| | |
| | | /// </summary>
|
| | | public Action<int, string> UpdateStatuChangedEvent = null;
|
| | | /// <summary>
|
| | | /// 进度值事件
|
| | | /// 进度值事件(已经是百分比的值)
|
| | | /// </summary>
|
| | | public Action<decimal> ProgressEvent = null;
|
| | | /// <summary>
|
| | |
| | |
|
| | | //协调器固件下载中
|
| | | this.UpdateStatuChangedEvent(0, Language.StringByID(R.MyInternationalizationString.uCoordinatorFirmwareDownLoading));
|
| | | this.SetProgressValue(0, 100);
|
| | |
|
| | | //下载协调器文件的进度
|
| | | this.upDatezbGateway.ReportAction += this.DownLoadCoordinatorFileProgress;
|
| | |
| | |
|
| | | //设置进度
|
| | | var responData = tempZb.downloadFileProgressResponData;
|
| | | this.SetProgressValue(responData.DownloadPercent, 100);
|
| | |
|
| | | //协调器固件下载中
|
| | | this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uCoordinatorFirmwareDownLoading));
|
| | |
| | |
|
| | | //网关固件下载中
|
| | | this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uGatewayFirmwareDownLoading));
|
| | | this.SetProgressValue(0, 100);
|
| | |
|
| | | //下载网关文件的进度
|
| | | this.upDatezbGateway.ReportAction += this.DownLoadGatewayFileProgress;
|
| | |
| | | //执行下一个升级
|
| | | HdlFirmwareUpdateLogic.DoUpdateNextFirmware();
|
| | | //网关升级成功!
|
| | | this.UpdateStatuChangedEvent?.Invoke(1, "");
|
| | | this.SetProgressValue(100, 100);
|
| | | System.Threading.Thread.Sleep(1500);
|
| | |
|
| | | this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uGatewayUpdateSuccess));
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | decimal result = value / maxValue;
|
| | | this.ProgressEvent?.Invoke(value);
|
| | | this.ProgressEvent?.Invoke(result);
|
| | | }
|
| | |
|
| | | /// <summary>
|