From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs | 118 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 59 insertions(+), 59 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs index caaab50..6c0a91c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs @@ -18,45 +18,45 @@ /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> - /// <param name="i_deviceMac">璁惧MAC鍦板潃</param> - public void ShowForm(string i_deviceMac) - { - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGeneralInformation)); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(i_deviceMac); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄤ俊鎭� - /// </summary> - /// <param name="i_deviceMac">璁惧MAC鍦板潃</param> - private void InitMiddleFrame(string i_deviceMac) + /// <param name="i_deviceMac">璁惧MAC鍦板潃</param> + public void ShowForm(string i_deviceMac) + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGeneralInformation)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(i_deviceMac); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + /// <param name="i_deviceMac">璁惧MAC鍦板潃</param> + private void InitMiddleFrame(string i_deviceMac) { //娓呯┖bodyFrame - this.ClearBodyFrame(); - - var listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac); - var oTADevice = Common.LocalDevice.Current.GetOTADevice(i_deviceMac); + this.ClearBodyFrame(); + + var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(i_deviceMac); + var oTADevice = HdlDeviceCommonLogic.Current.GetOTADevice(i_deviceMac); if (listDevice.Count == 0) { //閽堝鍗曠函鍙湁涓�涓�200绔偣鐨勮澶� listDevice.Add(oTADevice); - } - - var listView = new VerticalListControl(12); - listView.BackgroundColor = UserCenterColor.Current.White; - listView.Height = bodyFrameLayout.Height; - bodyFrameLayout.AddChidren(listView); - - //璁惧鍚嶇О - var myInfoType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); - var rowName = new FrameRowControl(listView.rowSpace / 2); - rowName.UseClickStatu = false; - listView.AddChidren(rowName); + } + + var listView = new VerticalListControl(12); + listView.BackgroundColor = UserCenterColor.Current.White; + listView.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listView); + + //璁惧鍚嶇О + var myInfoType = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice); + var rowName = new FrameRowControl(listView.rowSpace / 2); + rowName.UseClickStatu = false; + listView.AddChidren(rowName); rowName.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDeviceName), 400); - if (Common.LocalDevice.Current.IsMiniLight(listDevice[0]) == true) + if (HdlDeviceCommonLogic.Current.IsMiniLight(listDevice[0]) == true) { //mini澶滅伅 rowName.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uMiniNightLight), 600); @@ -75,14 +75,14 @@ strModel = Language.StringByID(R.MyInternationalizationString.uUnDistinguish); } var rowType = new FrameRowControl(listView.rowSpace / 2); - rowType.UseClickStatu = false; - listView.AddChidren(rowType); - rowType.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uModelIdentifier), 400); - rowType.AddMostRightView(strModel, 600); - rowType.AddBottomLine(); - - //闀滃儚ID - var otaDevice = Common.LocalDevice.Current.GetOTADevice(listDevice[0].DeviceAddr); + rowType.UseClickStatu = false; + listView.AddChidren(rowType); + rowType.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uModelIdentifier), 400); + rowType.AddMostRightView(strModel, 600); + rowType.AddBottomLine(); + + //闀滃儚ID + var otaDevice = HdlDeviceCommonLogic.Current.GetOTADevice(listDevice[0].DeviceAddr); if (otaDevice != null) { var rowImage = new FrameRowControl(listView.rowSpace / 2); @@ -100,7 +100,7 @@ rowVersion.UseClickStatu = false; listView.AddChidren(rowVersion); rowVersion.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFirmwareVersion), 400); - rowVersion.AddMostRightView(Common.LocalDevice.Current.AppendVersion(oTADevice.ImgVersion), 600); + rowVersion.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(oTADevice.ImgVersion), 600); rowVersion.AddBottomLine(); //纭欢鐗堟湰 @@ -114,41 +114,41 @@ //搴忓垪鍙� var rowSerial = new FrameRowControl(listView.rowSpace / 2); - rowSerial.UseClickStatu = false; - listView.AddChidren(rowSerial); + rowSerial.UseClickStatu = false; + listView.AddChidren(rowSerial); rowSerial.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSerialNumber), 400); - if (Common.LocalDevice.Current.IsHdlDevice(listDevice[0]) == false) + if (HdlDeviceCommonLogic.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 var rowMac = new FrameRowControl(listView.rowSpace / 2); - rowMac.UseClickStatu = false; - listView.AddChidren(rowMac); - rowMac.AddLeftCaption("MAC", 300); - rowMac.AddMostRightView(listDevice[0].DeviceAddr, 600); - rowMac.AddBottomLine(); - + rowMac.UseClickStatu = false; + listView.AddChidren(rowMac); + rowMac.AddLeftCaption("MAC", 300); + rowMac.AddMostRightView(listDevice[0].DeviceAddr, 600); + rowMac.AddBottomLine(); + //鍒堕�犲晢 string strProtuct = listDevice[0].ManufacturerName; - if (listDevice[0].DriveCode > 0 || Common.LocalDevice.Current.IsHdlDevice(listDevice[0]) == true) + if (listDevice[0].DriveCode > 0 || HdlDeviceCommonLogic.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), 600); - rowProtuct.AddMostRightView(strProtuct, 600); - - listView.AdjustRealHeight(Application.GetRealHeight(23)); + rowProtuct.UseClickStatu = false; + listView.AddChidren(rowProtuct); + rowProtuct.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uManufacturerName), 600); + rowProtuct.AddMostRightView(strProtuct, 600); + + listView.AdjustRealHeight(Application.GetRealHeight(23)); } #endregion -- Gitblit v1.8.0