Program.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using System.Windows.Forms;
  6. namespace MusicPlayer
  7. {
  8. static class Program
  9. {
  10. /// <summary>
  11. /// The main entry point for the application.
  12. /// </summary>
  13. [STAThread]
  14. static void Main()
  15. {
  16. Application.EnableVisualStyles();
  17. Application.SetCompatibleTextRenderingDefault(false);
  18. NetworkHandler nw = new NetworkHandler("http://www.imegumii.nl");
  19. APIHandler api = new APIHandler(nw);
  20. // api.GetSongsByArtist("Amon Amarth").ForEach(s =>
  21. // {
  22. // Console.WriteLine(s.SongID);
  23. // });
  24. // api.GetSongsByYear("2009").ForEach(s =>
  25. // {
  26. // Console.WriteLine(s.Name);
  27. // });
  28. api.GetSongsByGenre("Melodic Death Metal").ForEach(s =>
  29. {
  30. Console.WriteLine(s.Name);
  31. });
  32. // api.GetSongsByAlbum("Stronger").ForEach(s =>
  33. // {
  34. // Console.WriteLine(s.Name);
  35. // });
  36. MainForm form = new MainForm();
  37. new Main(nw, api, form);
  38. Application.Run(form);
  39. }
  40. }
  41. }