|
@@ -0,0 +1,515 @@
|
|
|
|
+using System;
|
|
|
|
+using System.IO;
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
+using System.Collections.ObjectModel;
|
|
|
|
+using System.Linq;
|
|
|
|
+using System.Windows;
|
|
|
|
+using Aitex.Core.RT.Log;
|
|
|
|
+using Aitex.Core.UI.ControlDataContext;
|
|
|
|
+using Aitex.Core.Utilities;
|
|
|
|
+using Aitex.Sorter.Common;
|
|
|
|
+using Virgo_DUI.Client.Models.Sys;
|
|
|
|
+using MECF.Framework.Common.DataCenter;
|
|
|
|
+using OpenSEMI.ClientBase;
|
|
|
|
+using OpenSEMI.ClientBase.IO;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+using ExcelLibrary.SpreadSheet;
|
|
|
|
+using MECF.Framework.Common.OperationCenter;
|
|
|
|
+using Aitex.Core.Util;
|
|
|
|
+using Virgo_DCommon;
|
|
|
|
+using Aitex.Core.Common.DeviceData;
|
|
|
|
+using Aitex.Core.RT.SCCore;
|
|
|
|
+
|
|
|
|
+namespace Virgo_DUI.Client.Models.PMs
|
|
|
|
+{
|
|
|
|
+ public class LeakCheckViewModel : ModuleUiViewModelBase, ISupportMultipleSystem
|
|
|
|
+ {
|
|
|
|
+ #region
|
|
|
|
+ private int MenuPermission;
|
|
|
|
+ private bool _isEnableGasLine;
|
|
|
|
+ public bool IsEnableGasLine
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return (LeakCheckModeSetPoint == "ChamberAndGasLine" || LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") && IsLeakCheckEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableGasLine");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #region GasLine
|
|
|
|
+ public bool IsEnableGas1Line
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ bool originalCondition = (LeakCheckModeSetPoint == "ChamberAndGasLine" ||
|
|
|
|
+ LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") &&
|
|
|
|
+ IsLeakCheckEnabled;
|
|
|
|
+
|
|
|
|
+ string configValue = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas1.Enable").ToString(); // GasIndex 表示当前气体管路序号(1/2/3/4)
|
|
|
|
+ //string configValue = QueryDataClient.Instance.Service.GetConfig(configKey)?.ToString();
|
|
|
|
+ bool isGasEnabled = bool.TryParse(configValue, out bool result) ? result : false;
|
|
|
|
+
|
|
|
|
+ return originalCondition && isGasEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableGasLine");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ public bool IsEnableGas2Line
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ bool originalCondition = (LeakCheckModeSetPoint == "ChamberAndGasLine" ||
|
|
|
|
+ LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") &&
|
|
|
|
+ IsLeakCheckEnabled;
|
|
|
|
+
|
|
|
|
+ string configValue = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas2.Enable").ToString(); // GasIndex 表示当前气体管路序号(1/2/3/4)
|
|
|
|
+ //string configValue = QueryDataClient.Instance.Service.GetConfig(configKey)?.ToString();
|
|
|
|
+ bool isGasEnabled = bool.TryParse(configValue, out bool result) ? result : false;
|
|
|
|
+
|
|
|
|
+ return originalCondition && isGasEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableGasLine");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ public bool IsEnableGas3Line
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ bool originalCondition = (LeakCheckModeSetPoint == "ChamberAndGasLine" ||
|
|
|
|
+ LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") &&
|
|
|
|
+ IsLeakCheckEnabled;
|
|
|
|
+
|
|
|
|
+ string configValue = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas3.Enable").ToString(); // GasIndex 表示当前气体管路序号(1/2/3/4)
|
|
|
|
+ //string configValue = QueryDataClient.Instance.Service.GetConfig(configKey)?.ToString();
|
|
|
|
+ bool isGasEnabled = bool.TryParse(configValue, out bool result) ? result : false;
|
|
|
|
+
|
|
|
|
+ return originalCondition && isGasEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableGasLine");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ public bool IsEnableGas4Line
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ bool originalCondition = (LeakCheckModeSetPoint == "ChamberAndGasLine" ||
|
|
|
|
+ LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") &&
|
|
|
|
+ IsLeakCheckEnabled;
|
|
|
|
+
|
|
|
|
+ string configValue = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.MfcGas4.Enable").ToString(); // GasIndex 表示当前气体管路序号(1/2/3/4)
|
|
|
|
+ //string configValue = QueryDataClient.Instance.Service.GetConfig(configKey)?.ToString();
|
|
|
|
+ bool isGasEnabled = bool.TryParse(configValue, out bool result) ? result : false;
|
|
|
|
+
|
|
|
|
+ return originalCondition && isGasEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableGasLine");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ public bool IsEnableMasterGasline
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return (LeakCheckModeSetPoint == "ChamberAndGasLine" || LeakCheckModeSetPoint == "ChamberAndGasLineAndFAC") && IsLeakCheckEnabled;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _isEnableGasLine = value;
|
|
|
|
+ NotifyOfPropertyChange("IsEnableMasterGasline");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ public bool IsLeakCheckEnabled
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return IsManualMode && !IsLeakCheck;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [IgnorePropertyChange]
|
|
|
|
+ public string LeakCheckModeSetPoint
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [IgnorePropertyChange]
|
|
|
|
+ public string LeakCheckPumpDownTimeSetPoint
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [IgnorePropertyChange]
|
|
|
|
+ public string LeakCheckTimeSetPoint
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [IgnorePropertyChange]
|
|
|
|
+ public string LeakRateUpperLimitSetPoint
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [IgnorePropertyChange]
|
|
|
|
+ public string LeakCheckFlowScale
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription("IoMfc.MfcGas1.IsEnable")]
|
|
|
|
+ public bool MfcGas1Enable
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription("IoMfc.MfcGas2.IsEnable")]
|
|
|
|
+ public bool MfcGas2Enable
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription("IoMfc.MfcGas3.IsEnable")]
|
|
|
|
+ public bool MfcGas3Enable
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription("IoMfc.MfcGas4.IsEnable")]
|
|
|
|
+ public bool MfcGas4Enable
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //[Subscription("IoMfc.MfcGas5.IsEnable")]
|
|
|
|
+ //public bool MfcGas5Enable
|
|
|
|
+ //{
|
|
|
|
+ // get;
|
|
|
|
+ // set;
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ private bool _enableGasLine1;
|
|
|
|
+ public bool EnableGasLine1
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return _enableGasLine1;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _enableGasLine1 = value;
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine1");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool _enableGasLine2;
|
|
|
|
+ public bool EnableGasLine2
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return _enableGasLine2;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _enableGasLine2 = value;
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine2");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool _enableGasLine3;
|
|
|
|
+ public bool EnableGasLine3
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return _enableGasLine3;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _enableGasLine3 = value;
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine3");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool _enableGasLine4;
|
|
|
|
+ public bool EnableGasLine4
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return _enableGasLine4;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _enableGasLine4 = value;
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine4");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool _enableGasLine5;
|
|
|
|
+ public bool EnableGasLine5
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return _enableGasLine5;
|
|
|
|
+ }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _enableGasLine5 = value;
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine5");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool _masterGasLineControl;
|
|
|
|
+ public bool MasterGasLineControl
|
|
|
|
+ {
|
|
|
|
+ get => _masterGasLineControl;
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ if (_masterGasLineControl == value) return;
|
|
|
|
+ _masterGasLineControl = value;
|
|
|
|
+
|
|
|
|
+ // 动态获取各气体管道的配置状态
|
|
|
|
+ bool gas1Enabled = GetGasConfigState("MfcGas1");
|
|
|
|
+ bool gas2Enabled = GetGasConfigState("MfcGas2");
|
|
|
|
+ bool gas3Enabled = GetGasConfigState("MfcGas3");
|
|
|
|
+ bool gas4Enabled = GetGasConfigState("MfcGas4");
|
|
|
|
+
|
|
|
|
+ // 仅操作配置启用的管道
|
|
|
|
+ if (gas1Enabled) EnableGasLine1 = value;
|
|
|
|
+ if (gas2Enabled) EnableGasLine2 = value;
|
|
|
|
+ if (gas3Enabled) EnableGasLine3 = value;
|
|
|
|
+ if (gas4Enabled) EnableGasLine4 = value;
|
|
|
|
+
|
|
|
|
+ NotifyOfPropertyChange(nameof(MasterGasLineControl));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private bool GetGasConfigState(string gasName)
|
|
|
|
+ {
|
|
|
|
+ string configKey = $"{SystemName}.{gasName}.Enable";
|
|
|
|
+ string configValue = QueryDataClient.Instance.Service.GetConfig(configKey)?.ToString();
|
|
|
|
+ return bool.TryParse(configValue, out bool result) && result; // 配置无效时默认禁用
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription(Virgo_DDevice.ProcessGauge)]
|
|
|
|
+ public AITPressureMeterData ProcessGauge { get; set; }
|
|
|
|
+
|
|
|
|
+ [Subscription(Virgo_DDevice.PressureGauge)]
|
|
|
|
+ public AITPressureMeterData PressureGauge { get; set; }
|
|
|
|
+
|
|
|
|
+ [Subscription(Virgo_DDevice.ForelineGauge)]
|
|
|
|
+ public AITPressureMeterData ForelineGauge { get; set; }
|
|
|
|
+
|
|
|
|
+ [Subscription("LeakCheckElapseTime")]
|
|
|
|
+ public string LeakCheckElapseTime
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public List<LeakCheckResultItem> LeakCheckResultList
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription("IsAutoMode")]
|
|
|
|
+ public bool IsAutoMode
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [Subscription(StateData.PMState)]
|
|
|
|
+ public int PMStatus
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public string Status
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return ((PMState)PMStatus).ToString();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public string Pressure
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return ProcessGauge == null ? "0" : ProcessGauge.FeedBack.ToString("F0") + ProcessGauge.Unit;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public bool IsLeakCheck
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return (PMState)PMStatus == PMState.LeakCheck;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public bool IsManualMode
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return !IsAutoMode;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public bool IsEnableLeakCheck
|
|
|
|
+ {
|
|
|
|
+ get
|
|
|
|
+ {
|
|
|
|
+ return !IsAutoMode && (PMState)PMStatus == PMState.Idle;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public LeakCheckResultItem CurrentLeakCheckResultItem
|
|
|
|
+ {
|
|
|
|
+ get;
|
|
|
|
+ set;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ F_TRIG _trigLeakCheckFinished = new F_TRIG();
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
+ public LeakCheckViewModel()
|
|
|
|
+ {
|
|
|
|
+ LeakCheckModeSetPoint = LeakCheckMode.ChamberOnly.ToString();
|
|
|
|
+
|
|
|
|
+ EnableGasLine1 = true;
|
|
|
|
+ EnableGasLine2 = true;
|
|
|
|
+ EnableGasLine3 = true;
|
|
|
|
+ EnableGasLine4 = true;
|
|
|
|
+
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine1");
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine2");
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine3");
|
|
|
|
+ NotifyOfPropertyChange("EnableGasLine4");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void OnInitialize()
|
|
|
|
+ {
|
|
|
|
+ base.OnInitialize();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void OnActivate()
|
|
|
|
+ {
|
|
|
|
+ base.OnActivate();
|
|
|
|
+ LeakCheckPumpDownTimeSetPoint = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.Pump.LeakCheckPumpingTime").ToString();
|
|
|
|
+ LeakCheckTimeSetPoint = QueryDataClient.Instance.Service.GetConfig($"{SystemName}.Pump.LeakCheckWaitTime").ToString();
|
|
|
|
+ LeakRateUpperLimitSetPoint = ((float)(double)QueryDataClient.Instance.Service.GetConfig($"{SystemName}.Pump.LeakRate")).ToString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void UpdateLeakCheckResult(string Module)
|
|
|
|
+ {
|
|
|
|
+ LeakCheckResultList = QueryDataClient.Instance.Service.GetHistoryLeakCheck(Module);
|
|
|
|
+ InvokePropertyChanged("LeakCheckResultList");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
|
|
|
|
+ {
|
|
|
|
+ MenuPermission = ClientApp.Instance.GetPermission($"LeakCheck{SystemName}");
|
|
|
|
+ if (!MfcGas1Enable) EnableGasLine1 = false;
|
|
|
|
+ if (!MfcGas2Enable) EnableGasLine2 = false;
|
|
|
|
+ if (!MfcGas3Enable) EnableGasLine3 = false;
|
|
|
|
+ if (!MfcGas4Enable) EnableGasLine4 = false;
|
|
|
|
+ //if (!MfcGas5Enable) EnableGasLine5 = false;
|
|
|
|
+
|
|
|
|
+ _trigLeakCheckFinished.CLK = IsLeakCheck;
|
|
|
|
+ if (_trigLeakCheckFinished.Q)
|
|
|
|
+ {
|
|
|
|
+ Application.Current.Dispatcher.Invoke(new Action(() =>
|
|
|
|
+ {
|
|
|
|
+ UpdateLeakCheckResult(SystemName);
|
|
|
|
+
|
|
|
|
+ }));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
|
|
|
|
+ {
|
|
|
|
+ if (CurrentLeakCheckResultItem == null)
|
|
|
|
+ {
|
|
|
|
+ UpdateLeakCheckResult(SystemName);
|
|
|
|
+ ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void LeakCheck()
|
|
|
|
+ {
|
|
|
|
+ if (MenuPermission != 3) return;
|
|
|
|
+ if (!IsLeakCheck)
|
|
|
|
+ {
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{SystemName}.Pump.LeakCheckPumpingTime", LeakCheckPumpDownTimeSetPoint.ToString());
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{SystemName}.Pump.LeakCheckWaitTime", LeakCheckTimeSetPoint.ToString());
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation("System.SetConfig", $"{SystemName}.Pump.LeakRate", LeakRateUpperLimitSetPoint.ToString());
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{SystemName}.LeakCheck", new[]
|
|
|
|
+ {
|
|
|
|
+ LeakCheckPumpDownTimeSetPoint,
|
|
|
|
+ LeakCheckTimeSetPoint,
|
|
|
|
+ LeakCheckModeSetPoint,
|
|
|
|
+ LeakRateUpperLimitSetPoint,
|
|
|
|
+ EnableGasLine1.ToString(),
|
|
|
|
+ EnableGasLine2.ToString(),
|
|
|
|
+ EnableGasLine3.ToString(),
|
|
|
|
+ EnableGasLine4.ToString(),
|
|
|
|
+ EnableGasLine5.ToString(),
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void AbortLeakCheck()
|
|
|
|
+ {
|
|
|
|
+ if (MenuPermission != 3) return;
|
|
|
|
+ if (MessageBox.Show("Confirm to stop leak detection?", "JetPlasma", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{SystemName}.Abort");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void DeleteLeakCheck()
|
|
|
|
+ {
|
|
|
|
+ if (MenuPermission != 3) return;
|
|
|
|
+ if (CurrentLeakCheckResultItem == null)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show("Please select the leak detection record to delete first.", "JetPlasma", MessageBoxButton.OK);
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (MessageBox.Show("Confirm to delete the current leak detection record?", "JetPlasma", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{SystemName}.DeleteLeakCheck", CurrentLeakCheckResultItem.Id);
|
|
|
|
+
|
|
|
|
+ CurrentLeakCheckResultItem = null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|