protected virtual void OnConnectError(ConnectionErrorEventArgs e) { this.State = ServerState.Disconnected; OnGlobalMessageReceived(new NotificationEventArgs(new NotificationMessage("Could not connect to server {0}. {1}", this.Name, e.Exception.GetBaseException()))); if (ConnectError != null) ConnectError(this, e); }
protected virtual void OnConnectError(ConnectionErrorEventArgs e) { this.State = ServerState.Disconnected; OnGlobalMessageReceived(new NotificationEventArgs(new NotificationMessage("Could not connect to server {0}. {1}", this.Name, e.Exception.GetBaseException()))); if (ConnectError != null) { ConnectError(this, e); } }
async void HandleConnectError(object sender, ConnectionErrorEventArgs e) { GetServerSection(e.Server); if (e.Exception is NotAuthenticatedException) { if (e.Server.Authenticate(this)) { JabbRApplication.Instance.SaveConfiguration(); await e.Server.Connect(); } } else { MessageBox.Show(this, e.Exception.GetBaseException().Message, string.Format("Could not connect to server {0}", e.Server.Name)); } }