Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7661


Ignore:
Timestamp:
03/26/12 10:58:40 (13 years ago)
Author:
spimming
Message:

#1680: Show error dialog (from PluginInfrastructure) instead of message box on exception

Location:
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs

    r7565 r7661  
    122122        Subscription subscription = (Subscription)cmbChooseSubscription.SelectedItem;
    123123        if (subscription.CurrentHostedServices == subscription.MaxHostedServices) {
    124           MessageBox.Show("You have already created the maximum number of hosted services", "Limit Reached", MessageBoxButtons.OK, MessageBoxIcon.Error);
     124          PluginInfrastructure.ErrorHandling.ShowErrorDialog(new Exception("You have already created the maximum number of hosted services"));
    125125          cbNewHostedService.Checked = false;
    126126        } else {
     
    264264      }
    265265      catch (Exception ex) {
    266         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     266        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    267267      }
    268268    }
     
    317317      catch (Exception ex) {
    318318        errorOccured = true;
    319         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     319        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    320320      }
    321321
     
    332332      catch (Exception ex) {
    333333        errorOccured = true;
    334         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     334        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    335335      }
    336336
     
    348348      catch (Exception ex) {
    349349        errorOccured = true;
    350         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     350        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    351351      }
    352352
     
    359359      catch (Exception ex) {
    360360        errorOccured = true;
    361         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     361        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    362362        if (newHostedServiceChecked) {
    363363          CloudManagerClient.Instance.AzureProvider.DeleteHostedService(sub, hostedService.ServiceName);
     
    375375      catch (Exception ex) {
    376376        errorOccured = true;
    377         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     377        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    378378        if (newHostedServiceChecked) {
    379379          CloudManagerClient.Instance.AzureProvider.DeleteHostedService(sub, hostedService.ServiceName);
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.cs

    r7362 r7661  
    3636
    3737      if (CertificateFile.Length == 0) {
    38         MessageBox.Show("Certificate file is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     38        PluginInfrastructure.ErrorHandling.ShowErrorDialog(new Exception("Certificate file is required"));
    3939      } else if (CertificatePassword.Length == 0) {
    40         MessageBox.Show("Password is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     40        PluginInfrastructure.ErrorHandling.ShowErrorDialog(new Exception("Password is required"));
    4141      } else {
    4242        SetControlsEnabled(false);
     
    6969        this.Close();
    7070      } else {
    71         MessageBox.Show(e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     71        PluginInfrastructure.ErrorHandling.ShowErrorDialog(e.Error);
    7272        CertificateFile = string.Empty;
    7373        CertificateFile = string.Empty;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddSubscriptionDialog.cs

    r7387 r7661  
    5656        this.Close();
    5757      } else {
    58         MessageBox.Show(e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     58        PluginInfrastructure.ErrorHandling.ShowErrorDialog(e.Error);
    5959        ErrorOccured = true;
    6060        Subscription = null;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/DeleteDeploymentView.cs

    r7608 r7661  
    7272        this.Close();
    7373      } else {
    74         MessageBox.Show(e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     74        PluginInfrastructure.ErrorHandling.ShowErrorDialog(e.Error);
    7575        ErrorOccured = true;
    7676        this.Show();
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/DeleteHostedServiceView.cs

    r7608 r7661  
    6262        this.Close();
    6363      } else {
    64         MessageBox.Show(e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     64        PluginInfrastructure.ErrorHandling.ShowErrorDialog(e.Error);
    6565        ErrorOccured = true;
    6666        this.Show();
Note: See TracChangeset for help on using the changeset viewer.