private void reservationMenuButton_Click(object sender, EventArgs e) { mainPanel.Controls.Clear(); ReservationControl reservationControl = new ReservationControl { Dock = DockStyle.Fill }; mainPanel.Controls.Add(reservationControl); UnderlineMenuButton(reservationsMenuButton); }
private void StaffForm_Load(object sender, EventArgs e) { _menuButtons = new[] { reservationsMenuButton, timetablesMenuButton }; labelName.Text = AuthUser.Model.Name + " " + AuthUser.Model.Surname; ReservationControl reservationControl = new ReservationControl { Dock = DockStyle.Fill }; mainPanel.Controls.Add(reservationControl); UnderlineMenuButton(reservationsMenuButton); }