protected internal static RoomForm Instance() { if (_instance == null) { _instance = new RoomForm(); } return(_instance); }
private void btnRoom_Click(object sender, EventArgs e) { if (!panel3.Controls.Contains(RoomForm.Instance())) { panel3.Controls.Add(RoomForm._instance); RoomForm._instance.Dock = DockStyle.Fill; RoomForm._instance.BringToFront(); RoomForm._instance.Visible = true; } RoomForm._instance.BringToFront(); RoomForm._instance.Visible = true; }