| | |
| | | /// </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);
|
| | |
| | | /// </summary> |
| | | private void InitTopRightMenu()
|
| | | {
|
| | | if (UserCenterResourse.HideOption.DeviceHistory != 1)
|
| | | if (HdlUserCenterResourse.HideOption.DeviceHistory != 1)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | var oTADevice = Common.LocalDevice.Current.GetOTADevice(deviceMac);
|
| | | var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(deviceMac);
|
| | |
|
| | | //升级
|
| | | var btnUpdate = new BottomClickButton();
|
| | |
| | | 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();
|
| | |
|
| | | //最新固件版本
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | | //清空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);
|
| | |
| | | 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();
|
| | |
|
| | | //最新固件版本
|
| | |
| | | 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);
|
| | | }
|
| | | };
|
| | | }
|