예제 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            NetworkHandler nw = new NetworkHandler("http://www.imegumii.nl");
            APIHandler api = new APIHandler(nw);
            //            api.GetSongsByArtist("Amon Amarth").ForEach(s =>
            //            {
            //                Console.WriteLine(s.SongID);
            //            });
            //            api.GetSongsByYear("2009").ForEach(s =>
            //            {
            //                Console.WriteLine(s.Name);
            //            });
            api.GetSongsByGenre("Melodic Death Metal").ForEach(s =>
            {
                Console.WriteLine(s.Name);
            });
            //            api.GetSongsByAlbum("Stronger").ForEach(s =>
            //            {
            //                Console.WriteLine(s.Name);
            //            });
            MainForm form = new MainForm();
            new Main(nw, api, form);

            Application.Run(form);
        }
예제 #2
0
파일: Main.cs 프로젝트: yorickr/musicplayer
        public Main(NetworkHandler nw, APIHandler api, MainForm form)
        {
            this.nw = nw;
            this.api = api;
            this.form = form;
            form.main = this;

            audio = new AudioHandler();
            table = new SongsTable();
            form.SongsTableView.DataSource = table;

            Populate();
        }
예제 #3
0
 public APIHandler(NetworkHandler nw)
 {
     this.nw = nw;
 }