// the event handler for imports tree it is used to display information about the import node clicked private void treeViewImports_Selected(object sender, RoutedEventArgs e) { if (((TreeViewItem)((TreeView)sender).SelectedItem).Tag != null) { dataGridImportsTable.Visibility = Visibility.Visible; object obj = ((TreeViewItem)((TreeView)sender).SelectedItem).Tag; ImportFunctionObject importFunctionObject = (ImportFunctionObject)(obj); List <ImportFunctionObject> listOfImportFunctionObjects = new List <ImportFunctionObject>(); listOfImportFunctionObjects.Add(importFunctionObject); dataGridImportsTable.ItemsSource = listOfImportFunctionObjects; } }
// the event handler for imports tree it is used to display information about the import node clicked private void treeViewImports_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Node.Tag != null) { ImportFunctionObject importFunctionObject = (ImportFunctionObject)e.Node.Tag; if (importFunctionObject != null) { dataGridViewImportExamined.Rows.Clear(); dataGridViewImportExamined.Show(); string[] row = { importFunctionObject.Function, importFunctionObject.BaseAddress.ToString(), importFunctionObject.Dependency }; dataGridViewImportExamined.Rows.Add(row); } } }