Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/15 16:14:30 (9 years ago)
Author:
gkronber
Message:

#2522:

  • moved UI components out of HeuristicLab.PluginInfrastructure -> HeuristicLab.PluginInfrastructure.UI
  • moved ErrorDialog to HeuristicLab.MainForm.WindowsForms
  • moved ErrorHandling (for building an error message string) to HeuristicLab.Common
  • Changed exception handlers in Views to use MainForm.ShowError()
  • Changed usages for ErrorDialog in non-UI components to throw exceptions instead.
Location:
branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views/AdministratorView.cs

    r12012 r13338  
    104104
    105105    private void refreshButton_Click(object sender, EventArgs e) {
    106       Content.RefreshAsync(new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex)));
     106      Content.RefreshAsync(new Action<Exception>((Exception ex) => MainFormManager.MainForm.ShowError("Refresh failed.", ex)));
    107107    }
    108108  }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views/AlgorithmView.cs

    r12012 r13338  
    164164      }
    165165      catch (Exception ex) {
    166         ErrorHandling.ShowErrorDialog(this, "Store authorized users and groups failed.", ex);
     166        MainFormManager.MainForm.ShowError( "Store authorized users and groups failed.", ex);
    167167      }
    168168    }
     
    221221        }
    222222        catch (Exception ex) {
    223           ErrorHandling.ShowErrorDialog(this, "Create new algorithm data failed.", ex);
     223          MainFormManager.MainForm.ShowError( "Create new algorithm data failed.", ex);
    224224        }
    225225        SetEnabledStateOfControls();
     
    302302        Cursor = Cursors.Default;
    303303        Enabled = true;
    304         if (exception != null) ErrorHandling.ShowErrorDialog(this, errorMessage, exception);
     304        if (exception != null) MainFormManager.MainForm.ShowError(errorMessage, exception);
    305305        if (continueWith != null) continueWith();
    306306      }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views/OKBItemCollectionView.cs

    r12012 r13338  
    4040      }
    4141      catch (Exception ex) {
    42         ErrorHandling.ShowErrorDialog(this, "Delete failed.", ex);
     42        MainFormManager.MainForm.ShowError("Delete failed.", ex);
    4343      }
    4444    }
     
    4848      }
    4949      catch (Exception ex) {
    50         ErrorHandling.ShowErrorDialog(this, "Delete failed.", ex);
     50        MainFormManager.MainForm.ShowError("Delete failed.", ex);
    5151      }
    5252    }
     
    5656      }
    5757      catch (Exception ex) {
    58         ErrorHandling.ShowErrorDialog(this, "Delete failed.", ex);
     58        MainFormManager.MainForm.ShowError("Delete failed.", ex);
    5959      }
    6060    }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views/OKBItemView.cs

    r12012 r13338  
    7878      }
    7979      catch (Exception ex) {
    80         ErrorHandling.ShowErrorDialog(this, "Store failed.", ex);
     80        MainFormManager.MainForm.ShowError("Store failed.", ex);
    8181      }
    8282    }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.OKB.Views/3.3/Administration/Views/ProblemView.cs

    r12012 r13338  
    164164      }
    165165      catch (Exception ex) {
    166         ErrorHandling.ShowErrorDialog(this, "Store authorized users and groups failed.", ex);
     166        MainFormManager.MainForm.ShowError("Store authorized users and groups failed.", ex);
    167167      }
    168168    }
     
    223223        }
    224224        catch (Exception ex) {
    225           ErrorHandling.ShowErrorDialog(this, "Create new problem data failed.", ex);
     225          MainFormManager.MainForm.ShowError("Create new problem data failed.", ex);
    226226        }
    227227        SetEnabledStateOfControls();
     
    304304        Cursor = Cursors.Default;
    305305        Enabled = true;
    306         if (exception != null) ErrorHandling.ShowErrorDialog(this, errorMessage, exception);
     306        if (exception != null) MainFormManager.MainForm.ShowError(errorMessage, exception);
    307307        if (continueWith != null) continueWith();
    308308      }
Note: See TracChangeset for help on using the changeset viewer.