private void menuItem_Enqueue(object sender, EventArgs e) { var dlg = new FolderBrowserDialog(); if (dlg.ShowDialog() == DialogResult.OK) { var dlObj = lstLessions.SelectedNode.Tag as IDownloadable; if (dlObj != null) { IDMan.Enqueue(dlObj, dlg.SelectedPath); } } }
private void lblCourseVideoZip_Click(object sender, EventArgs e) { var link = lblCourseVideoZip.Text; if (string.IsNullOrWhiteSpace(link)) { return; } var dlg = new SaveFileDialog(); dlg.FileName = Path.GetFileName(link); if (dlg.ShowDialog() == DialogResult.OK) { IDMan.Download(new DownloadTask(link, dlg.FileName)); } }