From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 16 四月 2020 17:10:57 +0800 Subject: [PATCH] 请合并代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs index dfce7b9..4462aa1 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs @@ -37,7 +37,13 @@ //娓呯┖bodyFrame this.ClearBodyFrame(); - var listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac); + var listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac); + var oTADevice = Common.LocalDevice.Current.GetOTADevice(i_deviceMac); + if (listDevice.Count == 0) + { + //閽堝鍗曠函鍙湁涓�涓�200绔偣鐨勮澶� + listDevice.Add(oTADevice); + } var listView = new VerticalListControl(12); listView.BackgroundColor = UserCenterColor.Current.White; @@ -45,11 +51,12 @@ bodyFrameLayout.AddChidren(listView); //璁惧鍚嶇О + var myInfoType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); var rowName = new FrameRowControl(listView.rowSpace / 2); rowName.UseClickStatu = false; listView.AddChidren(rowName); rowName.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDeviceName), 400); - rowName.AddMostRightView(Common.LocalDevice.Current.GetDeviceObjectText(listDevice), 600); + rowName.AddMostRightView(Language.StringByID(myInfoType.ConcreteTextId), 600); rowName.AddBottomLine(); //璁惧鍨嬪彿 @@ -76,18 +83,25 @@ rowImage.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uImageId), 400); rowImage.AddMostRightView(otaDevice.ImgTypeId.ToString(), 400); rowImage.AddBottomLine(); - } - - //鍥轰欢鐗堟湰 - var oTADevice = Common.LocalDevice.Current.GetOTADevice(listDevice[0].DeviceAddr); + } + if (oTADevice != null) { + //鍥轰欢鐗堟湰 var rowVersion = new FrameRowControl(listView.rowSpace / 2); rowVersion.UseClickStatu = false; listView.AddChidren(rowVersion); rowVersion.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFirmwareVersion), 400); rowVersion.AddMostRightView(Common.LocalDevice.Current.AppendVersion(oTADevice.ImgVersion), 600); rowVersion.AddBottomLine(); + + //纭欢鐗堟湰 + var rowHard = new FrameRowControl(listView.rowSpace / 2); + rowHard.UseClickStatu = false; + listView.AddChidren(rowHard); + rowHard.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uHardwareVersion), 400); + rowHard.AddMostRightView(oTADevice.HwVersion.ToString(), 600); + rowHard.AddBottomLine(); } //搴忓垪鍙� -- Gitblit v1.8.0