New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.GatewayUpdate
|
| | | {
|
| | | /// <summary>
|
| | | /// 网关Linux固件信息界面
|
| | | /// </summary>
|
| | | public class GatewayLinuxInfoForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// </summary> |
| | | private VerticalListControl listView = null;
|
| | | /// <summary> |
| | | /// 当前选择的网关 |
| | | /// </summary> |
| | | private ZbGateway zbGateway = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="gateid">网关ID</param> |
| | | public void ShowForm(string gateid) |
| | | { |
| | | this.zbGateway = HdlGatewayLogic.Current.GetLocalGateway(gateid); |
| | | |
| | | //设置标题信息 |
| | | base.SetTitleText("Linux"); |
| | | |
| | | //初始化中部控件 |
| | | this.InitMiddleFrame(); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary> |
| | | private void InitMiddleFrame() |
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.Height = Application.GetRealHeight(3);
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | bodyFrameLayout.AddChidren(frameBack);
|
| | |
|
| | | listView = new VerticalListControl(23);
|
| | | listView.Y = frameBack.Bottom;
|
| | | listView.Height = bodyFrameLayout.Height;
|
| | | listView.BackgroundColor = UserCenterColor.Current.White;
|
| | | bodyFrameLayout.AddChidren(listView);
|
| | |
|
| | | //添加镜像ID行
|
| | | this.AddImageIdRow();
|
| | | //添加固件版本行
|
| | | this.AddFirmwareVersionRow();
|
| | | //添加固件日期行
|
| | | this.AddHardwareDateRow();
|
| | | //添加硬件版本行
|
| | | this.AddHardwareVersionRow();
|
| | |
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23)); |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加镜像ID行_______________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加镜像ID行
|
| | | /// </summary>
|
| | | private void AddImageIdRow()
|
| | | {
|
| | | var row1 = new FrameRowControl(listView.rowSpace / 2);
|
| | | row1.UseClickStatu = false; |
| | | listView.AddChidren(row1);
|
| | |
|
| | | //镜像ID
|
| | | row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uImageId), 300);
|
| | | row1.AddMostRightView(zbGateway.LinuxImageType.ToString(), 400);
|
| | | row1.AddBottomLine();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加固件版本行_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加固件版本行
|
| | | /// </summary>
|
| | | private void AddFirmwareVersionRow()
|
| | | {
|
| | | var row1 = new FrameRowControl(listView.rowSpace / 2); |
| | | row1.UseClickStatu = false; |
| | | listView.AddChidren(row1);
|
| | |
|
| | | //固件版本
|
| | | row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFirmwareVersion), 300);
|
| | | row1.AddMostRightView(Common.LocalDevice.Current.AppendVersion(zbGateway.LinuxFirmwareVersion), 400);
|
| | | row1.AddBottomLine();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加固件日期行_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加固件日期行
|
| | | /// </summary>
|
| | | private void AddHardwareDateRow()
|
| | | {
|
| | | var row1 = new FrameRowControl(listView.rowSpace / 2);
|
| | | row1.UseClickStatu = false; |
| | | listView.AddChidren(row1);
|
| | |
|
| | | //固件日期
|
| | | row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uHardwareDate), 300);
|
| | | row1.AddMostRightView(zbGateway.GwVersionDate.ToString(), 400);
|
| | | row1.AddBottomLine();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加硬件版本行_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加硬件版本行
|
| | | /// </summary>
|
| | | private void AddHardwareVersionRow()
|
| | | {
|
| | | var row1 = new FrameRowControl(listView.rowSpace / 2);
|
| | | row1.UseClickStatu = false; |
| | | listView.AddChidren(row1);
|
| | |
|
| | | //硬件版本
|
| | | row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uHardwareVersion), 300);
|
| | | row1.AddMostRightView(zbGateway.LinuxHardVersion.ToString(), 400);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|