| | |
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 分类界面的窗帘设备行控件
|
| | | /// </summary>
|
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param>
|
| | | public DeviceCurtainRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
|
| | | {
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化控件
|
| | | /// </summary>
|
| | | /// <param name="i_device"></param>
|
| | | public override void InitControl(CommonDevice i_device)
|
| | | public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
|
| | | {
|
| | | base.InitControl(i_device);
|
| | | base.InitControl(i_device, i_nowSelectRoom);
|
| | |
|
| | | //添加跳转深度卡片信息事件
|
| | | this.AddDetailInfoEvent(i_device);
|
| | |
| | | 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);
|
| | | };
|
| | |
|
| | |
| | | {
|
| | | //窗帘类型的深度卡片界面
|
| | | var form = new MainPage.ControlForm.DeviceCurtainDetailCardForm();
|
| | | form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1316);
|
| | | form.RowOrCardControl = this;
|
| | | form.AddForm(i_device, this.nowSelectRoom, 965, 1316);
|
| | | form.FormCloseEvent += this.CardDetailInfoBackEvent;
|
| | | };
|
| | | }
|
| | |
| | | /// </summary>
|
| | | public override void SendStatuComand()
|
| | | {
|
| | | //如果住宅为虚拟住宅,此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|