| | |
| | | /// </summary>
|
| | | private FrameLayout frameTable = null;
|
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// 列表控件(白色背景)
|
| | | /// </summary>
|
| | | private VerticalListControl listView = null;
|
| | | private FrameListControl listView = null;
|
| | | /// <summary>
|
| | | /// 整个界面的上下滑动控件
|
| | | /// </summary>
|
| | | private VerticalFrameControl listBackContr = null;
|
| | | /// <summary>
|
| | | /// 楼层顺序
|
| | | /// </summary>
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //整个界面的上下滑动控件
|
| | | this.listBackContr = new VerticalFrameControl();
|
| | | listBackContr.Height = bodyFrameLayout.Height;
|
| | | bodyFrameLayout.AddChidren(listBackContr);
|
| | |
|
| | | //住宅行
|
| | | var rowHome = new RowLayoutControl();
|
| | | rowHome.Height = Application.GetRealHeight(173);
|
| | | rowHome.BackgroundColor = UserCenterColor.Current.White;
|
| | | bodyFrameLayout.AddChidren(rowHome);
|
| | | listBackContr.frameTable.AddChidren(rowHome);
|
| | | rowHome.frameTable.UseClickStatu = false;
|
| | |
|
| | | var btnAdreeIcon = rowHome.frameTable.AddLeftIcon(81);
|
| | |
| | | //初始化桌布
|
| | | this.frameTable = new FrameLayout();
|
| | | frameTable.Y = rowHome.Bottom + Application.GetRealHeight(23);
|
| | | frameTable.Height = bodyFrameLayout.Height - rowHome.Bottom - Application.GetRealHeight(23);
|
| | | bodyFrameLayout.AddChidren(frameTable);
|
| | | frameTable.Height = listBackContr.frameTable.Height - rowHome.Bottom - Application.GetRealHeight(23);
|
| | | listBackContr.frameTable.AddChidren(frameTable);
|
| | |
|
| | | //根据指定模式,初始化桌布控件
|
| | | this.InitFrameTableByMode();
|
| | |
| | | frameFloor.UseClickStatu = false;
|
| | | frameFloor.Height = Application.GetRealHeight(115);
|
| | | frameFloor.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameTable.AddChidren(frameFloor);
|
| | | this.frameTable.AddChidren(frameFloor);
|
| | |
|
| | | //楼层
|
| | | var btnFloor = frameFloor.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFloor), 200, 60);
|
| | |
| | | btnFloor.TextSize = 15;
|
| | | frameFloor.AddChidren(btnFloor, ChidrenBindMode.NotBind);
|
| | |
|
| | | listView = new VerticalListControl(29);
|
| | | listView = new FrameListControl(29);
|
| | | listView.BackgroundColor = UserCenterColor.Current.White;
|
| | | listView.Y = frameFloor.Bottom;
|
| | | listView.Height = frameTable.Height - frameFloor.Bottom;
|
| | | frameTable.AddChidren(listView);
|
| | | this.frameTable.AddChidren(listView);
|
| | |
|
| | | //初始化楼层行
|
| | | this.InitFloorRow();
|
| | |
| | | this.AddFloorRow(keys, dicFloor[keys], i != count);
|
| | | }
|
| | | //调整控件高度
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | | this.AdjustContrlTableHeight();
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | private void AddFloorRow(string keys, string floorName, bool addLine)
|
| | | {
|
| | | var frameRow = new RowLayoutControl(listView.rowSpace / 2);
|
| | | frameRow.MainKeys = keys;
|
| | | this.listView.AddChidren(frameRow);
|
| | | //图标
|
| | | var btnIcon = frameRow.frameTable.AddLeftIcon(81);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | bool canMove = false;
|
| | | for (int i = 0; i < listView.ChildrenCount; i++)
|
| | | {
|
| | | var myRow = listView.GetChildren(i) as RowLayoutControl;
|
| | | if (myRow != null && myRow.MainKeys == keys)
|
| | | {
|
| | | canMove = true;
|
| | | continue;
|
| | | }
|
| | | if (canMove == true)
|
| | | {
|
| | | //它之后的行,全部往上移
|
| | | myRow.Y -= frameRow.Height;
|
| | | }
|
| | | }
|
| | | frameRow.RemoveFromParent();
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | | //调整桌布高度
|
| | | this.AdjustContrlTableHeight();
|
| | | }
|
| | | });
|
| | | };
|
| | |
| | | btnRoomList.TextSize = 15;
|
| | | frameRoom.AddChidren(btnRoomList, ChidrenBindMode.NotBind);
|
| | |
|
| | | listView = new VerticalListControl(29);
|
| | | listView = new FrameListControl(29);
|
| | | listView.BackgroundColor = UserCenterColor.Current.White;
|
| | | listView.Y = frameRoom.Bottom;
|
| | | listView.Height = frameTable.Height - frameRoom.Bottom;
|
| | |
| | | //添加房间行
|
| | | this.AddRoomRow(listRoom[i], i != listRoom.Count - 1);
|
| | | }
|
| | | //调整控件真实高度
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | | //调整桌布高度
|
| | | this.AdjustContrlTableHeight();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | private void AddRoomRow(Common.Room room, bool addLine)
|
| | | {
|
| | | var frameRow = new RowLayoutControl(listView.rowSpace / 2);
|
| | | frameRow.MainKeys = room.Id;
|
| | | listView.AddChidren(frameRow);
|
| | | //图标
|
| | | var btnIcon = frameRow.frameTable.AddLeftIcon(81);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | bool canMove = false;
|
| | | for (int i = 0; i < listView.ChildrenCount; i++)
|
| | | {
|
| | | var myRow = listView.GetChildren(i) as RowLayoutControl;
|
| | | if (myRow != null && myRow.MainKeys == room.Id)
|
| | | {
|
| | | canMove = true;
|
| | | continue;
|
| | | }
|
| | | if (canMove == true)
|
| | | {
|
| | | //它之后的行,全部往上移
|
| | | myRow.Y -= frameRow.Height;
|
| | | }
|
| | | }
|
| | | frameRow.RemoveFromParent();
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | | //调整桌布高度
|
| | | this.AdjustContrlTableHeight();
|
| | | }
|
| | | });
|
| | | };
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 调整控件桌布高度
|
| | | /// </summary>
|
| | | private void AdjustContrlTableHeight()
|
| | | {
|
| | | //调整桌布高度
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | | this.frameTable.Height = listView.Bottom;
|
| | | this.listBackContr.AdjustTableHeight();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 结构体_____________________________
|