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.Access.Views/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Access.Views/3.3/ClientViews/ClientRegistrationDialog.cs

    r12012 r13338  
    2525using System.Threading.Tasks;
    2626using System.Windows.Forms;
     27using HeuristicLab.MainForm;
    2728
    2829namespace HeuristicLab.Clients.Access.Views {
     
    103104          btnCollectInformation.Enabled = true;
    104105          btnCancel.Enabled = true;
    105           PluginInfrastructure.ErrorHandling.ShowErrorDialog(task.Exception);
     106          MainFormManager.MainForm.ShowError(task.Exception.Message, task.Exception);
    106107        }
    107108      }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Access.Views/3.3/UserViews/ChangePasswordDialog.cs

    r12012 r13338  
    2323using System.Windows.Forms;
    2424using HeuristicLab.Clients.Common;
     25using HeuristicLab.MainForm;
    2526using CcSettings = HeuristicLab.Clients.Common.Properties;
    2627
     
    105106      call.BeginInvoke(delegate(IAsyncResult result) {
    106107        Exception ex = call.EndInvoke(result);
    107         if (ex != null) PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
     108        if (ex != null)
     109          MainFormManager.MainForm.ShowError(ex.Message, ex);
    108110      }, null);
    109111    }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserGroupSelectionView.cs

    r12012 r13338  
    2323using System.Windows.Forms;
    2424using HeuristicLab.Core;
     25using HeuristicLab.MainForm;
    2526using HeuristicLab.PluginInfrastructure;
    2627
     
    4748        AccessClient.Instance.Refreshing += new EventHandler(Instance_Refreshing);
    4849        AccessClient.Instance.Refreshed += new EventHandler(Instance_Refreshed);
    49         AccessClient.Instance.RefreshAsync(new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex)));
     50        AccessClient.Instance.RefreshAsync(new Action<Exception>((Exception ex) => MainFormManager.MainForm.ShowError("Refresh failed.", ex)));
    5051        AccessClient.Instance.Refreshing -= new EventHandler(Instance_Refreshing);
    5152        AccessClient.Instance.Refreshed -= new EventHandler(Instance_Refreshed);
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.cs

    r12012 r13338  
    2222using System;
    2323using System.Windows.Forms;
     24using HeuristicLab.MainForm;
    2425
    2526namespace HeuristicLab.Clients.Access.Views {
     
    3940
    4041    protected override void RefreshData() {
    41       Content.ExecuteActionAsync(RefreshUserData, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
     42      Content.ExecuteActionAsync(RefreshUserData, (ex) => MainFormManager.MainForm.ShowError(ex.Message, ex));
    4243    }
    4344
     
    7172      AccessClient.Instance.ExecuteActionAsync(new Action(delegate {
    7273        AccessClient.CallAccessService(x => x.UpdateLightweightUser(UserInformation.Instance.User));
    73       }), HeuristicLab.PluginInfrastructure.ErrorHandling.ShowErrorDialog);
     74      }), (ex) => MainFormManager.MainForm.ShowError(ex.Message, ex));
    7475    }
    7576  }
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserView.cs

    r12012 r13338  
    6464      });
    6565
    66       Content.ExecuteActionAsync(completeRefreshAction, new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex)));
     66      Content.ExecuteActionAsync(completeRefreshAction, new Action<Exception>((Exception ex) => MainFormManager.MainForm.ShowError("Refresh failed.", ex)));
    6767    }
    6868
Note: See TracChangeset for help on using the changeset viewer.