From 6fee0e6dd12d7aa30a49425a3982560a902a3d2b Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 29 八月 2023 19:12:25 +0800
Subject: [PATCH] 2023年08月29日19:12:23

---
 HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
index 0e5cd5a..9f0a66a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -35,17 +35,34 @@
         /// <param name="deviceId">璁惧id</param>
         /// <param name="action">鎴愬姛杩斿洖true</param>
         /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param>
-        public bool DelDevice(string deviceId,Action<bool>action, TipType tipType = TipType.flicker)
+        public void DelDevice(string deviceId, Action<bool> action, TipType tipType = TipType.flicker)
         {
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
-            d.Add("deviceId", deviceId);//璁惧id
-            var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_KeypadExecute, "鍒犻櫎娴蜂俊鐢佃");
+            d.Add("deviceIds", new List<string> { deviceId });//璁惧id
+            var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_UnbindDeviceToHome, "鍒犻櫎娴蜂俊鐢佃");
             if (!this.DataChecking(responsePackNew, tipType))
             {
-                return false;
+                //action?.Invoke(false);
+                return;
             }
-            return true;
+            action?.Invoke(true);
+        }
+
+        /// <summary>
+        /// 鍙戦�佹帶鍒跺懡浠�
+        /// </summary>
+        /// <param name="device">褰撳墠璁惧</param>
+        /// <param name="dic">鍙戦�佹帶鍒舵暟鎹�</param>
+        public void SendControlCommand(Function device, Dictionary<string, string> dic,Action<bool> action) 
+        {
+            new System.Threading.Thread(() =>
+            {
+                var result = DriverLayer.Control.Ins.SendWriteCommand(device, dic, false, 0);
+                action?.Invoke(result);
+
+            })
+            { IsBackground = true }.Start();
         }
 
 

--
Gitblit v1.8.0