|
@@ -59,7 +59,16 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
_valveDisplayName = value;
|
|
|
}
|
|
|
}
|
|
|
+ public bool IsN2PurgeView
|
|
|
+ {
|
|
|
+ get { return (bool)this.GetValue(IsN2PurgeViewProperty); }
|
|
|
+ set { this.SetValue(IsN2PurgeViewProperty, value); }
|
|
|
+ }
|
|
|
|
|
|
+ // Using a DependencyProperty as the backing store for MenuVisibility. This enables animation, styling, binding, etc...
|
|
|
+ public static readonly DependencyProperty IsN2PurgeViewProperty =
|
|
|
+ DependencyProperty.Register("IsN2PurgeView", typeof(bool), typeof(AITGasIIIValve),
|
|
|
+ new FrameworkPropertyMetadata(false));
|
|
|
|
|
|
public bool IsSim
|
|
|
{
|
|
@@ -119,7 +128,7 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
{
|
|
|
if (data.IsILKOK)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
|
|
{
|
|
|
ValveName.Foreground = (Brush)_brushconvert.ConvertFromString("White");
|
|
@@ -309,7 +318,7 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
}
|
|
|
else if (DeviceData.IsILKOK && !DeviceData.Feedback && !(GasStateType == GasPanelStateType.Recipe))
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
|
|
{
|
|
|
ValveName.Foreground = (Brush)_brushconvert.ConvertFromString("Black");
|
|
@@ -324,7 +333,7 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
|
|
{
|
|
|
ValveName.Foreground = (Brush)_brushconvert.ConvertFromString("White");
|
|
@@ -340,7 +349,7 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
|
|
{
|
|
|
ValveName.Foreground = (Brush)_brushconvert.ConvertFromString("Black");
|
|
@@ -495,25 +504,35 @@ namespace Aitex.Core.UI.DeviceControl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //if (IsDisableMode) return;
|
|
|
- switch (GasStateType)
|
|
|
+ if (IsN2PurgeView)
|
|
|
{
|
|
|
- case GasPanelStateType.Manual:
|
|
|
- DeviceData.Feedback = !DeviceData.IsOpen;
|
|
|
- rdTrig.CLK = (DeviceData == null || DeviceData.IsOpen);
|
|
|
- IsSwitchOpen = DeviceData.Feedback;
|
|
|
- //IsSwitchOpen = !IsSwitchOpen;
|
|
|
- //InvokeClient.Instance.Service.DoOperation($"{DeviceData.UniqueName}.{AITValveOperation.GVTurnValve}", IsSwitchOpen);
|
|
|
- break;
|
|
|
- case GasPanelStateType.Monitor:
|
|
|
- break;
|
|
|
- case GasPanelStateType.Recipe:
|
|
|
- IsVirtualSwitchOpen = !IsVirtualSwitchOpen;
|
|
|
- InvokeClient.Instance.Service.DoOperation($"{DeviceData.UniqueName}.{AITValveOperation.GVVirtualTurnValve}", IsVirtualSwitchOpen);
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
+ IsSwitchOpen = DeviceData.Feedback;
|
|
|
+ IsSwitchOpen = !IsSwitchOpen;
|
|
|
+ IsVirtualSwitchOpen = IsSwitchOpen;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //if (IsDisableMode) return;
|
|
|
+ switch (GasStateType)
|
|
|
+ {
|
|
|
+ case GasPanelStateType.Manual:
|
|
|
+ DeviceData.Feedback = !DeviceData.IsOpen;
|
|
|
+ rdTrig.CLK = (DeviceData == null || DeviceData.IsOpen);
|
|
|
+ IsSwitchOpen = DeviceData.Feedback;
|
|
|
+ //IsSwitchOpen = !IsSwitchOpen;
|
|
|
+ //InvokeClient.Instance.Service.DoOperation($"{DeviceData.UniqueName}.{AITValveOperation.GVTurnValve}", IsSwitchOpen);
|
|
|
+ break;
|
|
|
+ case GasPanelStateType.Monitor:
|
|
|
+ break;
|
|
|
+ case GasPanelStateType.Recipe:
|
|
|
+ IsVirtualSwitchOpen = !IsVirtualSwitchOpen;
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{DeviceData.UniqueName}.{AITValveOperation.GVVirtualTurnValve}", IsVirtualSwitchOpen);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (Command == null)
|
|
|
return;
|
|
|
Command.Execute(new object[] { DeviceData.DeviceName, AITValveOperation.GVVirtualTurnValve, IsVirtualSwitchOpen });
|