From 23bbed132eea46eef51c6d01c21b346238e29ee2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 30 六月 2022 13:39:12 +0800
Subject: [PATCH] Merge branch 'wxr0114' into V1.5.9

---
 HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs |  142 +++++++++++++++++++++++-----------------------
 1 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index 89d64ae..d93b021 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -126,16 +126,16 @@
 
             #region 鎺у埗
             btnUp.MouseUpEventHandler = (sender, e) => {
-                //if (!device.online)
-                //{
-                //    new Tip()
-                //    {
-                //        CloseTime = 1,
-                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                //        Direction = AMPopTipDirection.None,
-                //    }.Show(MainPage.BaseView);
-                //    return;
-                //}
+                if (!device.online)
+                {
+                    new Tip()
+                    {
+                        CloseTime = 1,
+                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                        Direction = AMPopTipDirection.None,
+                    }.Show(MainPage.BaseView);
+                    return;
+                }
                 new System.Threading.Thread(() =>
                 {
                     System.Threading.Thread.Sleep(2000);
@@ -151,16 +151,16 @@
             };
             //----
             btnStop.MouseUpEventHandler = (sender, e) => {
-                //if (!device.online)
-                //{
-                //    new Tip()
-                //    {
-                //        CloseTime = 1,
-                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                //        Direction = AMPopTipDirection.None,
-                //    }.Show(MainPage.BaseView);
-                //    return;
-                //}
+                if (!device.online)
+                {
+                    new Tip()
+                    {
+                        CloseTime = 1,
+                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                        Direction = AMPopTipDirection.None,
+                    }.Show(MainPage.BaseView);
+                    return;
+                }
                 new System.Threading.Thread(() =>
                 {
                     System.Threading.Thread.Sleep(2000);
@@ -174,7 +174,7 @@
                 d.Add(FunctionAttributeKey.Position, "stop");
                 Control.Ins.SendWriteCommand(device, d);
             };
-            //if (!device.online)
+            if (!device.online)
             {
                 btnUp.MouseDownEventHandler = (sender, e) => {
                     btnUp.IsSelected = true;
@@ -189,16 +189,16 @@
                 };
             }
             btnDown.MouseUpEventHandler = (sender, e) => {
-                //if (!device.online)
-                //{
-                //    new Tip()
-                //    {
-                //        CloseTime = 1,
-                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                //        Direction = AMPopTipDirection.None,
-                //    }.Show(MainPage.BaseView);
-                //    return;
-                //}
+                if (!device.online)
+                {
+                    new Tip()
+                    {
+                        CloseTime = 1,
+                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                        Direction = AMPopTipDirection.None,
+                    }.Show(MainPage.BaseView);
+                    return;
+                }
                 new System.Threading.Thread(() =>
                 {
                     System.Threading.Thread.Sleep(2000);
@@ -242,16 +242,16 @@
 
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                 {
-                    //if (!device.online)
-                    //{
-                    //    new Tip()
-                    //    {
-                    //        CloseTime = 1,
-                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                    //        Direction = AMPopTipDirection.None,
-                    //    }.Show(MainPage.BaseView);
-                    //    return;
-                    //}
+                    if (!device.online)
+                    {
+                        new Tip()
+                        {
+                            CloseTime = 1,
+                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                            Direction = AMPopTipDirection.None,
+                        }.Show(MainPage.BaseView);
+                    return;
+                    }
                     string onoff = hotDryView.Lighting ? "false" : "true";
                     device.SetAttrState(FunctionAttributeKey.HotDry, onoff);
                     Dictionary<string, string> d = new Dictionary<string, string>();
@@ -281,16 +281,16 @@
 
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                 {
-                    //if (!device.online)
-                    //{
-                    //    new Tip()
-                    //    {
-                    //        CloseTime = 1,
-                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                    //        Direction = AMPopTipDirection.None,
-                    //    }.Show(MainPage.BaseView);
-                    //    return;
-                    //}
+                    if (!device.online)
+                    {
+                        new Tip()
+                        {
+                            CloseTime = 1,
+                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                            Direction = AMPopTipDirection.None,
+                        }.Show(MainPage.BaseView);
+                    return;
+                    }
                     string onoff = windDryView.Lighting ? "false" : "true";
                     device.SetAttrState(FunctionAttributeKey.WindDry, onoff);
                     Dictionary<string, string> d = new Dictionary<string, string>();
@@ -326,16 +326,16 @@
 
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                 {
-                    //if (!device.online)
-                    //{
-                    //    new Tip()
-                    //    {
-                    //        CloseTime = 1,
-                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                    //        Direction = AMPopTipDirection.None,
-                    //    }.Show(MainPage.BaseView);
-                    //    return;
-                    //}
+                    if (!device.online)
+                    {
+                        new Tip()
+                        {
+                            CloseTime = 1,
+                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                            Direction = AMPopTipDirection.None,
+                        }.Show(MainPage.BaseView);
+                    return;
+                    }
                     string onoff = disinfectView.Lighting ? "false" : "true";
                     device.SetAttrState(FunctionAttributeKey.Disinfect, onoff);
                     Dictionary<string, string> d = new Dictionary<string, string>();
@@ -376,16 +376,16 @@
 
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                 {
-                    //if (!device.online)
-                    //{
-                    //    new Tip()
-                    //    {
-                    //        CloseTime = 1,
-                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
-                    //        Direction = AMPopTipDirection.None,
-                    //    }.Show(MainPage.BaseView);
-                    //    return;
-                    //}
+                    if (!device.online)
+                    {
+                        new Tip()
+                        {
+                            CloseTime = 1,
+                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+                            Direction = AMPopTipDirection.None,
+                        }.Show(MainPage.BaseView);
+                    return;
+                    }
                     string onoff = lightingView.Lighting ? "off" : "on";
                     device.SetAttrState(FunctionAttributeKey.OnOff, onoff);
                     Dictionary<string, string> d = new Dictionary<string, string>();

--
Gitblit v1.8.0