From 160e6863bf3ecb420986f31abb1ab1372218d921 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 11 一月 2021 14:11:35 +0800 Subject: [PATCH] Merge branch 'WJC' into NewFilePath --- HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs | 71 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs new file mode 100644 index 0000000..53bba3f --- /dev/null +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs @@ -0,0 +1,71 @@ +锘縰sing System; +using Shared; +namespace HDL_ON.UI.UI2.Intelligence.Automation +{ + public class Weather : FrameLayout + { + public Weather() + { + Tag = "Logic"; + } + + public void Show() + { + #region 鐣岄潰甯冨眬 + LogicView.TopView topView = new LogicView.TopView(); + this.AddChidren(topView.FLayoutView()); + topView.clickBackBtn.MouseUpEventHandler += (e, sen) => + { + RemoveFromParent(); + }; + topView.topNameBtn.TextID = StringId.xuanzeshiwaibianhuatiaojian; + + FrameLayout viewLayout = new FrameLayout + { + Y = Application.GetRealHeight(64), + Width = Application.GetRealWidth(LogicView.TextSize.view375), + Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64), + BackgroundColor = CSS.CSS_Color.viewMiddle, + }; + this.AddChidren(viewLayout); + //瀹ゅ娓┿�佹箍搴︺�丳M2.5鍙樺寲 + LogicView.SelectTypeView airqualityView = new LogicView.SelectTypeView(); + airqualityView.btnIcon.Visible = false; + airqualityView.btnText.X = Application.GetRealWidth(16); + airqualityView.btnLine.X = Application.GetRealWidth(16); + airqualityView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); + airqualityView.btnText.TextID =StringId.shuwaigongneng; + viewLayout.AddChidren(airqualityView.FLayoutView()); + //澶╂皵鍙樺寲(鍩庡競澶╂皵) + LogicView.SelectTypeView weatherView = new LogicView.SelectTypeView(); + weatherView.frameLayout.Y = airqualityView.frameLayout.Bottom; + weatherView.btnIcon.Visible = false; + weatherView.btnText.X = Application.GetRealWidth(16); + weatherView.btnLine.X = Application.GetRealWidth(16); + weatherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); + weatherView.btnText.TextID = StringId.tianqibianhua; + viewLayout.AddChidren(weatherView.FLayoutView()); + + #endregion + + #region 鎵�鏈夌偣鍑讳簨浠� + //瀹ゅ娓┿�佹箍搴︺�丳M2.5鍙樺寲 + airqualityView.btnClick.MouseUpEventHandler += (sen, e) => { + OutdoorEnvironment outdoorEnvironment = new OutdoorEnvironment(); + MainPage.BasePageView.AddChidren(outdoorEnvironment); + outdoorEnvironment.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + }; + //澶╂皵鍙樺寲(鍩庡競澶╂皵) + weatherView.btnClick.MouseUpEventHandler += (sen, e) => { + WeatherCondition weatherCondition = new WeatherCondition(); + MainPage.BasePageView.AddChidren(weatherCondition); + weatherCondition.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + + #endregion + } + } +} -- Gitblit v1.8.0