From ee31aee3192d1235a87898708962e1f1f1c1650b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 25 十月 2022 14:54:21 +0800
Subject: [PATCH] 智慧人居备份

---
 HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
index 90f1464..f6a5fbd 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -36,24 +36,29 @@
 
 
                 int setTempValue = 0;
-                int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out setTempValue);
+                double dd = 0;
+                double.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out dd);
+                setTempValue = Convert.ToInt32(dd);
                 if (setTempValue != 0)
                     bodyView.btnSetTempValues.Text = setTempValue.ToString();
 
                 bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
 
-                int progress = 0;
-                int.TryParse(temp.GetAttrState(FunctionAttributeKey.SetTemp), out progress);
-                bodyView.tempBar.Progress = progress + 16;
+                //int progress = 0;
+                //int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString()), out progress);
+                bodyView.tempBar.Progress = setTempValue - 16;
                 if(temp.trait_on_off.curValue.ToString() == "on")
                 {
                     bodyView.btnPowerControl.IsSelected = true;
-                    bodyView.tempBar.Enable = false;
+                    bodyView.tempBar.ProgressBarColor = bodyView.curColor;
+                    bodyView.tempBar.IsOffline = false;
+
                 }
                 else
                 {
                     bodyView.btnPowerControl.IsSelected = false;
-                    bodyView.tempBar.Enable = true;
+                    bodyView.tempBar.ProgressBarColor = CSS_Color.DividingLineColor;
+                    bodyView.tempBar.IsOffline = true;
                 }
             });
 
@@ -195,7 +200,7 @@
             {
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealHeight(260),
-                Width = Application.GetRealWidth(71),
+                Width = Application.GetRealWidth(77),
                 Height = Application.GetRealHeight(90),
                 TextAlignment = TextAlignment.TopRight,
                 TextColor = CSS.CSS_Color.FirstLevelTitleColor,
@@ -205,10 +210,12 @@
             };
             contentView.AddChidren(btnSetTempValues);
             int setTempValue = 0;
-            int.TryParse(function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out setTempValue);
+            double dd = 0;
+            double.TryParse(function.GetAttrState(AcstSub_AttrEnum.set_temp.ToString(), "--"), out dd);
+            setTempValue = Convert.ToInt32(dd);
             if (setTempValue != 0)
                 btnSetTempValues.Text = setTempValue.ToString();
-            bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+            //bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
 
 
 
@@ -259,7 +266,7 @@
                 SeekBarPadding = Application.GetRealWidth(20),
                 IsProgressTextShow = false,
                 ProgressChangeDelayTime = 0,
-                Enable = function.trait_on_off.curValue.ToString() == "off",
+                //Enable = function.trait_on_off.curValue.ToString() == "off",
                 //IsOffline = function.trait_on_off.curValue.ToString() == "off",
             };
             contentView.AddChidren(tempBar);
@@ -269,7 +276,7 @@
             tempBar.OnStopTrackingTouchEvent = (sender, e) => {
                 new System.Threading.Thread(() => {
                     var d = new Dictionary<string, string>();
-                    d.Add(FunctionAttributeKey.SetTemp, e.ToString());
+                    d.Add(FunctionAttributeKey.SetTemp, (e+16).ToString());
                     Control.Ins.SendWriteCommand(function, d);
                 })
                 { IsBackground = true }.Start();

--
Gitblit v1.8.0