From d53e6af2c5f17838fa79659614b15a2a1f383399 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 31 三月 2023 10:04:58 +0800
Subject: [PATCH] 1

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs |   39 ++++++++++++++++-----------------------
 1 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs
index bc97f19..809a913 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs
@@ -247,28 +247,7 @@
             base.RemoveFromParent ();
         }
 
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="stateCodeStr"></param>
-        void ShowGetHomePagerErrorInfo (string stateCodeStr)
-        {
-            string mes = "";
-            //2020-01-06 寰呰ˉ鍏�
-            if (stateCodeStr == ErrorCode.NetworkError) {
-                mes = ErrorCode.NetworkError;
-            } else {
-                mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
-
-            }
-            if (!string.IsNullOrEmpty (mes)) {
-                Application.RunOnMainThread (() => {
-                    new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
-                });
-            }
-
-
-        }
+      
 
         public void InitRoomView (string RoomFilePath)
         {
@@ -1117,6 +1096,8 @@
                     fhRowView.AddChidren (btnFHNull);
                     #endregion
                 }
+                //InitRoomView (roomFilePath);
+
                 foreach (var devcieCommon in room.DeviceList) {
                     if (devcieCommon == null)
                         continue;
@@ -1211,7 +1192,18 @@
                                 //}
                                 //Control.ControlBytesSend (Command.SetSingleLight, fanModule.SubnetID, fanModule.DeviceID, new byte [] { fanModule.LoopID, fanModule.Switch });
 
-                                int mSetSwitch = tempSwitch.IsSelected ? 0 : fanModule.WindSpeed;
+                                int mSetSwitch = 0;
+                                if (!tempSwitch.IsSelected) {
+                                    //2021-03-02 淇寮�0妗i棶棰�
+                                    if (fanModule.WindSpeed == 0) {
+                                        mSetSwitch = 1;
+                                    } else {
+                                        mSetSwitch = fanModule.WindSpeed;
+                                    }
+                                } else {
+                                    mSetSwitch = 0;
+                                }
+
                                 SendControl.SendControlSetSingleLight (fanModule, new byte [] { fanModule.LoopID, (byte)mSetSwitch });
                                 //IO.FileUtils.SaveEquipmentMessage (fanModule, fanModule.LoopID.ToString ());
                             };
@@ -2411,6 +2403,7 @@
                 //if (!roomDeviceFilePathList.Contains (filePath)) {
                 //    roomDeviceFilePathList.Add (filePath);
                 //}
+
             };
             GenericDialog.Current.ShowModifyRemarksDialog (commonDevice, commonBytes, btnEquipment, successAction);
         }

--
Gitblit v1.8.0