From fff515073c2e3dea325a9d835e0f607c01770974 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 01 二月 2023 17:08:57 +0800
Subject: [PATCH] 空调温度控制

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

diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index 5df9ec0..c55d69b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -305,15 +305,18 @@
             };
             setTempBar.OnStopTrackingTouchEvent = (sender, e) => {
                 temp = e;
+                Dictionary<string, string> d = new Dictionary<string, string>();
                 device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
                 if (setTempAttr.step == "0.5")
                 {
-                    e = e / 2;
-                    btnTemp.Text = (setTempAttr.min + ((double)e)).ToString("0.0");
+                    double ex = (double)e / 2;
+                    btnTemp.Text = (setTempAttr.min + ((double)ex)).ToString("0.0");
+                    d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + ex).ToString());
                 }
                 else
                 {
                     btnTemp.Text = (setTempAttr.min + e).ToString();
+                    d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + e).ToString());
                 }
 
 #if __IOS__
@@ -323,8 +326,6 @@
 #endif
                 btnTempUint.X = btnTemp.Right;
                 controlTime = DateTime.Now;
-                Dictionary<string, string> d = new Dictionary<string, string>();
-                d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + e).ToString());
                 Control.Ins.SendWriteCommand(device, d);
             };
 

--
Gitblit v1.8.0