From 82a773d1783549caca563831aac8affc059deedf Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 07 十一月 2019 10:56:13 +0800 Subject: [PATCH] 合并了全部的代码,IOS 图片需要从新引入工程 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs index 1d0ea04..716b00b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs +++ b/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> -- Gitblit v1.8.0