| | |
| | | /// <param name="deviceMac">设备Mac地址</param>
|
| | | public void ShowForm(string deviceMac)
|
| | | {
|
| | | this.listUpdateDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac);
|
| | | this.listUpdateDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac);
|
| | |
|
| | | //设置标题信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uHistoryVersion));
|
| | |
| | | bodyFrameLayout.AddChidren(listView);
|
| | |
|
| | | //拥有200端口这个东西的时候,才会显示
|
| | | var oTADevice = Common.LocalDevice.Current.GetOTADevice(listUpdateDevice[0].DeviceAddr);
|
| | | var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(listUpdateDevice[0].DeviceAddr);
|
| | | if (oTADevice == null || oTADevice.ImgVersion == -1)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | //获取历史版本
|
| | | var listData = HdlFirmwareUpdateLogic.GetFirmwareVersionListInfo(FirmwareLevelType.ZigbeeDevice,
|
| | | var listData = HdlFirmwareUpdateLogic.Current.GetFirmwareVersionListInfo(FirmwareLevelType.A设备,
|
| | | oTADevice.HwVersion.ToString(),
|
| | | oTADevice.ImgTypeId.ToString());
|
| | |
|
| | | string unSelectPic = string.Empty;
|
| | | string selectPic = string.Empty;
|
| | | Common.LocalDevice.Current.GetDeviceBeloneIcon(listUpdateDevice, ref unSelectPic, ref selectPic);
|
| | | HdlDeviceCommonLogic.Current.GetDeviceObjectIcon(listUpdateDevice, ref unSelectPic, ref selectPic);
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | string ImagType = oTADevice.ImgTypeId.ToString();
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | foreach (var data in listData)
|
| | | {
|
| | |
| | | var btnIcon = rowlayout.AddLeftIcon();
|
| | | btnIcon.UnSelectedImagePath = unSelPath;
|
| | | //指定的设备
|
| | | rowlayout.AddLeftCaption(info.ShowName, 800);
|
| | | rowlayout.AddTopView(info.ShowName, 800);
|
| | | //向右的图标
|
| | | rowlayout.AddRightArrow();
|
| | | //固件信息
|
| | | rowlayout.AddMostRightView(Common.LocalDevice.Current.AppendVersion(info.FirmwareVersion), 300);
|
| | | string firmwareText = HdlDeviceCommonLogic.Current.AppendVersion(info.FirmwareVersion);
|
| | | firmwareText += " " + HdlCommonLogic.Current.ConvertUtcTimeToLocalTime(info.CreatedOnUtc).ToString("yyyy/MM/dd HH:mm:ss");
|
| | | rowlayout.AddBottomView(firmwareText, 800);
|
| | | //底线
|
| | | rowlayout.AddBottomLine();
|
| | |
|
| | | rowlayout.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.listUpdateDevice[0]);
|
| | | if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(mainKeys) == true)
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.listUpdateDevice[0]);
|
| | | if (HdlFirmwareUpdateResourse.dicUpdateList.ContainsKey(mainKeys) == true)
|
| | | {
|
| | | this.CloseForm();
|
| | | return;
|