| | |
| | | {
|
| | | if (m_CurrentRoom == null && Lists.Count > 0)
|
| | | {
|
| | | if (m_CurrentRoom == null) { m_CurrentRoom = Lists[0]; }
|
| | | return Lists[0];
|
| | | }
|
| | | return m_CurrentRoom;
|
| | |
| | | /// </summary> |
| | | public static void RefreshAllRoomByLocation()
|
| | | {
|
| | | Lists.Clear();
|
| | | var homeTemp = Config.Instance.Home;
|
| | | homeTemp.RoomFilePathList.Clear();
|
| | |
|
| | |
| | | if (listFile.Contains(fRoom) == true)
|
| | | {
|
| | | listFile.Remove(fRoom);
|
| | | homeTemp.AddRoomListFilePath(fRoom);
|
| | | homeTemp.RoomFilePathList.Add(fRoom);
|
| | | }
|
| | |
|
| | | var listRoomFile = new List<string>();
|
| | |
| | | {
|
| | | if (fileName.StartsWith("Room_"))
|
| | | {
|
| | | homeTemp.AddRoomListFilePath(fileName);
|
| | | homeTemp.RoomFilePathList.Add(fileName);
|
| | | listRoomFile.Add(fileName);
|
| | | }
|
| | | }
|
| | |
| | | //保存到本地 |
| | | Save(); |
| | | |
| | | //添加自动备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(FileName); |
| | | if (saveRealRoom == true && LocalDevice.Current.GetDevicesCountByMac(device.DeviceAddr) == 1)
|
| | | {
|
| | | //如果只有一个回路,则修改真实物理设备的房间
|