示例#1
0
        private void mngRooms_BT_Click(object sender, EventArgs e)
        {
            ManageRoomsForm frm = new ManageRoomsForm();

            this.Width    = 1080;
            this.Height   = 585;
            frm.MdiParent = this.ParentForm;
            frm.TopLevel  = false;
            panel2.Controls.Clear();
            panel2.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;

            if (this.mngRooms_BT.FillColor == Color.Transparent && this.mngRooms_BT.FillColor2 == Color.Transparent)
            {
                this.employ_BT.FillColor        = Color.Transparent;
                this.employ_BT.FillColor2       = Color.Transparent;
                this.mngSchedules_BT.FillColor  = Color.Transparent;
                this.mngSchedules_BT.FillColor2 = Color.Transparent;

                this.mngRooms_BT.FillColor  = Color.FromArgb(0, 192, 192);
                this.mngRooms_BT.FillColor2 = Color.Teal;
                frm.Show();
            }
            else
            {
                this.mngRooms_BT.FillColor  = Color.Transparent;
                this.mngRooms_BT.FillColor2 = Color.Transparent;
            }
        }
        private void showRoom_BT_Click(object sender, EventArgs e)
        {
            ManageRoomsForm frm = new ManageRoomsForm();

            frm.TopLevel = false;

            panelMngRoom.Controls.Clear();
            panelMngRoom.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            frm.Show();
        }