/** * Gets filename from dialog * Get that file from Filer * Call other Load(fileName) */ public void LoadLevel(string which) { LoadFileFromListDialog levDia = new LoadFileFromListDialog(); levDia.InsertLevels(Filer.GetAllLevels()); if (levDia.ShowDialog() == DialogResult.OK) { string fileName = levDia.GetSelected(); string file = Filer.Load(fileName); string level = FM.GetLevel(file); switch (which) { case GAME_STRING: PlayLevel(fileName, level); break; case DESIGN_STRING: OpenDesignerLoad(fileName, level); break; } } levDia.Dispose(); }