From 3a26f6025130dcaae4aa82ea19b16ad902450eb8 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 28 十一月 2019 11:43:47 +0800
Subject: [PATCH] 合并全部代码完成

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs |  112 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 57 insertions(+), 55 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index e5d7071..660ebbc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -707,7 +707,7 @@
             //绉婚櫎
             ZbGateway.GateWayList.RemoveAll((obj) => this.GetGatewayId(obj) == zbGatewayID);
             //鏂紑mqtt杩炴帴
-            realWay.DisConnect("GD");
+            realWay.DisConnectLocalMqttClient("GD");
 
             return true;
         }
@@ -1556,7 +1556,7 @@
             //鏈�鍚庡啀鏂紑mqtt杩炴帴
             for (int i = 0; i < list.Count; i++)
             {
-                list[i].DisConnect("G");
+                list[i].DisConnectLocalMqttClient("G");
             }
             list.Clear();
         }
@@ -1833,50 +1833,6 @@
             realWay.Send("GwLinuxLocate_Respon", jObject.ToString());
         }
 
-        #endregion
-
-        #region 鈻� 涓�鑸柟娉昣__________________________
-
-        /// <summary>
-        /// 寮瑰嚭缃戝叧涓嶅湪绾跨殑
-        /// </summary>
-        private void ShowGatewayNotOnlineMsg()
-        {
-            Application.RunOnMainThread(() =>
-            {
-                //缃戝叧杩炴帴澶辫触,璇风‘璁ょ綉缁�
-                string msg = Language.StringByID(R.MyInternationalizationString.uGatewayIsNotLinkAndCheckNetwork);
-                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
-                control.Show();
-            });
-        }
-
-        /// <summary>
-        /// 鏄剧ず閿欒淇℃伅绐楀彛
-        /// </summary>
-        /// <param name="msg"></param>
-        private void ShowErrorMsg(string msg)
-        {
-            Application.RunOnMainThread(() =>
-            {
-                var contr = new ShowMsgControl(ShowMsgType.Error, msg);
-                contr.Show();
-            });
-        }
-
-        /// <summary>
-        /// 鏄剧ずTip淇℃伅绐楀彛
-        /// </summary>
-        /// <param name="msg"></param>
-        private void ShowTipMsg(string msg)
-        {
-            Application.RunOnMainThread(() =>
-            {
-                var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
-                contr.Show();
-            });
-        }
-
         #endregion
 
         #region 鈻� 缃戝叧鐩戣___________________________
@@ -2080,17 +2036,19 @@
             {
                 return;
             }
-            //鑾峰彇褰撳墠鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫佺殑鐣岄潰
-            var listForm = new List<CommonFormBase>();
-            listForm.AddRange(UserCenterResourse.listGatewayOnlinePushForm);
-            if (listForm.Count > 0)
+            //淇濆瓨褰撳墠婵�娲荤殑鐣岄潰ID
+            var listId = new List<string>();
+            listId.AddRange(UserCenterResourse.listActionFormId);
+            for (int i = 0; i < listId.Count; i++)
             {
-                for (int i = 0; i < listChange.Count; i++)
+                if (UserCenterResourse.DicActionForm.ContainsKey(listId[i]) == false)
                 {
-                    foreach (var form in listForm)
-                    {
-                        form?.GatewayOnlinePush(listChange[i], listChangeStatu[i]);
-                    }
+                    continue;
+                }
+                //缃戝叧鍦ㄧ嚎鎺ㄩ��
+                for (int j = 0; j < listChange.Count; j++)
+                {
+                    UserCenterResourse.DicActionForm[listId[i]]?.GatewayOnlinePush(listChange[j], listChangeStatu[j]);
                 }
             }
         }
@@ -2644,5 +2602,49 @@
         }
 
         #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 寮瑰嚭缃戝叧涓嶅湪绾跨殑
+        /// </summary>
+        private void ShowGatewayNotOnlineMsg()
+        {
+            Application.RunOnMainThread(() =>
+            {
+                //缃戝叧杩炴帴澶辫触,璇风‘璁ょ綉缁�
+                string msg = Language.StringByID(R.MyInternationalizationString.uGatewayIsNotLinkAndCheckNetwork);
+                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
+                control.Show();
+            });
+        }
+
+        /// <summary>
+        /// 鏄剧ず閿欒淇℃伅绐楀彛
+        /// </summary>
+        /// <param name="msg"></param>
+        private void ShowErrorMsg(string msg)
+        {
+            Application.RunOnMainThread(() =>
+            {
+                var contr = new ShowMsgControl(ShowMsgType.Error, msg);
+                contr.Show();
+            });
+        }
+
+        /// <summary>
+        /// 鏄剧ずTip淇℃伅绐楀彛
+        /// </summary>
+        /// <param name="msg"></param>
+        private void ShowTipMsg(string msg)
+        {
+            Application.RunOnMainThread(() =>
+            {
+                var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
+                contr.Show();
+            });
+        }
+
+        #endregion
     }
 }

--
Gitblit v1.8.0