| | |
| | | using System; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.DeviceLogic; |
| | | using Shared.Phone.UserCenter; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.Device.CommonForm |
| | | { |
| | | public class RoomView : FrameLayout |
| | | public class RoomView : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// Room |
| | |
| | | var temperatureIcon = new Button |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | Width = this.GetPictrueRealSize(58), |
| | | Height = this.GetPictrueRealSize(58), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Room/Temperature.png" |
| | | }; |
| | |
| | | var humidityIcon = new Button |
| | | { |
| | | X = temperatureText.Right, |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | Width = this.GetPictrueRealSize(58), |
| | | Height = this.GetPictrueRealSize(58), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Room/Humidity.png" |
| | | }; |
| | |
| | | {
|
| | | //发送获取温度的命令 |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev); |
| | | HdlDeviceAttributeLogic.Current.SendTemperatureStatuComand(dev); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(room.HumidityDevice) == false) |
| | | { |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(dev); |
| | | HdlDeviceAttributeLogic.Current.SendHumidityStatuComand(dev); |
| | | } |
| | | |
| | | roomListBtn = new Button() |
| | | { |
| | | X = roomBackView.Width - Application.GetRealWidth(100 + 20), |
| | | Y = Application.GetRealHeight(20), |
| | | Width = Application.GetMinRealAverage(100), |
| | | Height = Application.GetMinRealAverage(100), |
| | | Width = this.GetPictrueRealSize(100), |
| | | Height = this.GetPictrueRealSize(100), |
| | | UnSelectedImagePath = "Room/List.png", |
| | | }; |
| | | roomBackView.AddChidren(roomListBtn); |