public SearchThread(SearchForm form, IPackage pkg, Predicate <IResourceIndexEntry> match, byte[] pattern, AddCallBack addCB, updateProgressCallback updateProgressCB, stopSearchCallback stopSearchCB, searchCompleteCallback searchCompleteCB) { this.form = form; this.pkg = pkg; this.match = match; this.pattern = (byte[])pattern.Clone(); this.addCB = addCB; this.updateProgressCB = updateProgressCB; this.stopSearchCB = stopSearchCB; this.searchCompleteCB = searchCompleteCB; }
private void updateProgress(double percent) { if (this.InvokeRequired) { updateProgressCallback callback = new updateProgressCallback(updateProgress); this.Invoke(callback, percent); } else { int progress = (int)(percent * 100); this.UploadProgressBar.Value = progress; } }
public SearchThread(SearchForm form, IPackage pkg, Predicate<IResourceIndexEntry> match, byte[] pattern, AddCallBack addCB, updateProgressCallback updateProgressCB, stopSearchCallback stopSearchCB, searchCompleteCallback searchCompleteCB) { this.form = form; this.pkg = pkg; this.match = match; this.pattern = (byte[])pattern.Clone(); this.addCB = addCB; this.updateProgressCB = updateProgressCB; this.stopSearchCB = stopSearchCB; this.searchCompleteCB = searchCompleteCB; }