From 631f94758c3cb42abcdda8094e77895f376eff16 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 11 一月 2021 14:53:43 +0800 Subject: [PATCH] 2021-1-12-3 --- HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs index 19b6a60..67c8638 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs @@ -61,26 +61,38 @@ }; for (int i = 0; i < list.Count; i++) { - LogicView.SelectTypeView timeView = new LogicView.SelectTypeView(); - timeView.frameLayout.Y = Application.GetRealHeight(i * 50); - timeView.btnIcon.Visible = false; - timeView.btnText.X = Application.GetRealWidth(16); - timeView.btnLine.X = Application.GetRealWidth(16); - timeView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); - timeView.btnText.Text = list[i]; - timeView.btnClick.Tag = list[i]; - viewLayout.AddChidren(timeView.FLayoutView()); + LogicView.SelectTypeView view = new LogicView.SelectTypeView(); + view.frameLayout.Y = Application.GetRealHeight(i * 50); + view.btnIcon.Visible = false; + view.btnNextIcon.Visible = false; + view.btnText.X = Application.GetRealWidth(16); + view.btnLine.X = Application.GetRealWidth(16); + view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); + view.btnText.Text = list[i]; + view.btnClick.Tag = list[i]; + viewLayout.AddChidren(view.FLayoutView()); - timeView.btnClick.MouseUpEventHandler += (sen, e) => + view.btnClick.MouseUpEventHandler += (sen, e) => { - //string - //if () { } - //else if () { } - //else if () { } + string text = view.btnClick.Tag.ToString(); + if (text == Language.StringByID(StringId.clearday)) + { + + } + else if (text == Language.StringByID(StringId.cloudy)) + { + + } + else if (text == Language.StringByID(StringId.rain)) + { + + } }; } } + + } } -- Gitblit v1.8.0