N2PurgeEditViewModel.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. using Aitex.Core.RT.SCCore;
  2. using Aitex.Core.Util;
  3. using Caliburn.Micro;
  4. using DocumentFormat.OpenXml.Drawing;
  5. using FurnaceUI.Client.Dialog;
  6. using MECF.Framework.Common.DataCenter;
  7. using MECF.Framework.Common.OperationCenter;
  8. using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
  9. using MECF.Framework.UI.Client.CenterViews.Dialogs;
  10. using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
  11. using MECF.Framework.UI.Client.ClientBase;
  12. using OpenSEMI.ClientBase;
  13. using OxyPlot;
  14. using OxyPlot.Axes;
  15. using OxyPlot.Series;
  16. using System;
  17. using System.Collections.Generic;
  18. using System.Collections.ObjectModel;
  19. using System.Globalization;
  20. using System.Linq;
  21. using System.Text;
  22. using System.Threading;
  23. using System.Threading.Tasks;
  24. using System.Windows;
  25. using System.Windows.Controls;
  26. using System.Windows.Data;
  27. namespace FurnaceUI.Views.Parameter
  28. {
  29. public class N2PurgeEditViewModel : ModuleUiViewModelBase
  30. {
  31. public bool IsPermission { get => this.Permission == 3; }
  32. public string TransferRoomVisibleBackGround { get; set; } = "#FF7DABD4";
  33. public string FOUPOpenVisibleBackGround { get; set; } = "#FF7DABD4";
  34. public string O2DetectorVisibleBackGround { get; set; } = "#FF7DABD4";
  35. public string ClampOFFVisibleBackGround { get; set; } = "#FF7DABD4";
  36. public string FurnaceOpenVisibleBackGround { get; set; } = "#FF7DABD4";
  37. public string OperationCheckVisibleBackGround { get; set; } = "#FF7DABD4";
  38. public string O2DensityQuickDownVisibleBackGround { get; set; } = "#FF7DABD4";
  39. public string FoupEnterVisibleBackGround { get; set; } = "#FF7DABD4";
  40. public string WaferChargeVisibleBackGround { get; set; } = "#FF7DABD4";
  41. public string BoatLoadVisibleBackGround { get; set; } = "#FF7DABD4";
  42. public string FoupInhibitAfterVisibleBackGround { get; set; } = "#FF7DABD4";
  43. public string BoatUnloadVisibleBackGround { get; set; } = "#FF7DABD4";
  44. public string BoatUnloadPreVisibleBackGround { get; set; } = "#FF7DABD4";
  45. public string WaferCoolingVisibleBackGround { get; set; } = "#FF7DABD4";
  46. public string WaferDishargeVisibleBackGround { get; set; } = "#FF7DABD4";
  47. public List<ParamBase> ParameterTree { get; set; } = new List<ParamBase>();
  48. public RecipeDataBase CurrentRecipe { get; set; } = new RecipeDataBase();
  49. public ObservableCollection<TempSetData> HeadLst { get; set; } = new ObservableCollection<TempSetData>();
  50. public ObservableCollection<TempSetData> PIDHeadLst { get; set; } = new ObservableCollection<TempSetData>();
  51. private ConfigNode levelOneNode;
  52. public ConfigNode LevelOneNode
  53. {
  54. get { return levelOneNode; }
  55. set { levelOneNode = value; this.NotifyOfPropertyChange(nameof(LevelOneNode)); }
  56. }
  57. private ConfigNode levelTwoNode;
  58. public ConfigNode LevelTwoNode
  59. {
  60. get { return levelTwoNode; }
  61. set { levelTwoNode = value; this.NotifyOfPropertyChange(nameof(LevelTwoNode)); }
  62. }
  63. private List<ConfigItem> currenItems;
  64. public List<ConfigItem> CurrenItems
  65. {
  66. get { return currenItems; }
  67. set { currenItems = value; this.NotifyOfPropertyChange(nameof(CurrenItems)); }
  68. }
  69. private List<ConfigNode> _ConfigNodes = new List<ConfigNode>();
  70. public List<ConfigNode> ConfigNodes
  71. {
  72. get { return _ConfigNodes; }
  73. set { _ConfigNodes = value; NotifyOfPropertyChange("ConfigNodes"); }
  74. }
  75. private string _defaultUnit = "Pa";
  76. public string DefaultUnit
  77. {
  78. get
  79. {
  80. return _defaultUnit;
  81. }
  82. set
  83. {
  84. _defaultUnit = value;
  85. NotifyOfPropertyChange("DefaultUnit");
  86. }
  87. }
  88. private ConfigNode _rootNode;
  89. private string _CurrentNodeName = string.Empty;
  90. private string path;
  91. private string currentValue;
  92. private ObservableCollection<PageValue> valueList { get; set; } = new ObservableCollection<PageValue>();
  93. private PlotModel o2Model;
  94. public PlotModel O2Model
  95. {
  96. get { return o2Model; }
  97. set { o2Model = value; NotifyOfPropertyChange("O2Model"); }
  98. }
  99. private PlotModel n2Model;
  100. public PlotModel N2Model
  101. {
  102. get { return n2Model; }
  103. set { n2Model = value; NotifyOfPropertyChange("N2Model"); }
  104. }
  105. [Subscription("PM1.ConcentrationO2.Value")]
  106. public double ConcentrationO2Value { get; set; }
  107. [Subscription("PM1.MFC51.Feedback")]
  108. public double MFC51Feedback { get; set; }
  109. [Subscription("PM1.MFM57.Feedback")]
  110. public double MFM57Feedback { get; set; }
  111. protected override void OnInitialize()
  112. {
  113. base.OnInitialize();
  114. this.SystemName = "System";
  115. ConfigNodes = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
  116. InitTree();
  117. _rootNode = SystemConfigProvider.Instance.GetConfig(true);
  118. }
  119. protected override void OnActivate()
  120. {
  121. base.OnActivate();
  122. DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
  123. GetO2ModelSpline();
  124. GetN2ModelSpline();
  125. }
  126. public void GetO2ModelSpline()
  127. {
  128. var tmp = new PlotModel { };
  129. tmp.Axes.Add(new DateTimeAxis()
  130. {
  131. StringFormat = "HH:mm:ss",
  132. IsZoomEnabled = false,
  133. IsPanEnabled = false,
  134. IntervalType = DateTimeIntervalType.Seconds
  135. });
  136. tmp.Series.Add(new LineSeries
  137. {
  138. Color = OxyColors.Blue,
  139. MarkerType = MarkerType.Circle,
  140. InterpolationAlgorithm = InterpolationAlgorithms.CanonicalSpline
  141. });
  142. this.O2Model = tmp;
  143. Task.Run(() =>
  144. {
  145. while (true)
  146. {
  147. var date = DateTime.Now;
  148. tmp.Axes[0].Maximum = DateTimeAxis.ToDouble(date.AddSeconds(1));
  149. var lineSer = this.O2Model.Series[0] as LineSeries;
  150. lineSer.Points.Add(new OxyPlot.DataPoint(DateTimeAxis.ToDouble(date), ConcentrationO2Value));
  151. if (lineSer.Points.Count > 30)
  152. {
  153. lineSer.Points.RemoveAt(0);
  154. }
  155. tmp.InvalidatePlot(true);
  156. Thread.Sleep(1000);
  157. }
  158. });
  159. }
  160. public void GetN2ModelSpline()
  161. {
  162. var tmp = new PlotModel { };
  163. tmp.Axes.Add(new DateTimeAxis()
  164. {
  165. StringFormat = "HH:mm:ss",
  166. IsZoomEnabled = false,
  167. IsPanEnabled = false,
  168. IntervalType = DateTimeIntervalType.Seconds
  169. });
  170. tmp.Series.Add(new LineSeries
  171. {
  172. Color = OxyColors.Blue,
  173. MarkerType = MarkerType.Circle,
  174. InterpolationAlgorithm = InterpolationAlgorithms.CanonicalSpline
  175. });
  176. this.N2Model = tmp;
  177. Task.Run(() =>
  178. {
  179. while (true)
  180. {
  181. var date = DateTime.Now;
  182. tmp.Axes[0].Maximum = DateTimeAxis.ToDouble(date.AddSeconds(1));
  183. var lineSer = this.N2Model.Series[0] as LineSeries;
  184. var pointValue = MFC51Feedback + MFM57Feedback;
  185. lineSer.Points.Add(new OxyPlot.DataPoint(DateTimeAxis.ToDouble(date), pointValue));
  186. if (lineSer.Points.Count > 30)
  187. {
  188. lineSer.Points.RemoveAt(0);
  189. }
  190. tmp.InvalidatePlot(true);
  191. Thread.Sleep(1000);
  192. }
  193. });
  194. }
  195. private void InitTree()
  196. {
  197. var node = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
  198. ParameterTree.Add(new ParamBase() { ID = 1, ParentID = 0, Name = "StepTime", ConfigName = "StepTime" });
  199. ParameterTree.Add(new ParamBase() { ID = 2, ParentID = 0, Name = "Temperature" });
  200. {
  201. ParameterTree.Add(new ParamBase() { ID = 21, ParentID = 2, Name = "TempOffset", ConfigName = "TempOffsetTable" });
  202. ParameterTree.Add(new ParamBase() { ID = 22, ParentID = 2, Name = "TempProfile", ConfigName = "TempProfileTable" });
  203. ParameterTree.Add(new ParamBase() { ID = 23, ParentID = 2, Name = "TempStabilize", ConfigName = "TempStabilizeTable" });
  204. ParameterTree.Add(new ParamBase() { ID = 24, ParentID = 2, Name = "TempSetting", ConfigName = "TempSetting" });
  205. ParameterTree.Add(new ParamBase() { ID = 25, ParentID = 2, Name = "TempPIDTable", ConfigName = "TempPIDTable" });
  206. }
  207. //ParameterTree.Add(new ParamBase() { ID = 3, ParentID = 0, Name = "TempSetting", ConfigName = "TempSetting" });
  208. ParameterTree.Add(new ParamBase() { ID = 4, ParentID = 0, Name = "PressureStabilize", ConfigName = "PressureStabilizeTable" });
  209. ParameterTree.Add(new ParamBase() { ID = 5, ParentID = 0, Name = "AlarmWatchTable" });
  210. {
  211. ParameterTree.Add(new ParamBase() { ID = 51, ParentID = 5, Name = "TempAlarm", ConfigName = "AlarmWatchTable.TempAlarmWatch" });
  212. ParameterTree.Add(new ParamBase() { ID = 52, ParentID = 5, Name = "FlowAlarm", ConfigName = "AlarmWatchTable.FlowAlarmWatch" });
  213. ParameterTree.Add(new ParamBase() { ID = 53, ParentID = 5, Name = "PressureAlarm", ConfigName = "AlarmWatchTable.PressureAlarmWatch" });
  214. }
  215. ParameterTree.Add(new ParamBase() { ID = 6, ParentID = 0, Name = "FlowSetting", ConfigName = "FlowSetting" });
  216. {
  217. var MfcItems = ConfigNodes.Where(x => x.Display == "Parameter").FirstOrDefault().SubNodes.Where(y => y.Name == "MFC").FirstOrDefault().SubNodes;
  218. foreach (var item in MfcItems)
  219. {
  220. var isInstalled = QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{item.Name}.IsMFCInstalled");
  221. if (!(bool)isInstalled) continue;
  222. ParameterTree.Add(new ParamBase()
  223. {
  224. ID = 61,
  225. ParentID = 6,
  226. Name = SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.{item.Name}.GasName"),
  227. ConfigName = $"FlowSetting.{item.Name}"
  228. });
  229. }
  230. }
  231. ParameterTree.Add(new ParamBase() { ID = 7, ParentID = 0, Name = "APCSetting" });
  232. {
  233. ParameterTree.Add(new ParamBase() { ID = 71, ParentID = 7, Name = "Pressure", ConfigName = "APCSetting.Pressure" });
  234. ParameterTree.Add(new ParamBase() { ID = 72, ParentID = 7, Name = "Position", ConfigName = "APCSetting.Position" });
  235. }
  236. ParameterTree.Add(new ParamBase() { ID = 8, ParentID = 0, Name = "LayoutPitch", ConfigName = "LayoutPitch" });
  237. ParameterTree.Add(new ParamBase() { ID = 9, ParentID = 0, Name = "CoolingTime", ConfigName = "CoolTime" });
  238. ParameterTree = this.LoadTreeView(0);
  239. }
  240. private List<ParamBase> LoadTreeView(int id)
  241. {
  242. List<ParamBase> node = ParameterTree.FindAll(s => s.ParentID.Equals(id));
  243. foreach (var item in node)
  244. {
  245. item.Children = LoadTreeView(item.ID);
  246. }
  247. return node;
  248. }
  249. public void HideAllCanvas()
  250. {
  251. }
  252. public void TreeViewSelectedItemChanged(object obj)
  253. {
  254. valueList.Clear();
  255. LevelOneNode = LevelTwoNode = new ConfigNode();
  256. HideAllCanvas();
  257. var view = GetView() as N2PurgeEditView;
  258. ParamBase para = obj as ParamBase;
  259. string strHeader = "PM1.RecipeEditParameter";
  260. Canvas canvas = null;
  261. LevelOneNode = FindNodeByName(_rootNode, $"{strHeader}.{para.ConfigName}");
  262. LevelTwoNode = LevelOneNode.SubNodes.FirstOrDefault();
  263. if (canvas == null) return;
  264. canvas.Visibility = Visibility.Visible;
  265. this.GetHeaderConfig();
  266. this.GetPIDHeaderConfig();
  267. if (LevelTwoNode == null)
  268. {
  269. InitItemsCurrentValue(LevelOneNode, false);
  270. }
  271. else
  272. {
  273. InitItemsCurrentValue(LevelTwoNode, true);
  274. ConfigNode subNode = LevelTwoNode.SubNodes.FirstOrDefault();
  275. if (subNode != null) InitItemsCurrentValue(subNode, true);
  276. }
  277. }
  278. private void InitItemsCurrentValue(ConfigNode node, bool initSubItems = true)
  279. {
  280. if (node == null) return;
  281. CurrenItems = node.Items;
  282. _CurrentNodeName = string.IsNullOrEmpty(node.Path) ? node.Name : $"{node.Path}.{node.Name}";
  283. if (CurrenItems == null || CurrenItems.Count <= 0)
  284. {
  285. if (!initSubItems) return;
  286. foreach (var item in node.SubNodes)
  287. {
  288. InitItemsCurrentValue(item);
  289. }
  290. }
  291. else
  292. {
  293. GetDataOfConfigItems();
  294. }
  295. }
  296. private void GetDataOfConfigItems()
  297. {
  298. if (CurrenItems == null)
  299. return;
  300. for (int i = 0; i < CurrenItems.Count; i++)
  301. {
  302. var isInstalled = QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{CurrenItems[i].Name}.IsMFCInstalled");
  303. if (isInstalled != null && !(bool)isInstalled)
  304. CurrenItems[i].Visible = false;
  305. else
  306. CurrenItems[i].Visible = true;
  307. string key = String.Format("{0}{1}{2}", _CurrentNodeName, ".", CurrenItems[i].Name);
  308. CurrenItems[i].CurrentValue = SystemConfigProvider.Instance.GetValueByName(key);
  309. CurrenItems[i].Path = key;
  310. if (CurrenItems[i].Type == DataType.Bool)
  311. {
  312. bool value;
  313. if (bool.TryParse(CurrenItems[i].CurrentValue, out value))
  314. {
  315. CurrenItems[i].BoolValue = value;
  316. CurrenItems[i].CurrentValue = value ? "Yes" : "No";
  317. }
  318. }
  319. else
  320. CurrenItems[i].StringValue = CurrenItems[i].CurrentValue;
  321. }
  322. }
  323. public void MenuCommand(object obj, object menuLevel)
  324. {
  325. RadioButton radioButton = obj as RadioButton;
  326. ConfigNode currentNode = null;
  327. switch (menuLevel.ToString())
  328. {
  329. case "LevelOne":
  330. currentNode = LevelTwoNode = LevelOneNode.SubNodes.Find((x) => x.Name == radioButton.ToolTip.ToString());
  331. break;
  332. case "LevelTwo":
  333. currentNode = LevelTwoNode.SubNodes.Find((x) => x.Name == radioButton.ToolTip.ToString());
  334. break;
  335. }
  336. InitItemsCurrentValue(currentNode);
  337. }
  338. public void SetValue(object obj)
  339. {
  340. var CurrentRecipes = CurrentRecipe;
  341. if (CurrenItems == null || currenItems.Count == 0) return;
  342. ConfigItem item = null;
  343. if (obj is Control)
  344. item = CurrenItems.Find((x) => x.Name == (obj as Control).ToolTip.ToString());
  345. else
  346. item = obj as ConfigItem;
  347. InputDialogViewModel dialog = new InputDialogViewModel();
  348. dialog.Item = item;
  349. dialog.DisplayName = "Set Value";
  350. WindowManager wm = new WindowManager();
  351. bool? bret = wm.ShowDialog(dialog);
  352. if ((bool)bret)
  353. {
  354. item.StringValue = dialog.DialogResult;
  355. //key :System.IsSimulatorMode
  356. //value: true or false 都是字符串
  357. //input check
  358. string value;
  359. if (item.Type == DataType.Bool)
  360. {
  361. if (item.StringValue.Equals("Yes", StringComparison.CurrentCultureIgnoreCase))
  362. item.BoolValue = true;
  363. else if (item.StringValue.Equals("No", StringComparison.CurrentCultureIgnoreCase))
  364. item.BoolValue = false;
  365. else
  366. {
  367. DialogBox.ShowWarning("The Value Should be Yes Or No.");
  368. return;
  369. }
  370. value = item.BoolValue.ToString().ToLower();
  371. }
  372. else
  373. {
  374. if (item.Type == DataType.Int)
  375. {
  376. int iValue;
  377. if (int.TryParse(item.StringValue, out iValue))
  378. {
  379. if (!double.IsNaN(item.Max) && !double.IsNaN(item.Min))
  380. {
  381. if (iValue > item.Max || iValue < item.Min)
  382. {
  383. DialogBox.ShowWarning(string.Format("The value should be between {0} and {1}.", ((int)item.Min).ToString(), ((int)item.Max).ToString()));
  384. return;
  385. }
  386. }
  387. }
  388. else
  389. {
  390. DialogBox.ShowWarning("Please input valid data.");
  391. return;
  392. }
  393. value = item.StringValue;
  394. }
  395. else if (item.Type == DataType.Double)
  396. {
  397. double fValue;
  398. if (double.TryParse(item.StringValue, out fValue))
  399. {
  400. if (!double.IsNaN(item.Max) && !double.IsNaN(item.Min))
  401. {
  402. if (fValue > item.Max || fValue < item.Min)
  403. {
  404. DialogBox.ShowWarning(string.Format("The value should be between {0} and {1}.", item.Min.ToString(), item.Max.ToString()));
  405. return;
  406. }
  407. string[] box = fValue.ToString().Split('.');
  408. if (box.Length > 1 && box[1].Length > 3)
  409. {
  410. DialogBox.ShowWarning(string.Format("The value should be more than three decimal places"));
  411. return;
  412. }
  413. }
  414. }
  415. else
  416. {
  417. DialogBox.ShowWarning("Please input valid data.");
  418. return;
  419. }
  420. value = item.StringValue;
  421. }
  422. else
  423. value = item.StringValue;
  424. }
  425. string key = String.Format("{0}{1}{2}", _CurrentNodeName, ".", item.Name);
  426. if (item.Path.Split('.')[2] == "LayoutPitch")
  427. {
  428. if (item.Path.Split('.')[3] == "StandardPitch")
  429. {
  430. foreach (var current in currenItems.Where(x => x.Description != "StandardPitch"))
  431. {
  432. current.CurrentValue = "No";
  433. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", current.Path, "false");
  434. }
  435. }
  436. else if (item.Path.Split('.')[3] == "DoublePitch")
  437. {
  438. foreach (var current in currenItems.Where(x => x.Description != "DoublePitch"))
  439. {
  440. current.CurrentValue = "No";
  441. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", current.Path, "false");
  442. }
  443. }
  444. else
  445. {
  446. foreach (var current in currenItems.Where(x => x.Description != "TriplePitch"))
  447. {
  448. current.CurrentValue = "No";
  449. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", current.Path, "false");
  450. }
  451. }
  452. }
  453. path = item.Path;
  454. currentValue = value;
  455. valueList.Add(new PageValue() { Path = path, CurrentValue = currentValue });
  456. }
  457. }
  458. public void SaveParameter()
  459. {
  460. foreach (var item in valueList)
  461. {
  462. InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", item.Path, item.CurrentValue);
  463. }
  464. }
  465. public void GetHeaderConfig()
  466. {
  467. HeadLst.Clear();
  468. for (int i = 0; i < 10; i++)
  469. {
  470. if (i % 2 != 0)
  471. {
  472. var configHeater = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.Heater{i}.DisplayName");
  473. TempSetData item = new TempSetData(configHeater);
  474. item.SetValue.Value = configHeater;
  475. HeadLst.Add(item);
  476. }
  477. }
  478. }
  479. public void GetPIDHeaderConfig()
  480. {
  481. PIDHeadLst.Clear();
  482. for (int i = 0; i < 10; i++)
  483. {
  484. if (i % 2 != 0)
  485. {
  486. var configHeater = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.Heater{i}.DisplayName");
  487. TempSetData item1 = new TempSetData(configHeater);
  488. TempSetData item2 = new TempSetData(configHeater);
  489. TempSetData item3 = new TempSetData(configHeater);
  490. item1.SetValue.Value = $"{configHeater} P";
  491. PIDHeadLst.Add(item1);
  492. item2.SetValue.Value = $"{configHeater} I";
  493. PIDHeadLst.Add(item2);
  494. item3.SetValue.Value = $"{configHeater} D";
  495. PIDHeadLst.Add(item3);
  496. }
  497. }
  498. }
  499. private ConfigNode FindNodeByName(ConfigNode parentNode, string strName)
  500. {
  501. string strCates = strName.Split('.')[0];
  502. ConfigNode node = parentNode.SubNodes.Find((x) => x.Name == strCates);
  503. if (node == null)
  504. return parentNode;
  505. else
  506. return FindNodeByName(node, strName.Replace(strCates + ".", ""));
  507. }
  508. public void N2PurgeParaSelect(string ButtonPara)
  509. {
  510. this.GetType().GetProperty($"{ButtonPara}BackGround").SetValue(this, "#FF7DD486");
  511. UpdataProperty();
  512. N2PurgeSelectDialogViewModel dialog = new N2PurgeSelectDialogViewModel(ButtonPara);
  513. WindowManager wm = new WindowManager();
  514. bool? bret = wm.ShowDialog(dialog);
  515. this.GetType().GetProperty($"{ButtonPara}BackGround").SetValue(this, "#FF7DABD4");
  516. UpdataProperty();
  517. if (!(bool)bret)
  518. return;
  519. }
  520. public void UpdataProperty()
  521. {
  522. NotifyOfPropertyChange("TransferRoomVisibleBackGround");
  523. NotifyOfPropertyChange("FOUPOpenVisibleBackGround");
  524. NotifyOfPropertyChange("O2DetectorVisibleBackGround");
  525. NotifyOfPropertyChange("ClampOFFVisibleBackGround");
  526. NotifyOfPropertyChange("OperationCheckVisibleBackGround");
  527. NotifyOfPropertyChange("O2DensityQuickDownVisibleBackGround");
  528. NotifyOfPropertyChange("FoupEnterVisibleBackGround");
  529. NotifyOfPropertyChange("WaferChargeVisibleBackGround");
  530. NotifyOfPropertyChange("BoatLoadVisibleBackGround");
  531. NotifyOfPropertyChange("FoupInhibitAfterVisibleBackGround");
  532. NotifyOfPropertyChange("BoatUnloadVisibleBackGround");
  533. NotifyOfPropertyChange("BoatUnloadPreVisibleBackGround");
  534. NotifyOfPropertyChange("WaferCoolingVisibleBackGround");
  535. NotifyOfPropertyChange("WaferDishargeVisibleBackGround");
  536. }
  537. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  538. {
  539. base.InvokeAfterUpdateProperty(data);
  540. NotifyOfPropertyChange("TransferRoomVisibleBackGround");
  541. }
  542. }
  543. }