Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/10 03:28:16 (14 years ago)
Author:
swagner
Message:

Restricted types of child operators in MultiOperator (#979)

Location:
trunk/sources/HeuristicLab.Parameters.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs

    r3376 r3407  
    138138        typeSelectorDialog.TypeSelector.Configure(Content.DataType, false, false);
    139139      }
    140       if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK)
    141         Content.Value = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
     140      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
     141        try {
     142          Content.Value = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
     143        }
     144        catch (Exception ex) {
     145          Auxiliary.ShowErrorMessageBox(ex);
     146        }
     147      }
    142148    }
    143149    protected virtual void clearValueButton_Click(object sender, EventArgs e) {
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs

    r3376 r3407  
    126126        typeSelectorDialog.TypeSelector.Configure(Content.DataType, false, false);
    127127      }
    128       if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK)
    129         Content.Value = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
     128      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
     129        try {
     130          Content.Value = (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
     131        }
     132        catch (Exception ex) {
     133          Auxiliary.ShowErrorMessageBox(ex);
     134        }
     135      }
    130136    }
    131137    protected virtual void setValueButton_Click(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.