Add project files.

This commit is contained in:
Daniel Clark
2022-11-01 15:26:08 +00:00
parent daa7b59f22
commit 7e4f880821
408 changed files with 16863 additions and 0 deletions
@@ -0,0 +1,36 @@
using System;
using System.Windows;
using TheXamlGuy.UI;
using TheXamlGuy.Framework.Core;
using TheXamlGuy.Framework.Microcontroller;
namespace TheXamlGuy.Framework.WPF;
public class InteractiveFrameButton : DependencyObject
{
public static DependencyProperty PlacementProperty =
DependencyProperty.Register(nameof(Type),
typeof(InteractiveFrameButtonPlacement), typeof(InteractiveFrameButton));
public event TypedEventHandler<InteractiveFrameButton, InteractiveFrameButtonInvokedArgs>? Invoked;
public InteractiveFrameButtonPlacement Placement
{
get => (InteractiveFrameButtonPlacement)GetValue(PlacementProperty);
set => SetValue(PlacementProperty, value);
}
public void Register(IEventAggregator eventAggregator)
{
eventAggregator.SubscribeUI<CapactiveSensor>(args =>
{
if ((int)args.Placement == (int)Placement)
{
if (args.State == SensorState.On)
{
Invoked?.Invoke(this, new InteractiveFrameButtonInvokedArgs());
}
}
});
}
}