| | |
| | | //添加【通用信息】行
|
| | | this.AddGeneralInformationRow();
|
| | |
|
| | | //添加【空调模块版本(空调专用)】行
|
| | | this.AddAirConditionerModelVersionRow();
|
| | |
|
| | | if (isHdlDevice == true)
|
| | | {
|
| | | //添加【固件升级】行
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 空调模块版本(空调专用)_____________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加【空调模块版本】行(河东的中央空调)
|
| | | /// </summary>
|
| | | private void AddAirConditionerModelVersionRow()
|
| | | {
|
| | | if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.AirConditioner_ZbGateway)
|
| | | {
|
| | | //不是中央空调
|
| | | return;
|
| | | }
|
| | | string caption = Language.StringByID(R.MyInternationalizationString.uAirConditionerModelVersion);
|
| | | var rowVersion = new FrameRowControl(listview.rowSpace / 2);
|
| | | rowVersion.UseClickStatu = false;
|
| | | listview.AddChidren(rowVersion);
|
| | | rowVersion.AddLeftCaption(caption, 600);
|
| | | //版本
|
| | | var btnVersion = rowVersion.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uGetting), 800);
|
| | | //底线
|
| | | rowVersion.AddBottomLine();
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //读取空调模块版本
|
| | | var result = await ((AC)listNewDevice[0]).ReadACFirewareVersionAsync();
|
| | | if (result == null || result.readACFirewareVersionResponData == null || result.readACFirewareVersionResponData.Status != 0)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //获取失败
|
| | | btnVersion.TextID = R.MyInternationalizationString.uGettingFail;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | btnVersion.Text = result.readACFirewareVersionResponData.FirewareVersion.Replace("-", string.Empty);
|
| | | });
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 固件升级___________________________
|
| | |
|
| | | /// <summary>
|
| | |
| | |
|
| | | rowUpDate.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.AirConditioner_ZbGateway)
|
| | | {
|
| | | //这个是一般设备的升级
|
| | | var form = new DeviceFirmwareUpdateForm();
|
| | | form.AddForm(listNewDevice[0].DeviceAddr);
|
| | | }
|
| | | else
|
| | | {
|
| | | //中央空调的升级的话,是特殊的
|
| | | var form = new DeviceAirConditioner.ACZbGatewayUpdateMenuForm();
|
| | | form.AddForm(listNewDevice[0].DeviceAddr, btnNewVersion.Visible);
|
| | | }
|
| | | btnNewVersion.Visible = false;
|
| | | var form = new DeviceFirmwareInfoForm();
|
| | | form.AddForm(listNewDevice[0].DeviceAddr);
|
| | | };
|
| | |
|
| | | //设置设备的版本信息
|