From 505effa88b17ce8c3c7ac5403b76d9e5d0cfc2a5 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期一, 28 十月 2024 11:58:31 +0800
Subject: [PATCH] 谷歌版本问题修复

---
 HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs |  114 +++++++++++++++++++++++++-------------------------------
 1 files changed, 51 insertions(+), 63 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
index 860de44..a3888ee 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -19,9 +19,15 @@
                     {
                         return;
                     }
+                    if (updateTemp.sid != bodyView.function.sid)
+                    {
+                        return;
+                    }
                     var outinTemp = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
                     bodyView.btnTemp.Text = outinTemp.ToString();
-                    bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
+                    //bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
+                    bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTempOutdoorTemp).Replace("{1}", Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))).ToString()).Replace("{0}", MainPage.cityInfo.temperature);
+
                     bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
                     bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode), false);
                     bodyView.arcBar.Progress = outinTemp;
@@ -37,6 +43,14 @@
                     //    bodyView.btnSwitch.IsSelected = false;
                     //    bodyView.arcBar.IsOffline = true;
                     //}
+                    if (bodyView.btnTemp.Text.Length > 2)
+                    {
+                        bodyView.btnTemp.TextSize = 44;
+                    }
+                    else
+                    {
+                        bodyView.btnTemp.TextSize = 56;
+                    }
 
 
                     //app鑷繁鎺у埗鐨勪笉鐢ㄦ洿鏂帮紝浼氶�犳垚璺冲姩
@@ -73,16 +87,14 @@
                         bodyView.arcBar.IsClickable = false;
                         bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
                     }
-                    ////鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
-                    //if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto" || updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
-                    //{
-                    //    bodyView.btnPlus.Enable = false;
-                    //    bodyView.btnMinus.Enable = false;
-                    //    bodyView.arcBar.IsClickable = false;
-                    //    bodyView.arcBar.IsOffline = true;
-                    //}
-                    //鏇存柊涓嶅悓鐣岄潰鐘舵�� 2022骞�06鏈�09鏃�19:22:55 wjc 淇敼
-                    bodyView.updateStatusPage();
+                    //鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
+                    if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto" || updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
+                    {
+                        bodyView.btnPlus.Enable = false;
+                        bodyView.btnMinus.Enable = false;
+                        bodyView.arcBar.IsClickable = false;
+                        bodyView.arcBar.IsOffline = true;
+                    }
                 });
             }
             catch (Exception ex)
@@ -104,16 +116,14 @@
                 //function.SaveFunctionData(true);
             };
 
-            ////鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
-            //if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
-            //{
-            //    btnPlus.Enable = false;
-            //    btnMinus.Enable = false;
-            //    arcBar.IsClickable = false;
-            //    arcBar.IsOffline = true;
-            //}
-            //鍒濆鍖栦笉鍚岀晫闈㈢姸鎬� 2022骞�06鏈�09鏃�19:22:55 wjc 淇敼
-            this.updateStatusPage();
+            //鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
+            if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
+            {
+                btnPlus.Enable = false;
+                btnMinus.Enable = false;
+                arcBar.IsClickable = false;
+                arcBar.IsOffline = true;
+            }
         }
 
         /// <summary>
@@ -133,16 +143,16 @@
         /// </summary>
         void LoadEvent_TempChange()
         {
-            //if (!function.online)
-            //{
-            //    new Tip()
-            //    {
-            //        CloseTime = 1,
-            //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-            //        Direction = AMPopTipDirection.None,
-            //    }.Show(MainPage.BaseView);
-            //    return;
-            //}
+            if (!function.isOnline())
+            {
+                new Tip()
+                {
+                    CloseTime = 1,
+                    Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                    Direction = AMPopTipDirection.None,
+                }.Show(MainPage.BaseView);
+                return;
+            }
             btnMinus.MouseUpEventHandler = (sender, e) =>
             {
                 if (function.trait_on_off.curValue.ToString() == "off")
@@ -196,6 +206,14 @@
             {
                 function.SetAttrState(FunctionAttributeKey.SetTemp, e);
                 btnTemp.Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
+                if (btnTemp.Text.Length > 2)
+                {
+                    btnTemp.TextSize = 44;
+                }
+                else
+                {
+                    btnTemp.TextSize = 56;
+                }
             };
         }
         /// <summary>
@@ -265,36 +283,6 @@
             dialogView.MouseUpEventHandler = eventHandler;
         }
 
-        /// <summary>
-        /// 鏇存柊涓嶅悓鐣岄潰鐘舵��
-        /// </summary>
-       private void updateStatusPage() 
-        {
-            btnPlus.Enable = true;
-            btnMinus.Enable = true;
-            arcBar.IsClickable = true;
-            arcBar.IsOffline = false;
-            switch (getModeValue)
-            {
-                case "auto"://鑷姩
-                case "timer"://
-                    btnPlus.Enable = false;
-                    btnMinus.Enable = false;
-                    arcBar.IsClickable = false;
-                    arcBar.IsOffline = true;
-                    break;
-
-            }
-        }
-        /// <summary>
-        /// 鑾峰彇妯″紡value鍊�
-        /// </summary>
-        private string getModeValue
-        {
-            get
-            {
-                return function.GetAttrState(FunctionAttributeKey.Mode);
-            }
-        }
+  
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.8.0