From 72be4f06a683de33ddd563c8447c39f7f17e5b7d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 一月 2020 13:03:50 +0800
Subject: [PATCH] 合并代码

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs |   58 ----------------------------------------------------------
 1 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
index 728bea6..e852fa5 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -44,7 +44,6 @@
                     else if (topic == gatewayID + "/" + "Bind/SetBind_Respon")
                     {
                         var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
-                        //var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
                         var tempResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AddedDeviceBindResponseData>(jobject["Data"].ToString());
                         if (tempResult == null)
                         {
@@ -52,30 +51,10 @@
                         }
                         else
                         {
-                            //var dataBindRes = new AddedDeviceBindResponseData();
-                            //for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
-                            //{
-                            //    var tempBind = tempBindList[m];
-                            //    dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
-                            //}
-                            //if (dataBindRes != null)
-                            //{
                             result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = tempResult };
                             DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
-                            //}
                         }
                     }
-                    //else if (topic == gatewayID + "/" + "Bind/BindResult")
-                    //{
-                    //    var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
-                    //    var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindResultResponseData>(jobject["Data"].ToString());
-
-                    //    if (tempData != null)
-                    //    {
-                    //        result = new AddedDeviceBindResponseAllData { addBindResultResponseData = tempData };
-                    //    }
-                    //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
-                    //}
                 };
                 mainGateway.Actions += action;
                 DebugPrintLog("Bind/SetBind_Actions 鍚姩" + "_" + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
@@ -128,43 +107,6 @@
                         break;
                     }
                 }
-                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
-                {
-                    result = new AddedDeviceBindResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-                }
-                //while ((DateTime.Now - dateTime).TotalMilliseconds < 20*1000)
-                //{
-                //await System.Threading.Tasks.Task.Delay(100);
-                //if (result == null || result.addedDeviceBindResponseData == null)
-                //{
-                //    continue;
-                //}
-                //if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 1).Count)
-                //{
-                //    if (result.addBindResultResponseData != null)
-                //    {
-                //        break;
-                //    }
-                //}
-                //else if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 2).Count)
-                //{
-                //    if (result.addBindResultResponseData != null)
-                //    {
-                //        break;
-                //    }
-                //}
-                //else if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 3).Count)
-                //{
-                //    if (result.addBindResultResponseData != null)
-                //    {
-                //        break;
-                //    }
-                //}
-                //else
-                //{
-                //    break;
-                //}
-                //}
                 if ((DateTime.Now - dateTime).TotalMilliseconds > 20 * 1000)
                 {
                     result = new AddedDeviceBindResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };

--
Gitblit v1.8.0