| | |
| | | /// <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);
|
| | |
| | | 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);
|
| | |
| | | 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();
|
| | |
|
| | | //硬件版本
|
| | |
| | |
|
| | | //序列号
|
| | | 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)
|
| | | {
|
| | | //第三方设备固定使用Mac
|
| | | 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
|