黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1160,12 +1160,11 @@
        {
            bool bolBreak = false;
            ZbGatewayData.GetGwData result = null;
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                result = await this.GetGatewayNewInfoAsync(zbGateway, mode);
                bolBreak = true;
            })
            { IsBackground = true }.Start();
            });
            while (bolBreak == false)
            {
@@ -1356,7 +1355,7 @@
            if (localWay == null || localWay.getGwInfo == null)
            {
                //给一个线程去获取它的镜像类型
                new System.Threading.Thread(async () =>
                HdlThreadLogic.Current.RunThread(async () =>
                {
                    var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
                    if (result != null)
@@ -1369,8 +1368,7 @@
                            }
                        });
                    }
                })
                { IsBackground = true }.Start();
                });
            }
            else
            {
@@ -1390,7 +1388,7 @@
            if (localWay == null || localWay.getGwInfo == null)
            {
                //给一个线程去获取它的镜像类型
                new System.Threading.Thread(async () =>
                HdlThreadLogic.Current.RunThread(async () =>
                {
                    var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
                    if (result != null)
@@ -1404,8 +1402,7 @@
                            }
                        });
                    }
                })
                { IsBackground = true }.Start();
                });
            }
            else
            {
@@ -1575,7 +1572,7 @@
                return;
            }
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                var dicStatu = this.GetNowOnlineStatuBeforeCheck();
                //等个3秒,准备一下
@@ -1604,8 +1601,7 @@
                }
                //将变化的网关推送到界面上
                this.PushGatewayOnlineStatuToForm(dicStatu);
            })
            { IsBackground = true }.Start();
            });
        }
        #endregion
@@ -1623,7 +1619,7 @@
                return;
            }
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                //先获取现在全部的网关,初期値设置为不在线
                var dicStatu = this.GetNowOnlineStatuBeforeCheck();
@@ -1665,8 +1661,7 @@
                    string msg = Language.StringByID(R.MyInternationalizationString.uRemoteTimeOutAndNotGatewaiOnline);
                    //this.ShowTipMsg(msg);
                }
            })
            { IsBackground = true }.Start();
            });
        }
        #endregion
@@ -1791,7 +1786,7 @@
            }
            bool canBreak = false;
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                List<string> list = new List<string>() { "NotSetAgain" };
@@ -1817,8 +1812,7 @@
                }
                dicDbGateway = dic;
                canBreak = true;
            })
            { IsBackground = true }.Start();
            });
            int count = 0;
            while (canBreak == false)
@@ -1887,7 +1881,7 @@
        /// </summary>
        public void ResetComandToBindBackupGateway()
        {
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
                if (fileData == null)
@@ -1936,8 +1930,7 @@
                    var byteData = System.Text.Encoding.UTF8.GetBytes(strData);
                    Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile, byteData);
                }
            })
            { IsBackground = true }.Start();
            });
        }
        #endregion