/// <summary> /// Connects to a server. /// </summary> private async void Server_ConnectMI_ClickAsync(object sender, EventArgs e) { try { await ConnectServerCTRL.Connect(); } catch (Exception exception) { ClientUtils.HandleException(this.Text, exception); } }
/// <summary> /// Connects to a server. /// </summary> private void Server_ConnectMI_Click(object sender, EventArgs e) { try { ConnectServerCTRL.Connect(); } catch (Exception exception) { MessageBox.Show(exception.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }