| | |
| | | btnOpen.X = Application.GetRealWidth(625) - btnOpen.XOffset;
|
| | | btnOpen.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果住宅为虚拟住宅,直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 100;
|
| | | base.RefreshControlInfo(i_device);
|
| | | return;
|
| | | }
|
| | | ((Rollershade)i_device).CurtainUpDownStopControl(0);
|
| | | };
|
| | |
|
| | |
| | | btnStop.X = Application.GetRealWidth(769) - btnOpen.XOffset;
|
| | | btnStop.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | ((Rollershade)i_device).CurtainUpDownStopControl(2);
|
| | | //如果住宅为虚拟住宅,此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | ((Rollershade)i_device).CurtainUpDownStopControl(2);
|
| | | }
|
| | | };
|
| | |
|
| | | //关闭
|
| | |
| | | btnClose.X = Application.GetRealWidth(896) - btnOpen.XOffset;
|
| | | btnClose.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果住宅为虚拟住宅,直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 0;
|
| | | base.RefreshControlInfo(i_device);
|
| | | return;
|
| | | }
|
| | | ((Rollershade)i_device).CurtainUpDownStopControl(1);
|
| | | };
|
| | |
|
| | |
| | | /// </summary>
|
| | | public override void SendStatuComand()
|
| | | {
|
| | | //如果住宅为虚拟住宅,此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|