From ec5a167e0366a75642e45dbd30817c1c8ae57e79 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 11 九月 2023 15:34:29 +0800
Subject: [PATCH] 备份

---
 OnPro/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs |   54 ++++++++++++------------------------------------------
 1 files changed, 12 insertions(+), 42 deletions(-)

diff --git a/OnPro/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/OnPro/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
index 56137f3..2156140 100644
--- a/OnPro/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
+++ b/OnPro/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -458,15 +458,6 @@
                 };
                 EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                 {
-                    if (!device.isOnline())
-                    {
-                        new Tip()
-                        {
-                            CloseTime = 1,
-                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                            Direction = AMPopTipDirection.None,
-                        }.Show(MainPage.BaseView);
-                    }
                     btnModeIcon.IsSelected = btnModeText.IsSelected = true;
                     device.SetAttrState(FunctionAttributeKey.Mode, m);
                     btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(m);
@@ -524,15 +515,6 @@
         {
             btnMinus.MouseUpEventHandler = (sender, e) =>
             {
-                if (!device.isOnline())
-                {
-                    new Tip()
-                    {
-                        CloseTime = 1,
-                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                        Direction = AMPopTipDirection.None,
-                    }.Show(MainPage.BaseView);
-                }
                 if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                 {
                     return;
@@ -552,15 +534,6 @@
             };
             btnPlus.MouseUpEventHandler = (sender, e) =>
             {
-                if (!device.isOnline())
-                {
-                    new Tip()
-                    {
-                        CloseTime = 1,
-                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                        Direction = AMPopTipDirection.None,
-                    }.Show(MainPage.BaseView);
-                }
                 if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                 {
                     return;
@@ -579,22 +552,19 @@
                 Control.Ins.SendWriteCommand(device, d);
             };
 
-            if (!device.isOnline())
+            arcBar.OnStopTrackingTouchEvent = (sender, e) =>
             {
-                arcBar.OnStopTrackingTouchEvent = (sender, e) =>
-                {
-                    device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
-                    btnTemp.Text = arcBar.Progress.ToString();
-                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                    d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
-                    Control.Ins.SendWriteCommand(device, d);
-                };
-                arcBar.OnProgressChangedEvent = (sender, e) =>
-                {
-                    device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
-                    btnTemp.Text = e.ToString();
-                };
-            }
+                device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+                btnTemp.Text = arcBar.Progress.ToString();
+                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+                d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+                Control.Ins.SendWriteCommand(device, d);
+            };
+            arcBar.OnProgressChangedEvent = (sender, e) =>
+            {
+                device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
+                btnTemp.Text = e.ToString();
+            };
         }
         /// <summary>
         /// 鎺у埗妯″紡浜嬩欢

--
Gitblit v1.8.0