| | |
| | |
|
| | | //设备名字
|
| | | this.btnDeviceName = new NormalViewControl(600, 60, true);
|
| | | if (this.device.Type == DeviceType.WindowCoveringDevice)
|
| | | if (this.device.Type == DeviceType.WindowCoveringDevice || this.device.Type == DeviceType.Airer) |
| | | {
|
| | | //窗帘因为右边有三个按钮,所以需要所有名字的宽度
|
| | | //窗帘和晾衣架因为右边有三个按钮,所以需要所有名字的宽度 |
| | | this.btnDeviceName.Width = Application.GetRealWidth(360);
|
| | | }
|
| | | btnDeviceName.X = Application.GetRealWidth(181);
|
| | | //当指定实际坐标时,这里需要的偏移量为2倍
|
| | | btnDeviceName.Y = Application.GetRealHeight(16) + this.chidrenYaxis * 2; |
| | | |
| | | //晾衣架显示模块名字(Mac名字) |
| | | if (this.device.Type == DeviceType.Airer) |
| | | { |
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceMacName(i_device); |
| | | } |
| | | else |
| | | { |
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device); |
| | | }
|
| | | btnDeviceName.SelectedTextColor = Common.ZigbeeColor.Current.GXCTextSelectedColor;
|
| | | this.frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent); |
| | | |
| | |
| | | //设备图标也刷新
|
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnDeviceIcon, i_device);
|
| | | //设备名字
|
| | | //晾衣架显示模块名字(Mac名字) |
| | | if (this.device.Type == DeviceType.Airer) |
| | | { |
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceMacName(i_device); |
| | | } |
| | | else |
| | | { |
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | }
|
| | | //检测设备是否是打开状态
|
| | | bool isOpen = this.CheckIsOpenStatu(i_device);
|
| | | if (this.isHadOpenSwitch == true && i_device.HadReadDeviceStatu == false)
|