| | |
| | | public SafetySensorStatuControl()
|
| | | {
|
| | | this.Height = Application.GetRealHeight(256);
|
| | | this.Width = Application.GetRealWidth(968);
|
| | | this.Gravity = Gravity.CenterHorizontal;
|
| | | this.BackgroundColor = UserCenterColor.Current.White;
|
| | | this.Radius = 6;
|
| | | this.Radius = 8;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | //区域
|
| | | var btnArea = new NormalViewControl(400, 49, true);
|
| | | btnArea.Y = Application.GetRealHeight(40);
|
| | | btnArea.X = Application.GetRealWidth(104);
|
| | | btnArea.X = Application.GetRealWidth(46);
|
| | | btnArea.TextSize = 12;
|
| | | btnArea.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnArea.Text = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
|
| | |
| | | //状态
|
| | | var btnStatu = new NormalViewControl(200, 49, true);
|
| | | btnStatu.Y = btnArea.Y;
|
| | | btnStatu.X = this.Width - Application.GetRealWidth(200 + 101);
|
| | | btnStatu.X = this.Width - Application.GetRealWidth(200 + 46);
|
| | | btnStatu.TextSize = 12;
|
| | | btnStatu.TextAlignment = TextAlignment.CenterRight;
|
| | | btnStatu.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | |
| | | //线
|
| | | var btnLine = new NormalViewControl(Application.GetRealWidth(876), 2, false);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | btnLine.X = Application.GetRealWidth(104);
|
| | | btnLine.X = Application.GetRealWidth(46);
|
| | | btnLine.Y = Application.GetRealHeight(104);
|
| | | this.AddChidren(btnLine);
|
| | | //设备名称
|
| | | var btnDeviceName = new NormalViewControl(400, 58, true);
|
| | | btnDeviceName.X = Application.GetRealWidth(104);
|
| | | btnDeviceName.X = Application.GetRealWidth(46);
|
| | | btnDeviceName.Y = Application.GetRealHeight(141);
|
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | this.AddChidren(btnDeviceName);
|
| | | //在线状态
|
| | | btnOnline = new NormalViewControl(200, 58, true);
|
| | | btnOnline.X = this.Width - Application.GetRealWidth(200 + 101);
|
| | | btnOnline.X = this.Width - Application.GetRealWidth(200 + 46);
|
| | | btnOnline.Y = btnDeviceName.Y;
|
| | | btnOnline.TextAlignment = TextAlignment.CenterRight;
|
| | | this.SetOnlineStatu(device.IsOnline == 1);
|
| | |
| | | {
|
| | | //图标
|
| | | btnMsgIcon = new IconViewControl(58);
|
| | | btnMsgIcon.X = Application.GetRealWidth(922);
|
| | | btnMsgIcon.X = Application.GetRealWidth(864);
|
| | | btnMsgIcon.Y = Application.GetRealHeight(141);
|
| | | btnMsgIcon.UnSelectedImagePath = "Item/Tips.png";
|
| | | this.AddChidren(btnMsgIcon);
|
| | |
| | | btnMsg = new NormalViewControl(400, 58, true);
|
| | | btnMsg.TextAlignment = TextAlignment.CenterRight;
|
| | | btnMsg.TextColor = 0xfff34747;
|
| | | btnMsg.X = Application.GetRealWidth(910 - 400);
|
| | | btnMsg.X = this.Width - Application.GetRealWidth(400 + 115);
|
| | | btnMsg.Y = Application.GetRealHeight(141);
|
| | | this.AddChidren(btnMsg);
|
| | | }
|