黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareUpdateForm.cs
@@ -53,9 +53,9 @@
        /// </summary>
        private void InitMiddleFrame()
        {
            var oTADevice = Common.LocalDevice.Current.GetOTADevice(deviceMac);
            var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac);
            //获取设备最新版本
            this.deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.A设备,
            this.deviceFirmware = HdlFirmwareUpdateLogic.Current.GetFirmwareMostVersionInfo(FirmwareLevelType.A设备,
                oTADevice.HwVersion.ToString(),
                oTADevice.ImgTypeId.ToString(),
                oTADevice.ImgVersion);
@@ -88,7 +88,7 @@
        /// </summary>
        private void InitTopRightMenu()
        {
            if (UserCenterResourse.HideOption.DeviceHistory != 1)
            if (HdlUserCenterResourse.HideOption.DeviceHistory != 1)
            {
                return;
            }
@@ -136,7 +136,7 @@
            //清空bodyFrame
            this.ClearBodyFrame();
            var oTADevice = Common.LocalDevice.Current.GetOTADevice(deviceMac);
            var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac);
            //升级
            var btnUpdate = new BottomClickButton();
@@ -162,7 +162,7 @@
            frameNow.Y = Application.GetRealHeight(20);
            frameWhiteBack.AddChidren(frameNow);
            frameNow.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowFirmwareVersion), 500);
            frameNow.AddMostRightView(Common.LocalDevice.Current.AppendVersion(oTADevice.ImgVersion), 500);
            frameNow.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(oTADevice.ImgVersion), 500);
            frameNow.AddBottomLine();
            //最新固件版本
@@ -171,11 +171,11 @@
            frameNew.Y = frameNow.Bottom + Application.GetRealHeight(12);
            frameWhiteBack.AddChidren(frameNew);
            frameNew.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNewFirmwareVersion), 500);
            frameNew.AddMostRightView(Common.LocalDevice.Current.AppendVersion(deviceFirmware.FirmwareVersion), 500);
            frameNew.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(deviceFirmware.FirmwareVersion), 500);
            frameNew.AddBottomLine();
            //添加固件介绍行
            int maxHeight = btnUpdate.Y - ControlCommonResourse.BottomButtonAndListViewSpace - frameNew.Bottom;
            int maxHeight = btnUpdate.Y - HdlControlResourse.BottomButtonAndListViewSpace - frameNew.Bottom;
            this.AddUpdateContent(deviceFirmware, maxHeight, frameNew.Bottom);
        }
@@ -191,7 +191,7 @@
            //清空bodyFrame
            this.ClearBodyFrame();
            var oTADevice = Common.LocalDevice.Current.GetOTADevice(deviceMac);
            var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac);
            var frameWhiteBack = new FrameLayout();
            frameWhiteBack.Height = Application.GetRealHeight(308);
@@ -204,7 +204,7 @@
            frameNow.Y = Application.GetRealHeight(20);
            frameWhiteBack.AddChidren(frameNow);
            frameNow.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowFirmwareVersion), 500);
            frameNow.AddMostRightView(Common.LocalDevice.Current.AppendVersion(oTADevice.ImgVersion), 500);
            frameNow.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(oTADevice.ImgVersion), 500);
            frameNow.AddBottomLine();
            //最新固件版本
@@ -362,12 +362,12 @@
            ProgressFormBar.Current.CloseEvent += () =>
            {
                //升级对象
                if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(deviceMac) == true
                    && FirmwareUpdateResourse.dicUpdateList[deviceMac].IsFinishUpdate == true)
                if (HdlFirmwareUpdateResourse.dicUpdateList.ContainsKey(deviceMac) == true
                    && HdlFirmwareUpdateResourse.dicUpdateList[deviceMac].IsFinishUpdate == true)
                {
                    //如果设备已经升级完成,界面关闭时,则移除内存
                    FirmwareUpdateResourse.dicUpdateList[deviceMac].Dispose();
                    FirmwareUpdateResourse.dicUpdateList.Remove(deviceMac);
                    HdlFirmwareUpdateResourse.dicUpdateList[deviceMac].Dispose();
                    HdlFirmwareUpdateResourse.dicUpdateList.Remove(deviceMac);
                }
            };
        }