示例#1
0
 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;
 }
示例#2
0
 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;
     }
 }
示例#3
0
 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;
 }