| | |
| | | var btnSwitch = this.AddSwitchControl();
|
| | | btnSwitch.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果住宅为虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //直接变更缓存
|
| | | ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = btnSwitch.IsSelected == true ? 0 : 100;
|
| | | this.RefreshControlInfo(this.device);
|
| | | return;
|
| | | }
|
| | |
|
| | | bool setStatu = !btnSwitch.IsSelected;
|
| | | //变更卡片状态
|
| | | this.SetCardOpenStatu(setStatu);
|
| | |
| | | /// </summary>
|
| | | public override void SendStatuComand()
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|