| | |
| | | {
|
| | | 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)
|
| | | {
|
| | |
| | | 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)
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | 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)
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | var dicStatu = this.GetNowOnlineStatuBeforeCheck();
|
| | | //等个3秒,准备一下
|
| | |
| | | }
|
| | | //将变化的网关推送到界面上
|
| | | this.PushGatewayOnlineStatuToForm(dicStatu);
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //先获取现在全部的网关,初期値设置为不在线
|
| | | var dicStatu = this.GetNowOnlineStatuBeforeCheck();
|
| | |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uRemoteTimeOutAndNotGatewaiOnline);
|
| | | //this.ShowTipMsg(msg);
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | }
|
| | |
|
| | | bool canBreak = false;
|
| | | new System.Threading.Thread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | List<string> list = new List<string>() { "NotSetAgain" };
|
| | |
|
| | |
| | | }
|
| | | dicDbGateway = dic;
|
| | | canBreak = true;
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | |
|
| | | int count = 0;
|
| | | while (canBreak == false)
|
| | |
| | | /// </summary>
|
| | | public void ResetComandToBindBackupGateway()
|
| | | {
|
| | | new System.Threading.Thread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
|
| | | if (fileData == null)
|
| | |
| | | var byteData = System.Text.Encoding.UTF8.GetBytes(strData);
|
| | | Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile, byteData);
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|