private void OnFilesFound(object sender, FileSearchArgs e) { Thread.Sleep(50); wipeModule.Invoke(new FileSearchDelegate(OnFilesFoundDispatcher), null, e); }
private void OnFilesFoundDispatcher(object sender, FileSearchArgs e) { if(e.files != null && e.files.Length > 0) { int count = e.files.Length; wipeModule.ObjectList.BeginUpdate(); for(int i = 0; i < count; i++) { wipeModule.AddFile(e.files[i]); } wipeModule.ObjectList.EndUpdate(); } if(_searching == false) { e.stop = true; } if(e.lastSet) { StopSearch(); } this.Update(); }
private void SendResultChunk(string[] files, bool lastSet) { FileSearchArgs e = new FileSearchArgs(files, lastSet); if(OnFilesFound != null) { OnFilesFound(this, e); if(e.stop == true) { SetStop(true); } } }