Пример #1
0
        private void radButton1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtUrl.Text) && !string.IsNullOrWhiteSpace(txtUrl.Text))
            {
                string[] sl = lvFormatList.SelectedItem.Tag.ToString().Split(char.Parse("£"));

                _selected_video_format = sl[0];
                _videoExtension        = sl[1];
                Console.WriteLine("Selected format: " + _selected_video_format);
                //_selected_video_format = _selected_video_format.Replace(" ", "");
                videoDownloader.StartDownload(_videoUrl, _videoSavePath, _selected_video_format, _videoExtension);
            }
            else
            {
                MessageBox.Show("Please enter the URL before downloading.", "URL not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }