private void groupGridView_DoubleClickRow(object sender, DoubleClickRowEventArgs e) { string assetName = e.Row.Cells["Asset"].Value.ToString(); List <WorkItem> workItemList = (List <WorkItem>)workItem.RootWorkItem.WorkItems.FindByType(typeof(NetworkWorkItem)); NetworkWorkItem netDiscWorkItem = workItemList[0] as NetworkWorkItem; NetworkWorkItemController controller = netDiscWorkItem.Controller as NetworkWorkItemController; NetworkExplorerView explorerView = (NetworkExplorerView)netDiscWorkItem.ExplorerView; Infragistics.Win.UltraWinTree.UltraTree explorerTree = explorerView.GetDisplayedTree; Infragistics.Win.UltraWinTree.UltraTreeNode rootNode = explorerTree.Nodes[0]; Infragistics.Win.UltraWinTree.UltraTreeNode selectedNode = AddMatches(rootNode, assetName); if (selectedNode != null) { selectedNode.BringIntoView(); //explorerTree.SelectedNodes.Clear(); selectedNode.Expanded = true; selectedNode.Selected = true; //controller.ActivateWorkItem(); } }
/// <summary> /// Run the startup wizard /// </summary> public void RunStartupWizard() { log.Debug("Entering RunStartupWizard"); // Get the Layton.LicenseWizard.NetworkWorkItemController object to pass to the wizard List <WorkItem> workItemList = (List <WorkItem>)workItem.RootWorkItem.WorkItems.FindByType(typeof(NetworkWorkItem)); NetworkWorkItem netDiscWorkItem = workItemList[0] as NetworkWorkItem; NetworkWorkItemController controller = netDiscWorkItem.Controller as NetworkWorkItemController; // Get the Layton.NetworkDiscovery.NetworkDiscoveryWorkItemController object also workItemList = (List <WorkItem>)workItem.RootWorkItem.WorkItems.FindByType(typeof(NetworkDiscoveryWorkItem)); NetworkDiscoveryWorkItem networkDiscoveryWorkItem = workItemList[0] as NetworkDiscoveryWorkItem; NetworkDiscoveryWorkItemController ndController = networkDiscoveryWorkItem.Controller as NetworkDiscoveryWorkItemController; // Save the active tab view as the discovery process may change it ILaytonView activeTabView = (ILaytonView)workItem.RootWorkItem.Workspaces[WorkspaceNames.TabWorkspace].ActiveSmartPart; FormStartupWizard wizard = new FormStartupWizard(this, controller, ndController); wizard.ShowDialog(); OverviewTabView tabView = WorkItem.TabView as OverviewTabView; tabView.RefreshView(); }
public NetworkToolbarsController([ServiceDependency] WorkItem workItem) { this.workItem = workItem as NetworkWorkItem; }