VPWCellUIControl.xaml.cs 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. using OpenSEMI.ClientBase;
  2. using MECF.Framework.Common.OperationCenter;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace PunkHPX8_Themes.UserControls
  18. {
  19. /// <summary>
  20. /// VPWCellUIControl.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class VPWCellUIControl : UserControl
  23. {
  24. public VPWCellUIControl()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  29. "ModuleName", typeof(string), typeof(VPWCellUIControl),
  30. new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  31. /// <summary>
  32. /// 模块名称
  33. /// </summary>
  34. public string ModuleName
  35. {
  36. get
  37. {
  38. return (string)this.GetValue(ModuleNameProperty);
  39. }
  40. set
  41. {
  42. this.SetValue(ModuleNameProperty, value);
  43. }
  44. }
  45. public static readonly DependencyProperty WaferInfoProperty = DependencyProperty.Register(
  46. "WaferInfo", typeof(WaferInfo), typeof(VPWCellUIControl));
  47. /// <summary>
  48. /// WaferInfo
  49. /// </summary>
  50. public WaferInfo WaferInfo
  51. {
  52. get
  53. {
  54. return (WaferInfo)this.GetValue(WaferInfoProperty);
  55. }
  56. set
  57. {
  58. this.SetValue(WaferInfoProperty, value);
  59. }
  60. }
  61. public static readonly DependencyProperty DripValveProerty = DependencyProperty.Register(
  62. "DripValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  63. /// <summary>
  64. /// DripValve
  65. /// </summary>
  66. public bool DripValve
  67. {
  68. get
  69. {
  70. return (bool)this.GetValue(DripValveProerty);
  71. }
  72. set
  73. {
  74. this.SetValue(DripValveProerty, value);
  75. }
  76. }
  77. public static readonly DependencyProperty SmallValveProerty = DependencyProperty.Register(
  78. "SmallValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  79. /// <summary>
  80. /// SmallValve
  81. /// </summary>
  82. public bool SmallValve
  83. {
  84. get
  85. {
  86. return (bool)this.GetValue(SmallValveProerty);
  87. }
  88. set
  89. {
  90. this.SetValue(SmallValveProerty, value);
  91. }
  92. }
  93. public static readonly DependencyProperty LargeValveProerty = DependencyProperty.Register(
  94. "LargeValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  95. /// <summary>
  96. /// LargeValve
  97. /// </summary>
  98. public bool LargeValve
  99. {
  100. get
  101. {
  102. return (bool)this.GetValue(LargeValveProerty);
  103. }
  104. set
  105. {
  106. this.SetValue(LargeValveProerty, value);
  107. }
  108. }
  109. public static readonly DependencyProperty VentValveProerty = DependencyProperty.Register(
  110. "VentValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  111. /// <summary>
  112. /// VentValve
  113. /// </summary>
  114. public bool VentValve
  115. {
  116. get
  117. {
  118. return (bool)this.GetValue(VentValveProerty);
  119. }
  120. set
  121. {
  122. this.SetValue(VentValveProerty, value);
  123. }
  124. }
  125. public static readonly DependencyProperty DrainValveProerty = DependencyProperty.Register(
  126. "DrainValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  127. /// <summary>
  128. /// DrainValve
  129. /// </summary>
  130. public bool DrainValve
  131. {
  132. get
  133. {
  134. return (bool)this.GetValue(DrainValveProerty);
  135. }
  136. set
  137. {
  138. this.SetValue(DrainValveProerty, value);
  139. }
  140. }
  141. public static readonly DependencyProperty VacuumValveProerty = DependencyProperty.Register(
  142. "VacuumValve", typeof(bool), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  143. /// <summary>
  144. /// VacuumValve
  145. /// </summary>
  146. public bool VacuumValve
  147. {
  148. get
  149. {
  150. return (bool)this.GetValue(VacuumValveProerty);
  151. }
  152. set
  153. {
  154. this.SetValue(VacuumValveProerty, value);
  155. }
  156. }
  157. public static readonly DependencyProperty DIWLoopDoProperty = DependencyProperty.Register(
  158. "DIWLoopDo", typeof(double), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  159. /// <summary>
  160. /// DIWLoopDo
  161. /// </summary>
  162. public double DIWLoopDo
  163. {
  164. get
  165. {
  166. return (double)this.GetValue(DIWLoopDoProperty);
  167. }
  168. set
  169. {
  170. this.SetValue(DIWLoopDoProperty, value);
  171. }
  172. }
  173. public static readonly DependencyProperty DIWFlowProperty = DependencyProperty.Register(
  174. "DIWFlow", typeof(double), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  175. /// <summary>
  176. /// DIWFlow
  177. /// </summary>
  178. public double DIWFlow
  179. {
  180. get
  181. {
  182. return (double)this.GetValue(DIWFlowProperty);
  183. }
  184. set
  185. {
  186. this.SetValue(DIWFlowProperty, value);
  187. }
  188. }
  189. public static readonly DependencyProperty CellVacuumProperty = DependencyProperty.Register(
  190. "CellVacuum", typeof(double), typeof(VPWCellUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  191. /// <summary>
  192. /// CellVacuum
  193. /// </summary>
  194. public double CellVacuum
  195. {
  196. get
  197. {
  198. return (double)this.GetValue(CellVacuumProperty);
  199. }
  200. set
  201. {
  202. this.SetValue(CellVacuumProperty, value);
  203. }
  204. }
  205. private void OpenDripValve_Click(object sender, RoutedEventArgs e)
  206. {
  207. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowDripOn");
  208. }
  209. private void CloseDripValve_Click(object sender, RoutedEventArgs e)
  210. {
  211. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowDripOff");
  212. }
  213. private void OpenSmallValve_Click(object sender, RoutedEventArgs e)
  214. {
  215. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowSmallOn");
  216. }
  217. private void CloseSmallValve_Click(object sender, RoutedEventArgs e)
  218. {
  219. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowSmallOff");
  220. }
  221. private void OpenLargeValve_Click(object sender, RoutedEventArgs e)
  222. {
  223. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowLargeOn");
  224. }
  225. private void CloseLargeValve_Click(object sender, RoutedEventArgs e)
  226. {
  227. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.FlowLargeOff");
  228. }
  229. private void OpenVentValve_Click(object sender, RoutedEventArgs e)
  230. {
  231. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VentValveOn");
  232. }
  233. private void CloseVentValve_Click(object sender, RoutedEventArgs e)
  234. {
  235. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VentValveOff");
  236. }
  237. private void OpenDrainValve_Click(object sender, RoutedEventArgs e)
  238. {
  239. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DrainValveOn");
  240. }
  241. private void CloseDrainValve_Click(object sender, RoutedEventArgs e)
  242. {
  243. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DrainValveOff");
  244. }
  245. private void OpenCellVacuumValve_Click(object sender, RoutedEventArgs e)
  246. {
  247. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumValveOn");
  248. }
  249. private void CloseCellVacuumValve_Click(object sender, RoutedEventArgs e)
  250. {
  251. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumValveOff");
  252. }
  253. }
  254. }