| | |
| | | {
|
| | | foreach (var device in this.listNewDevice)
|
| | | {
|
| | | //保存这个设备属于哪个区域
|
| | | device.DeviceRoomId = roomKeys;
|
| | | device.ReSave();
|
| | | var room = Common.Room.CurrentRoom.GetRoomByDevice(device);
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | if (room == null)
|
| | |
| | | Common.Room.CurrentRoom.ChangedRoom(device, roomKeys);
|
| | | }
|
| | | }
|
| | | //保存设备房间索引
|
| | | Common.LocalDevice.Current.SaveRealDeviceRoomId(this.listNewDevice, roomKeys);
|
| | | };
|
| | |
|
| | | //更多配置
|
| | |
| | | }
|
| | | //添加设备到列表
|
| | | this.LoadFormMethodByName("DeviceListMainForm", "AddDeviceToFormTable", listNewDevice[0].DeviceAddr);
|
| | | |
| | |
|
| | | base.CloseForm();
|
| | | }
|
| | | #endregion
|