private void startButton_Click(object sender, EventArgs e) { Classes.ServerRun sr; if (server2IPTextbox.Text.Equals(String.Empty)) { sr = new Classes.ServerRun( deviceDropDown.SelectedIndex, server1IPTextbox.Text, Convert.ToInt32(msgCountTextbox.Text), Convert.ToInt32(paceTextbox.Text)); } else { sr = new Classes.ServerRun( deviceDropDown.SelectedIndex, server1IPTextbox.Text, server2IPTextbox.Text, Convert.ToInt32(msgCountTextbox.Text), Convert.ToInt32(paceTextbox.Text)); } infoRichTextBox.Text += "Starting ServerRun\r\n"; sr.Start(); }