protected void StartConnection(object sender, EventArgs e) { if (ValidateLoginInformation()) { StartButton.Enabled = false; if (StartButton.Text == START_TEXT) { PrepopulateProcessValues(); ProcessInstance.StartConnection(); } else if (StartButton.Text == STOP_TEXT) { Logger.Trace("Waiting for shutdown messages to propogate"); ProcessInstance.CloseConnection(); } } else { Logger.Error("User entered invalid information"); StartButton.Enabled = true; } }