From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 14 十二月 2020 11:16:06 +0800 Subject: [PATCH] 合并了晾衣架(非新云端) --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Common/Logic/HdlACZbGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs similarity index 94% rename from ZigbeeApp/Shared/Phone/Common/Logic/HdlACZbGatewayUpdateLogic.cs rename to ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs index 4a33664..f349f83 100644 --- a/ZigbeeApp/Shared/Phone/Common/Logic/HdlACZbGatewayUpdateLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs @@ -3,12 +3,12 @@ using System.Text; using ZigBee.Device; -namespace Shared.Phone +namespace Shared.Phone.UserCenter { /// <summary> /// 涓ぎ绌鸿皟鐨勫崌绾ч�昏緫 /// </summary> - public class HdlACZbGatewayUpdateLogic : DeviceUpdateCommon + public class HdlACZbGatewayUpdateLogic : HdlDeviceUpdateCommonLogic { #region 鈻� 鍙橀噺澹版槑___________________________ @@ -67,7 +67,7 @@ { this.ClassDiv = 2; this.deviceAc = i_deviceAc; - this.otaDevice = HdlDeviceCommonLogic.Current.GetOTADevice(i_deviceAc.DeviceAddr); + this.otaDevice = Common.LocalDevice.Current.GetOTADevice(i_deviceAc.DeviceAddr); this.deviceFirmware = i_deviceFirmware; this.zbGateway = i_deviceAc.Gateway; } @@ -84,9 +84,9 @@ if (this.UpdateStatu == UpdateStatuMode.Wait) { //濡傛灉鏄瓑寰呮ā寮忥紝鍐嶆鐐瑰嚮鏃讹紝绉婚櫎鍒楄〃 - if (HdlFirmwareUpdateResourse.dicUpdateList.ContainsKey(otaDevice.DeviceAddr) == true) + if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(otaDevice.DeviceAddr) == true) { - HdlFirmwareUpdateResourse.dicUpdateList.Remove(otaDevice.DeviceAddr); + FirmwareUpdateResourse.dicUpdateList.Remove(otaDevice.DeviceAddr); } //鍙栨秷 this.UpdateStatu = UpdateStatuMode.None; @@ -102,13 +102,13 @@ //杩涘叆绛夊緟妯″紡 this.UpdateStatu = UpdateStatuMode.Wait; - HdlFirmwareUpdateResourse.dicUpdateList[otaDevice.DeviceAddr] = this; + FirmwareUpdateResourse.dicUpdateList[otaDevice.DeviceAddr] = this; //绛夊緟涓�� this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uWaitting)); //鎵ц涓嬩竴涓彲鏇存柊鐨勫浐浠剁殑鏇存柊鎿嶄綔 - HdlFirmwareUpdateLogic.Current.DoUpdateNextFirmware(); + HdlFirmwareUpdateLogic.DoUpdateNextFirmware(); } /// <summary> @@ -174,7 +174,8 @@ //涓嬭浇鍥轰欢璧勬簮 if (this.deviceFirmware.ImagType != "-100") { - this.deviceFirmwareByte = HdlFirmwareUpdateLogic.Current.DowLoadFirmware(FirmwareLevelType.A璁惧, this.deviceFirmware.DistributedMark); + var pra = new { RequestVersion = Common.CommonPage.RequestVersion, DistributedMark = this.deviceFirmware.DistributedMark }; + this.deviceFirmwareByte = Common.CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("FirmwareMana/DownloadPlatformUploadFirmware", Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(pra))); } else { @@ -474,7 +475,7 @@ //鍗囩骇瀹屾垚 this.UpdateStatu = UpdateStatuMode.UpdateFinish; - HdlFirmwareUpdateLogic.Current.DoUpdateNextFirmware(); + HdlFirmwareUpdateLogic.DoUpdateNextFirmware(); //璁惧鍗囩骇鎴愬姛! this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uDeviceUpdateSuccess)); @@ -492,7 +493,7 @@ //鐘舵�佸彉鏇� this.IsFinishUpdate = true; //鎵ц涓嬩竴涓崌绾� - HdlFirmwareUpdateLogic.Current.DoUpdateNextFirmware(); + HdlFirmwareUpdateLogic.DoUpdateNextFirmware(); } /// <summary> @@ -503,7 +504,7 @@ //鐘舵�佸彉鏇� this.IsFinishUpdate = true; //鎵ц涓嬩竴涓崌绾� - HdlFirmwareUpdateLogic.Current.DoUpdateNextFirmware(); + HdlFirmwareUpdateLogic.DoUpdateNextFirmware(); } #endregion -- Gitblit v1.8.0