/// <summary>
        /// Runs the find based on the user specified arguments
        /// </summary>
        private void FindButtonClick(Object sender, EventArgs e)
        {
            String  path      = this.folderComboBox.Text;
            String  mask      = this.extensionComboBox.Text;
            Boolean recursive = this.subDirectoriesCheckBox.Checked;

            if (!String.IsNullOrEmpty(this.findComboBox.Text) && this.IsValidFileMask(mask))
            {
                FRConfiguration config = this.GetFRConfig(path, mask, recursive);
                if (config == null)
                {
                    return;
                }
                config.CacheDocuments = true;
                this.UpdateUIState(true);
                this.runner = new FRRunner();
                this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
                this.runner.Finished       += new FRFinishedHandler(this.FindFinished);
                this.runner.SearchAsync(config);
                //
                FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
            }
        }
        /// <summary>
        /// Runs the replace based on the user specified arguments
        /// </summary>
        private void ReplaceButtonClick(Object sender, EventArgs e)
        {
            String  path      = this.folderComboBox.Text;
            String  mask      = this.extensionComboBox.Text;
            Boolean recursive = this.subDirectoriesCheckBox.Checked;

            if (this.findComboBox.Text.Trim() != "")
            {
                if (!Globals.Settings.DisableReplaceFilesConfirm)
                {
                    String       caption = TextHelper.GetString("Title.ConfirmDialog");
                    String       message = TextHelper.GetString("Info.AreYouSureToReplaceInFiles");
                    DialogResult result  = MessageBox.Show(message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                    if (result == DialogResult.Cancel)
                    {
                        return;
                    }
                }
                this.UpdateUIState(true);
                FRConfiguration config = new FRConfiguration(path, mask, recursive, this.GetFRSearch());
                config.Replacement          = this.replaceComboBox.Text;
                this.runner                 = new FRRunner();
                this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
                this.runner.Finished       += new FRFinishedHandler(this.ReplaceFinished);
                this.runner.ReplaceAsync(config);
                //
                FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.replaceComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
            }
        }
예제 #3
0
    private static void Replace(List <String> path, String search, String replace)
    {
        FRConfiguration config = new FRConfiguration(path, GetFRSearch(search));

        config.Replacement     = replace;
        runner                 = new FRRunner();
        runner.ProgressReport += new FRProgressReportHandler(RunnerProgress);
        runner.Finished       += new FRFinishedHandler(ReplaceFinished);
        runner.ReplaceAsync(config);
    }
        /// <summary>
        /// Runs the replace based on the user specified arguments
        /// </summary>
        private void ReplaceButtonClick(Object sender, EventArgs e)
        {
            String  mask      = this.extensionComboBox.Text;
            Boolean recursive = this.subDirectoriesCheckBox.Checked;

            if (!String.IsNullOrEmpty(this.findComboBox.Text) && this.IsValidFileMask(mask))
            {
                if (!Globals.Settings.DisableReplaceFilesConfirm)
                {
                    String       caption = TextHelper.GetString("Title.ConfirmDialog");
                    String       message = TextHelper.GetString("Info.AreYouSureToReplaceInFiles");
                    DialogResult result  = MessageBox.Show(message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                    if (result == DialogResult.Cancel)
                    {
                        return;
                    }
                }

                string[] paths = this.folderComboBox.Text.Split(';');
                foreach (string path in paths)
                {
                    FRConfiguration config = this.GetFRConfig(path, mask, recursive);
                    if (config == null)
                    {
                        return;
                    }
                    config.CacheDocuments       = true;
                    config.UpdateSourceFileOnly = false;
                    config.Replacement          = this.replaceComboBox.Text;
                    this.UpdateUIState(true);
                    this.runner = new FRRunner();
                    this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
                    this.runner.Finished       += new FRFinishedHandler(this.ReplaceFinished);
                    this.runner.ReplaceAsync(config);
                    //
                    FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
                    FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
                    FRDialogGenerics.UpdateComboBoxItems(this.replaceComboBox);
                    FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
                }
            }
        }
        /// <summary>
        /// Runs the find based on the user specified arguments
        /// </summary>
        private void FindButtonClick(Object sender, EventArgs e)
        {
            String  path      = this.folderComboBox.Text;
            String  mask      = this.extensionComboBox.Text;
            Boolean recursive = this.subDirectoriesCheckBox.Checked;

            if (this.findComboBox.Text.Trim() != "")
            {
                this.UpdateUIState(true);
                FRConfiguration config = new FRConfiguration(path, mask, recursive, this.GetFRSearch());
                this.runner = new FRRunner();
                this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
                this.runner.Finished       += new FRFinishedHandler(this.FindFinished);
                this.runner.SearchAsync(config);
                //
                FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
                FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
            }
        }
예제 #6
0
 /// <summary>
 /// Runs the replace based on the user specified arguments
 /// </summary>
 private void ReplaceButtonClick(Object sender, EventArgs e)
 {
     String mask = this.extensionComboBox.Text;
     Boolean recursive = this.subDirectoriesCheckBox.Checked;
     if (IsValidPattern() && this.IsValidFileMask(mask))
     {
         if (!Globals.Settings.DisableReplaceFilesConfirm)
         {
             String caption = TextHelper.GetString("Title.ConfirmDialog");
             String message = TextHelper.GetString("Info.AreYouSureToReplaceInFiles");
             DialogResult result = MessageBox.Show(message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
             if (result == DialogResult.Cancel) return;
         }
         String[] paths = this.folderComboBox.Text.Split(';');
         foreach (String path in paths)
         {
             FRConfiguration config = this.GetFRConfig(path, mask, recursive);
             if (config == null) return;
             config.CacheDocuments = true;
             config.UpdateSourceFileOnly = false;
             config.Replacement = this.replaceComboBox.Text;
             this.UpdateUIState(true);
             this.runner = new FRRunner();
             this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
             this.runner.Finished += new FRFinishedHandler(this.ReplaceFinished);
             this.runner.ReplaceAsync(config);
             FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
             FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
             FRDialogGenerics.UpdateComboBoxItems(this.replaceComboBox);
             FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
         }
     }
 }
예제 #7
0
 /// <summary>
 /// Runs the find based on the user specified arguments
 /// </summary>
 private void FindButtonClick(Object sender, EventArgs e)
 {
     String mask = this.extensionComboBox.Text;
     Boolean recursive = this.subDirectoriesCheckBox.Checked;
     if (IsValidPattern() && this.IsValidFileMask(mask))
     {
         String[] paths = this.folderComboBox.Text.Split(';');
         foreach (String path in paths)
         {
             FRConfiguration config = this.GetFRConfig(path, mask, recursive);
             if (config == null) return;
             config.CacheDocuments = true;
             this.UpdateUIState(true);
             this.runner = new FRRunner();
             this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
             this.runner.Finished += new FRFinishedHandler(this.FindFinished);
             this.runner.SearchAsync(config);
             FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
             FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
             FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
         }
     }
 }
예제 #8
0
 private static void Replace(List<String> path, String search, String replace)
 {
     FRConfiguration config = new FRConfiguration(path, GetFRSearch(search));
     config.Replacement = replace;
     runner = new FRRunner();
     runner.ProgressReport += new FRProgressReportHandler(RunnerProgress);
     runner.Finished += new FRFinishedHandler(ReplaceFinished);
     runner.ReplaceAsync(config);
 }
예제 #9
0
 /// <summary>
 /// Runs the replace based on the user specified arguments
 /// </summary>
 private void ReplaceButtonClick(Object sender, EventArgs e)
 {
     String path = this.folderComboBox.Text;
     String mask = this.extensionComboBox.Text;
     Boolean recursive = this.subDirectoriesCheckBox.Checked;
     if (this.findComboBox.Text.Trim() != "")
     {
         if (!Globals.Settings.DisableReplaceFilesConfirm)
         {
             String caption = TextHelper.GetString("Title.ConfirmDialog");
             String message = TextHelper.GetString("Info.AreYouSureToReplaceInFiles");
             DialogResult result = MessageBox.Show(message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
             if (result == DialogResult.Cancel) return;
         }
         this.UpdateUIState(true);
         FRConfiguration config = new FRConfiguration(path, mask, recursive, this.GetFRSearch());
         config.Replacement = this.replaceComboBox.Text;
         this.runner = new FRRunner();
         this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
         this.runner.Finished += new FRFinishedHandler(this.ReplaceFinished);
         this.runner.ReplaceAsync(config);
         //
         FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
         FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
         FRDialogGenerics.UpdateComboBoxItems(this.replaceComboBox);
         FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
     }
 }
예제 #10
0
 /// <summary>
 /// Runs the find based on the user specified arguments
 /// </summary>
 private void FindButtonClick(Object sender, EventArgs e)
 {
     String path = this.folderComboBox.Text;
     String mask = this.extensionComboBox.Text;
     Boolean recursive = this.subDirectoriesCheckBox.Checked;
     if (this.findComboBox.Text.Trim() != "")
     {
         this.UpdateUIState(true);
         FRConfiguration config = new FRConfiguration(path, mask, recursive, this.GetFRSearch());
         this.runner = new FRRunner();
         this.runner.ProgressReport += new FRProgressReportHandler(this.RunnerProgress);
         this.runner.Finished += new FRFinishedHandler(this.FindFinished);
         this.runner.SearchAsync(config);
         //
         FRDialogGenerics.UpdateComboBoxItems(this.folderComboBox);
         FRDialogGenerics.UpdateComboBoxItems(this.extensionComboBox);
         FRDialogGenerics.UpdateComboBoxItems(this.findComboBox);
     }
 }