private void initializeTestSet() { string err; //get command line arguments testArgs.getArgs(out err); //if there was an error, display it if (!string.IsNullOrWhiteSpace(err)) { writeToLog(err); } //if no error create a new TestSet and assign the values from the command line arguments to the TestSet object else { testSet = new TestSet(testArgs.testSetName, testArgs.workstation, testArgs.testSetNumber); updateTextBar(); testSet.managePorts(); } }
public CommTest(TestSet tSet, string newPort) { InitializeComponent(); this.tSet = tSet; tSet.portNumber = newPort; tSet.managePorts(); try { if (tSet.port.isOpen()) { writeToLog(string.Format("Port: {0} open\n", tSet.portNumber)); } else { writeToLog(string.Format("Failed to open port {0} ", tSet.portNumber)); } } catch (Exception ex) { writeToLog(string.Format("Port failed to open with ex: {0}" + System.Environment.NewLine, ex.Message)); } }
private void COMToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) { testSet.portNumber = e.ClickedItem.Text; testSet.managePorts(); updateCOMMenuItems(e.ClickedItem); }