| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 安防部分事件 |
| | | /// 更新安防控件状态 |
| | | /// </summary> |
| | | void LoadEvent_SecurityEvent() |
| | | void LoadEvent_UpdataSenurityStatus() |
| | | { |
| | | if (btnResidenceArmIcon != null) |
| | | { |
| | | btnResidenceArmIcon.IsSelected = false; |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | { |
| | | if (temp.status == "enable") |
| | | { |
| | | if (temp.alarm) |
| | | { |
| | | btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceInAlarmIcon.png"; |
| | | } |
| | | else |
| | | { |
| | | btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png"; |
| | | } |
| | | btnResidenceArmIcon.IsSelected = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | btnResidenceArmIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new ArmCenterPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | if (btnResidenceArmText != null) |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | btnResidenceArmText.TextID = StringId.Undefense; |
| | | foreach (var temp in FunctionList.List.securities) |
| | |
| | | if (temp.status == "enable") |
| | | { |
| | | btnResidenceArmText.TextID = StringId.Defense; |
| | | if (temp.alarm) |
| | | { |
| | | btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceInAlarmIcon.png"; |
| | | } |
| | | else |
| | | { |
| | | btnResidenceArmIcon.SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png"; |
| | | } |
| | | btnResidenceArmIcon.IsSelected = true; |
| | | break; |
| | | } |
| | | } |
| | | btnResidenceArmText.MouseUpEventHandler = (sender, e) => |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 安防部分事件 |
| | | /// </summary> |
| | | void LoadEvent_SecurityEvent() |
| | | { |
| | | if (btnResidenceArmIcon != null&& btnResidenceArmText != null) |
| | | { |
| | | Action action = () =>{ |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | LoadEvent_UpdataSenurityStatus(); |
| | | }); |
| | | }; |
| | | |
| | | |
| | | btnResidenceArmIcon.IsSelected = false; |
| | | LoadEvent_UpdataSenurityStatus(); |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new ArmCenterPage(); |
| | | var page = new ArmCenterPage(action); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnResidenceArmIcon.MouseUpEventHandler = eventHandler; |
| | | btnResidenceArmText.MouseUpEventHandler = eventHandler; |
| | | } |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | void LoadEvent_SkipGetSupportPage() |
| | | { |
| | | btnSupportText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var getsupportPage = new FAQHelpPage(); |
| | | MainPage.BasePageView.AddChidren(getsupportPage); |
| | | getsupportPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | //btnSupportText.MouseUpEventHandler = (sender, e) => |
| | | //{ |
| | | // var getsupportPage = new FAQHelpPage(); |
| | | // MainPage.BasePageView.AddChidren(getsupportPage); |
| | | // getsupportPage.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //}; |
| | | } |
| | | |
| | | /// <summary> |