HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-09-18 c7df85937f73fb347ee0b19e9c052d2d00a6df6c
ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs
@@ -149,71 +149,61 @@
            btnIcon.UnSelectedImagePath = "Item/Tips.png";
            bodyFrameLayout.AddChidren(btnIcon);
            int XX = 0;
            int contrWidth = 0;
            string msg = string.Empty;
            //24小时防区
            if (zoonID == 1)
            {
                //24小时防区不受布防、撤防影响{0}防区被触发立即报警{0}一般设置烟雾、燃气、水浸等传感器
                msg = Language.StringByID(R.MyInternationalizationString.u24HourSectorsTipMsg);
                btnIcon.X = Application.GetRealWidth(233);
                XX = Application.GetRealWidth(282);
                contrWidth = Application.GetRealWidth(580);
            }
            //静音防区
            else if (zoonID == 2)
            {
                //静音防区不受布防、撤防影响,防区被{0}触发立即报警,通常不产生声音或{0}其他提示,只发送信息到特定的接收者
                msg = Language.StringByID(R.MyInternationalizationString.uMuteSectorsTipMsg);
                btnIcon.X = Application.GetRealWidth(202);
                XX = Application.GetRealWidth(279);
                contrWidth = Application.GetRealWidth(614);
            }
            //内部防区
            else if (zoonID == 4)
            {
                //在离家布防模式下,内部防区传感器触发{0}立即报警。在在家布防模式下{0}内部防区所有传感器不参与报警
                msg = Language.StringByID(R.MyInternationalizationString.uInteriorSectorsTipMsg);
                btnIcon.X = Application.GetRealWidth(179);
                XX = Application.GetRealWidth(256);
                contrWidth = Application.GetRealWidth(651);
            }
            //周界防区
            else if (zoonID == 5)
            {
                //离家布防模式或在家布防模式下{0}周界防区传感器触发立即报警
                msg = Language.StringByID(R.MyInternationalizationString.uPerimeterSectorsTipMsg);
                btnIcon.X = Application.GetRealWidth(239);
                XX = Application.GetRealWidth(317);
                contrWidth = Application.GetRealWidth(510);
            }
            //出入防区
            else
            {
                //在布防后系统提供一定的延迟时间。出门时{0}外出延时结束后,系统触发目标报警{0}回家时,进入延时结束后,系统触发目标报警
                msg = Language.StringByID(R.MyInternationalizationString.uInAndOutSectorsTipMsg);
                btnIcon.X = Application.GetRealWidth(156);
                XX = Application.GetRealWidth(216);
                contrWidth = Application.GetRealWidth(721);
            }
            var ArryMsg = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            int yy = Application.GetRealHeight(1428);
            int firstXX = 0;
            for (int i = 0; i < ArryMsg.Length; i++)
            {
                var btnTip = new NormalViewControl(contrWidth, Application.GetRealHeight(50), false);
                var btnTip = new NormalViewControl(100, 50, true);
                btnTip.Y = yy;
                btnTip.TextAlignment = TextAlignment.Center;
                btnTip.TextColor = UserCenterColor.Current.TextGrayColor1;
                btnTip.TextSize = 12;
                btnTip.X = XX;
                btnTip.Y = yy;
                btnTip.Text = ArryMsg[i];
                btnTip.Width = btnTip.GetRealWidthByText();
                btnTip.Gravity = Gravity.CenterHorizontal;
                bodyFrameLayout.AddChidren(btnTip);
                yy = btnTip.Bottom;
                if (i == 0)
                {
                    //记录第一条msg的X轴
                    firstXX = btnTip.X;
                }
            }
            btnIcon.X = firstXX - Application.GetRealWidth(23) - btnIcon.Width;
        }
        #endregion