123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using FurnaceUI.Models;
- using MECF.Framework.Common.OperationCenter;
- namespace FurnaceUI.Client.Dialog
- {
- public class SelectSequenceViewModel : FurnaceUIViewModelBase
- {
- public string _dialogResultString = "";
- public string DialogResultString
- {
- get
- {
- return _dialogResultString;
- }
- set
- {
- _dialogResultString = value;
- switch (value)
- {
- case "Auto":
- {
- DialogResultView = "Auto";
- break;
- }
- case "Manual_N2Purge":
- {
- DialogResultView = "Manual(N2Purge)";
- break;
- }
- case "Manual_ATM":
- {
- DialogResultView = "Manual(ATM)";
- break;
- }
- case "Manual_Maintenance":
- {
- DialogResultView = "Manual(Maintenance)";
- break;
- }
- case "Auto_Check":
- {
- DialogResultView = "Auto Check";
- break;
- }
- }
- NotifyOfPropertyChange("DialogResultView");
- }
- }
- public string DialogResultView { get; set; }
-
- private string _productZeroStr;
- public string ProductZeroStr
- {
- get => _productZeroStr;
- set
- {
- _productZeroStr = value;
- NotifyOfPropertyChange(nameof(ProductZeroStr));
- }
- }
- protected override void OnViewLoaded(object view)
- {
- base.OnViewLoaded(view);
- LoadSetDefaultOption(view);
- }
- private void LoadSetDefaultOption(object view)
- {
- }
-
- public void SelectExistClick(string cmd)
- {
- DialogResultString = cmd;
- //if (cmd == "Cancel")
- //{
- // ((Window)GetView()).DialogResult = false;
- //}
- //else
- //{
- // ((Window)GetView()).DialogResult = true;
- //}
- }
- public void OK()
- {
- if (_dialogResultString == null || _dialogResultString == "")
- {
- return;
- }
- ((Window)GetView()).DialogResult = true;
- InvokeClient.Instance.Service.DoOperation($"PM1.SetN2PurgeMode", DialogResultString);
- }
- public void Cancel()
- {
- ((Window)GetView()).DialogResult = false;
- }
- }
- }
|