终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

71 líneas
2.1 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace BPASmartClient.Academy.CustomControls
  16. {
  17. /// <summary>
  18. /// ValveWithCommandState.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class ValveWithCommandState : UserControl
  21. {
  22. public ValveWithCommandState()
  23. {
  24. InitializeComponent();
  25. }
  26. public bool OpenEnable
  27. {
  28. get { return (bool)GetValue(OpenEnableProperty); }
  29. set { SetValue(OpenEnableProperty, value); }
  30. }
  31. /// <summary>
  32. /// 阀门开关状态
  33. /// </summary>
  34. public static readonly DependencyProperty OpenEnableProperty =
  35. DependencyProperty.Register("OpenEnable", typeof(bool), typeof(ValveWithCommandState), new PropertyMetadata(false));
  36. public Color EdgeColor
  37. {
  38. get { return (Color)GetValue(EdgeColorProperty); }
  39. set { SetValue(EdgeColorProperty, value); }
  40. }
  41. /// <summary>
  42. /// 阀门颜色
  43. /// </summary>
  44. public static readonly DependencyProperty EdgeColorProperty =
  45. DependencyProperty.Register("EdgeColor", typeof(Color), typeof(ValveWithCommandState), new PropertyMetadata(Color.FromArgb(byte.MaxValue, 91, 92, 95)));
  46. public Brush CommandColor
  47. {
  48. get { return (Brush)GetValue(CommandColorProperty); }
  49. set { SetValue(CommandColorProperty, value); }
  50. }
  51. // Using a DependencyProperty as the backing store for CommandColor. This enables animation, styling, binding, etc...
  52. public static readonly DependencyProperty CommandColorProperty =
  53. DependencyProperty.Register("CommandColor", typeof(Brush), typeof(ValveWithCommandState), new PropertyMetadata(Brushes.Red));
  54. }
  55. }