WJC
2019-12-13 9c6bd67d66859e48f0e794cd2746aef9310ce71d
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
@@ -36,7 +36,7 @@
            this.Gravity = Gravity.CenterHorizontal;
            this.Width = Application.GetRealWidth(964);
            this.Height = Application.GetRealHeight(340);
            this.Radius = (uint)Application.GetMinRealAverage(20);
            this.Radius = 20;
            this.BackgroundColor = UserCenterColor.Current.White;
        }
@@ -52,14 +52,14 @@
            //右上圆角背景
            var btnTopRight = new NormalViewControl(50, 50, true);
            btnTopRight.BackgroundColor = UserCenterColor.Current.White;
            btnTopRight.Radius = (uint)Application.GetMinRealAverage(6);
            btnTopRight.Radius = 6;
            this.AddChidren(btnTopRight);
            btnTopRight.X = this.Width - btnTopRight.Width;
            //左下圆角背景
            var btnBottomRight = new NormalViewControl(50, 50, true);
            btnBottomRight.BackgroundColor = UserCenterColor.Current.White;
            btnBottomRight.Radius = (uint)Application.GetMinRealAverage(6);
            btnBottomRight.Radius = 6;
            this.AddChidren(btnBottomRight);
            btnBottomRight.Y = this.Height - btnBottomRight.Height;
@@ -159,8 +159,7 @@
                //如果设置有内部防区
                string msg = string.Empty;
                if (HdlSafeguardLogic.Current.IsHadInternalDefenseArea() == true)
                 {
                {
                    //在家布防设置成功
                    msg = Language.StringByID(R.MyInternationalizationString.uSetAtHomeGarrisonSuccess);
                }
@@ -169,18 +168,8 @@
                    //布防设置成功
                    msg = Language.StringByID(R.MyInternationalizationString.uSetGarrisonSuccess);
                }
                if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
                {
                    //添加布防上报的行控件
                    var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
                    form?.AddSafeguardLogPushRow(null);
                }
                else
                {
                    var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                    control.Show();
                }
                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                control.Show();
            });
        }
@@ -209,19 +198,10 @@
                {
                    return;
                }
                if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
                {
                    //添加布防上报的行控件
                    var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
                    form?.AddSafeguardLogPushRow(null);
                }
                else
                {
                    //离家布防设置成功
                    string msg = Language.StringByID(R.MyInternationalizationString.uSetRemoveHomeGarrisonSuccess);
                    var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                    control.Show();
                }
                //离家布防设置成功
                string msg = Language.StringByID(R.MyInternationalizationString.uSetRemoveHomeGarrisonSuccess);
                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                control.Show();
            });
        }
@@ -246,19 +226,10 @@
                //根据布防模式,设置图标的选择状态
                this.SetIconStatuByGarrisonMode(GarrisonMode.RemoveGarrison);
                if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
                {
                    //添加布防上报的行控件
                    var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
                    form?.AddSafeguardLogPushRow(null);
                }
                else
                {
                    //离家布防设置成功
                    string msg = Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess);
                    var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                    control.Show();
                }
                //离家布防设置成功
                string msg = Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess);
                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                control.Show();
            });
        }
@@ -373,7 +344,7 @@
                int backHeight = Application.GetMinRealAverage(132);
                btnBack = new NormalViewControl(backHeight, backHeight, false);
                btnBack.Gravity = Gravity.CenterHorizontal;
                btnBack.Radius = (uint)backHeight;
                btnBack.Radius = (uint)backHeight / 2;
                btnBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
                this.AddChidren(btnBack, ChidrenBindMode.BindEventOnly);