Exemplo n.º 1
0
 private void btnRoomShow_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (!(clockRoom != null && quickRoom != null))
     {
         clockRoom = new ClockRoom();
         quickRoom = new QuickRoom();
     }
     this.splitContainerControl1.Panel1.Controls.Clear();
     this.splitContainerControl1.Panel2.Controls.Clear();
     this.splitContainerControl1.Panel1.Controls.Add(clockRoom);
     this.splitContainerControl1.Panel2.Controls.Add(quickRoom);
     quickRoom.Dock = DockStyle.Fill;
     clockRoom.Dock = DockStyle.Fill;
 }
Exemplo n.º 2
0
        private void ClockRoomMainUI_Load(object sender, EventArgs e)
        {
            clockRoom = new ClockRoom();
            quickRoom = new QuickRoom();
            this.splitContainerControl1.Panel2.Controls.Add(quickRoom);
            quickRoom.Dock = DockStyle.Fill;
            this.splitContainerControl1.Panel1.Controls.Add(clockRoom);
            clockRoom.Dock = DockStyle.Fill;
            //测试数据
            int         i          = 0;
            List <Room> roomVoList = new List <Room>();

            while (i < 150)
            {
                RoomVo vo = new RoomVo()
                {
                    RoomId = i + 1, RoomName = "杭州", RoomStatus = i % 2
                };
                roomVoList.Add(new Room(vo));
                i++;
            }
            clockRoom.SetRoomList(roomVoList);
        }