private void toolStripMenuItem2_Click_1(object sender, EventArgs e) { panel1.Controls.Clear(); groupBox1.Text = "Rooms"; panel1.Controls.Add(SomerenUI.showRooms()); }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { panel1.Controls.Clear(); // clear stuff on panel groupBox1.Text = "Rooms"; // set name for groupbox panel1.Controls.Add(SomerenUI.showRooms()); // add data to the panel }