VPWMainUIControl.xaml.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. using MECF.Framework.Common.OperationCenter;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. using OpenSEMI.ClientBase;
  17. namespace PunkHPX8_Themes.UserControls
  18. {
  19. /// <summary>
  20. /// VPWMainUIControl.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class VPWMainUIControl : UserControl
  23. {
  24. public VPWMainUIControl()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  29. "ModuleName", typeof(string), typeof(VPWMainUIControl),
  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 DIWProcessValveProerty = DependencyProperty.Register(
  46. "DIWProcessValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  47. /// <summary>
  48. /// DIWProcessValve
  49. /// </summary>
  50. public bool DIWProcessValve
  51. {
  52. get
  53. {
  54. return (bool)this.GetValue(DIWProcessValveProerty);
  55. }
  56. set
  57. {
  58. this.SetValue(DIWProcessValveProerty, value);
  59. }
  60. }
  61. public static readonly DependencyProperty DIWDegasValveProerty = DependencyProperty.Register(
  62. "DIWDegasValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  63. /// <summary>
  64. /// DIWDegasValve
  65. /// </summary>
  66. public bool DIWDegasValve
  67. {
  68. get
  69. {
  70. return (bool)this.GetValue(DIWDegasValveProerty);
  71. }
  72. set
  73. {
  74. this.SetValue(DIWDegasValveProerty, value);
  75. }
  76. }
  77. public static readonly DependencyProperty DegasAdjustValveProerty = DependencyProperty.Register(
  78. "DegasAdjustValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  79. /// <summary>
  80. /// DegasAdjustValve
  81. /// </summary>
  82. public bool DegasAdjustValve
  83. {
  84. get
  85. {
  86. return (bool)this.GetValue(DegasAdjustValveProerty);
  87. }
  88. set
  89. {
  90. this.SetValue(DegasAdjustValveProerty, value);
  91. }
  92. }
  93. public static readonly DependencyProperty VPW1VACValveProerty = DependencyProperty.Register(
  94. "VPW1VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  95. /// <summary>
  96. /// VPW1VACValve
  97. /// </summary>
  98. public bool VPW1VACValve
  99. {
  100. get
  101. {
  102. return (bool)this.GetValue(VPW1VACValveProerty);
  103. }
  104. set
  105. {
  106. this.SetValue(VPW1VACValveProerty, value);
  107. }
  108. }
  109. public static readonly DependencyProperty VPW2VACValveProerty = DependencyProperty.Register(
  110. "VPW2VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  111. /// <summary>
  112. /// VPW2VACValve
  113. /// </summary>
  114. public bool VPW2VACValve
  115. {
  116. get
  117. {
  118. return (bool)this.GetValue(VPW2VACValveProerty);
  119. }
  120. set
  121. {
  122. this.SetValue(VPW2VACValveProerty, value);
  123. }
  124. }
  125. public static readonly DependencyProperty IsBoosterPumpOpenProerty = DependencyProperty.Register(
  126. "IsBoosterPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  127. /// <summary>
  128. /// IsBoosterPumpOpen
  129. /// </summary>
  130. public bool IsBoosterPumpOpen
  131. {
  132. get
  133. {
  134. return (bool)this.GetValue(IsBoosterPumpOpenProerty);
  135. }
  136. set
  137. {
  138. this.SetValue(IsBoosterPumpOpenProerty, value);
  139. }
  140. }
  141. public static readonly DependencyProperty IsDegasPumpOpenProerty = DependencyProperty.Register(
  142. "IsDegasPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  143. /// <summary>
  144. /// IsDegasPumpOpen
  145. /// </summary>
  146. public bool IsDegasPumpOpen
  147. {
  148. get
  149. {
  150. return (bool)this.GetValue(IsDegasPumpOpenProerty);
  151. }
  152. set
  153. {
  154. this.SetValue(IsDegasPumpOpenProerty, value);
  155. }
  156. }
  157. public static readonly DependencyProperty IsVacuumPumpOpenProerty = DependencyProperty.Register(
  158. "IsVacuumPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  159. /// <summary>
  160. ///IsVacuumPumpOpen
  161. /// </summary>
  162. public bool IsVacuumPumpOpen
  163. {
  164. get
  165. {
  166. return (bool)this.GetValue(IsVacuumPumpOpenProerty);
  167. }
  168. set
  169. {
  170. this.SetValue(IsVacuumPumpOpenProerty, value);
  171. }
  172. }
  173. public static readonly DependencyProperty TotalFlowProperty = DependencyProperty.Register(
  174. "TotalFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  175. /// <summary>
  176. /// TotalFlow
  177. /// </summary>
  178. public double TotalFlow
  179. {
  180. get
  181. {
  182. return (double)this.GetValue(TotalFlowProperty);
  183. }
  184. set
  185. {
  186. this.SetValue(TotalFlowProperty, value);
  187. }
  188. }
  189. public static readonly DependencyProperty Cell1DIWFlowProperty = DependencyProperty.Register(
  190. "Cell1DIWFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  191. /// <summary>
  192. /// Cell1DIWFlow
  193. /// </summary>
  194. public double Cell1DIWFlow
  195. {
  196. get
  197. {
  198. return (double)this.GetValue(Cell1DIWFlowProperty);
  199. }
  200. set
  201. {
  202. this.SetValue(Cell1DIWFlowProperty, value);
  203. }
  204. }
  205. public static readonly DependencyProperty Cell2DIWFlowProperty = DependencyProperty.Register(
  206. "Cell2DIWFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  207. /// <summary>
  208. /// Cell2DIWFlow
  209. /// </summary>
  210. public double Cell2DIWFlow
  211. {
  212. get
  213. {
  214. return (double)this.GetValue(Cell2DIWFlowProperty);
  215. }
  216. set
  217. {
  218. this.SetValue(Cell2DIWFlowProperty, value);
  219. }
  220. }
  221. public static readonly DependencyProperty VPW1WaferInfoProperty = DependencyProperty.Register(
  222. "VPW1WaferInfo", typeof(WaferInfo), typeof(VPWMainUIControl));
  223. /// <summary>
  224. /// VPW1WaferInfo
  225. /// </summary>
  226. public WaferInfo VPW1WaferInfo
  227. {
  228. get
  229. {
  230. return (WaferInfo)this.GetValue(VPW1WaferInfoProperty);
  231. }
  232. set
  233. {
  234. this.SetValue(VPW1WaferInfoProperty, value);
  235. }
  236. }
  237. public static readonly DependencyProperty VPW2WaferInfoProperty = DependencyProperty.Register(
  238. "VPW2WaferInfo", typeof(WaferInfo), typeof(VPWMainUIControl));
  239. /// <summary>
  240. /// VPW2WaferInfo
  241. /// </summary>
  242. public WaferInfo VPW2WaferInfo
  243. {
  244. get
  245. {
  246. return (WaferInfo)this.GetValue(VPW2WaferInfoProperty);
  247. }
  248. set
  249. {
  250. this.SetValue(VPW2WaferInfoProperty, value);
  251. }
  252. }
  253. private void OpenDIWProcessValve_Click(object sender, RoutedEventArgs e)
  254. {
  255. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwProcessOn");
  256. }
  257. private void CloseDIWProcessValve_Click(object sender, RoutedEventArgs e)
  258. {
  259. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwProcessOff");
  260. }
  261. private void OpenDIWDegasValve_Click(object sender, RoutedEventArgs e)
  262. {
  263. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOn");
  264. }
  265. private void CloseDIWDegasValve_Click(object sender, RoutedEventArgs e)
  266. {
  267. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOff");
  268. }
  269. private void OpenDegasAdjustValve_Click(object sender, RoutedEventArgs e)
  270. {
  271. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  272. }
  273. private void CloseDegasAdjustValve_Click(object sender, RoutedEventArgs e)
  274. {
  275. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOff");
  276. }
  277. private void OpenVPW1VACValve_Click(object sender, RoutedEventArgs e)
  278. {
  279. InvokeClient.Instance.Service.DoOperation($"VPW1.VacuumValveOn");
  280. }
  281. private void CloseVPW1VACValve_Click(object sender, RoutedEventArgs e)
  282. {
  283. InvokeClient.Instance.Service.DoOperation($"VPW1.VacuumValveOff");
  284. }
  285. private void OpenVPW2VACValve_Click(object sender, RoutedEventArgs e)
  286. {
  287. InvokeClient.Instance.Service.DoOperation($"VPW2.VacuumValveOn");
  288. }
  289. private void CloseVPW2VACValve_Click(object sender, RoutedEventArgs e)
  290. {
  291. InvokeClient.Instance.Service.DoOperation($"VPW2.VacuumValveOff");
  292. }
  293. }
  294. }