From 4c586bb23cdcae56ae4e4c62e90e148dc10b9d90 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 17 五月 2022 14:19:31 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wxr1215 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs new file mode 100644 index 0000000..d9514ef --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacHistoryChoosePage.cs @@ -0,0 +1,108 @@ +锘縰sing System; +using HDL_ON.Entity; +using HDL_ON.UI.CSS; +using Shared; +namespace HDL_ON.UI +{ + /// <summary> + /// 娓╂帶鍣ㄥ巻鍙叉暟鎹樉绀洪�夋嫨鐣岄潰 + /// </summary> + public class CacHistoryChoosePage : FrameLayout + { + FrameLayout bodyView; + Function device; + public CacHistoryChoosePage(Function function) + { + device = function; + bodyView = this; + } + + public void InitView() + { + new TopViewDiv(bodyView, Language.StringByID(StringId.Data)).LoadTopView(); + bodyView.BackgroundColor = CSS_Color.BackgroundColor; + + FrameLayout tempView = new FrameLayout() + { + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(50), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + bodyView.AddChidren(tempView); + + Button btnTempRight = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + tempView.AddChidren(btnTempRight); + + Button btnTempLine = new Button() + { + Y = Application.GetRealHeight(49), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(1), + BackgroundColor = CSS_Color.DividingLineColor + }; + tempView.AddChidren(btnTempLine); + + Button btnTempName = new Button() + { + X = Application.GetRealWidth(16), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.TemperatureStatistics + }; + tempView.AddChidren(btnTempName); + btnTempName.MouseUpEventHandler = (sender, e) => { + var page = new CacWeekHistoryPage(device, "room_temp"); + MainPage.BasePageView.AddChidren(page); + page.InitView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + + + + FrameLayout humidityView = new FrameLayout() + { + Y = Application.GetRealHeight(64 + 50), + Height = Application.GetRealHeight(50), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + bodyView.AddChidren(humidityView); + + Button btnHumidityRight = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + humidityView.AddChidren(btnHumidityRight); + + Button btnHumidityName = new Button() + { + X = Application.GetRealWidth(16), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.HumidityStatistics + }; + humidityView.AddChidren(btnHumidityName); + btnHumidityName.MouseUpEventHandler = (sender, e) => { + var page = new CacWeekHistoryPage(device, "room_humidity"); + MainPage.BasePageView.AddChidren(page); + page.InitView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + + + } + } +} -- Gitblit v1.8.0