private void SearchFiles() { state = State.Searching; MainBtn.Content = "Stop"; LogTextBox.Document.Blocks.Clear(); LogTextBox.Document.Blocks.Add(new Paragraph(new Run("Scanning..."))); filesToDelete.Clear(); filesSize = 0; filesCount = 0; FilesSizeLabel.Content = HumanReadableByte.GetSize(0); FilesCountLabel.Content = "0 files"; if (searchManager == null) { searchManager = new SearchFilesManager(); searchManager.OnProgressChanged += WorkerProgressChanged; this.searchManager.OnProgressDirChanged += this.WorkerDirProgressChanged; searchManager.OnFinished += SearchFilesComplete; } //// Start Seraching Thread thread = new Thread(searchManager.Work); thread.Start(context); }
private void SearchTextInFiles() { SearchFilesManager.SearchTextInFiles(this, new ThreadCallBackResult(ShowResult)); if (!searchClosed) { Invoke(new ThreadCallBack(StopExecution)); } }
private void clearToolStripButton_Click(object sender, EventArgs e) { Form1 form = (Form1)ParentForm; SearchFilesManager.ClearList(form, this); openFileToolStripButton.Enabled = false; clearToolStripButton.Enabled = false; exportListToolStripButton.Enabled = false; infoDirLabel.Text = String.Empty; infoTextLabel.Text = String.Empty; }
private void searchInFilesListBox_MouseDoubleClick(object sender, MouseEventArgs e) { Form1 form = (Form1)ParentForm; if (form == null) { throw new ParentFormNullException(); } int selectionPosition = searchInFilesListBox.IndexFromPoint(e.X, e.Y); if (selectionPosition < 0) { return; } searchInFilesListBox.SelectedIndex = selectionPosition; String[] fileName = new String[1]; fileName[0] = SearchFilesManager.GetFileCompletePathName(this, searchInFilesListBox.SelectedItem.ToString()); //pathBaseToolStripLabel.Text + searchInFilesListBox.SelectedItem.ToString().Substring(2); FileManager.OpenFile(form, form.TabIdentity, fileName); }
private void searchFolderButton_Click(object sender, EventArgs e) { SearchFilesManager.GetPath(this); }
private void openFileToolStripButton_Click(object sender, EventArgs e) { Form1 form = (Form1)ParentForm; SearchFilesManager.OpenSelectedFileItem(form, this); }
private void copyFileFullPathToolStripMenuItem_Click(object sender, EventArgs e) { SearchFilesManager.CopyFileFullPath(this); }
private void exportListToolStripButton_Click(object sender, EventArgs e) { Form1 form = (Form1)ParentForm; SearchFilesManager.ExportList(form, this); }