From 06696e6f225733a60b03eea4a7c6374053d92c1d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 14 四月 2020 14:15:35 +0800 Subject: [PATCH] 20200414 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 57 ++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 36 insertions(+), 21 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index ef62f22..d53cdaf 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -124,7 +124,7 @@ Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/InfoIcon/TempIcon.png", + UnSelectedImagePath = "Public/DeviceInfoIcon/TempIcon.png", }; environmentalView.AddChidren(btnTempIcon); @@ -135,7 +135,7 @@ Gravity = Gravity.CenterVertical, TextColor = CSS.CSS_Color.MainBackgroundColor, TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel, - Text = "--掳", + Text = MainPage.cityInfo.temperature, TextAlignment = TextAlignment.CenterLeft, }; environmentalView.AddChidren(btnTempValues); @@ -146,7 +146,7 @@ Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/InfoIcon/HumidityIcon.png", + UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", }; environmentalView.AddChidren(btnHumidityIcon); @@ -157,7 +157,7 @@ Gravity = Gravity.CenterVertical, TextColor = CSS.CSS_Color.MainBackgroundColor, TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel, - Text = "--%", + Text = MainPage.cityInfo.humidity, TextAlignment = TextAlignment.CenterLeft, }; environmentalView.AddChidren(btnHumidityValues); @@ -168,7 +168,7 @@ Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/InfoIcon/Pm25Icon.png", + UnSelectedImagePath = "Public/DeviceInfoIcon/Pm25Icon.png", }; environmentalView.AddChidren(btnPm25Icon); @@ -179,7 +179,7 @@ Gravity = Gravity.CenterVertical, TextColor = CSS.CSS_Color.MainBackgroundColor, TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel, - Text = "--", + Text = MainPage.cityInfo.pm25, TextAlignment = TextAlignment.CenterLeft, }; environmentalView.AddChidren(btnPm25Values); @@ -288,10 +288,13 @@ changeView.AddChidren(btnChangeScene); #endregion + //bodyView.AddChidren(new Button() { Y = changeView.Bottom, Height = Application.GetRealHeight(10), BackgroundColor = 0xAAF2F3F7 }); + + #region ContextView contentView = new PageLayout() { - Y = changeView.Bottom + Application.GetRealHeight(10), + Y = changeView.Bottom , Height = Application.GetRealHeight(310 + 30), //20涓鸿秴鍑洪儴鍒� }; bodyView.AddChidren(contentView); @@ -307,6 +310,7 @@ contentView.PageIndex = 0; #endregion + bodyView.AddChidren(new Button() { Y = changeView.Bottom, Height = Application.GetRealHeight(7), BackgroundColor = 0xAAF2F3F7 }); LoadEvent_ChangeShowedFunctionType(); } @@ -433,7 +437,7 @@ } /// <summary> - /// 鍔犺浇鎺у埗鍗$墖 + /// 鍔犺浇鍔熻兘鎺у埗鍗$墖 /// </summary> void LoadDeviceFunctionDiv(FrameLayout view, Function function) { @@ -506,6 +510,7 @@ UnSelectedImagePath = "Collection/CollectionIcon.png", }; view.AddChidren(btnCollection); + LoadEvent_FunctionCollection(btnCollection, function, true); if (function.functionCategory == FunctionCategory.Curtain) { @@ -560,21 +565,31 @@ UpdataFunctionStates(function as Light); #endregion break; - case FunctionCategory.AC: - #region 绌鸿皟 AC - btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcIcon.png"; - btnIcon.SelectedImagePath = "FunctionIcon/AC/AcOnIcon.png"; - #endregion - break; - case FunctionCategory.FloorHeating: - #region 鍦扮儹 - btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingIcon.png"; - btnIcon.SelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingOnIcon.png"; - #endregion + case FunctionCategory.Thermostat: + switch (function.functionType) + { + case FunctionType.AC: + #region 绌鸿皟 AC + btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcIcon.png"; + btnIcon.SelectedImagePath = "FunctionIcon/AC/AcOnIcon.png"; + #endregion + break; + case FunctionType.FloorHeating: + #region 鍦扮儹 + btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingIcon.png"; + btnIcon.SelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingOnIcon.png"; + #endregion + break; + } break; } LoadEvent_SwitchFunction(function, btnSwitch); } + var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, new Button(), new Button(), new Button()); + view.MouseUpEventHandler = skipControlPageEvent; + btnName.MouseUpEventHandler = skipControlPageEvent; + btnIcon.MouseUpEventHandler = skipControlPageEvent; + btnState.MouseUpEventHandler = skipControlPageEvent; UpdataFunctionStates(function); } catch (Exception ex) @@ -585,7 +600,7 @@ /// <summary> - /// 鍔犺浇鎺у埗鍗$墖 + /// 鍔犺浇鍦烘櫙鎺у埗鍗$墖 /// </summary> void LoadSceneFunctionDiv(FrameLayout view, Function function) { @@ -594,7 +609,6 @@ Button btnCoverd = new Button() { UnSelectedImagePath = "Collection/SceneCovered.png", - SelectedImagePath = "Collection/SceneCoveredOn.png", }; view.AddChidren(btnCoverd); LoadEvent_ControlScene(btnCoverd, function); @@ -621,6 +635,7 @@ UnSelectedImagePath = "Collection/CollectionIcon.png", }; view.AddChidren(btnCollection); + LoadEvent_FunctionCollection(btnCollection, function, false); Button btnName; btnName = new Button() { -- Gitblit v1.8.0