From f1c3921b08bb22ac6f5db22d620e01d7e8e5c49f Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 30 十二月 2019 13:32:33 +0800 Subject: [PATCH] 2019-12-30-1 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs index 1d0ea04..44249b0 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> @@ -980,10 +986,6 @@ { HdlThreadLogic.Current.RunThread(async () => { - //褰撳墠缃戝叧鐨勭増鏈� - var oldVersion = HdlGatewayLogic.Current.GetGwInfoAttribute(this.upDatezbGateway, "LinuxFWVersion"); - int oldLinuxVersion = Convert.ToInt32(oldVersion); - //鍏堢瓑涓�120绉掑惂锛岀綉鍏冲崌绾у拰缃戝叧瀹屽叏閲嶅惎闇�瑕佸緢闀挎椂闂� int count = 12; for (int i = 0; i < count; i++) -- Gitblit v1.8.0