From 900a085e5ce1aee2bb60dc5a3b31777805712db2 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期六, 28 八月 2021 10:25:51 +0800 Subject: [PATCH] co2 5000数值显示清新的问题 --- HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index c88f248..52ba900 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -30,21 +30,38 @@ /// </summary> public static void LoadEvent_RefreshSecurityStatus() { - Application.RunOnMainThread(() => + try { - if (bodyView != null) + Application.RunOnMainThread(() => { - foreach(var temp in FunctionList.List.securities) + if (bodyView != null) { - if(temp.status == "enable") + lock (FunctionList.List.securities) { - bodyView.btnSecurityStatus.IsSelected = true; - return; + foreach (var temp in FunctionList.List.securities) + { + if (temp.status == "enable") + { + if (temp.alarm) + { + bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseAlarmIcon.png"; + } + else + { + bodyView.btnSecurityStatus.SelectedImagePath = "Collection/DefenseStatusIcon.png"; + } + bodyView.btnSecurityStatus.IsSelected = true; + return; + } + } } } - bodyView.btnSecurityStatus.IsSelected = false; - } - }); + }); + } + catch (Exception ex) + { + MainPage.Log($"瀹夐槻涓婚〉鏇存柊寮傚父锛歿ex.Message}"); + } } /// <summary> -- Gitblit v1.8.0