Пример #1
0
 public void setError(string error)
 {
     //
     // Don't display errors at that point GUI is being destroyed.
     //
     if (_exit)
     {
         return;
     }
     if (_model.State == ClientState.Connected || _model.State == ClientState.ConnectionLost)
     {
         _chatView.appendError(error);
         setState(ClientState.ConnectionLost);
     }
     else
     {
         setState(ClientState.Disconnected);
         ErrorView errorView = new ErrorView();
         errorView.ResizeMode = ResizeMode.NoResize;
         errorView.setError(error);
         ChatUtils.centerWindow(errorView, _mainView);
         errorView.ShowDialog();
     }
 }
Пример #2
0
 public void setError(string error)
 {
     //
     // Don't display errors at that point GUI is being destroyed.
     //
     if(_exit)
     {
         return;
     }
     if(_model.State == ClientState.Connected || _model.State == ClientState.ConnectionLost)
     {
         _chatView.appendError(error);
         setState(ClientState.ConnectionLost);
     }
     else
     {
         setState(ClientState.Disconnected);
         ErrorView errorView = new ErrorView();
         errorView.ResizeMode = ResizeMode.NoResize;
         errorView.setError(error);
         ChatUtils.centerWindow(errorView,_mainView);
         errorView.ShowDialog();
     }
 }