| | |
| | | btnDeviceName.Y = Application.GetRealHeight(46);
|
| | | btnDeviceName.TextSize = 15;
|
| | | btnDeviceName.IsBold = true;
|
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
|
| | | btnDeviceName.TextAlignment = TextAlignment.Center;
|
| | | btnDeviceName.Gravity = Gravity.CenterHorizontal;
|
| | |
| | |
|
| | | //房间图标
|
| | | var btnRoomIcon = new IconViewControl(81);
|
| | | btnRoomIcon.X = ControlCommonResourse.XXLeft;
|
| | | btnRoomIcon.X = HdlControlResourse.XXLeft;
|
| | | btnRoomIcon.UnSelectedImagePath = "Item/Room.png";
|
| | | btnRoomIcon.Gravity = Gravity.CenterVertical;
|
| | | frameRoomBlack.AddChidren(btnRoomIcon);
|
| | |
| | | /// </summary>
|
| | | private void AddDeviceReportEvent()
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
|
| | | //属性上报
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|
| | | string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report);
|
| | | string mainKey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report);
|
| | | if (mainKeys != mainKey2)
|
| | | {
|
| | | //不是同一个东西
|
| | |
| | | else
|
| | | {
|
| | | //刷新名字
|
| | | this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(this.device);
|
| | | this.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device);
|
| | | btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
|
| | | btnDeviceName.Gravity = Gravity.CenterHorizontal;
|
| | | if (this.nowSelectRoom == null)
|
| | |
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceDetailCardAttribute" + mainKeys);
|
| | |
|
| | | //回调函数
|