private void mnuProjectAddTest_Click(object sender, EventArgs e) { Document.Target target = projectExplorerControl1.SelectedObject as Document.Target; if (target != null) { Document.AutomatedTest newTest = new TigerClient.Document.AutomatedTest(); target.AutomatedTests.Add(newTest); projectExplorerControl1.SelectNodeFor(newTest); } }
private void mnuProject_DropDownOpening(object sender, EventArgs e) { if (isProjectExecuting) { mnuProjectAddTarget.Enabled = false; mnuProjectAddTest.Enabled = false; mnuProjectAddTestParameter.Enabled = false; mnuProjectRun.Enabled = false; mnuProjectStop.Enabled = true; } else { mnuProjectAddTarget.Enabled = true; mnuProjectRun.Enabled = true; mnuProjectStop.Enabled = false; Document.Target target = propertiesControl1.SelectedObject as Document.Target; mnuProjectAddTest.Enabled = (target != null); Document.AutomatedTest test = propertiesControl1.SelectedObject as Document.AutomatedTest; mnuProjectAddTestParameter.Enabled = (test != null); } }
private void mnuProjectAddTarget_Click(object sender, EventArgs e) { Document.Target newTarget = new Document.Target(); projectExplorerControl1.Project.Targets.Add(newTarget); projectExplorerControl1.SelectNodeFor(newTarget); }