Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/18/20 16:28:53 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • added two new methods in IJsonItem -> FixatePath and LoosenPath to fixate/loosen the path (to enable name changing without effects on path)
  • set IsInRange to virtual and made overrides for IntMatrixJsonItem and DoubleMatrixJsonItem (IsInRange is a bad name and needs to be renamed in future versions)
  • implemented basic validation feedback with ErrorProvider for some inputs (templateName, Name, Range)
  • now all items gets validated before export (validation errors are shown with ErrorHandling.ShowErrorDialog)
  • added a check in AlgorithmConverter to prevent an exception for accessing the first element of an empty IEnumerable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/NumericRangeControl.cs

    r17411 r17444  
    3333      textBoxFrom.ReadOnly = !checkBoxFrom.Checked;
    3434    }
     35
     36    private void textBoxFrom_Validating(object sender, CancelEventArgs e) {
     37      if (string.IsNullOrWhiteSpace(textBoxFrom.Text)) {
     38        errorProvider.SetError(textBoxFrom, "'From' must not be empty.");
     39        e.Cancel = true;
     40      } else {
     41        errorProvider.SetError(textBoxFrom, null);
     42      }
     43    }
     44
     45    private void textBoxTo_Validating(object sender, CancelEventArgs e) {
     46      if (string.IsNullOrWhiteSpace(textBoxTo.Text)) {
     47        errorProvider.SetError(textBoxTo, "'To' must not be empty.");
     48        e.Cancel = true;
     49      } else {
     50        errorProvider.SetError(textBoxTo, null);
     51      }
     52    }
    3553  }
    3654}
Note: See TracChangeset for help on using the changeset viewer.