private void renameCurrentRoomToolStripMenuItem_Click(object sender, EventArgs e)
{
if (currentState != State.NO_EDITS)
{
StringPromptDialog dialog = new StringPromptDialog("Please enter the new name:");
if (dialog.ShowDialog() == DialogResult.OK)
{
if (currentState == State.EDITING_ROOM || isRoomNameUnique(dialog.UserInput))
{
currentlySelectedRoom.name = dialog.UserInput;
updateTitle();
}
else
{
showMessage("Name Entry Error", "A room already exists with the name " + dialog.UserInput);
}
}
}
}