private void tvwServices_MouseDoubleClick(object sender, MouseEventArgs e) { TreeNode selectedNode = tvwServices.SelectedNode; if (selectedNode.Name == "ConfigNode") { TabPage tabPage = new TabPage(selectedNode.ToolTipText); ServiceConfigUserControl serviceConfigUserControl = new ServiceConfigUserControl(selectedNode.Tag.ToString()); serviceConfigUserControl.Dock = DockStyle.Fill; tabPage.Controls.Add(serviceConfigUserControl); tbOperations.TabPages.Add(tabPage); } else { OperationInfo operationInfo = selectedNode.Tag as OperationInfo; if (operationInfo != null) { TabPage tabPage = new TabPage(operationInfo.Method.Name); OperationInvokerUserControl operationInvokerUserControl = new OperationInvokerUserControl(operationInfo); operationInvokerUserControl.Dock = DockStyle.Fill; tabPage.Controls.Add(operationInvokerUserControl); tbOperations.TabPages.Add(tabPage); } } }