| | |
| | | }; |
| | | if (addNav) |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.SecurityCenter)).LoadTopView_ArmCenter(skipAction); |
| | | var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.SecurityCenter)); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView_ArmCenter(skipAction); |
| | | } |
| | | VerticalScrolViewLayout contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = addNav? Application.GetRealHeight(64):0, |
| | | Height = Application.GetRealHeight(667 - 64), |
| | | Y = addNav? Application.GetRealHeight(64+10):0, |
| | | Height = Application.GetRealHeight(667 - 64-10), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | ScrollEnabled = false, |
| | | }; |
| | |
| | | addDefensePage.LoadPage(Language.StringByID(StringId.BurglarAlarm)); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | disasterAlarmView.SetClick(disasterAlarmViewClick); |
| | | burglarAlarmView.SetClick(burglarAlarmViewClick); |
| | | fixedDeploymentTypeView.AddChidren(burglarAlarmView); |
| | | #endregion |
| | | |
| | |
| | | armDiyViewList.Clear(); |
| | | foreach (var mode in FunctionList.List.securities) |
| | | { |
| | | if(mode.type== "all_day"|| mode.type == "mute") |
| | | { |
| | | continue; |
| | | } |
| | | var armDiyView = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png", |
| | | mode.name,mode.sid); |
| | | customDeploymentView.AddChidren(armDiyView); |
| | |
| | | armDiyViewList.Add(armDiyView); |
| | | } |
| | | |
| | | if (FunctionList.List.securities.Count < 4) |
| | | if (FunctionList.List.GetOrdinarySecurities().Count < 4) |
| | | { |
| | | var view = new ArmDiyView("FunctionIcon/ArmCenter/AddDefenseIcon.png", "FunctionIcon/ArmCenter/AddDefenseIcon.png", |
| | | Language.StringByID(StringId.Custom),"customSid"); |
| | |
| | | TextID = StringId.Cancel, |
| | | TextColor = CSS_Color.WarningColor, |
| | | IsBold = true, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | }; |
| | | contentView.AddChidren(btnCancel); |
| | | |
| | |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | if(updataTemp.type == "all_day"|| updataTemp.type == "mute") |
| | | { |
| | | return; |
| | | } |
| | | bodyView.refreshAction?.Invoke(); |
| | | |
| | | //布防 |
| | |
| | | } |
| | | else |
| | | { |
| | | //撤防 |
| | | if(bodyView.InDefenseMode.sid == updataTemp.sid) |
| | | try |
| | | { |
| | | foreach (var tempView in bodyView.armDiyViewList) |
| | | //撤防 |
| | | if (bodyView.InDefenseMode != null) |
| | | { |
| | | tempView.LightingView(false); |
| | | if (bodyView.InDefenseMode.sid == updataTemp.sid) |
| | | { |
| | | bodyView.InDefenseMode.status = updataTemp.status; |
| | | foreach (var tempView in bodyView.armDiyViewList) |
| | | { |
| | | tempView.LightingView(false); |
| | | } |
| | | } |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"撤防异常:{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | |
| | | bodyView.btnArmTipIcon.IsSelected = true; |
| | | bodyView.btnDefenseName.Text = bodyView.InDefenseMode.name; |
| | | } |
| | | bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm); |
| | | if (bodyView.InDefenseMode != null) |
| | | { |
| | | bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = title, |
| | | IsBold = true, |
| | | IsMoreLines = true, |
| | | }; |
| | | this.AddChidren(btnTitle); |
| | | |