From 136b9e2fc48249a5ff89874f1080ba94130e7a9e Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 19 五月 2020 11:12:29 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs | 51 ++++++++++++++------------------------------------- 1 files changed, 14 insertions(+), 37 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs index f7ac7c2..774a737 100644 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs @@ -52,7 +52,7 @@ /// 鍒濆鍖朠M2.5浼犳劅鍣ㄦ帶浠� /// </summary> /// <param name="frameWhiteBack"></param> - private void InitPmControl(FrameLayout frameWhiteBack) + private void InitPmControl(FrameLayout frameWhiteBack) { //婀垮害瀹瑰櫒 var frameHumidityPic = new FrameLayout(); @@ -147,7 +147,7 @@ framePmPic.AddChidren(btnPmText); //PM2.5鏁版嵁锛堢3涓紝listControl銆�2銆戯級 - var btnPmStatus = new NormalViewControl(162, 92, true); + var btnPmStatus = new NormalViewControl(162, 92, true); btnPmStatus.Y = Application.GetRealHeight(181); btnPmStatus.Text = "155"; btnPmStatus.TextSize = 30; @@ -156,8 +156,8 @@ framePmPic.AddChidren(btnPmStatus); this.listControl.Add(btnPmStatus); - //PM2.5鍗曚綅 锛堢4涓紝listControl銆�3銆戯級 - var btnPmUnit = new NormalViewControl(120 + 26, 43, true); + //PM2.5鍗曚綅 锛堢4涓紝listControl銆�3銆戯級 + var btnPmUnit = new NormalViewControl(120 + 26, 43, true); btnPmUnit.Y = Application.GetRealHeight(181 + 46); btnPmUnit.X = Application.GetRealWidth(153); btnPmUnit.Text = "渭g/m鲁"; @@ -166,22 +166,6 @@ btnPmUnit.TextAlignment = TextAlignment.CenterLeft; framePmPic.AddChidren(btnPmUnit); this.listControl.Add(btnPmUnit); - - frameHumidityPic.MouseUpEventHandler += (sender, e) => - { - pMSensor.currentPmData = 35; - UpdateStatus(); - }; - frameTemperaturePic.MouseUpEventHandler += (sender, e) => - { - pMSensor.currentPmData = 99; - UpdateStatus(); - }; - framePmPic.MouseUpEventHandler += (sender, e) => - { - pMSensor.currentPmData = 100; - UpdateStatus(); - }; } #endregion @@ -246,10 +230,10 @@ //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 return true; } - } - } - } - return false; + } + } + } + return false; } #endregion @@ -281,16 +265,13 @@ if (pMSensor.currentPmData < 10) { - this.listControl[2].Width = Application.GetRealWidth(193 - 70); + this.listControl[2].Width = Application.GetRealWidth(188 - 70); this.listControl[3].X = Application.GetRealWidth(180 - 70); } else { this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(153 - 25); - - this.listControl[2].BackgroundColor = 0xff00ff00; - this.listControl[3].BackgroundColor = 0xff00ffff; + this.listControl[3].X = Application.GetRealWidth(137); } } @@ -298,7 +279,7 @@ { curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(153 - 25); + this.listControl[3].X = Application.GetRealWidth(137); } else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75) { @@ -307,16 +288,12 @@ if (pMSensor.currentPmData < 100) { this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(153 - 25); - this.listControl[2].BackgroundColor = 0xff00ff00; - this.listControl[3].BackgroundColor = 0xff00ffff; + this.listControl[3].X = Application.GetRealWidth(137); } else { this.listControl[2].Width = Application.GetRealWidth(162); this.listControl[3].X = Application.GetRealWidth(153); - this.listControl[2].BackgroundColor = 0xff00ff00; - this.listControl[3].BackgroundColor = 0xff00ffff; } } else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115) @@ -340,8 +317,8 @@ else { curQuality = ""; - this.listControl[2].Width = Application.GetRealWidth(0); - this.listControl[3].Gravity = Gravity.CenterHorizontal; + this.listControl[2].Width = Application.GetRealWidth(162); + this.listControl[3].X = Application.GetRealWidth(153); } //璁剧疆鐘舵�佹枃瀛� return curQuality; -- Gitblit v1.8.0