GasPanelView.xaml.cs 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using Aitex.Core.Common.DeviceData;
  15. namespace Aitex.Triton160.UI.Views
  16. {
  17. /// <summary>
  18. /// GasBoxView.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class GasPanelView : UserControl
  21. {
  22. public static readonly DependencyProperty Gas1ValveProperty = DependencyProperty.Register(
  23. "Gas1Valve", typeof(AITValveData), typeof(GasPanelView),
  24. new FrameworkPropertyMetadata(new AITValveData(), FrameworkPropertyMetadataOptions.AffectsRender));
  25. public AITValveData Gas1Valve
  26. {
  27. get
  28. {
  29. return (AITValveData)this.GetValue(Gas1ValveProperty);
  30. }
  31. set
  32. {
  33. this.SetValue(Gas1ValveProperty, value);
  34. }
  35. }
  36. public static readonly DependencyProperty Gas2ValveProperty = DependencyProperty.Register(
  37. "Gas2Valve", typeof(AITValveData), typeof(GasPanelView),
  38. new FrameworkPropertyMetadata(new AITValveData(), FrameworkPropertyMetadataOptions.AffectsRender));
  39. public AITValveData Gas2Valve
  40. {
  41. get
  42. {
  43. return (AITValveData)this.GetValue(Gas2ValveProperty);
  44. }
  45. set
  46. {
  47. this.SetValue(Gas2ValveProperty, value);
  48. }
  49. }
  50. public static readonly DependencyProperty Gas3ValveProperty = DependencyProperty.Register(
  51. "Gas3Valve", typeof(AITValveData), typeof(GasPanelView),
  52. new FrameworkPropertyMetadata(new AITValveData(), FrameworkPropertyMetadataOptions.AffectsRender));
  53. public AITValveData Gas3Valve
  54. {
  55. get
  56. {
  57. return (AITValveData)this.GetValue(Gas3ValveProperty);
  58. }
  59. set
  60. {
  61. this.SetValue(Gas3ValveProperty, value);
  62. }
  63. }
  64. public static readonly DependencyProperty Gas4ValveProperty = DependencyProperty.Register(
  65. "Gas4Valve", typeof(AITValveData), typeof(GasPanelView),
  66. new FrameworkPropertyMetadata(new AITValveData(), FrameworkPropertyMetadataOptions.AffectsRender));
  67. public AITValveData Gas4Valve
  68. {
  69. get
  70. {
  71. return (AITValveData)this.GetValue(Gas4ValveProperty);
  72. }
  73. set
  74. {
  75. this.SetValue(Gas4ValveProperty, value);
  76. }
  77. }
  78. public static readonly DependencyProperty Gas5ValveProperty = DependencyProperty.Register(
  79. "Gas5Valve", typeof(AITValveData), typeof(GasPanelView),
  80. new FrameworkPropertyMetadata(new AITValveData(), FrameworkPropertyMetadataOptions.AffectsRender));
  81. public AITValveData Gas5Valve
  82. {
  83. get
  84. {
  85. return (AITValveData)this.GetValue(Gas5ValveProperty);
  86. }
  87. set
  88. {
  89. this.SetValue(Gas5ValveProperty, value);
  90. }
  91. }
  92. public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(
  93. "Command", typeof(ICommand), typeof(GasPanelView),
  94. new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
  95. public ICommand Command
  96. {
  97. get
  98. {
  99. return (ICommand)this.GetValue(CommandProperty);
  100. }
  101. set
  102. {
  103. this.SetValue(CommandProperty, value);
  104. }
  105. }
  106. public static readonly DependencyProperty Gas1MFCProperty = DependencyProperty.Register(
  107. "Gas1MFC", typeof(AITMfcData), typeof(GasPanelView),
  108. new FrameworkPropertyMetadata(new AITMfcData(), FrameworkPropertyMetadataOptions.AffectsRender));
  109. public AITMfcData Gas1MFC
  110. {
  111. get
  112. {
  113. return (AITMfcData)this.GetValue(Gas1MFCProperty);
  114. }
  115. set
  116. {
  117. this.SetValue(Gas1MFCProperty, value);
  118. }
  119. }
  120. public static readonly DependencyProperty Gas2MFCProperty = DependencyProperty.Register(
  121. "Gas2MFC", typeof(AITMfcData), typeof(GasPanelView),
  122. new FrameworkPropertyMetadata(new AITMfcData(), FrameworkPropertyMetadataOptions.AffectsRender));
  123. public AITMfcData Gas2MFC
  124. {
  125. get
  126. {
  127. return (AITMfcData)this.GetValue(Gas2MFCProperty);
  128. }
  129. set
  130. {
  131. this.SetValue(Gas2MFCProperty, value);
  132. }
  133. }
  134. public static readonly DependencyProperty Gas3MFCProperty = DependencyProperty.Register(
  135. "Gas3MFC", typeof(AITMfcData), typeof(GasPanelView),
  136. new FrameworkPropertyMetadata(new AITMfcData(), FrameworkPropertyMetadataOptions.AffectsRender));
  137. public AITMfcData Gas3MFC
  138. {
  139. get
  140. {
  141. return (AITMfcData)this.GetValue(Gas3MFCProperty);
  142. }
  143. set
  144. {
  145. this.SetValue(Gas3MFCProperty, value);
  146. }
  147. }
  148. public static readonly DependencyProperty Gas4MFCProperty = DependencyProperty.Register(
  149. "Gas4MFC", typeof(AITMfcData), typeof(GasPanelView),
  150. new FrameworkPropertyMetadata(new AITMfcData(), FrameworkPropertyMetadataOptions.AffectsRender));
  151. public AITMfcData Gas4MFC
  152. {
  153. get
  154. {
  155. return (AITMfcData)this.GetValue(Gas4MFCProperty);
  156. }
  157. set
  158. {
  159. this.SetValue(Gas4MFCProperty, value);
  160. }
  161. }
  162. public static readonly DependencyProperty Gas5MFCProperty = DependencyProperty.Register(
  163. "Gas5MFC", typeof(AITMfcData), typeof(GasPanelView),
  164. new FrameworkPropertyMetadata(new AITMfcData(), FrameworkPropertyMetadataOptions.AffectsRender));
  165. public AITMfcData Gas5MFC
  166. {
  167. get
  168. {
  169. return (AITMfcData)this.GetValue(Gas5MFCProperty);
  170. }
  171. set
  172. {
  173. this.SetValue(Gas5MFCProperty, value);
  174. }
  175. }
  176. public static readonly DependencyProperty Gas1VisibleProperty = DependencyProperty.Register(
  177. "Gas1Visible", typeof(Visibility), typeof(GasPanelView),
  178. new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsRender));
  179. public Visibility Gas1Visible
  180. {
  181. get
  182. {
  183. return (Visibility)this.GetValue(Gas1VisibleProperty);
  184. }
  185. set
  186. {
  187. this.SetValue(Gas1VisibleProperty, value);
  188. }
  189. }
  190. public static readonly DependencyProperty Gas2VisibleProperty = DependencyProperty.Register(
  191. "Gas2Visible", typeof(Visibility), typeof(GasPanelView),
  192. new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsRender));
  193. public Visibility Gas2Visible
  194. {
  195. get
  196. {
  197. return (Visibility)this.GetValue(Gas2VisibleProperty);
  198. }
  199. set
  200. {
  201. this.SetValue(Gas2VisibleProperty, value);
  202. }
  203. }
  204. public static readonly DependencyProperty Gas3VisibleProperty = DependencyProperty.Register(
  205. "Gas3Visible", typeof(Visibility), typeof(GasPanelView),
  206. new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsRender));
  207. public Visibility Gas3Visible
  208. {
  209. get
  210. {
  211. return (Visibility)this.GetValue(Gas3VisibleProperty);
  212. }
  213. set
  214. {
  215. this.SetValue(Gas3VisibleProperty, value);
  216. }
  217. }
  218. public static readonly DependencyProperty Gas4VisibleProperty = DependencyProperty.Register(
  219. "Gas4Visible", typeof(Visibility), typeof(GasPanelView),
  220. new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsRender));
  221. public Visibility Gas4Visible
  222. {
  223. get
  224. {
  225. return (Visibility)this.GetValue(Gas4VisibleProperty);
  226. }
  227. set
  228. {
  229. this.SetValue(Gas4VisibleProperty, value);
  230. }
  231. }
  232. public static readonly DependencyProperty Gas5VisibleProperty = DependencyProperty.Register(
  233. "Gas5Visible", typeof(Visibility), typeof(GasPanelView),
  234. new FrameworkPropertyMetadata(Visibility.Visible, FrameworkPropertyMetadataOptions.AffectsRender));
  235. public Visibility Gas5Visible
  236. {
  237. get
  238. {
  239. return (Visibility)this.GetValue(Gas5VisibleProperty);
  240. }
  241. set
  242. {
  243. this.SetValue(Gas5VisibleProperty, value);
  244. }
  245. }
  246. public GasPanelView()
  247. {
  248. InitializeComponent();
  249. }
  250. }
  251. }