From 351bdda734832d821a9764b0cde8be5d83c4ec50 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 01 十二月 2022 09:56:25 +0800
Subject: [PATCH] 2022年12月01日09:56:23
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs | 42 ++++++++++++++++++++++++++++++++++--------
1 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
index fd6e618..caaab50 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
@@ -38,6 +38,12 @@
this.ClearBodyFrame();
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,20 @@
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.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDeviceName), 400);
+ if (Common.LocalDevice.Current.IsMiniLight(listDevice[0]) == true)
+ {
+ //mini澶滅伅
+ rowName.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uMiniNightLight), 600);
+ }
+ else
+ {
+ rowName.AddMostRightView(myInfoType.ConcreteText, 600);
+ }
rowName.AddBottomLine();
//璁惧鍨嬪彿
@@ -76,9 +91,8 @@
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)
{
//鍥轰欢鐗堟湰
@@ -102,8 +116,16 @@
var rowSerial = new FrameRowControl(listView.rowSpace / 2);
rowSerial.UseClickStatu = false;
listView.AddChidren(rowSerial);
- rowSerial.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSerialNumber), 400);
- rowSerial.AddMostRightView(listDevice[0].SerialNumber != string.Empty ? listDevice[0].SerialNumber : listDevice[0].DeviceAddr, 600);
+ rowSerial.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSerialNumber), 400);
+ if (Common.LocalDevice.Current.IsHdlDevice(listDevice[0]) == false)
+ {
+ //绗笁鏂硅澶囧浐瀹氫娇鐢∕ac
+ rowSerial.AddMostRightView(listDevice[0].DeviceAddr, 600);
+ }
+ else
+ {
+ rowSerial.AddMostRightView(listDevice[0].SerialNumber != string.Empty ? listDevice[0].SerialNumber : listDevice[0].DeviceAddr, 600);
+ }
rowSerial.AddBottomLine();
//MAC
@@ -115,11 +137,15 @@
rowMac.AddBottomLine();
//鍒堕�犲晢
- string strProtuct = listDevice[0].DriveCode > 0 ? "HDL" : listDevice[0].ManufacturerName;
+ string strProtuct = listDevice[0].ManufacturerName;
+ if (listDevice[0].DriveCode > 0 || Common.LocalDevice.Current.IsHdlDevice(listDevice[0]) == true)
+ {
+ strProtuct = "骞垮窞娌充笢绉戞妧鏈夐檺鍏徃";
+ }
var rowProtuct = new FrameRowControl(listView.rowSpace / 2);
rowProtuct.UseClickStatu = false;
listView.AddChidren(rowProtuct);
- rowProtuct.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uManufacturerName), 400);
+ rowProtuct.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uManufacturerName), 600);
rowProtuct.AddMostRightView(strProtuct, 600);
listView.AdjustRealHeight(Application.GetRealHeight(23));
--
Gitblit v1.8.0