From 9cc8fd11b13813adbdd3c6c31554e5c0bebf4026 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 21 八月 2020 19:53:49 +0800 Subject: [PATCH] 发布到商店的版本 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 74 +++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 35 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs old mode 100755 new mode 100644 index 1bd57b2..e575691 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -602,7 +602,7 @@ btnFunction.ButtonClickEvent += (sender, e) => { //绠�绾︾幆澧冮潰鏉跨殑鎸夐敭閰嶇疆 - var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm(); + var form = new DevicePanel.PanelSettionWithSourceForm(); form.AddForm(listNewDevice[0]); }; } @@ -643,16 +643,10 @@ var form = new DevicePanel.PanelFangyueButtonSettionForm(); form.AddForm(listNewDevice[0]); } - else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment) + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir) { - //鏂规偊鐜闈㈡澘鐨勬寜閿厤缃� - var form = new DevicePanel.PanelFangyueEnvironmentButtonSettionForm(); - form.AddForm(listNewDevice[0]); - } - else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir) - { - //鏂规偊鏂伴闈㈡澘鐨勬寜閿厤缃� - var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm(); + //鏂规偊鐜闈㈡澘鐨勬寜閿厤缃�&鏂规偊鏂伴闈㈡澘鐨勬寜閿厤缃� + var form = new DevicePanel.PanelSettionWithSourceForm(); form.AddForm(listNewDevice[0]); } else @@ -713,8 +707,7 @@ private void AddPirSensorWorkModeRow() { if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir - || deviceEnumInfo.IsHdlDevice == false - || this.listNewDevice.Count != 2) + || deviceEnumInfo.IsHdlDevice == false) { return; } @@ -743,8 +736,7 @@ /// </summary> private void AddPirSensorBindRow() { - if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir - || this.listNewDevice.Count != 2) + if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir) { return; } @@ -1078,7 +1070,7 @@ paneTargetsBaseFormp.Show(); paneTargetsBaseFormp.actionHumidityTarget += (bindName) => { - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { if (string.IsNullOrEmpty(bindName)) { @@ -1129,7 +1121,7 @@ paneTargetsBaseFormp.Show(); paneTargetsBaseFormp.actionTemperatureTarget += (bindName) => { - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { if (string.IsNullOrEmpty(bindName)) { @@ -1164,7 +1156,7 @@ { Application.RunOnMainThread(() => { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_2" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); }); return; } @@ -1176,7 +1168,7 @@ { Application.RunOnMainThread(() => { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007_3" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); }); return; } @@ -1335,7 +1327,7 @@ listview.AddChidren(rowVersion); rowVersion.AddLeftCaption(caption, 600); //鐗堟湰 - this.btnAirConditionerVersion = rowVersion.AddMostRightView("", 800); + this.btnAirConditionerVersion = rowVersion.AddMostRightView(((AC)this.listNewDevice[0]).AcModelVersion, 800); //搴曠嚎 rowVersion.AddBottomLine(); @@ -1439,13 +1431,13 @@ if (deviceFirmware != null && deviceFirmware.FirmwareVersion > oTADevice.ImgVersion) { - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { if (btnNewVersion != null) { btnNewVersion.Visible = true; } - }); + }, ShowErrorMode.NO); } }); } @@ -1690,27 +1682,39 @@ { return; } - //鑾峰彇涓�.... - this.btnAirConditionerVersion.TextID = R.MyInternationalizationString.uGetting; + //濡傛灉鏄櫄鎷熶綇瀹呮垨鑰呭睍绀烘ā鏉跨殑璇� + if (Config.Instance.Home.IsShowTemplate == true || Config.Instance.Home.IsVirtually == true) + { + return; + } + + bool notVersion = ((AC)this.listNewDevice[0]).AcModelVersion == string.Empty; + if (notVersion == true) + { + //鑾峰彇涓� + btnAirConditionerVersion.Text = Language.StringByID(R.MyInternationalizationString.uGetting); + } HdlThreadLogic.Current.RunThread(async () => { //璇诲彇绌鸿皟妯″潡鐗堟湰 var result = await HdlDeviceAirConditionerLogic.Current.ReadACFirewareVersionAsync(listNewDevice[0]); if (result == null || result.readACFirewareVersionResponData == null || result.readACFirewareVersionResponData.Status != 0) - { - HdlThreadLogic.Current.RunMain(() => - { - //鑾峰彇澶辫触 - btnAirConditionerVersion.TextID = R.MyInternationalizationString.uGettingFail; - }); + { + if (notVersion == true) + { + //鑾峰彇澶辫触 + HdlThreadLogic.Current.RunMain(() => + { + btnAirConditionerVersion.Text = Language.StringByID(R.MyInternationalizationString.uGettingFail); + }); + } + return; } - else + HdlThreadLogic.Current.RunMain(() => { - HdlThreadLogic.Current.RunMain(() => - { - btnAirConditionerVersion.Text = result.readACFirewareVersionResponData.FirewareVersion.Replace("-", string.Empty); - }); - } + ((AC)this.listNewDevice[0]).AcModelVersion = result.readACFirewareVersionResponData.FirewareVersion.Replace("-", string.Empty); + btnAirConditionerVersion.Text = ((AC)this.listNewDevice[0]).AcModelVersion; + }); }); } -- Gitblit v1.8.0