| | |
| | | /// 控件信息
|
| | | /// </summary>
|
| | | private Dictionary<string, RowControlInfo> dicControl = new Dictionary<string, RowControlInfo>();
|
| | | /// <summary>
|
| | | /// 激活的设备地址
|
| | | /// </summary>
|
| | | private string actionDeviceKeys = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | btnDeviceName.X = Application.GetRealWidth(193);
|
| | | btnDeviceName.Y = Application.GetRealHeight(45);
|
| | | frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly);
|
| | | rowInfo.btnDeviceName = btnDeviceName;
|
| | | //房间
|
| | | var btnRoom = new NormalViewControl(400, 50, true);
|
| | | btnRoom.X = btnDeviceName.X;
|
| | |
| | | btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnRoom.Text = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
|
| | | frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
|
| | | rowInfo.btnRoom = btnRoom;
|
| | | //摄氏度
|
| | | var btnValue = new NormalViewControl(300, 60, true);
|
| | | btnValue.Y = Application.GetRealHeight(58);
|
| | |
| | |
|
| | | frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.actionDeviceKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | |
|
| | | var form = new IndoorUnitSettionForm();
|
| | | form.AddForm(device);
|
| | | };
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面重新激活事件___________________
|
| | |
|
| | | /// <summary>
|
| | | /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
|
| | | /// </summary>
|
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | if (this.actionDeviceKeys != null && dicControl.ContainsKey(this.actionDeviceKeys) == true)
|
| | | {
|
| | | //刷新设备信息
|
| | | var device = Common.LocalDevice.Current.GetDevice(this.actionDeviceKeys);
|
| | | if (device != null)
|
| | | {
|
| | | var contr = dicControl[this.actionDeviceKeys];
|
| | | contr.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | contr.btnRoom.Text = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
|
| | | }
|
| | | }
|
| | | this.actionDeviceKeys = null;
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 结构体_____________________________
|
| | |
|
| | | /// <summary>
|
| | |
| | | private class RowControlInfo
|
| | | {
|
| | | /// <summary>
|
| | | /// 设备名字
|
| | | /// </summary>
|
| | | public NormalViewControl btnDeviceName = null;
|
| | | /// <summary>
|
| | | /// 设备房间
|
| | | /// </summary>
|
| | | public NormalViewControl btnRoom = null;
|
| | | /// <summary>
|
| | | /// 设备图标背景
|
| | | /// </summary>
|
| | | public FrameLayout btnIconBack = null;
|