Beispiel #1
0
        private void mainForm_Load(object sender, EventArgs e)
        {
            tempObj = this;
            GuestControl guest = new GuestControl();

            guest.Dock = DockStyle.Fill;
            controlsContainer.Controls.Add(guest);
            mainGuestB.BackColor = Color.Gray;
            mainGuestB.ForeColor = Color.White;
        }
Beispiel #2
0
 private void mainGuestB_Click(object sender, EventArgs e)
 {
     if (!mainForm.Instance.controlsContainer.Controls.ContainsKey("GuestControl"))
     {
         GuestControl guest = new GuestControl();
         guest.Dock = DockStyle.Fill;
         mainForm.Instance.controlsContainer.Controls.Add(guest);
     }
     mainForm.Instance.controlsContainer.Controls["GuestControl"].BringToFront();
     ResetButtonsColor();
     mainGuestB.BackColor = Color.Gray;
     mainGuestB.ForeColor = Color.White;
 }