ResistivityProbeControl.xaml.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 CyberX8_Themes.UserControls
  16. {
  17. /// <summary>
  18. /// ResistivityProbeControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class ResistivityProbeControl : UserControl
  21. {
  22. #region 属性
  23. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  24. "ModuleName", typeof(string), typeof(ResistivityProbeControl),new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  25. /// <summary>
  26. /// 模块名称
  27. /// </summary>
  28. public string ModuleName
  29. {
  30. get
  31. {
  32. return (string)this.GetValue(ModuleNameProperty);
  33. }
  34. set
  35. {
  36. this.SetValue(ModuleNameProperty, value);
  37. }
  38. }
  39. public static readonly DependencyProperty ModuleTitleProperty = DependencyProperty.Register(
  40. "ModuleTitle", typeof(string), typeof(ResistivityProbeControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  41. /// <summary>
  42. /// 标题
  43. /// </summary>
  44. public string ModuleTitle
  45. {
  46. get
  47. {
  48. return (string)this.GetValue(ModuleTitleProperty);
  49. }
  50. set
  51. {
  52. this.SetValue(ModuleTitleProperty, value);
  53. }
  54. }
  55. public static readonly DependencyProperty IsConnectedProperty = DependencyProperty.Register(
  56. "IsConnected", typeof(bool), typeof(ResistivityProbeControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  57. /// <summary>
  58. /// 连接状态
  59. /// </summary>
  60. public bool IsConnected
  61. {
  62. get
  63. {
  64. return (bool)this.GetValue(IsConnectedProperty);
  65. }
  66. set
  67. {
  68. this.SetValue(IsConnectedProperty, value);
  69. }
  70. }
  71. public static readonly DependencyProperty ParentModuleProperty = DependencyProperty.Register(
  72. "ParentModule", typeof(string), typeof(ResistivityProbeControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  73. /// <summary>
  74. /// 父级模块
  75. /// </summary>
  76. public string ParentModule
  77. {
  78. get
  79. {
  80. return (string)this.GetValue(ParentModuleProperty);
  81. }
  82. set
  83. {
  84. this.SetValue(ParentModuleProperty, value);
  85. }
  86. }
  87. public static readonly DependencyProperty ResistivityValueProperty = DependencyProperty.Register(
  88. "ResistivityValue", typeof(string), typeof(ResistivityProbeControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  89. /// <summary>
  90. /// Resistivity value
  91. /// </summary>
  92. public string ResistivityValue
  93. {
  94. get
  95. {
  96. return (string)this.GetValue(ResistivityValueProperty);
  97. }
  98. set
  99. {
  100. this.SetValue(ResistivityValueProperty, value);
  101. }
  102. }
  103. #endregion
  104. /// <summary>
  105. /// 构造函数
  106. /// </summary>
  107. public ResistivityProbeControl()
  108. {
  109. InitializeComponent();
  110. }
  111. }
  112. }