| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | //获取网关新版本信息
|
| | | this.listVersionInfo = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
|
| | | this.listVersionInfo = HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
|
| | | if (listVersionInfo == null)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | return;
|
| | | }
|
| | | //虚拟驱动号
|
| | | this.listVode = await HdlGatewayLogic.Current.GetListVDDriveCode(this.zbGateway);
|
| | | this.listVode = HdlGatewayLogic.Current.GetListVDDriveCode(this.zbGateway);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | |
| | |
|
| | | //当前固件版本
|
| | | var btnTitle = new NormalViewControl(700, 65, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | | btnTitle.X = HdlControlResourse.XXLeft;
|
| | | btnTitle.Y = Application.GetRealHeight(30);
|
| | | btnTitle.TextID = R.MyInternationalizationString.uNowFirmwareVersion;
|
| | | btnTitle.TextSize = 15;
|
| | |
| | | rowLinux.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new GatewayLinuxInfoForm();
|
| | | form.AddForm(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
|
| | | form.AddForm(this.zbGateway.GwId);
|
| | | };
|
| | |
|
| | | //协调器
|
| | |
| | | rowCoordinator.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new GatewayCoordinatorInfoForm();
|
| | | form.AddForm(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
|
| | | form.AddForm(this.zbGateway.GwId);
|
| | | };
|
| | |
|
| | | if (this.listVode != null)
|
| | |
| | |
|
| | | //最新固件版本
|
| | | var btnTitle = new NormalViewControl(700, 65, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | | btnTitle.X = HdlControlResourse.XXLeft;
|
| | | btnTitle.Y = Application.GetRealHeight(30);
|
| | | btnTitle.TextID = R.MyInternationalizationString.uNewFirmwareVersion;
|
| | | btnTitle.TextSize = 15;
|
| | |
| | | rowLinux.UseClickStatu = false;
|
| | | listView.AddChidren(rowLinux);
|
| | | rowLinux.AddLeftCaption("Linux", 300);
|
| | | rowLinux.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[0].FirmwareVersion), 300);
|
| | | rowLinux.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[0].FirmwareVersion), 300);
|
| | | rowLinux.AddBottomLine();
|
| | | }
|
| | |
|
| | |
| | | rowCoordinator.UseClickStatu = false;
|
| | | listView.AddChidren(rowCoordinator);
|
| | | rowCoordinator.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoordinator), 500);
|
| | | rowCoordinator.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[1].FirmwareVersion), 300);
|
| | | rowCoordinator.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[1].FirmwareVersion), 300);
|
| | | rowCoordinator.AddBottomLine();
|
| | | }
|
| | |
|
| | |
| | | rowVirtual.UseClickStatu = false;
|
| | | listView.AddChidren(rowVirtual);
|
| | | rowVirtual.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uVirtualDrive), 500);
|
| | | rowVirtual.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[2].FirmwareVersion), 300);
|
| | | rowVirtual.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[2].FirmwareVersion), 300);
|
| | | rowVirtual.AddBottomLine();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 右上角菜单_________________________ |
| | | #region ■ 右上角菜单_________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化右上角菜单
|
| | | /// </summary> |
| | | /// </summary>
|
| | | private void InitTopRightMenu()
|
| | | {
|
| | | if (HdlUserCenterResourse.HideOption.DeviceHistory != 1)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var btnIcon = new MostRightIconControl(69, 69);
|
| | | btnIcon.UnSelectedImagePath = "Item/More.png";
|
| | | topFrameLayout.AddChidren(btnIcon);
|
| | |
| | |
|
| | | /// <summary>
|
| | | /// 显示右上角菜单界面
|
| | | /// </summary> |
| | | /// </summary>
|
| | | private void ShowTopRightMenu()
|
| | | {
|
| | | var frame = new TopRightMenuControl(1, 2);
|
| | |
| | | /// <summary>
|
| | | /// 添加固件介绍行
|
| | | /// </summary>
|
| | | /// <param name="listContent">列表控件</param> |
| | | /// <param name="listContent">列表控件</param>
|
| | | private void AddUpdateContent(VerticalListControl listContent)
|
| | | {
|
| | | //修改内容
|
| | |
| | | frameContent.Height = Application.GetRealHeight(87);
|
| | | listContent.AddChidren(frameContent);
|
| | | var btnContent = new NormalViewControl(500, 87, true);
|
| | | btnContent.X = ControlCommonResourse.XXLeft;
|
| | | btnContent.X = HdlControlResourse.XXLeft;
|
| | | btnContent.Y = Application.GetRealHeight(28);
|
| | | btnContent.TextID = R.MyInternationalizationString.uEditorContent;
|
| | | btnContent.TextSize = 12;
|
| | |
| | | ProgressFormBar.Current.CloseEvent += () =>
|
| | | {
|
| | | //升级对象
|
| | | string gwId = HdlGatewayLogic.Current.GetGatewayId(realway);
|
| | | if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true
|
| | | && FirmwareUpdateResourse.dicUpdateList[gwId].IsFinishUpdate == true)
|
| | | string gwId = realway.GwId;
|
| | | if (HdlFirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true
|
| | | && HdlFirmwareUpdateResourse.dicUpdateList[gwId].IsFinishUpdate == true)
|
| | | {
|
| | | //如果网关已经升级完成,界面关闭时,则移除内存
|
| | | FirmwareUpdateResourse.dicUpdateList[gwId].Dispose();
|
| | | FirmwareUpdateResourse.dicUpdateList.Remove(gwId);
|
| | | HdlFirmwareUpdateResourse.dicUpdateList[gwId].Dispose();
|
| | | HdlFirmwareUpdateResourse.dicUpdateList.Remove(gwId);
|
| | | }
|
| | | };
|
| | | }
|