HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs
@@ -120,11 +120,11 @@
                listText.Add(Language.StringByID(R.MyInternationalizationString.uReverseDirection));//反向
                var form = new BottomItemSelectForm();
                form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, nowSelectNo);
                form.FinishSelectEvent += async (index) =>
                form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, null, nowSelectNo);
                form.FinishSelectEvent += (index) =>
                {
                    //变更方向
                    var result = await HdlDeviceCurtainLogic.Current.SetCurtainDirection(curtainDevice, index == 0 ? false : true);
                    var result = HdlDeviceCurtainLogic.Current.SetCurtainDirection(curtainDevice, index == 0 ? false : true);
                    if (result == false)
                    {
                        return;
@@ -201,7 +201,7 @@
            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(35), false);
            btnIcon.UnSelectedImagePath = "Item/DownTriangle.png";
            btnIcon.Gravity = Gravity.Center;
            frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
            frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
            var frameText = new FrameLayoutStatuControl();
            frameText.Y= this.GetPictrueRealSize(265);
@@ -213,7 +213,7 @@
            btnOk.TextID = R.MyInternationalizationString.uConfirm1;
            btnOk.TextAlignment = TextAlignment.Center;
            btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
            frameText.AddChidren(btnOk, ChidrenBindMode.BindEventOnly);
            frameText.AddChidren(btnOk, ChidrenBindMode.BindEvent);
            //底线
            var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
            btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
@@ -227,7 +227,7 @@
            btnDown.Y = btnOk.Bottom;
            btnDown.TextAlignment = TextAlignment.Center;
            btnDown.TextColor = UserCenterColor.Current.TextOrangeColor;
            frameText.AddChidren(btnDown, ChidrenBindMode.BindEventOnly);
            frameText.AddChidren(btnDown, ChidrenBindMode.BindEvent);
            //底线
            var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
@@ -241,6 +241,11 @@
            {
                curtainDevice.CurtainUpDownStopControl(1);
            };
            //展示模板或者虚拟住宅,则无效
            if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
            {
                frameIconback.CanClick = false;
            }
            //重写控件点击效果
            frameIconback.SelectStatuEvent += (select) =>
            {
@@ -265,6 +270,11 @@
                    await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.DownLimit, -1, -1);
                });
            };
            //展示模板或者虚拟住宅,则无效
            if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
            {
                frameText.CanClick = false;
            }
            //重写控件点击效果
            frameText.SelectStatuEvent += (select) =>
            {
@@ -310,7 +320,7 @@
            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(35), false);
            btnIcon.UnSelectedImagePath = "Item/UpTriangle.png";
            btnIcon.Gravity = Gravity.Center;
            frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
            frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
            var frameText = new FrameLayoutStatuControl();
            frameText.Y = this.GetPictrueRealSize(265);
@@ -322,7 +332,7 @@
            btnOk.TextID = R.MyInternationalizationString.uConfirm1;
            btnOk.TextAlignment = TextAlignment.Center;
            btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
            frameText.AddChidren(btnOk, ChidrenBindMode.BindEventOnly);
            frameText.AddChidren(btnOk, ChidrenBindMode.BindEvent);
            //底线
            var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
            btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
@@ -336,7 +346,7 @@
            btnDown.Y = btnOk.Bottom;
            btnDown.TextAlignment = TextAlignment.Center;
            btnDown.TextColor = UserCenterColor.Current.TextOrangeColor;
            frameText.AddChidren(btnDown, ChidrenBindMode.BindEventOnly);
            frameText.AddChidren(btnDown, ChidrenBindMode.BindEvent);
            //底线
            var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
@@ -350,6 +360,11 @@
            {
                curtainDevice.CurtainUpDownStopControl(0);
            };
            //展示模板或者虚拟住宅,则无效
            if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
            {
                frameIconback.CanClick = false;
            }
            //重写控件点击效果
            frameIconback.SelectStatuEvent += (select) =>
            {
@@ -374,6 +389,11 @@
                    await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.UpLimit, -1, -1);
                });
            };
            //展示模板或者虚拟住宅,则无效
            if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
            {
                frameText.CanClick = false;
            }
            //重写控件点击效果
            frameText.SelectStatuEvent += (select) =>
            {
@@ -429,6 +449,11 @@
                    });
                });
            };
            //展示模板或者虚拟住宅,则无效
            if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
            {
                rowReset.CanClick = false;
            }
        }
        #endregion
@@ -441,10 +466,17 @@
        /// <returns></returns>
        private bool InitCurtainDefultData()
        {
            this.curtainData = new CurtainData();
            //如果当前是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                var data = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainLimitPoint(curtainDevice);
                curtainData.Direction = data.Direction;
                return true;
            }
            //开启进度条
            this.ShowProgressBar();
            this.curtainData = new CurtainData();
            bool receiptData = false;
            string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);