void clsDownload_DownloadLinksDone(clsMain.ProgressEventArgs Status) { string DownloadLinks = ""; SetTextHandler sth = new SetTextHandler(SetText); ComboBoxAddItemhandler cbaih = new ComboBoxAddItemhandler(ComboBoxAddItem); for (int i = 0; i < Status.strDownloadLinks.Count; i++) { //object[] objCombo = {cbDownOpt, Status.strDownloadLinks[i]}; object[] objCombo = { cbDownOpt, Status.strQuality[i] + " ( " + Status.strType[i] + " ) [" + Status.strSize[i] + " ]" }; cbDownOpt.Invoke(cbaih, objCombo); DownloadLinks += Status.strDownloadLinks[i] + "\t\t" + Status.strQuality[i] + "\t\t" + Status.strType[i] + Environment.NewLine + Environment.NewLine; //+ "\t\t\t" +Status.strQuality[i] + Status.strType[i] + Environment.NewLine + Environment.NewLine; strDownloadLinks.Add(new LinkInfo()); LinkInfo liTmp = strDownloadLinks[i]; liTmp.strVideoTitle = strCurrentVideoTitle; liTmp.strVideoSize = Status.strSize[i]; liTmp.strVideoType = Status.strType[i]; liTmp.strQuality = Status.strQuality[i]; liTmp.strVideoLink = Status.strDownloadLinks[i]; strDownloadLinks[i] = liTmp; } EnDisableControlHandler edch = new EnDisableControlHandler(EnDisableControl); object[] objEnable = { cbDownOpt, true }; cbDownOpt.Invoke(edch, objEnable); }
void clsDownload_Progress(clsMain.ProgressEventArgs Status) { SetTextHandler sth = new SetTextHandler(SetText); if (Status.Status == "Donwload links done") { EnDisableControlHandler edch = new EnDisableControlHandler(EnDisableControl); object[] objState = { txtUrl, true }; txtUrl.Invoke(edch, objState); object[] objLinks = { lblStatus, "Done (" + Status.strDownloadLinks.Count.ToString() + " download links found)" }; lblStatus.Invoke(sth, objLinks); } else { object[] objStatus = { lblStatus, Status.Status }; lblStatus.Invoke(sth, objStatus); } }