From 45a5e1810e13df5f19fa15522ed2df6eb1fb894b Mon Sep 17 00:00:00 2001
From: HCL <1625932291@qq.com>
Date: Wed, 19 Aug 2026 09:10:42 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9IO=E6=8A=A5=E9=94=99=E7=AD=89?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SicModules/Config/TM/DeviceModelSystem.xml | 1 -
App/Modules/SicModules/UnLoads/UnLoadModule.cs | 11 ++++++-----
App/SicUI/MainViewModel.cs | 15 ++++++++++-----
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/App/Modules/SicModules/Config/TM/DeviceModelSystem.xml b/App/Modules/SicModules/Config/TM/DeviceModelSystem.xml
index 092aa09..7d66dbb 100644
--- a/App/Modules/SicModules/Config/TM/DeviceModelSystem.xml
+++ b/App/Modules/SicModules/Config/TM/DeviceModelSystem.xml
@@ -137,7 +137,6 @@
-
diff --git a/App/Modules/SicModules/UnLoads/UnLoadModule.cs b/App/Modules/SicModules/UnLoads/UnLoadModule.cs
index 98c8b2a..0ccadd5 100644
--- a/App/Modules/SicModules/UnLoads/UnLoadModule.cs
+++ b/App/Modules/SicModules/UnLoads/UnLoadModule.cs
@@ -345,21 +345,22 @@ namespace SicModules.UnLoads
});*/
DATA.Subscribe($"{Name}.UnderVAC", () =>
{
- if (_unLoadDevice.CheckVacuum())
+ if(_unLoadDevice != null)
{
- return true;
+ return _unLoadDevice.CheckVacuum();
}
+
return false;
});
DATA.Subscribe($"{Name}.LidState", () =>
{
- if (_unLoadDevice.CheckLidClose())
+ if(_unLoadDevice != null)
{
- return "Closed";
+ return _unLoadDevice.CheckLidClose() ? "Closed" : "Open";
}
- return "Open";
+ return "Closed";
});
}
diff --git a/App/SicUI/MainViewModel.cs b/App/SicUI/MainViewModel.cs
index 4cfb734..73a9e78 100644
--- a/App/SicUI/MainViewModel.cs
+++ b/App/SicUI/MainViewModel.cs
@@ -1374,15 +1374,20 @@ namespace SicUI.Client
if (menuInfo.System is "PM1" or "PM2")
{
var rect = FindVisualChildByName(container, "InnerBG");
- rect.Fill = menuInfo.Selected
+ if(rect != null)
+ {
+ rect.Fill = menuInfo.Selected
? BgActiveContent
: new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF346294"));
+ }
var bgBorder = FindVisualChildByName(container, "BG");
- bgBorder.Background = menuInfo.Selected
- ? BgActiveContent
- : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF346294"));
-
+ if (bgBorder != null)
+ {
+ bgBorder.Background = menuInfo.Selected
+ ? BgActiveContent
+ : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF346294"));
+ }
}
}
}