| | |
| | | /// <summary>
|
| | | /// 主页的设备卡片控件底层共通(宽度:458 + 14 * 2 高度:305 + 43)
|
| | | /// </summary>
|
| | | public class DeviceCardCommon : FrameLayoutControl
|
| | | public class DeviceCardCommon : FrameLayoutStatuControl
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | |
| | | this.ChangedChidrenBindMode(fraDeviceRound, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //状态文本控件
|
| | | this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(280), HdlControlLogic.Current.GetPictrueRealSize(63), false);
|
| | | this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(300), HdlControlLogic.Current.GetPictrueRealSize(63), false);
|
| | | btnStatu.X = HdlControlLogic.Current.GetPictrueRealSize(46);
|
| | | btnStatu.Y = HdlControlLogic.Current.GetPictrueRealSize(236);
|
| | | btnStatu.TextColor = UserCenterColor.Current.TextColor1;
|
| | |
| | | }
|
| | | //设备图标也刷新
|
| | | Common.LocalDevice.Current.SetDeviceIconToControl2(btnDeviceIcon, i_device);
|
| | | //名字刷新
|
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | //检测设备是否是打开状态
|
| | | bool isOpen = this.CheckIsOpenStatu(i_device);
|
| | | if (this.isHadOpenSwitch == true && i_device.HadReadDeviceStatu == false)
|
| | |
| | | /// <param name="oldOpenStatu">设备目前的开关状态</param>
|
| | | public void StartCheckResponeResult(bool oldOpenStatu)
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | this.ResponeResult = 0;
|
| | | //开关按钮不能再点击
|
| | | if (btnSwitch != null) { this.btnSwitch.CanClick = false; }
|