From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1
---
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 43 ++++++++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 4a678e3..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(temp.status == "enable")
- // {
- // bodyView.btnSecurityStatus.IsSelected = true;
- // return;
- // }
- //}
- bodyView.btnSecurityStatus.IsSelected = SecurityCenter.Ins.InDefense;
- }
- });
+ if (bodyView != null)
+ {
+ lock (FunctionList.List.securities)
+ {
+ 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;
+ }
+ }
+ }
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"瀹夐槻涓婚〉鏇存柊寮傚父锛歿ex.Message}");
+ }
}
/// <summary>
--
Gitblit v1.8.0