| | |
| | | get { return Common.LocalDevice.Current.GetDevice(MainKeys); }
|
| | | }
|
| | | /// <summary>
|
| | | /// 房间控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnRoom = null;
|
| | | /// <summary>
|
| | | /// 设备控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnDevie = null;
|
| | | /// <summary>
|
| | | /// 选择控件
|
| | | /// </summary>
|
| | | private MostRightIconControl btnSelect = null;
|
| | |
| | |
|
| | | //设备
|
| | | string eName = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | btnDevie = this.AddLeftCaption(eName, 850, 60);
|
| | | btnDevie.TextSize = 15;
|
| | | //这个坐标有点特殊
|
| | | btnDevie.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
|
| | | this.AddChidren(btnDevie, ChidrenBindMode.BindEventOnly);
|
| | | this.AddTopView(eName, 850);
|
| | |
|
| | | //房间
|
| | | string roomName = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
|
| | | btnRoom = this.AddLeftCaption(roomName, 850, 50, true);
|
| | | //这个坐标有点特殊
|
| | | btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
|
| | | btnRoom.TextSize = 12;
|
| | | btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | this.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
|
| | | this.AddBottomView(roomName, 850);
|
| | |
|
| | | btnSelect = this.AddMostRightEmptyIcon(58, 58);
|
| | | btnSelect.Visible = false;
|
| | |
| | | #endregion
|
| | |
|
| | | #region ■ 一般方法___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 移除房间控件
|
| | | /// </summary>
|
| | | public void RemoveRoomControl()
|
| | | {
|
| | | //移除事件
|
| | | this.ChangedChidrenBindMode(btnRoom, ChidrenBindMode.NotBind);
|
| | | this.btnRoom.RemoveFromParent();
|
| | | this.btnDevie.Gravity = Gravity.CenterVertical;
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | this.btnDevie.Y += chidrenYaxis;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|