终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

80 lines
2.2 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.CustomResource.UserControls
  16. {
  17. /// <summary>
  18. /// HandValve.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class HandValve : UserControl
  21. {
  22. public HandValve()
  23. {
  24. InitializeComponent();
  25. }
  26. public static readonly DependencyProperty OpenEnableProperty = DependencyProperty.Register("OpenEnable", typeof(bool), typeof(HandValve), new PropertyMetadata(true));
  27. public static readonly DependencyProperty EdgeColorProperty = DependencyProperty.Register("EdgeColor", typeof(Color), typeof(HandValve), new PropertyMetadata(Color.FromArgb(byte.MaxValue, 91, 92, 95)));
  28. public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(HandValve), new PropertyMetadata(""));
  29. /// <summary>
  30. /// 获取或设置当前的阀门的开关状态
  31. /// </summary>
  32. public bool OpenEnable
  33. {
  34. get
  35. {
  36. return (bool)GetValue(OpenEnableProperty);
  37. }
  38. set
  39. {
  40. SetValue(OpenEnableProperty, value);
  41. }
  42. }
  43. /// <summary>
  44. /// 边缘的颜色
  45. /// </summary>
  46. public Color EdgeColor
  47. {
  48. get
  49. {
  50. return (Color)GetValue(EdgeColorProperty);
  51. }
  52. set
  53. {
  54. SetValue(EdgeColorProperty, value);
  55. }
  56. }
  57. /// <summary>
  58. /// 获取或设置控件的显示颜色
  59. /// </summary>
  60. public string Text
  61. {
  62. get
  63. {
  64. return (string)GetValue(TextProperty);
  65. }
  66. set
  67. {
  68. SetValue(TextProperty, value);
  69. }
  70. }
  71. }
  72. }