| | |
| | | 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);
|
| | | };
|
| | |
|
| | |
| | | //深度卡片信息
|
| | | this.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var rollerShadeControl = new Phone.Device.Curtain.RollerShadeControl();
|
| | | UserView.HomePage.Instance.AddChidren(rollerShadeControl);
|
| | | UserView.HomePage.Instance.PageIndex += 1;
|
| | | UserView.HomePage.Instance.ScrollEnabled = false;
|
| | | rollerShadeControl.Show(i_device, UserCenter.HdlRoomLogic.Current.CurrentRoom);
|
| | | rollerShadeControl.action += this.CardDetailInfoBackEvent;
|
| | | //窗帘类型的深度卡片界面
|
| | | var form = new MainPage.ControlForm.DeviceCurtainDetailCardForm();
|
| | | form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1316);
|
| | | form.FormCloseEvent += this.CardDetailInfoBackEvent;
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | /// <returns></returns>
|
| | | public override bool CheckIsOpenStatu(CommonDevice i_device)
|
| | | {
|
| | | return ((Rollershade)i_device).WcdCurrentPositionLiftPercentage > 10;
|
| | | return ((Rollershade)i_device).WcdCurrentPositionLiftPercentage > 0;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// </summary>
|
| | | public override void SendStatuComand()
|
| | | {
|
| | | //如果住宅为虚拟住宅,此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendCurtainStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendCurtainStatuComand(this.device);
|
| | | }
|
| | | if (((Rollershade)this.device).WcdType == -1)
|
| | | {
|
| | |
| | | //无需变更
|
| | | return;
|
| | | }
|
| | | this.WcdType = wcdType;
|
| | | if (this.WcdType == 0)
|
| | | {
|
| | | btnOpen.UnSelectedImagePath = "RollerShade/Up.png";
|