From 34b65350abbb8b740b9c3bc0b43254cbbe23fcb5 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 19 五月 2020 09:31:44 +0800
Subject: [PATCH] 合并代码,更改面板目标信息

---
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs
index 7e3146e..50ed3c5 100644
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs
@@ -156,7 +156,7 @@
             framePmPic.AddChidren(btnPmStatus);
             this.listControl.Add(btnPmStatus);
 
-            //PM2.5鍗曚綅
+            //PM2.5鍗曚綅  锛堢4涓紝listControl銆�3銆戯級 
             var btnPmUnit = new NormalViewControl(120 + 26, 43, true);
             btnPmUnit.Y = Application.GetRealHeight(181 + 46);
             btnPmUnit.X = Application.GetRealWidth(153);
@@ -165,6 +165,7 @@
             btnPmUnit.TextColor = ZigbeeColor.Current.XMWhite;
             btnPmUnit.TextAlignment = TextAlignment.CenterLeft;
             framePmPic.AddChidren(btnPmUnit);
+            this.listControl.Add(btnPmUnit);
         }
         #endregion
 
@@ -261,30 +262,63 @@
             if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+
+                if (pMSensor.currentPmData < 10)
+                {
+                    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(137);
+                }
             }
+
             else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+                this.listControl[2].Width = Application.GetRealWidth(193 - 40);
+                this.listControl[3].X = Application.GetRealWidth(137);
             }
             else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+
+                if (pMSensor.currentPmData < 100)
+                {
+                    this.listControl[2].Width = Application.GetRealWidth(193 - 40);
+                    this.listControl[3].X = Application.GetRealWidth(137);
+                }
+                else
+                {
+                    this.listControl[2].Width = Application.GetRealWidth(162);
+                    this.listControl[3].X = Application.GetRealWidth(153);
+                }
             }
             else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+                this.listControl[2].Width = Application.GetRealWidth(162);
+                this.listControl[3].X = Application.GetRealWidth(153);
             }
             else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+                this.listControl[2].Width = Application.GetRealWidth(162);
+                this.listControl[3].X = Application.GetRealWidth(153);
             }
             else if (pMSensor.currentPmData > 250)
             {
                 curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
+                this.listControl[2].Width = Application.GetRealWidth(162);
+                this.listControl[3].X = Application.GetRealWidth(153);
             }
             else
             {
                 curQuality = "";
+                this.listControl[2].Width = Application.GetRealWidth(162);
+                this.listControl[3].X = Application.GetRealWidth(153);
             }
             //璁剧疆鐘舵�佹枃瀛�
             return curQuality;

--
Gitblit v1.8.0