78 lines
2.6 KiB
C#
78 lines
2.6 KiB
C#
namespace Common.UI.Controls
|
|
{
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
public partial class SIRT : Grid
|
|
{
|
|
public SIRT() => this.InitializeComponent();
|
|
|
|
public ICommand Activated
|
|
{
|
|
get => this.GetValue(ConnectedProeprty) as ICommand;
|
|
set => this.SetValue(ConnectedProeprty, value);
|
|
}
|
|
|
|
public ICommand Connected
|
|
{
|
|
get => this.GetValue(ConnectedProeprty) as ICommand;
|
|
set => this.SetValue(ConnectedProeprty, value);
|
|
}
|
|
|
|
public ICommand Disconnected
|
|
{
|
|
get => this.GetValue(DisconnectedProeprty) as ICommand;
|
|
set => this.SetValue(DisconnectedProeprty, value);
|
|
}
|
|
|
|
private void Button_Click(System.Object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public partial class SIRT
|
|
{
|
|
public static readonly DependencyProperty ActivatedProeprty = DependencyProperty.Register(
|
|
name: nameof(Activated)
|
|
, propertyType: typeof(ICommand)
|
|
, ownerType: typeof(SIRT)
|
|
, typeMetadata: new FrameworkPropertyMetadata(
|
|
defaultValue: null
|
|
, propertyChangedCallback: ActivatedPropertyChanged));
|
|
|
|
public static readonly DependencyProperty ConnectedProeprty = DependencyProperty.Register(
|
|
name: nameof(Connected)
|
|
, propertyType: typeof(ICommand)
|
|
, ownerType: typeof(SIRT)
|
|
, typeMetadata: new FrameworkPropertyMetadata(
|
|
defaultValue: null
|
|
, propertyChangedCallback: ConnectedCommandPropertyChanged));
|
|
|
|
public static readonly DependencyProperty DisconnectedProeprty = DependencyProperty.Register(
|
|
name: nameof(Disconnected)
|
|
, propertyType: typeof(ICommand)
|
|
, ownerType: typeof(SIRT)
|
|
, typeMetadata: new FrameworkPropertyMetadata(
|
|
defaultValue: null
|
|
, propertyChangedCallback: DisconnectedPropertyChanged));
|
|
|
|
private static void ActivatedPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
private static void ConnectedCommandPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
|
|
{
|
|
|
|
}
|
|
|
|
private static void DisconnectedPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|