| | |
| | | //Log出力
|
| | | string msg = "当前激活的界面[" + UserCenterResourse.NowActionFormID + "]";
|
| | | HdlLogLogic.Current.WriteLog(ex, msg);
|
| | | //出现未知错误
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
|
| | | //电机数据异常,请重置电机
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain));
|
| | | try
|
| | | {
|
| | | this.listView.RemoveAll();
|
| | |
| | | }
|
| | | oldProValue = nowValue;
|
| | | checking = true;
|
| | | if (curtainData.DeleteOpenLimit == true)
|
| | | {
|
| | | //重置开限位点
|
| | | var result = await HdlDeviceCurtainLogic.Current.DeleteCurtainLimitPoint(curtainDevice, Rollershade.LimiType.UpLimit);
|
| | | if (result == false)
|
| | | {
|
| | | checking = false;
|
| | | continue;
|
| | | }
|
| | | curtainData.DeleteOpenLimit = false;
|
| | | }
|
| | |
|
| | | //将窗帘调整到指定百分比
|
| | | this.sendDiv = 1;
|
| | | curtainDevice.WcdGoToTiltValue(nowValue);
|
| | |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uCommitCurtainOpenLimitMsg);
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
|
| | | {
|
| | | decimal openValue = ((decimal)curtainData.OpenLimitPersent / 100) * curtainData.CurtainLength;
|
| | | decimal closeValue = ((decimal)curtainData.CloseLimitPersent / 100) * curtainData.CurtainLength;
|
| | | if (openValue < 0) { openValue = 0; }
|
| | | if (closeValue < 0) { closeValue = curtainData.CurtainLength; }
|
| | | //执行确认及覆盖上限位点
|
| | | var result = await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.UpLimit,
|
| | | curtainData.OpenLimitPersent, curtainData.CloseLimitPersent);
|
| | | (int)openValue, (int)closeValue);
|
| | | if (result == true)
|
| | | {
|
| | | curtainData.DeleteOpenLimit = true;
|
| | | this.receiveOpenlimit = false;
|
| | | }
|
| | | });
|
| | |
| | | }
|
| | | checking = true;
|
| | | oldProValue = nowValue;
|
| | | if (curtainData.DeleteCloseLimit == true)
|
| | | {
|
| | | //重置合限位点
|
| | | var result = await HdlDeviceCurtainLogic.Current.DeleteCurtainLimitPoint(curtainDevice, Rollershade.LimiType.DownLimit);
|
| | | if (result == false)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | curtainData.DeleteCloseLimit = false;
|
| | | }
|
| | |
|
| | | //将窗帘调整到指定百分比
|
| | | this.sendDiv = 2;
|
| | | curtainDevice.WcdGoToTiltValue(nowValue);
|
| | |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uCommitCurtainCloseLimitMsg);
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
|
| | | {
|
| | | //执行确认及覆盖合限位点
|
| | | decimal openValue = ((decimal)curtainData.OpenLimitPersent / 100) * curtainData.CurtainLength;
|
| | | decimal closeValue = ((decimal)curtainData.CloseLimitPersent / 100) * curtainData.CurtainLength;
|
| | | if (openValue < 0) { openValue = 0; }
|
| | | if (closeValue < 0) { closeValue = curtainData.CurtainLength; }
|
| | | //执行确认及覆盖上限位点
|
| | | var result = await HdlDeviceCurtainLogic.Current.CommitCurtainLimitPoint(curtainDevice, Rollershade.CurtainPrivateInstalledLimi.DownLimit,
|
| | | curtainData.OpenLimitPersent, curtainData.CloseLimitPersent);
|
| | | (int)openValue, (int)closeValue);
|
| | |
|
| | | if (result == true)
|
| | | {
|
| | | curtainData.DeleteCloseLimit = true;
|
| | | this.receiveCloseLimit = false;
|
| | | }
|
| | | });
|
| | |
| | | /// false:电机方向正向;true:电机方向反向
|
| | | /// </summary>
|
| | | public bool Direction = false;
|
| | | /// <summary>
|
| | | /// 是否重置开限位点
|
| | | /// </summary>
|
| | | public bool DeleteOpenLimit = true;
|
| | | /// <summary>
|
| | | /// 是否重置合限位点
|
| | | /// </summary>
|
| | | public bool DeleteCloseLimit = true;
|
| | | /// <summary>
|
| | | /// 开限位的值
|
| | | /// </summary>
|