| | |
| | | listText.Add(Language.StringByID(R.MyInternationalizationString.uReverseDirection));//反向
|
| | |
|
| | | var form = new BottomItemSelectForm();
|
| | | form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, nowSelectNo);
|
| | | form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, null, nowSelectNo);
|
| | | form.FinishSelectEvent += (index) =>
|
| | | {
|
| | | //变更方向
|
| | |
| | | btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
|
| | | frameText.AddChidren(btnOk, ChidrenBindMode.BindEvent);
|
| | | //底线
|
| | | var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine1.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine1.Y = btnOk.Bottom - this.GetPictrueRealSize(8);
|
| | |
| | | frameText.AddChidren(btnDown, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //底线
|
| | | var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine2.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine2.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine2.Y = btnDown.Bottom - this.GetPictrueRealSize(8);
|
| | |
| | | {
|
| | | curtainDevice.CurtainUpDownStopControl(1);
|
| | | };
|
| | | //展示模板或者虚拟住宅,则无效
|
| | | if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | frameIconback.CanClick = false;
|
| | | }
|
| | | //重写控件点击效果
|
| | | frameIconback.SelectStatuEvent += (select) =>
|
| | | {
|
| | |
| | | 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) =>
|
| | | {
|
| | |
| | | btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
|
| | | frameText.AddChidren(btnOk, ChidrenBindMode.BindEvent);
|
| | | //底线
|
| | | var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine1.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine1.Y = btnOk.Bottom - this.GetPictrueRealSize(8);
|
| | |
| | | frameText.AddChidren(btnDown, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //底线
|
| | | var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
|
| | | var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine2.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnLine2.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine2.Y = btnDown.Bottom - this.GetPictrueRealSize(8);
|
| | |
| | | {
|
| | | curtainDevice.CurtainUpDownStopControl(0);
|
| | | };
|
| | | //展示模板或者虚拟住宅,则无效
|
| | | if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | frameIconback.CanClick = false;
|
| | | }
|
| | | //重写控件点击效果
|
| | | frameIconback.SelectStatuEvent += (select) =>
|
| | | {
|
| | |
| | | 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) =>
|
| | | {
|
| | |
| | | });
|
| | | });
|
| | | };
|
| | | //展示模板或者虚拟住宅,则无效
|
| | | if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | rowReset.CanClick = false;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// <returns></returns>
|
| | | private bool InitCurtainDefultData()
|
| | | {
|
| | | this.curtainData = new CurtainData();
|
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var data = HdlTemplateDeviceDataLogic.Current.GetCurtainLimitPoint(curtainDevice);
|
| | | curtainData.Direction = data.Direction;
|
| | | return true;
|
| | | }
|
| | |
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | this.curtainData = new CurtainData();
|
| | |
|
| | | bool receiptData = false;
|
| | | string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(curtainDevice);
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", ReceiveComandDiv.A设备属性上报, (device) =>
|
| | | {
|
| | | string checkKey = LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string checkKey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258)
|
| | | {
|
| | | return;
|
| | |
| | | //获取窗帘方向与限位设置失败
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetCurtainDirectionAndLimitSettionFail);
|
| | | //拼接上【网关回复超时】的Msg
|
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "回复超时");
|
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, null, "回复超时");
|
| | | this.ShowMassage(ShowMsgType.Tip, msg);
|
| | | return false;
|
| | | }
|