private void samplesTreeView_AfterSelect(object sender, TreeViewEventArgs e) { TreeNode currentNode = samplesTreeView.SelectedNode; currentSample = (Sample)currentNode.Tag; if (currentSample != null) { currentHarness = currentSample.Harness; runButton.Enabled = true; descriptionTextBox.Text = currentSample.Description; codeRichTextBox.Clear(); codeRichTextBox.Text = currentSample.Code; colorizeCode(codeRichTextBox); outputTextBox.Clear(); } else { currentHarness = null; runButton.Enabled = false; descriptionTextBox.Text = "Select a query from the tree to the left."; codeRichTextBox.Clear(); outputTextBox.Clear(); if (e.Action != TreeViewAction.Collapse && e.Action != TreeViewAction.Unknown) { e.Node.Expand(); } } }
public Sample(SampleHarness harness, MethodInfo method, string category, string title, string description, string code) { this._Harness = harness; this._Method = method; this._Category = category; this._Title = title; this._Description = description; this._Code = code; }
public Sample(SampleHarness harness, MethodInfo method, string category, string title, string description, string code) { Harness = harness; Method = method; Category = category; Title = title; Description = description; Code = code; }
public Sample(SampleHarness harness, MethodInfo method, string category, string title, string description, string code) { _harness = harness; _method = method; _category = category; _title = title; _description = description; _code = code; }