diff --git a/SicRT/Equipments/Systems/EquipmentManager.cs b/SicRT/Equipments/Systems/EquipmentManager.cs index 728bed72..f9234e92 100644 --- a/SicRT/Equipments/Systems/EquipmentManager.cs +++ b/SicRT/Equipments/Systems/EquipmentManager.cs @@ -489,7 +489,6 @@ namespace SicRT.Equipments.Systems DATA.Subscribe("System.IsAutoRunning", () => IsRunning);//System.IsAutoRunning=>IsRunning,绑定相同的值,不同的地方用 DATA.Subscribe("System.Modules", () => _modules); DATA.Subscribe("System.SignalTowerData", () => _mainSignalTower?.DeviceData); - DATA.Subscribe("System.IsEngMode", () => _isEngMode); } void SubscribeOperation() @@ -1390,20 +1389,9 @@ namespace SicRT.Equipments.Systems MonitorPmTmInfo(); MonitorUPSAlarm(); //MonitorAETemp(); - MonitorEngMode(); return true; } - private bool _isEngMode; - - private void MonitorEngMode() - { - var isBypassInterlock = SC.GetValue("System.BypassInterlock"); - var isBypassEnableTable = SC.GetValue("System.BypassEnableTable"); - _isEngMode = isBypassInterlock || isBypassEnableTable; - } - - private void MonitorPmTmInfo() { if (_pm1SlitValve != null) diff --git a/SicUI/MainView.xaml b/SicUI/MainView.xaml index fa072216..2cf821d6 100644 --- a/SicUI/MainView.xaml +++ b/SicUI/MainView.xaml @@ -430,8 +430,8 @@ ModuleDescription="TM" IsOnline="{Binding IsOnlineTM}" Status="{Binding TMStatus}" - HasWarning="{Binding IsTMInterlockBypassed}" - WarningTip="Warning: Interlock bypassed" + HasWarning="{Binding IsTMWarning}" + WarningTip="{Binding TMWarningMessage}" cal:Message.Attach="[SetOnline] = [Action SetModuleOnline($source, $eventArgs)];[SetOffline] = [Action SetModuleOffline($source, $eventArgs)]" /> IsPM1InterlockBypassed || IsPM1EnableTableBypassed; + + public string PM1WarningMessage + { + get + { + if (IsPM1InterlockBypassed && IsPM1EnableTableBypassed) + return "PM1 Interlock and Enable Table are bypassed"; + + if (IsPM1InterlockBypassed) + return "PM1 Interlock is bypassed"; + + return "PM1 Enable Table is bypassed"; + } + } + [Subscription("PM2.IsBypassInterlock")] public bool IsPM2InterlockBypassed { get; set; } - [Subscription("TM.IsInterlockBypassed")] + [Subscription("PM2.IsBypassEnableTable")] + public bool IsPM2EnableTableBypassed { get; set; } + + public bool IsPM2Warning => IsPM2InterlockBypassed || IsPM2EnableTableBypassed; + + public string PM2WarningMessage + { + get + { + if (IsPM2InterlockBypassed && IsPM2EnableTableBypassed) + return "PM2 Interlock and Enable Table are bypassed"; + + if (IsPM2InterlockBypassed) + return "PM2 Interlock is bypassed"; + + return "PM2 Enable Table is bypassed"; + } + } + + [Subscription("TM.IsBypassInterlock")] public bool IsTMInterlockBypassed { get; set; } + [Subscription("TM.IsBypassEnableTable")] + public bool IsTMEanbleTableBypassed { get; set; } + + public bool IsTMWarning => IsTMInterlockBypassed || IsTMEanbleTableBypassed; + + public string TMWarningMessage + { + get + { + if (IsTMInterlockBypassed && IsTMEanbleTableBypassed) + return "TM Interlock and Enable Table are bypassed"; + + if (IsTMInterlockBypassed) + return "TM Interlock is bypassed"; + + return "TM Enable Table is bypassed"; + } + } + [Subscription("Rt.Status")] public string RtStatus { get; set; }