static void OpenWindow() { SongBuilder window = (SongBuilder)GetWindow(typeof(SongBuilder), false, "Song Builder"); window.minSize = new Vector2(460, 420); window.maxSize = new Vector2(510, 420); window.Show(); }
// GET: Muziek public ActionResult Index() { DatasetInit(); List <Song> liedjes = new List <Song>(); SongBuilder sb = new SongBuilder(); foreach (DataRow dr in ds.Tables[0].Rows) { Song s = sb.CreateSong(dr); liedjes.Add(s); } return(View(liedjes)); }
static void Main() { var input = ""; //set the window size Console.SetWindowSize(165, 35); //display version number and Main Menu Console.WriteLine("\n\n\t SongBrain (version 1.3.052718)\n"); Menus.DisplayMainMenu(); //start while loop that controls termination of program while (input != "exit") { Console.Write("\n Enter your selection here: "); //get input from the user and convert it to lower case input = Console.ReadLine().ToLower(); Console.WriteLine(); switch (input) { case "prog": Progression prog = new Progression(); //create a Progression object prog.MakeProgression(); //Create the chord progression prog.DisplayProgression(); //display the chord progression Console.WriteLine("\n **Type \"MENU\" to display program options.**"); break; case "song": SongBuilder song = new SongBuilder(); //create a SongBuilder object song.MakeSong(); song.DisplaySong(); Console.WriteLine("\n **Type \"MENU\" to display program options.**"); break; case "menu": Menus.DisplayMainMenu(); break; case "info": var info = " SongBrain by Quinn Schroeder.\n" + " Version 1.3.0 (c) 2018 All Rights Reserved.\n"; Console.Write(info); Console.WriteLine("\n **Type \"MENU\" to display program options.**"); break; case "exit": var endMessage = " * * * * * * * * * * * * * * * * * * *\n" + " * Thank you for using SongBrain. *\n" + " * See you next time! *\n" + " * * * * * * * * * * * * * * * * * * *\n"; Console.WriteLine(endMessage); // pause the program for 3 seconds before closing Thread.Sleep(3000); break; default: Console.WriteLine(" ***ERROR: Please enter a correct value from the Main Menu.\n"); break; } } }