/// <summary> /// When double clicking in the list of classnames from the search operation (in the SearchClassResultWindow), /// we retrieve the classname and load the details. The SearchClassResultWindow will also be closed. /// </summary> private void SearchClassResultWindow_ClassNameSelected(object sender, WbemTreeViewItem wbemTreeViewItem) { PopulateClassDetails(wbemTreeViewItem); wbemTreeViewItem.IsSelected = true; ClassNavigator.ExpandTo(wbemTreeViewItem); searchClassResultWindow.Close(); searchClassResultWindow = null; }
/// <summary> /// Starts searching for classes when enter button is pressed. /// Once the search is done, it will open a new SearchClassResultWindow Window with the results. /// </summary> private void TextBoxClass_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key != System.Windows.Input.Key.Enter) { return; } IEnumerable <WbemTreeViewItem> classes = ClassNavigator.Search(TextBoxClass.Text); searchClassResultWindow = new SearchClassResultWindow(classes); searchClassResultWindow.ClassNameSelected += SearchClassResultWindow_ClassNameSelected; searchClassResultWindow.Show(); }