/// <summary> /// Searches this instance. /// </summary> private void Search() { if (this.SingleConceptMatching.InputBoxText != this.lastInputBoxSearch) { this.lastInputBoxSearch = this.SingleConceptMatching.InputBoxText; if (this.connected) { if (!SingleConceptMatchingPage.ValidateInputText(this.SingleConceptMatching.InputBoxText)) { this.StatusText.Text = SingleConceptMatchingPage.InputTextValidationFailed; return; } this.StatusText.Text = SingleConceptMatchingPage.SearchInProgressText; this.ShowProgressBar(); this.SingleConceptMatching.InputBoxItemsSource = null; FilterItem filterItem = this.SingleConceptMatching.SubsetPickerSelectedItem as FilterItem; TerminologyManager.SearchInputField(SingleConceptMatchingPage.FixupInputText(this.SingleConceptMatching.InputBoxText), filterItem.SubsetCollection); } } else if (this.lastInputBoxResults != null && this.SingleConceptMatching.InputBoxText == this.lastInputBoxResults.SearchTextOriginal) { this.SingleConceptMatching.InputBoxItemsSource = this.lastInputBoxResults.InputFieldResults; } }
/// <summary> /// Handles the InputFieldTextChanged event of the SingleConceptMatching control. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.Windows.Controls.TextChangedEventArgs"/> instance containing the event data.</param> private void SingleConceptMatching_InputBoxTextChanged(object sender, TextChangedEventArgs e) { this.SingleConceptMatching.InputBoxItemsSource = null; this.encodableInputFieldTimer.Stop(); if (this.connected) { this.StatusText.Text = string.Empty; } this.HideProgressBar(); if (!SingleConceptMatchingPage.ValidateInputText(this.SingleConceptMatching.InputBoxText)) { return; } switch (SingleConceptMatchingPage.searchMode) { case SearchMode.Progressive: if (!this.encodableInputFieldTimer.IsEnabled) { this.encodableInputFieldTimer.Start(); } break; case SearchMode.UserInitiated: break; default: break; } }