| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | MainPage.CurPageIndex = 1; |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | #region top |
| | | FrameLayout topView = new FrameLayout() |
| | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.EnergyMonitoring: |
| | | #region 能源 |
| | | functionCount = FunctionList.List.GetEnergyList().Count; |
| | | functionOnCount = FunctionList.List.GetEnergyList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Environmental: |
| | | #region 环境数据 |
| | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | functionCount = FunctionList.List.GetAirFreshList().Count; |
| | | break; |
| | | case ShowFunction.Music: |
| | | functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | if(functionCount == 0) |
| | | { |
| | | functionCount = FunctionList.List.GetMusicList().Count; |
| | | } |
| | | break; |
| | | case ShowFunction.Panel: |
| | | break; |
| | |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | if (FunctionList.List.videoIntercom != null) |
| | | { |
| | | functionCount = 1; |
| | | } |
| | | break; |
| | | case ShowFunction.SecurityCenter: |
| | | functionCount = FunctionList.List.securities.Count; |
| | | #if DEBUG |
| | | functionCount = 1; |
| | | #endif |
| | | break; |
| | | |
| | | } |
| | |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(14), |
| | | Width = Application.GetRealWidth(120), |
| | | Width = Application.GetRealWidth(140), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | IsMoreLines = true, |
| | | }; |
| | | functionView.AddChidren(btnName); |
| | | |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter |
| | | && functionCount != 0) |
| | | { |
| | | Button btnFunctionCount = new Button() |
| | |
| | | LoadEvent_SwitchFunction(btnLightPower, item, functionView); |
| | | }; |
| | | functionPageTitleId = StringId.Lights; |
| | | |
| | | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.AC: |
| | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.EnergyMonitoring: |
| | | #region 能源监测 |
| | | btnName.TextID = StringId.EnergyMonitoring; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new EnergyMainPage(); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Environmental: |
| | | #region 环境数据 |
| | |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | btnName.TextID = StringId.FreshAir; |
| | | #region Light |
| | | Button btnFreshAirPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | | Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | IsSelected = functionOnCount > 0, |
| | | Tag = item + "_AllControl", |
| | | }; |
| | | functionView.AddChidren(btnFreshAirPower); |
| | | |
| | | btnFreshAirPower.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEvent_SwitchFunction(btnFreshAirPower, item, functionView); |
| | | }; |
| | | functionPageTitleId = StringId.FreshAir; |
| | | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Music: |
| | | btnName.TextID = StringId.Music; |
| | |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | btnName.TextID = StringId.VideoIntercom; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var videoMethod = new UI2.FuntionControlView.Video.VideoMethod(); |
| | | videoMethod.MianView(this,FunctionList.List.videoIntercom); |
| | | }; |
| | | break; |
| | | case ShowFunction.SecurityCenter: |
| | | btnName.TextID = StringId.SecurityCenter; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new ArmCenterPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | break; |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面 |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring) |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring |
| | | && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item && ShowFunction.SecurityCenter != item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | #endregion |
| | | } |
| | | |
| | | #region 切换楼层 |
| | | #region 切换楼层 |
| | | /// <summary> |
| | | /// 楼层显示切换 |
| | | /// </summary> |
| | |
| | | { |
| | | |
| | | } |
| | | #endregion |
| | | #endregion |
| | | } |
| | | } |