public override void BindChildren() { Benchmark.Benchmark benchmark = (Benchmark.Benchmark)BenchmarkObject; initScriptNode = new ScriptTreeNode(benchmark.InitScript, BenchmarkTreeView); initScriptNode.Text = "Init script"; initScriptNode.ImageKey = "InitScript"; initScriptNode.SelectedImageKey = "InitScript"; this.Nodes.Add(initScriptNode); cleanUpScriptNode = new ScriptTreeNode(benchmark.CleanUpScript, BenchmarkTreeView); cleanUpScriptNode.Text = "Clean-up script"; cleanUpScriptNode.ImageKey = "CleanUpScript"; cleanUpScriptNode.SelectedImageKey = "CleanUpScript"; this.Nodes.Add(cleanUpScriptNode); testGroupsNode = new FolderTreeNode(BenchmarkTreeView); testGroupsNode.Text = "Groups"; testGroupsNode.ImageKey = "Folder"; testGroupsNode.SelectedImageKey = "Folder"; BindCollection <Benchmark.TestGroup>(testGroupsNode, benchmark.TestGroups); this.Nodes.Add(testGroupsNode); connectionSettingsNode = new ConnectionSettingsNode(benchmark.ConnectionSettings, BenchmarkTreeView); connectionSettingsNode.Text = "Connection"; connectionSettingsNode.ImageKey = "Connection"; connectionSettingsNode.SelectedImageKey = "Connection"; this.Nodes.Add(connectionSettingsNode); testRunsNode = new TestRunsTreeNode(benchmark, BenchmarkTreeView); testRunsNode.Text = "Results"; this.Nodes.Add(testRunsNode); BindCollection <Benchmark.TestRun>(testRunsNode, benchmark.TestRuns); testGroupsContextMenu = new ContextMenuStrip(); testGroupsContextMenu.Items.Add("Add", Properties.Resources.Add_16, AddTestGroup_Click); testGroupsNode.ContextMenuStrip = testGroupsContextMenu; ChildrenBound = true; }
public override void BindChildren() { this.Nodes.Clear(); Benchmark.Configuration configuration = (Benchmark.Configuration)BenchmarkObject; initScriptNode = new ScriptTreeNode(configuration.InitScript, BenchmarkTreeView); initScriptNode.Text = "Init script"; initScriptNode.ImageKey = "InitScript"; initScriptNode.SelectedImageKey = "InitScript"; this.Nodes.Add(initScriptNode); cleanUpScriptNode = new ScriptTreeNode(configuration.CleanUpScript, BenchmarkTreeView); cleanUpScriptNode.Text = "Clean-up script"; cleanUpScriptNode.ImageKey = "CleanUpScript"; cleanUpScriptNode.SelectedImageKey = "CleanUpScript"; this.Nodes.Add(cleanUpScriptNode); ChildrenBound = true; }