Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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));
     }
 }