| | |
| | | /// <param name="i_diviceMac">设备Mac地址</param>
|
| | | public void ShowForm(string i_diviceMac)
|
| | | {
|
| | | this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_diviceMac);
|
| | | this.listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(i_diviceMac);
|
| | | //收集全部端点
|
| | | foreach (var device in this.listDevice)
|
| | | {
|
| | |
| | |
|
| | | var btnIcon = new IconViewControl(78);
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device);
|
| | | HdlDeviceCommonLogic.Current.SetDeviceIconToControl(btnIcon, device);
|
| | | btnIconBack.AddChidren(btnIcon);
|
| | | frameTable.ChangedChidrenBindMode(btnIconBack, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnIcon = btnIcon;
|
| | |
|
| | | //设备名称
|
| | | var btnDeviceName = new NormalViewControl(700, 60, true);
|
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | btnDeviceName.X = Application.GetRealWidth(193);
|
| | | btnDeviceName.Y = Application.GetRealHeight(45);
|
| | | frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
|
| | |
| | |
|
| | | frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.actionDeviceKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | this.actionDeviceKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | |
|
| | | var form = new IndoorUnitSettionForm();
|
| | | form.AddForm(device);
|
| | | };
|
| | |
|
| | | dicControl[Common.LocalDevice.Current.GetDeviceMainKeys(device)] = rowInfo;
|
| | | dicControl[HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device)] = rowInfo;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | {
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("IndoorUnitListFormEvent", ReceiveComandDiv.A设备属性上报, (device) =>
|
| | | {
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (dicControl.ContainsKey(mainkeys) == false || device.DeviceStatusReport.CluterID != 513)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
|
| | | var localDevice = HdlDeviceCommonLogic.Current.GetDevice(mainkeys);
|
| | | if (localDevice == null)
|
| | | {
|
| | | return;
|
| | |
| | | if (this.actionDeviceKeys != null && dicControl.ContainsKey(this.actionDeviceKeys) == true)
|
| | | {
|
| | | //刷新设备信息
|
| | | var device = Common.LocalDevice.Current.GetDevice(this.actionDeviceKeys);
|
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(this.actionDeviceKeys);
|
| | | if (device != null)
|
| | | {
|
| | | var contr = dicControl[this.actionDeviceKeys];
|
| | | contr.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | contr.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | contr.btnRoom.Text = HdlRoomLogic.Current.GetRoomNameByDevice(device);
|
| | | }
|
| | | }
|