Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/02/12 15:32:40 (12 years ago)
Author:
ascheibe
Message:

#1725

  • moved Hive resources to HL common resources
  • added missing invokes and usings for displaying the hive information dialog


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.cs

    r7249 r7256  
    107107
    108108    private void HandleServiceException(Exception ex) {
    109       if (ex is MessageSecurityException) {
    110         MessageBox.Show("A Message Security error has occured. This normally means that your user name or password is wrong.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
    111       } else if (ex is AnonymousUserException) {
    112         HiveInformationDialog dialog = new HiveInformationDialog();
    113         dialog.ShowDialog(this);
     109      if (this.InvokeRequired) {
     110        Invoke(new Action<Exception>(HandleServiceException), ex);
    114111      } else {
    115         ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex);
     112        if (ex is MessageSecurityException) {
     113          MessageBox.Show("A Message Security error has occured. This normally means that your user name or password is wrong.", "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
     114        } else if (ex is AnonymousUserException) {
     115          using (HiveInformationDialog dialog = new HiveInformationDialog()) {
     116            dialog.ShowDialog(this);
     117          }
     118        } else {
     119          ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex);
     120        }
    116121      }
    117122    }
Note: See TracChangeset for help on using the changeset viewer.