| | |
| | | /// </summary> |
| | | public static void LoadEvent_RefreshSecurityStatus() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | try |
| | | { |
| | | if (bodyView != null) |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | bodyView.btnSecurityStatus.IsSelected = SecurityCenter.Security.CurrentDefenseMode != null; |
| | | } |
| | | }); |
| | | 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> |