From 30741caa02ed108fb0fbbaeda91eb6dd7c33fc9f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 27 八月 2021 11:48:35 +0800 Subject: [PATCH] Merge branch 'CJL-Linphone' into wxr7 --- 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