/// <summary> /// Occurs when a search operation occurs in a view. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">A <see cref="EditorViewSearchEventArgs"/> that contains the event data.</param> private void OnEditorViewSearch(object sender, EditorViewSearchEventArgs e) { if (this.Data.NotifySearchAction != null) { this.Data.NotifySearchAction(this, e.ResultSet); } }
/// <summary> /// Occurs when a search operation occurs in a view. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">A <see cref="EditorViewSearchEventArgs"/> that contains the event data.</param> private void OnSyntaxEditorViewSearch(object sender, EditorViewSearchEventArgs e) { // If an incremental search was performed... if (e.ResultSet.OperationType == SearchOperationType.FindNextIncremental) { // Show a statusbar message bool hasFindText = !String.IsNullOrEmpty(e.ResultSet.Options.FindText); bool notFound = (hasFindText) && (e.ResultSet.Results.Count == 0); string notFoundMessage = (notFound ? " (not found)" : String.Empty); messagePanel.Content = "Incremental Search: " + e.ResultSet.Options.FindText + notFoundMessage; } }
///////////////////////////////////////////////////////////////////////////////////////////////////// // NON-PUBLIC PROCEDURES ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Occurs when a search operation occurs in a view. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">A <see cref="EditorViewSearchEventArgs"/> that contains the event data.</param> private void OnEditorViewSearch(object sender, EditorViewSearchEventArgs e) { this.UpdateResults(e.ResultSet); }