Пример #1
0
        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
        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);
                }
            }
        }