From 1a0ddfcd1a24ed0a14d76362802c974e3d4c86c8 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 31 一月 2023 17:53:29 +0800
Subject: [PATCH] 空调进度控制问题修复

---
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index 1289164..ef87fa0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -123,7 +123,7 @@
                     Text = "---",
                     IsBold = true,
                 };
-                if(setTempAttr.step == "0.5")
+                if (setTempAttr.step == "0.5")
                 {
                     btnTemp.Text = Convert.ToDouble(setTempAttr.curValue).ToString("0.0");
                 }
@@ -137,7 +137,11 @@
                         btnTemp.Text = setTempAttr.curValue.ToString();
                     }
                 }
-                btnTemp.Width = btnTemp.GetTextWidth();
+#if __IOS__
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
+#else
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
+#endif
                 FrameWhiteCentet1.AddChidren(btnTemp);
 
 
@@ -177,12 +181,11 @@
 
                 var btnMinTemp = new Button()
                 {
-                    X = Application.GetRealWidth(26),
-                    Width = Application.GetRealWidth(18),
+                    X = Application.GetRealWidth(22),
+                    Width = Application.GetRealWidth(22),
                     TextAlignment = TextAlignment.Center,
                     Text = setTempAttr.min.ToString(),
                     TextSize = 12,
-                    TextColor = 0xFFC0C7D4,
                 };
                 setTempView.AddChidren(btnMinTemp);
 
@@ -223,7 +226,7 @@
                 var btnMaxTemp = new Button()
                 {
                     X = setTempBar.Right,
-                    Width = Application.GetRealWidth(18),
+                    Width = Application.GetRealWidth(24),
                     TextAlignment = TextAlignment.Center,
                     Text = setTempAttr.max.ToString(),
                     TextSize = 12,
@@ -290,6 +293,13 @@
                 {
                     btnTemp.Text = (setTempAttr.min + e).ToString();
                 }
+
+#if __IOS__
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
+#else
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
+#endif
+                btnTempUint.X = btnTemp.Right;
             };
             setTempBar.OnStopTrackingTouchEvent = (sender,e) =>{
                 temp = e;
@@ -302,9 +312,16 @@
                 {
                     btnTemp.Text = (setTempAttr.min + e).ToString();
                 }
+
+#if __IOS__
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
+#else
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
+#endif
+                btnTempUint.X = btnTemp.Right;
                 controlTime = DateTime.Now;
                 Dictionary<string, string> d = new Dictionary<string, string>();
-                d.Add(FunctionAttributeKey.SetTemp, e.ToString());
+                d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + e).ToString());
                 Control.Ins.SendWriteCommand(device, d);
             };
 
@@ -1035,8 +1052,12 @@
                         btnTemp.Text = temp.ToString();
                     }
 
-                    //btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
-                    //btnTempUint.X = btnTemp.Right;
+#if __IOS__
+                    btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
+#else
+                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
+#endif
+                    btnTempUint.X = btnTemp.Right;
 
                     if (device.trait_on_off.curValue.ToString() == "on")
                     {

--
Gitblit v1.8.0