| | |
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// </summary>
|
| | | private VerticalListControl listview = null;
|
| | | private FrameListControl listview = null;
|
| | | /// <summary>
|
| | | /// 当前选择的网关
|
| | | /// </summary>
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | var listBackControl = new VerticalFrameControl();
|
| | | listBackControl.Height = bodyFrameLayout.Height;
|
| | | bodyFrameLayout.AddChidren(listBackControl);
|
| | |
|
| | | //初始化桌布
|
| | | var tableContr = new InformationEditorControl();
|
| | | this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368);
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 1368);
|
| | |
|
| | | //图片
|
| | | var btnPic = new DeviceInfoIconControl();
|
| | | btnPic.Y = Application.GetRealHeight(92);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnPic);
|
| | | listBackControl.frameTable.AddChidren(btnPic);
|
| | | btnPic.InitControl(this.zbGateway);
|
| | |
|
| | | //设备备注
|
| | |
| | | }
|
| | | };
|
| | |
|
| | | //设备类型
|
| | | //设备类型 (固定智能网关)
|
| | | caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
|
| | | var btnType = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
|
| | | var btnType = new FrameCaptionViewControl(caption, Language.StringByID(60004), listview.rowSpace / 2);
|
| | | btnType.UseClickStatu = false;
|
| | | listview.AddChidren(btnType);
|
| | | btnType.InitControl();
|
| | | HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, this.zbGateway);
|
| | | //划线
|
| | | btnType.AddBottomLine();
|
| | |
|
| | | //安装位置
|
| | | var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowBeloneArea);
|
| | | rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uInstallationLocation), this.zbGateway);
|
| | | //底线
|
| | | rowBeloneArea.AddBottomLine();
|
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) =>
|
| | | {
|
| | | //变更网关房间
|
| | | HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
|
| | | };
|
| | |
|
| | | //所属住宅
|
| | | caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence);
|
| | | var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2);
|
| | | btnBeloneArea.UseClickStatu = false;
|
| | | listview.AddChidren(btnBeloneArea);
|
| | | btnBeloneArea.InitControl();
|
| | | //划线
|
| | | btnBeloneArea.AddBottomLine();
|
| | |
|
| | | //数据上传与下载
|
| | | var rowData = new RowLayoutControl(listview.rowSpace / 2);
|
| | |
| | | };
|
| | |
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl(bodyFrameLayout, this.listview);
|
| | | tableContr.FinishInitControl();
|
| | | tableContr = null;
|
| | |
|
| | | //保存
|
| | |
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //检测新版本
|
| | | this.CheckNewVersion(btnNewVersion, btnType);
|
| | | this.CheckNewVersion(btnNewVersion);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | /// 检测新版本
|
| | | /// </summary>
|
| | | /// <param name="btnNewVersion">提示有新版本的控件</param>
|
| | | /// <param name="btnType">网关类型控件</param>
|
| | | private async void CheckNewVersion(PicViewControl btnNewVersion, FrameCaptionViewControl btnType)
|
| | | private async void CheckNewVersion(PicViewControl btnNewVersion)
|
| | | {
|
| | | //获取网关版本信息
|
| | | var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
|
| | |
| | | {
|
| | | if (this.Parent != null)
|
| | | {
|
| | | HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, this.zbGateway);
|
| | | if (result[0] != null || result[1] != null || result[2] != null)
|
| | | {
|
| | | //提示有新版本
|