using System; using Shared; namespace HDL_ON.UI.UI2.Intelligence.Automation { public class OutdoorEnvironment : FrameLayout { public OutdoorEnvironment() { 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.shiwaihuanjingbianhua; 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); //温度高于 LogicView.SelectTypeView temperaturehigherView = new LogicView.SelectTypeView(); temperaturehigherView.btnIcon.Visible = false; temperaturehigherView.btnText.X = Application.GetRealWidth(16); temperaturehigherView.btnLine.X = Application.GetRealWidth(16); temperaturehigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); temperaturehigherView.btnText.TextID = StringId.wendugaoyu; viewLayout.AddChidren(temperaturehigherView.FLayoutView()); //温度低于 LogicView.SelectTypeView temperatureunderView = new LogicView.SelectTypeView(); temperatureunderView.frameLayout.Y = temperaturehigherView.frameLayout.Bottom; temperatureunderView.btnIcon.Visible = false; temperatureunderView.btnText.X = Application.GetRealWidth(16); temperatureunderView.btnLine.X = Application.GetRealWidth(16); temperatureunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); temperatureunderView.btnText.TextID = StringId.wendudiyu; viewLayout.AddChidren(temperatureunderView.FLayoutView()); //湿度高于 LogicView.SelectTypeView humidityhigherView = new LogicView.SelectTypeView(); humidityhigherView.frameLayout.Y = temperatureunderView.frameLayout.Bottom+Application.GetRealHeight(8); humidityhigherView.btnIcon.Visible = false; humidityhigherView.btnText.X = Application.GetRealWidth(16); humidityhigherView.btnLine.X = Application.GetRealWidth(16); humidityhigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); humidityhigherView.btnText.TextID = StringId.shidugaoyu; viewLayout.AddChidren(humidityhigherView.FLayoutView()); //湿度低于 LogicView.SelectTypeView humidityunderView = new LogicView.SelectTypeView(); humidityunderView.frameLayout.Y = humidityhigherView.frameLayout.Bottom; humidityunderView.btnIcon.Visible = false; humidityunderView.btnText.X = Application.GetRealWidth(16); humidityunderView.btnLine.X = Application.GetRealWidth(16); humidityunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); humidityunderView.btnText.TextID = StringId.shidudiyu; viewLayout.AddChidren(humidityunderView.FLayoutView()); //PM2.5高于 LogicView.SelectTypeView pmhigherView = new LogicView.SelectTypeView(); pmhigherView.frameLayout.Y = humidityunderView.frameLayout.Bottom + Application.GetRealHeight(8); pmhigherView.btnIcon.Visible = false; pmhigherView.btnText.X = Application.GetRealWidth(16); pmhigherView.btnLine.X = Application.GetRealWidth(16); pmhigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); pmhigherView.btnText.TextID = StringId.pmgaoyu; viewLayout.AddChidren(pmhigherView.FLayoutView()); //PM2.5低于 LogicView.SelectTypeView pmunderView = new LogicView.SelectTypeView(); pmunderView.frameLayout.Y = pmhigherView.frameLayout.Bottom; pmunderView.btnIcon.Visible = false; pmunderView.btnText.X = Application.GetRealWidth(16); pmunderView.btnLine.X = Application.GetRealWidth(16); pmunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); pmunderView.btnText.TextID = StringId.pmdiyu; viewLayout.AddChidren(pmunderView.FLayoutView()); #endregion #region 所有点击事件 //温度高于 temperaturehigherView.btnClick.MouseUpEventHandler += (sen, e) => { }; //温度低于 temperatureunderView.btnClick.MouseUpEventHandler += (sen, e) => { }; //湿度高于 humidityhigherView.btnClick.MouseUpEventHandler += (sen, e) => { }; //湿度低于 humidityunderView.btnClick.MouseUpEventHandler += (sen, e) => { }; //PM2.5高于 pmhigherView.btnClick.MouseUpEventHandler += (sen, e) => { }; //PM2.5低于 pmunderView.btnClick.MouseUpEventHandler += (sen, e) => { }; #endregion } } }