| | |
| | | public double Latitude = 0; |
| | | |
| | | /// <summary> |
| | | /// 房间路径列表 |
| | | /// 房间列表(房间的ID) |
| | | /// </summary> |
| | | public List<string> RoomFilePathList = new List<string> { }; |
| | | public List<string> ListRooms = new List<string>(); |
| | | |
| | | /// <summary> |
| | | /// 楼层字典 |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// InitFloor |
| | | /// 设置当前楼层的ID |
| | | /// </summary> |
| | | public void InitFloor() |
| | | public void SetCurrentFloorId() |
| | | { |
| | | if (Config.Instance.Home.FloorDics.Count > 0 && string.IsNullOrEmpty(CurrentFloorId)) |
| | | { |
| | |
| | | #region ◆ 添加房间路径_________________________ |
| | | |
| | | /// <summary> |
| | | /// 添加【房间路径】到房间路径列表 |
| | | /// 添加房间ID |
| | | /// </summary> |
| | | /// <returns><c>true</c>, if room list file path was added, <c>false</c> otherwise.</returns> |
| | | /// <param name="roomFilePath">Room file path.</param> |
| | | public bool AddRoomListFilePath(string roomFilePath) |
| | | public void AddRoomId(string roomId) |
| | | { |
| | | if (RoomFilePathList.Contains(roomFilePath)) |
| | | { |
| | | return false; |
| | | if (ListRooms.Contains(roomId) == false) |
| | | {
|
| | | ListRooms.Add(roomId);
|
| | | this.Save(); |
| | | } |
| | | RoomFilePathList.Add(roomFilePath); |
| | | Save(); |
| | | return true; |
| | | } |
| | | |
| | | #endregion |
| | |
| | | #region ◆ 删除房间路径_________________________ |
| | | |
| | | /// <summary> |
| | | /// 移除房间路径 |
| | | /// 移除房间Id |
| | | /// </summary> |
| | | /// <returns><c>true</c>, if room list file path was added, <c>false</c> otherwise.</returns> |
| | | /// <param name="roomFilePath">Room file path.</param> |
| | | public bool RemoveRoomListFilePath(string roomFilePath) |
| | | public void RemoveRoomId(string roomId) |
| | | { |
| | | if (!RoomFilePathList.Contains(roomFilePath)) |
| | | { |
| | | return false; |
| | | if (ListRooms.Contains(roomId)==true) |
| | | {
|
| | | ListRooms.Remove(roomId);
|
| | | Save(); |
| | | } |
| | | RoomFilePathList.Remove(roomFilePath); |
| | | Save(); |
| | | return true; |
| | | } |
| | | |
| | | #endregion |