| | |
| | | this.deviceObj.DeviceEpoint = 1;
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1342);
|
| | | }
|
| | |
|
| | | else
|
| | | else if (this.deviceObj.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | //空气质量传感器 |
| | | //获取设备类型
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { this.deviceObj });
|
| | | //空气质量传感器
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
|
| | | {
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1368);
|
| | | }
|
| | | }
|
| | | if (this.listview == null)
|
| | | {
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
|
| | | }
|
| | |
| | | //变更房间
|
| | | HdlRoomLogic.Current.ChangedRoom(nowSelectDevice, roomKeys);
|
| | | };
|
| | |
|
| | | if (this.deviceObj.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | //获取设备类型
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { this.deviceObj });
|
| | | //空气质量传感器
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
|
| | | {
|
| | | //设备类型
|
| | | this.AddDeviceTypeRow();
|
| | | }
|
| | | }
|
| | |
|
| | | //添加功能类型行
|
| | | this.AddFunctionTypeRow();
|
| | |
|
| | |
| | | rowFunction.InitControl();
|
| | | //底线
|
| | | rowFunction.AddBottomLine();
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 设备类型___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加功能类型行
|
| | | /// </summary>
|
| | | private void AddDeviceTypeRow()
|
| | | {
|
| | | var caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
|
| | | var listNewDevice = new List<CommonDevice>();
|
| | | listNewDevice.Add(deviceObj);
|
| | | var deviceName = Common.LocalDevice.Current.GetDeviceObjectText(listNewDevice);
|
| | | var btnType = new FrameCaptionViewControl(caption, deviceName, listview.rowSpace / 2);
|
| | | btnType.UseClickStatu = false;
|
| | | listview.AddChidren(btnType);
|
| | | btnType.InitControl();
|
| | | //划线
|
| | | btnType.AddBottomLine();
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | frameBack.Y = Application.GetRealHeight(92);
|
| | | frameBack.Gravity = Gravity.CenterHorizontal;
|
| | | }
|
| | |
|
| | | //如果是空气质量传感器
|
| | | if (this.deviceObj.Type == DeviceType.TemperatureSensor)
|
| | | {//空气质量传感器 |
| | | //获取设备类型
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { this.deviceObj });
|
| | | //空气质量传感器
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
|
| | | {
|
| | | frame.RemoveFromParent();
|
| | | frameBorder.Y = Application.GetRealHeight(0);
|
| | | frameBorder.Height = Application.GetRealHeight(299);
|
| | | //加载图标控件
|
| | | var btnPic = new DeviceInfoIconControl();
|
| | | btnPic.Y = Application.GetRealHeight(104);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | listBackControl.frameTable.AddChidren(btnPic);
|
| | | btnPic.InitControl(deviceObj);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|