黄学彪
2019-11-07 82a773d1783549caca563831aac8affc059deedf
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
@@ -23,7 +23,7 @@
        /// </summary>
        public Action<int, string> UpdateStatuChangedEvent = null;
        /// <summary>
        /// 进度值事件
        /// 进度值事件(已经是百分比的值)
        /// </summary>
        public Action<decimal> ProgressEvent = null;
        /// <summary>
@@ -412,6 +412,7 @@
            //协调器固件下载中
            this.UpdateStatuChangedEvent(0, Language.StringByID(R.MyInternationalizationString.uCoordinatorFirmwareDownLoading));
            this.SetProgressValue(0, 100);
            //下载协调器文件的进度
            this.upDatezbGateway.ReportAction += this.DownLoadCoordinatorFileProgress;
@@ -462,6 +463,7 @@
            //设置进度
            var responData = tempZb.downloadFileProgressResponData;
            this.SetProgressValue(responData.DownloadPercent, 100);
            //协调器固件下载中
            this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uCoordinatorFirmwareDownLoading));
@@ -610,6 +612,7 @@
            //网关固件下载中
            this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uGatewayFirmwareDownLoading));
            this.SetProgressValue(0, 100);
            //下载网关文件的进度
            this.upDatezbGateway.ReportAction += this.DownLoadGatewayFileProgress;
@@ -754,7 +757,10 @@
                //执行下一个升级
                HdlFirmwareUpdateLogic.DoUpdateNextFirmware();
                //网关升级成功!
                this.UpdateStatuChangedEvent?.Invoke(1, "");
                this.SetProgressValue(100, 100);
                System.Threading.Thread.Sleep(1500);
                this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uGatewayUpdateSuccess));
            });
        }
@@ -807,7 +813,7 @@
                return;
            }
            decimal result = value / maxValue;
            this.ProgressEvent?.Invoke(value);
            this.ProgressEvent?.Invoke(result);
        }
        /// <summary>