| | |
| | | /// </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> |