// Method for saving a map with a new name. public void SaveAs() { // Prompt the user with a save file dialog box to get the path and file name for the map. if (saveFileDialog.ShowDialog() == DialogResult.OK) { map.SetMapName(saveFileDialog.FileName); MapIO.SaveMap(map); } }