From b71dfb3ca100340005d56e1298292807da82322d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 08 六月 2020 15:04:21 +0800 Subject: [PATCH] 20200608 --- HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 87 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 73 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index 323ee88..c0e03d9 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -564,19 +564,75 @@ #endregion break; case ShowFunction.FloorHeating: + #region 鍦扮儹 btnName.TextID = StringId.FloorHeating; + functionCount = DB_ResidenceData.residenceData.functionList.floorHeatings.Count; + functionOnCount = DB_ResidenceData.residenceData.functionList.floorHeatings.FindAll((obj) => obj.on_off == "on").Count; + Button btnFhPower = 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 = functionCount == functionOnCount + }; + functionView.AddChidren(btnFhPower); + btnFhPower.MouseUpEventHandler = (sender, e) => { + LoadEvent_SwitchFunction(btnFhPower, item); + }; + btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new FunctionPage(); + MainPage.BasePageView.AddChidren(skipView); + skipView.LoadPage(StringId.FloorHeating); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + #endregion break; case ShowFunction.DoorLock: btnName.TextID = StringId.DoorLock; break; case ShowFunction.Electric: + #region 鐢靛櫒 btnName.TextID = StringId.Electric; + functionCount = DB_ResidenceData.residenceData.functionList.electricals.Count; + functionOnCount = DB_ResidenceData.residenceData.functionList.electricals.FindAll((obj) => obj.on_off == "on").Count; + Button btnElectricPower = 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 = functionCount == functionOnCount + }; + functionView.AddChidren(btnElectricPower); + btnElectricPower.MouseUpEventHandler = (sender, e) => { + LoadEvent_SwitchFunction(btnElectricPower, item); + }; + btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new FunctionPage(); + MainPage.BasePageView.AddChidren(skipView); + skipView.LoadPage(StringId.Electric); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + #endregion break; case ShowFunction.EnergyMonitoring: btnName.TextID = StringId.EnergyMonitoring; break; case ShowFunction.Environmental: - btnName.TextID = StringId.Environmental; + #region 鐜鏁版嵁 + btnName.TextID = StringId.EnvironmentalData; + btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new EnvironmentalSciencePage(); + MainPage.BasePageView.AddChidren(skipView); + skipView.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + #endregion break; case ShowFunction.FreshAir: btnName.TextID = StringId.FreshAir; @@ -592,26 +648,29 @@ break; case ShowFunction.Sensor: btnName.TextID = StringId.Sensor; + break; case ShowFunction.VideoIntercom: btnName.TextID = StringId.VideoIntercom; break; } - - Button btnFunctionCount = new Button() + if (item != ShowFunction.Environmental) { - X = Application.GetRealWidth(16), - Y = btnName.Bottom, - Width = Application.GetRealWidth(120), - Height = Application.GetRealHeight(24), - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextAlignment = TextAlignment.CenterLeft, - Text = functionOnCount + "/" + functionCount, - Tag = item + "_onCount" - }; - functionView.AddChidren(btnFunctionCount); + Button btnFunctionCount = new Button() + { + X = Application.GetRealWidth(16), + Y = btnName.Bottom, + Width = Application.GetRealWidth(120), + Height = Application.GetRealHeight(24), + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + TextAlignment = TextAlignment.CenterLeft, + Text = functionOnCount + "/" + functionCount, + Tag = item + "_onCount" + }; + functionView.AddChidren(btnFunctionCount); + } index++; } #endregion -- Gitblit v1.8.0