| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | List<Room> roomsShowed; |
| | | |
| | | public ClassificationPage() |
| | | { |
| | | bodyView = this; |
| | | roomsShowed = new List<Room>(); |
| | | roomsShowed.AddRange(DB_ResidenceData.residenceData.rooms); |
| | | } |
| | | |
| | | public void LoadPage() |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = UserConfig.Instance.CurFoor, |
| | | Text = OnAppConfig.Instance.CurFoor, |
| | | }; |
| | | roomFloorChangeView.AddChidren(btnFloor); |
| | | /// <summary> |
| | |
| | | roomFloorChangeView.AddChidren(btnSwitchDipaly); |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 房间列表区域 |
| | | /// </summary> |
| | |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomPageView.AddChidren(roomListView); |
| | | LoadRoomRows(); |
| | | roomListView.AddChidren(new Button() { Height = Application.GetRealHeight(20) });//太高视图,将导航了遮挡的部分完整显示 |
| | | #endregion |
| | | |
| | | foreach (var room in DB_ResidenceData.residenceData.rooms) |
| | | LoadDialog_ChangeFloor(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载房间列表区域 |
| | | /// </summary> |
| | | void LoadRoomRows () |
| | | { |
| | | roomListView.RemoveAll(); |
| | | foreach (var room in roomsShowed) |
| | | { |
| | | var roomView = new FrameLayout() |
| | | { |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/InfoIcon/TempIcon.png", |
| | | UnSelectedImagePath = "Public/DeviceInfoIcon/TempIcon.png", |
| | | }; |
| | | environmentalView.AddChidren(btnTempIcon); |
| | | |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/InfoIcon/HumidityIcon.png", |
| | | UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", |
| | | }; |
| | | environmentalView.AddChidren(btnHumidityIcon); |
| | | |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/InfoIcon/Pm25Icon.png", |
| | | UnSelectedImagePath = "Public/DeviceInfoIcon/Pm25Icon.png", |
| | | }; |
| | | environmentalView.AddChidren(btnPm25Icon); |
| | | |
| | |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | UnSelectedImagePath = "Classification/Room/AllCloseIcon.png", |
| | | Tag = "AllClose" |
| | | Tag = "AllClose", |
| | | Visible = false |
| | | }; |
| | | roomView.AddChidren(btnAllClose); |
| | | |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | var btn = new Button() |
| | |
| | | }; |
| | | |
| | | } |
| | | |
| | | roomListView.AddChidren(new Button() { Height = Application.GetRealHeight(20) });//太高视图,将导航了遮挡的部分完整显示 |
| | | #endregion |
| | | |
| | | LoadDialog_ChangeFloor(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | int functionOnCount = 0; |
| | | switch (item) |
| | | { |
| | | case FunctionCategory.Light: |
| | | case ShowFunction.Light: |
| | | #region Light |
| | | btnName.TextID = StringId.Lights; |
| | | functionCount = DB_ResidenceData.residenceData.functionList.lights.Count; |
| | |
| | | Height = Application.GetRealWidth(32), |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | IsSelected = functionCount == functionOnCount |
| | | }; |
| | | functionView.AddChidren(btnLightPower); |
| | | btnLightPower.MouseUpEventHandler = (sender, e) => { |
| | |
| | | }; |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.AC: |
| | | case ShowFunction.AC: |
| | | #region AC |
| | | btnName.TextID = StringId.AC; |
| | | functionCount = DB_ResidenceData.residenceData.functionList.aCs.Count; |
| | |
| | | Height = Application.GetRealWidth(32), |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | IsSelected = functionCount == functionOnCount |
| | | }; |
| | | functionView.AddChidren(btnAcPower); |
| | | btnAcPower.MouseUpEventHandler = (sender, e) => { |
| | |
| | | }; |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.Curtain: |
| | | case ShowFunction.Curtain: |
| | | #region Curtain |
| | | btnName.TextID = StringId.Curtain; |
| | | functionCount = DB_ResidenceData.residenceData.functionList.curtains.Count; |
| | |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | IsSelected = functionCount == functionOnCount |
| | | }; |
| | | functionView.AddChidren(btnClose); |
| | | |
| | |
| | | }; |
| | | #endregion |
| | | break; |
| | | case FunctionCategory.FloorHeating: |
| | | case ShowFunction.FloorHeating: |
| | | btnName.TextID = StringId.FloorHeating; |
| | | break; |
| | | case FunctionCategory.DoorLock: |
| | | case ShowFunction.DoorLock: |
| | | btnName.TextID = StringId.DoorLock; |
| | | break; |
| | | case FunctionCategory.Electric: |
| | | case ShowFunction.Electric: |
| | | btnName.TextID = StringId.Electric; |
| | | break; |
| | | case FunctionCategory.EnergyMonitoring: |
| | | case ShowFunction.EnergyMonitoring: |
| | | btnName.TextID = StringId.EnergyMonitoring; |
| | | break; |
| | | case FunctionCategory.Environmental: |
| | | case ShowFunction.Environmental: |
| | | btnName.TextID = StringId.Environmental; |
| | | break; |
| | | case FunctionCategory.FreshAir: |
| | | case ShowFunction.FreshAir: |
| | | btnName.TextID = StringId.FreshAir; |
| | | break; |
| | | case FunctionCategory.Music: |
| | | case ShowFunction.Music: |
| | | btnName.TextID = StringId.Music; |
| | | break; |
| | | case FunctionCategory.Panel: |
| | | case ShowFunction.Panel: |
| | | btnName.TextID = StringId.Panel; |
| | | break; |
| | | case FunctionCategory.SecurityMonitoring: |
| | | case ShowFunction.SecurityMonitoring: |
| | | btnName.TextID = StringId.SecurityMonitoring; |
| | | break; |
| | | case FunctionCategory.Sensor: |
| | | case ShowFunction.Sensor: |
| | | btnName.TextID = StringId.Sensor; |
| | | break; |
| | | case FunctionCategory.VideoIntercom: |
| | | case ShowFunction.VideoIntercom: |
| | | btnName.TextID = StringId.VideoIntercom; |
| | | break; |
| | | |
| | |
| | | Tag = item + "_onCount" |
| | | }; |
| | | functionView.AddChidren(btnFunctionCount); |
| | | |
| | | |
| | | |
| | | |
| | | index++; |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | |
| | | #region 切换楼层 |
| | | /// <summary> |
| | |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(100), |
| | | Width = Application.GetRealWidth(160), |
| | | Height = Application.GetRealHeight(190), |
| | | Height = Application.GetRealHeight(203), |
| | | BackgroundImagePath = "PersonalCenter/HomeListbg.png", |
| | | }; |
| | | dialogBody.AddChidren(dispalyView); |
| | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(8), |
| | | Y = Application.GetRealHeight(10), |
| | | Y = Application.GetRealHeight(15), |
| | | Width = Application.GetRealWidth(150), |
| | | Height = Application.GetRealHeight(44 * 4), |
| | | Height = Application.GetRealHeight(45 * 4), |
| | | }; |
| | | dispalyView.AddChidren(contentView); |
| | | |
| | |
| | | btnHomeName.MouseUpEventHandler += (senderH, en) => |
| | | { |
| | | dialog.Close(); |
| | | |
| | | btnFloor.Text = floor; |
| | | UserConfig.Instance.SaveUserConfig(); |
| | | roomsShowed.Clear(); |
| | | if (floor == Language.StringByID(StringId.All)) |
| | | { |
| | | roomsShowed.AddRange(DB_ResidenceData.residenceData.rooms); |
| | | } |
| | | else |
| | | { |
| | | foreach (var room in DB_ResidenceData.residenceData.rooms) |
| | | { |
| | | if (room.floor == floor) |
| | | { |
| | | roomsShowed.Add(room); |
| | | } |
| | | } |
| | | } |
| | | LoadRoomRows(); |
| | | }; |
| | | } |
| | | |