| | |
| | | btnMore.InitControl();
|
| | | btnMore.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //获取设备属于【晾衣架】
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice> { device });
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.Airer)
|
| | | {
|
| | | var form = new Shared.Phone.UserCenter.Device.DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | }
|
| | | else
|
| | | {
|
| | | var detailInfo = new DeviceDetailInfoForm();
|
| | | detailInfo.AddForm(device, nowSelectRoom);
|
| | | }
|
| | |
|
| | | };
|
| | |
|
| | | //初始化中部信息
|
| | |
| | | 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);
|
| | |
|
| | | if (this.device.Type == DeviceType.Airer && this.device.DeviceAddr == report.DeviceAddr)
|
| | | {
|
| | | //晾衣架特殊:5个回路代表不同的功能,但是默认本地只显示了第一个回路
|
| | | //所以条件特殊判断
|
| | | //检测结果
|
| | | if (this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, report) == true)
|
| | | {
|
| | | //结果已经接收到
|
| | | this.ResponeResult = 1;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | string mainKey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report);
|
| | | if (mainKeys != mainKey2)
|
| | | {
|
| | | //不是同一个东西
|
| | |
| | | {
|
| | | //结果已经接收到
|
| | | this.ResponeResult = 1;
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | 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);
|
| | |
|
| | | //回调函数
|