From 7c2541f609e8235c4c33b4fb2ee27125f73f8ee6 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期五, 24 六月 2022 13:28:36 +0800
Subject: [PATCH] 2022-06-24

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

diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index 0bdab9a..ca02d57 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -118,7 +118,15 @@
         /// </summary>
         private void InitFrameWhiteContent1()
         {
+            //鑾峰彇娓╁害鍊�
             temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
+            if (temp <= 0)
+            {
+                //榛樿鍊兼敼鎴�16,2022骞�06鏈�10鏃�10:03:19 鎴愮敨瑕佹眰鐨�
+                temp = 16;
+                device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
+            }
+           
             arcBar = new DiyArcSeekBar()
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -147,7 +155,7 @@
             arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off";
             arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min;
             arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max;
-            arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
+            arcBar.Progress = temp;
 
             btnTemp = new Button()
             {
@@ -158,7 +166,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 50,
                 IsBold = true,
-                Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(),
+                Text = Convert.ToDouble(temp).ToString(),
                 TextAlignment = TextAlignment.Center,
             };
             FrameWhiteCentet1.AddChidren(btnTemp);
@@ -358,7 +366,7 @@
                 };
                 EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                 {
-                    if (!device.online2d)
+                    if (!device.online)
                     {
                         new Tip()
                         {
@@ -494,7 +502,7 @@
                 };
                 EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                 {
-                    if (!device.online2d)
+                    if (!device.online)
                     {
                         new Tip()
                         {
@@ -618,7 +626,7 @@
                 };
                 EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                 {
-                    if (!device.online2d)
+                    if (!device.online)
                     {
                         new Tip()
                         {
@@ -814,7 +822,7 @@
 
                 btn.MouseUpEventHandler = (sender, e) =>
                 {
-                    if (!device.online2d)
+                    if (!device.online)
                     {
                         new Tip()
                         {
@@ -877,7 +885,7 @@
         {
             btnMinus.MouseUpEventHandler = (sender, e) =>
             {
-                if (!device.online2d)
+                if (!device.online)
                 {
                     new Tip()
                     {
@@ -907,7 +915,7 @@
             };
             btnPlus.MouseUpEventHandler = (sender, e) =>
             {
-                if (!device.online2d)
+                if (!device.online)
                 {
                     new Tip()
                     {
@@ -933,7 +941,7 @@
                 d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
                 Control.Ins.SendWriteCommand(device, d);
             };
-            if (!device.online2d)
+            if (!device.online)
             {
                 arcBar.OnStopTrackingTouchEvent = (sender, e) =>
                 {
@@ -994,7 +1002,7 @@
 
             btnSwitch.MouseUpEventHandler = (sender, e) =>
             {
-                if (!device.online2d)
+                if (!device.online)
                 {
                     new Tip()
                     {
@@ -1049,7 +1057,7 @@
                     btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false);
                     btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false);
                     temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
-
+                   
 
                     arcBar.Progress = temp;
                     btnTemp.Text = temp.ToString() ;

--
Gitblit v1.8.0