void makeCVEs() { this.cves = new List <CVE>(); this.bids = new List <BID>(); char[] delimiterChars = { ',' }; string[] cves = this.items_box.Text.Split(delimiterChars); int total = cves.Length; for (int x = 0; x < total; x++) { cves[x] = cves[x].Trim(); } this.count = 0; Array.Sort(cves); foreach (string c in cves) { CVE t = new CVE(c); this.cves.Add(t); this.count++; showProgress(total, this.count, t); } Thread bidThread = new Thread(new ThreadStart(CVEsToBIDs)); bidThread.Start(); }
void showProgress(int cves, int cves_done, CVE c) { if (progressBar1.InvokeRequired == false) { addTextBoxes(cves_done, c.getID(), c.getDescription()); } else { showProgressDelegate ShowProgress = new showProgressDelegate(showProgress); this.BeginInvoke(ShowProgress, new object[] { cves, cves_done, c }); } }