VPWMainUIControl.xaml.cs 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. namespace PunkHPX8_Themes.UserControls
  17. {
  18. /// <summary>
  19. /// VPWMainUIControl.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class VPWMainUIControl : UserControl
  22. {
  23. public VPWMainUIControl()
  24. {
  25. InitializeComponent();
  26. }
  27. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  28. "ModuleName", typeof(string), typeof(VPWMainUIControl),
  29. new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  30. /// <summary>
  31. /// 模块名称
  32. /// </summary>
  33. public string ModuleName
  34. {
  35. get
  36. {
  37. return (string)this.GetValue(ModuleNameProperty);
  38. }
  39. set
  40. {
  41. this.SetValue(ModuleNameProperty, value);
  42. }
  43. }
  44. public static readonly DependencyProperty DIWProcessValveProerty = DependencyProperty.Register(
  45. "DIWProcessValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  46. /// <summary>
  47. /// DIWProcessValve
  48. /// </summary>
  49. public bool DIWProcessValve
  50. {
  51. get
  52. {
  53. return (bool)this.GetValue(DIWProcessValveProerty);
  54. }
  55. set
  56. {
  57. this.SetValue(DIWProcessValveProerty, value);
  58. }
  59. }
  60. public static readonly DependencyProperty DIWDegasValveProerty = DependencyProperty.Register(
  61. "DIWDegasValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  62. /// <summary>
  63. /// DIWDegasValve
  64. /// </summary>
  65. public bool DIWDegasValve
  66. {
  67. get
  68. {
  69. return (bool)this.GetValue(DIWDegasValveProerty);
  70. }
  71. set
  72. {
  73. this.SetValue(DIWDegasValveProerty, value);
  74. }
  75. }
  76. public static readonly DependencyProperty DegasAdjustValveProerty = DependencyProperty.Register(
  77. "DegasAdjustValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  78. /// <summary>
  79. /// DegasAdjustValve
  80. /// </summary>
  81. public bool DegasAdjustValve
  82. {
  83. get
  84. {
  85. return (bool)this.GetValue(DegasAdjustValveProerty);
  86. }
  87. set
  88. {
  89. this.SetValue(DegasAdjustValveProerty, value);
  90. }
  91. }
  92. public static readonly DependencyProperty VPW1VACValveProerty = DependencyProperty.Register(
  93. "VPW1VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  94. /// <summary>
  95. /// VPW1VACValve
  96. /// </summary>
  97. public bool VPW1VACValve
  98. {
  99. get
  100. {
  101. return (bool)this.GetValue(VPW1VACValveProerty);
  102. }
  103. set
  104. {
  105. this.SetValue(VPW1VACValveProerty, value);
  106. }
  107. }
  108. public static readonly DependencyProperty VPW2VACValveProerty = DependencyProperty.Register(
  109. "VPW2VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  110. /// <summary>
  111. /// VPW2VACValve
  112. /// </summary>
  113. public bool VPW2VACValve
  114. {
  115. get
  116. {
  117. return (bool)this.GetValue(VPW2VACValveProerty);
  118. }
  119. set
  120. {
  121. this.SetValue(VPW2VACValveProerty, value);
  122. }
  123. }
  124. public static readonly DependencyProperty IsBoosterPumpOpenProerty = DependencyProperty.Register(
  125. "IsBoosterPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  126. /// <summary>
  127. /// IsBoosterPumpOpen
  128. /// </summary>
  129. public bool IsBoosterPumpOpen
  130. {
  131. get
  132. {
  133. return (bool)this.GetValue(IsBoosterPumpOpenProerty);
  134. }
  135. set
  136. {
  137. this.SetValue(IsBoosterPumpOpenProerty, value);
  138. }
  139. }
  140. public static readonly DependencyProperty IsDegasPumpOpenProerty = DependencyProperty.Register(
  141. "IsDegasPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  142. /// <summary>
  143. /// IsDegasPumpOpen
  144. /// </summary>
  145. public bool IsDegasPumpOpen
  146. {
  147. get
  148. {
  149. return (bool)this.GetValue(IsDegasPumpOpenProerty);
  150. }
  151. set
  152. {
  153. this.SetValue(IsDegasPumpOpenProerty, value);
  154. }
  155. }
  156. public static readonly DependencyProperty IsVacuumPumpOpenProerty = DependencyProperty.Register(
  157. "IsVacuumPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  158. /// <summary>
  159. ///IsVacuumPumpOpen
  160. /// </summary>
  161. public bool IsVacuumPumpOpen
  162. {
  163. get
  164. {
  165. return (bool)this.GetValue(IsVacuumPumpOpenProerty);
  166. }
  167. set
  168. {
  169. this.SetValue(IsVacuumPumpOpenProerty, value);
  170. }
  171. }
  172. public static readonly DependencyProperty TotalFlowProperty = DependencyProperty.Register(
  173. "TotalFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  174. /// <summary>
  175. /// TotalFlow
  176. /// </summary>
  177. public double TotalFlow
  178. {
  179. get
  180. {
  181. return (double)this.GetValue(TotalFlowProperty);
  182. }
  183. set
  184. {
  185. this.SetValue(TotalFlowProperty, value);
  186. }
  187. }
  188. public static readonly DependencyProperty Cell1DIWFlowProperty = DependencyProperty.Register(
  189. "Cell1DIWFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  190. /// <summary>
  191. /// Cell1DIWFlow
  192. /// </summary>
  193. public double Cell1DIWFlow
  194. {
  195. get
  196. {
  197. return (double)this.GetValue(Cell1DIWFlowProperty);
  198. }
  199. set
  200. {
  201. this.SetValue(Cell1DIWFlowProperty, value);
  202. }
  203. }
  204. public static readonly DependencyProperty Cell2DIWFlowProperty = DependencyProperty.Register(
  205. "Cell2DIWFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
  206. /// <summary>
  207. /// Cell2DIWFlow
  208. /// </summary>
  209. public double Cell2DIWFlow
  210. {
  211. get
  212. {
  213. return (double)this.GetValue(Cell2DIWFlowProperty);
  214. }
  215. set
  216. {
  217. this.SetValue(Cell2DIWFlowProperty, value);
  218. }
  219. }
  220. private void OpenDIWProcessValve_Click(object sender, RoutedEventArgs e)
  221. {
  222. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwProcessOn");
  223. }
  224. private void CloseDIWProcessValve_Click(object sender, RoutedEventArgs e)
  225. {
  226. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwProcessOff");
  227. }
  228. private void OpenDIWDegasValve_Click(object sender, RoutedEventArgs e)
  229. {
  230. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOn");
  231. }
  232. private void CloseDIWDegasValve_Click(object sender, RoutedEventArgs e)
  233. {
  234. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOff");
  235. }
  236. private void OpenDegasAdjustValve_Click(object sender, RoutedEventArgs e)
  237. {
  238. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  239. }
  240. private void CloseDegasAdjustValve_Click(object sender, RoutedEventArgs e)
  241. {
  242. InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOff");
  243. }
  244. private void OpenVPW1VACValve_Click(object sender, RoutedEventArgs e)
  245. {
  246. //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  247. }
  248. private void CloseVPW1VACValve_Click(object sender, RoutedEventArgs e)
  249. {
  250. //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  251. }
  252. private void OpenVPW2VACValve_Click(object sender, RoutedEventArgs e)
  253. {
  254. //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  255. }
  256. private void CloseVPW2VACValve_Click(object sender, RoutedEventArgs e)
  257. {
  258. //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
  259. }
  260. }
  261. }