| | |
| | | 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);
|
| | | listview.AddChidren(rowData);
|
| | |
| | | else
|
| | | {
|
| | | //刷新主画面(不重新获取设备状态)
|
| | | this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false);
|
| | | this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame");
|
| | | }
|
| | | });
|
| | | }
|