| | |
| | | /// <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);
|
| | |
|
| | | //设备备注
|
| | |
| | | //变更网关房间
|
| | | 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();
|
| | |
|
| | | //mini网关有个功能设置
|
| | | if (this.zbGateway.getGwInfo != null && this.zbGateway.getGwInfo.LinuxImageType == 11)
|
| | | {
|
| | | var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
|
| | | CommonDevice miniDevice = null;
|
| | | foreach (var device in listDevice)
|
| | | {
|
| | | //获取这个网关下的小夜灯设备
|
| | | if (Common.LocalDevice.Current.IsMiniLight(device) == true)
|
| | | {
|
| | | miniDevice = device;
|
| | | break;
|
| | | }
|
| | | }
|
| | | //如果找得到的话
|
| | | if (miniDevice != null)
|
| | | {
|
| | | //功能设置
|
| | | var rowFunction = new RowLayoutControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowFunction);
|
| | | rowFunction.frameTable.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFunctionSettingUp), 700);
|
| | | //右图标
|
| | | rowFunction.frameTable.AddRightArrow();
|
| | | //底线
|
| | | rowFunction.frameTable.AddBottomLine();
|
| | | rowFunction.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new DeviceLight.MiniNightLightFunctionSettionForm();
|
| | | form.AddForm(miniDevice);
|
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | //数据上传与下载
|
| | | var rowData = new RowLayoutControl(listview.rowSpace / 2);
|
| | |
| | | };
|
| | |
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl(bodyFrameLayout, this.listview);
|
| | | tableContr.FinishInitControl();
|
| | | tableContr = null;
|
| | |
|
| | | //保存
|
| | |
| | | else
|
| | | {
|
| | | //刷新主画面(不重新获取设备状态)
|
| | | this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false);
|
| | | this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame");
|
| | | }
|
| | | });
|
| | | }
|