示例#1
0
        /// <summary>
        /// Handles the Click event of the buttonReplace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void buttonReplace_Click(object sender, EventArgs e)
        {
            Cursor currentCursor = Cursor.Current;

            try
            {
                // Set wait cursor:
                Cursor.Current = Cursors.WaitCursor;

                // Create replace parameters:
                ReplaceParameters parameters = new ReplaceParameters();
                parameters.FileCrawlerParameters.PathInfoList = this.pathList.ToList();
                parameters.ReplacePatterns = this.patternList.ToList();

                // Process:
                using (ProcessingForm form = new ProcessingForm())
                {
                    form.ReplaceParameters = parameters;
                    form.ShowDialog(this);
                }
            }
            finally
            {
                // Restore original cursor:
                Cursor.Current = currentCursor;
            }
        }
示例#2
0
        /// <summary>
        /// Handles the Click event of the buttonReplace control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void buttonReplace_Click(object sender, EventArgs e)
        {
            Cursor currentCursor = Cursor.Current;
            try
            {
                // Set wait cursor:
                Cursor.Current = Cursors.WaitCursor;

                // Create replace parameters:
                ReplaceParameters parameters = new ReplaceParameters();
                parameters.FileCrawlerParameters.PathInfoList = this.pathList.ToList();
                parameters.ReplacePatterns = this.patternList.ToList();

                // Process:
                using (ProcessingForm form = new ProcessingForm())
                {
                    form.ReplaceParameters = parameters;
                    form.ShowDialog(this);
                }
            }
            finally
            {
                // Restore original cursor:
                Cursor.Current = currentCursor;
            }
        }