diff --git a/BPASmartClient.Academy/App.xaml.cs b/BPASmartClient.Academy/App.xaml.cs index 8da6032b..f22c92a9 100644 --- a/BPASmartClient.Academy/App.xaml.cs +++ b/BPASmartClient.Academy/App.xaml.cs @@ -47,7 +47,7 @@ namespace BPASmartClient.Academy Environment.Exit(0); } base.OnStartup(e); - SystemHelper.GetInstance.CreateDesktopShortcut(); + //SystemHelper.GetInstance.CreateDesktopShortcut(); DataInit(); MenuInit(); MainView mv = new MainView(); diff --git a/BPASmartClient.Academy/BPASmartClient.Academy.csproj b/BPASmartClient.Academy/BPASmartClient.Academy.csproj index a8400e6f..fffb170e 100644 --- a/BPASmartClient.Academy/BPASmartClient.Academy.csproj +++ b/BPASmartClient.Academy/BPASmartClient.Academy.csproj @@ -22,6 +22,7 @@ + diff --git a/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml b/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml new file mode 100644 index 00000000..014010d0 --- /dev/null +++ b/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml.cs b/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml.cs new file mode 100644 index 00000000..3ca8b70d --- /dev/null +++ b/BPASmartClient.Academy/CustomControls/ValveWithCommandState.xaml.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BPASmartClient.Academy.CustomControls +{ + /// + /// ValveWithCommandState.xaml 的交互逻辑 + /// + public partial class ValveWithCommandState : UserControl + { + public ValveWithCommandState() + { + InitializeComponent(); + } + + + + public bool OpenEnable + { + get { return (bool)GetValue(OpenEnableProperty); } + set { SetValue(OpenEnableProperty, value); } + } + /// + /// 阀门开关状态 + /// + public static readonly DependencyProperty OpenEnableProperty = + DependencyProperty.Register("OpenEnable", typeof(bool), typeof(ValveWithCommandState), new PropertyMetadata(false)); + + + + public Color EdgeColor + { + get { return (Color)GetValue(EdgeColorProperty); } + set { SetValue(EdgeColorProperty, value); } + } + /// + /// 阀门颜色 + /// + public static readonly DependencyProperty EdgeColorProperty = + DependencyProperty.Register("EdgeColor", typeof(Color), typeof(ValveWithCommandState), new PropertyMetadata(Color.FromArgb(byte.MaxValue, 91, 92, 95))); + + + + + + public Brush CommandColor + { + get { return (Brush)GetValue(CommandColorProperty); } + set { SetValue(CommandColorProperty, value); } + } + + // Using a DependencyProperty as the backing store for CommandColor. This enables animation, styling, binding, etc... + public static readonly DependencyProperty CommandColorProperty = + DependencyProperty.Register("CommandColor", typeof(Brush), typeof(ValveWithCommandState), new PropertyMetadata(Brushes.Red)); + + + } +} diff --git a/BPASmartClient.Academy/View/DeviceControlView.xaml b/BPASmartClient.Academy/View/DeviceControlView.xaml new file mode 100644 index 00000000..2d784bcc --- /dev/null +++ b/BPASmartClient.Academy/View/DeviceControlView.xaml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +