| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using Java.Util; |
| | | using ZigBee.Device;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.Device
|
| | |
| | | this.deviceObj.DeviceEpoint = 1; |
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1342); |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | 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(); |
| | | |
| | |
| | | } |
| | | #endregion
|
| | | |
| | | #region ■ 晾衣架专用_________________________ |
| | | #region ■ 烘干时间_________________________ |
| | | /// <summary> |
| | | /// 烘干时间行 |
| | | /// </summary> |
| | | #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
|
| | | |
| | | #region ■ 晾衣架专用_________________________ |
| | | #region ■ 烘干时间_________________________ |
| | | /// <summary>
|
| | | /// 烘干时间行
|
| | | /// </summary>
|
| | | private void AddAirerDryTimeRow(Airer airer) |
| | | { |
| | | var rowAirer = new AiererTimeControl(listview.rowSpace / 2); |
| | |
| | | double result = airer.DryTime / 60.0; |
| | | var hour = Math.Round(result, 2); |
| | | text = hour + Language.StringByID(R.MyInternationalizationString.AirerHour); |
| | | }
|
| | | } |
| | | rowAirer.InitControl(airer, bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.AirerDryTime), text, 1); |
| | | //底线 |
| | | rowAirer.AddBottomLine(); |
| | |
| | | } |
| | | #endregion
|
| | | |
| | | #region ■ 风干时间_________________________ |
| | | /// <summary> |
| | | /// 风干时间行 |
| | | /// </summary> |
| | | #region ■ 风干时间_________________________ |
| | | /// <summary>
|
| | | /// 风干时间行
|
| | | /// </summary>
|
| | | private void AddAirerWindTimeRow(Airer airer) |
| | | { |
| | | var rowAirer = new AiererTimeControl(listview.rowSpace / 2); |
| | |
| | | } |
| | | #endregion
|
| | | |
| | | #region ■ 消毒时间_________________________ |
| | | /// <summary> |
| | | /// 消毒时间行 |
| | | /// </summary> |
| | | #region ■ 消毒时间_________________________ |
| | | /// <summary>
|
| | | /// 消毒时间行
|
| | | /// </summary>
|
| | | private void AddAirerDisinfectTimeRow(Airer airer) |
| | | { |
| | | var rowAirer = new AiererTimeControl(listview.rowSpace / 2); |
| | | listview.AddChidren(rowAirer); |
| | | var text = Language.StringByID(R.MyInternationalizationString.AirerDefault) + 30 + Language.StringByID(R.MyInternationalizationString.AirerMin);
|
| | | var text = Language.StringByID(R.MyInternationalizationString.AirerDefault) + 30 + Language.StringByID(R.MyInternationalizationString.AirerMin); |
| | | if (airer.DisinfectTime != 0) |
| | | { |
| | | text = airer.DisinfectTime + Language.StringByID(R.MyInternationalizationString.AirerMin); |
| | | }
|
| | | } |
| | | rowAirer.InitControl(airer, bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.AirerDisinfectTime), text, 3); |
| | | //底线 |
| | | rowAirer.AddBottomLine(); |
| | |
| | | } |
| | | #endregion
|
| | | |
| | | #region ■ 读取时间命令___________________ |
| | | #region ■ 读取时间命令___________________
|
| | | |
| | | /// <summary> |
| | | /// 读取时间命令 |
| | | /// </summary> |
| | | /// <summary>
|
| | | /// 读取时间命令
|
| | | /// </summary>
|
| | | public void ReadAirerFunTimeDevice() |
| | | { |
| | | |
| | |
| | | { |
| | | frame.RemoveFromParent(); |
| | | frameBorder.Y = Application.GetRealHeight(0); |
| | | frameBorder.Height = Application.GetRealHeight(709); |
| | | frameBorder.Height = Application.GetRealHeight(299); |
| | | frameBack.BackgroundImagePath = "Airer/Airer216.png"; |
| | | frameBack.Width = this.GetPictrueRealSize(207); |
| | | frameBack.Height = this.GetPictrueRealSize(207); |
| | | 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 |
| | | { |