| | |
| | | {
|
| | | this.zbGateway.ReportAction -= this.UpdateDeviceProgress;
|
| | |
|
| | | new System.Threading.Thread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //终止升级
|
| | | await this.otaDevice.KillUpdateAsync(this.zbGateway, 200);
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | |
|
| | | this.UpdateStatu = UpdateStatuMode.DeviceUpdateFail;
|
| | | return;
|
| | |
| | | //升级成功
|
| | | this.UpdateStatu = UpdateStatuMode.UpdateSuccess;
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | System.Threading.Thread.Sleep(3000);
|
| | |
|
| | |
| | | //设备升级成功!
|
| | | this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uDeviceUpdateSuccess));
|
| | | });
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | private void StartDownLoadTimeOutThread()
|
| | | {
|
| | | this.downLoadTimeOutCount = 30;
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | while (true)
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | private void StartUpdateTimeOutThread()
|
| | | {
|
| | | this.UpdateTimeOutCount = 60;
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | while (true)
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|