예제 #1
0
파일: Form1.cs 프로젝트: vestlirik/Player
        private async void button6_Click(object sender, EventArgs e)
        {
            var res=folderBrowserDialog1.ShowDialog();
            if(res==System.Windows.Forms.DialogResult.OK)
            {
                playlist = new PlayListLocal();
                await Task.Factory.StartNew(() =>playlist.DownloadTracks(new string[]{folderBrowserDialog1.SelectedPath}));

                listBox1.Items.Clear();
                foreach (var elm in playlist.GetTrackList())
                {
                    listBox1.Items.Add(elm);
                }
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: vestlirik/Player
        private async void button1_Click(object sender, EventArgs e)
        {
            GetAuth();
            if (auth.IsAuth)
            {
                playlist = new PlayListVk();
                await Task.Factory.StartNew(() =>playlist.DownloadTracks(new string[] { auth.UserId,auth.Token }));

                listBox1.Items.Clear();
                foreach (var elm in playlist.GetTrackList())
                {
                    listBox1.Items.Add(elm);
                }
            }
        }