Ejemplo n.º 1
0
        void SetBottomView(ChatRoom room)
        {
            if (ViewLow != null)
            {
                if (ViewLow.Room == room && room.Members.SafeCount > 1)
                {
                    return;
                }

                ViewLow.Fin();
                ViewContainer.Panel2.Controls.Clear();
                ViewLow = null;
            }

            if (room == null || room.Members.SafeCount <= 1)
            {
                return;
            }

            ViewLow      = new RoomView(this, Chat, room);
            ViewLow.Dock = DockStyle.Fill;
            ViewContainer.Panel2.Controls.Add(ViewLow);

            ViewLow.Init();
            ViewContainer.Panel2Collapsed = false;
        }
Ejemplo n.º 2
0
        void SetTopView(ChatRoom room, bool force)
        {
            if (ViewHigh != null)
            {
                if (ViewHigh.Room == room && (force || room.Members.SafeCount > 1))
                {
                    return;
                }

                ViewHigh.Fin();
                ViewContainer.Panel1.Controls.Clear();
                ViewHigh = null;
            }

            if (room == null || (!force && room.Members.SafeCount <= 1))
            {
                return;
            }

            ViewHigh      = new RoomView(this, Chat, room);
            ViewHigh.Dock = DockStyle.Fill;
            ViewContainer.Panel1.Controls.Add(ViewHigh);

            ViewHigh.Init();
            ViewContainer.Panel1Collapsed = false;
        }