private void EditRoomContextMenuItem_Click(object sender, EventArgs e) { RoomEditor roomEdit = new RoomEditor(SelectedRoom); DialogResult dialogresult = roomEdit.ShowDialog(); if (dialogresult == DialogResult.OK) { // Functions.UpdateRoomEdits(roomEditForm.roomEdits, SelectedRoom); // roomsListBox.Items.Clear(); // roomsListBox.Items.AddRange(SelectedArea.Rooms.Select(room => room.Name).ToArray()); } roomEdit.Dispose(); }