| | |
| | | //导轨长度为0时
|
| | | if (curtainData.CurtainLength <= 0)
|
| | | {
|
| | | //电机数据异常,请重置电机
|
| | | //电机数据异常,确认已经安装导轨后,请重置电机
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain));
|
| | | try
|
| | | {
|
| | |
| | | //Log出力
|
| | | string msg = "当前激活的界面[" + UserCenterResourse.NowActionFormID + "]";
|
| | | HdlLogLogic.Current.WriteLog(ex, msg);
|
| | | //电机数据异常,请重置电机
|
| | | //电机数据异常,确认已经安装导轨后,请重置电机
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain));
|
| | | try
|
| | | {
|
| | |
| | | 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) =>
|
| | | {
|
| | | //变更方向
|
| | |
| | | curtainData.Direction = index == 0 ? false : true;
|
| | | };
|
| | | };
|
| | | //如果当前是展示模板,则不能编辑
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | rowDirection.CanClick = false;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //数据变更,百分比
|
| | | curtainData.OpenLimitPersent = value;
|
| | | };
|
| | | //如果当前是展示模板,则不能编辑
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | openSeekBar.Enable = false;
|
| | | btnMinus.CanClick = false;
|
| | | btnPlus.CanClick = false;
|
| | | btnSave.CanClick = false;
|
| | | }
|
| | |
|
| | | //虚拟住宅不需要监听
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | |
| | | //数据变更,百分比
|
| | | curtainData.CloseLimitPersent = value;
|
| | | };
|
| | | //如果当前是展示模板,则不能编辑
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | closeSeekBar.Enable = false;
|
| | | btnMinus.CanClick = false;
|
| | | btnPlus.CanClick = false;
|
| | | btnSave.CanClick = false;
|
| | | }
|
| | | //虚拟住宅不需要监听
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | |
| | | //如果当前是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var data = ModelData.DeviceModelDataLogic.Current.GetCurtainLimitPoint(curtainDevice);
|
| | | var data = TemplateData.TemplateDeviceDataLogic.Current.GetCurtainLimitPoint(curtainDevice);
|
| | | curtainData.Direction = data.Direction;
|
| | | curtainData.CurtainLength = data.curtainLength;
|
| | | curtainData.OpenLimitValue = data.upLimit;
|
| | |
| | | /// </summary>
|
| | | private void ReceiveLimitData()
|
| | | {
|
| | | //如果当前是展示模板,则需要处理
|
| | | if (Common.Config.Instance.Home.IsShowTemplate == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (HdlGatewayReceiveLogic.Current.IsEsixt("ReceiveLimitData") == true)
|
| | | {
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData");
|