Changeset 6032


Ignore:
Timestamp:
04/19/11 17:47:26 (9 years ago)
Author:
abeham
Message:

#1465

  • updated from trunk
  • fixed the bug regarding the -1 x-axis start
Location:
branches/histogram
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.Analysis

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r6020 r6032  
    137137          AddDataRow(row);
    138138        ConfigureChartArea(chart.ChartAreas[0]);
     139        RecalculateAxesScale(chart.ChartAreas[0]);
    139140      }
    140141    }
     
    155156
    156157      chart.Series.Add(series);
    157       chart.ChartAreas[0].RecalculateAxesScale();
    158158      ConfigureChartArea(chart.ChartAreas[0]);
     159      RecalculateAxesScale(chart.ChartAreas[0]);
    159160      UpdateYCursorInterval();
    160161    }
     
    208209
    209210    private void ConfigureChartArea(ChartArea area) {
    210       if (Content.VisualProperties.TitleFont != null)
    211         chart.Titles[0].Font = Content.VisualProperties.TitleFont;
    212       if (!Content.VisualProperties.TitleColor.IsEmpty)
    213         chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor;
    214 
    215       if (Content.VisualProperties.AxisTitleFont != null)
    216         area.AxisX.TitleFont = Content.VisualProperties.AxisTitleFont;
    217       if (!Content.VisualProperties.AxisTitleColor.IsEmpty)
    218         area.AxisX.TitleForeColor = Content.VisualProperties.AxisTitleColor;
     211      if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont;
     212      if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor;
     213
     214      if (Content.VisualProperties.AxisTitleFont != null) area.AxisX.TitleFont = Content.VisualProperties.AxisTitleFont;
     215      if (!Content.VisualProperties.AxisTitleColor.IsEmpty) area.AxisX.TitleForeColor = Content.VisualProperties.AxisTitleColor;
    219216      area.AxisX.Title = Content.VisualProperties.XAxisTitle;
    220217
    221       if (Content.VisualProperties.AxisTitleFont != null)
    222         area.AxisX2.TitleFont = Content.VisualProperties.AxisTitleFont;
    223       if (!Content.VisualProperties.AxisTitleColor.IsEmpty)
    224         area.AxisX2.TitleForeColor = Content.VisualProperties.AxisTitleColor;
     218      if (Content.VisualProperties.AxisTitleFont != null) area.AxisX2.TitleFont = Content.VisualProperties.AxisTitleFont;
     219      if (!Content.VisualProperties.AxisTitleColor.IsEmpty) area.AxisX2.TitleForeColor = Content.VisualProperties.AxisTitleColor;
    225220      area.AxisX2.Title = Content.VisualProperties.SecondXAxisTitle;
    226221
    227       if (Content.VisualProperties.AxisTitleFont != null)
    228         area.AxisY.TitleFont = Content.VisualProperties.AxisTitleFont;
    229       if (!Content.VisualProperties.AxisTitleColor.IsEmpty)
    230         area.AxisY.TitleForeColor = Content.VisualProperties.AxisTitleColor;
     222      if (Content.VisualProperties.AxisTitleFont != null) area.AxisY.TitleFont = Content.VisualProperties.AxisTitleFont;
     223      if (!Content.VisualProperties.AxisTitleColor.IsEmpty) area.AxisY.TitleForeColor = Content.VisualProperties.AxisTitleColor;
    231224      area.AxisY.Title = Content.VisualProperties.YAxisTitle;
    232225
    233       if (Content.VisualProperties.AxisTitleFont != null)
    234         area.AxisY2.TitleFont = Content.VisualProperties.AxisTitleFont;
    235       if (!Content.VisualProperties.AxisTitleColor.IsEmpty)
    236         area.AxisY2.TitleForeColor = Content.VisualProperties.AxisTitleColor;
     226      if (Content.VisualProperties.AxisTitleFont != null) area.AxisY2.TitleFont = Content.VisualProperties.AxisTitleFont;
     227      if (!Content.VisualProperties.AxisTitleColor.IsEmpty) area.AxisY2.TitleForeColor = Content.VisualProperties.AxisTitleColor;
    237228      area.AxisY2.Title = Content.VisualProperties.SecondYAxisTitle;
    238 
     229    }
     230
     231    private void RecalculateAxesScale(ChartArea area) {
     232      // Reset the axes bounds so that RecalculateAxesScale() will assign new bounds
     233      foreach (Axis a in area.Axes) {
     234        a.Minimum = double.NaN;
     235        a.Maximum = double.NaN;
     236      }
    239237      area.RecalculateAxesScale();
    240       area.AxisX.Minimum = Content.VisualProperties.XAxisMinimumFixedValue;
    241       area.AxisX.Maximum = Content.VisualProperties.XAxisMaximumFixedValue;
    242       area.AxisX2.Minimum = Content.VisualProperties.SecondXAxisMinimumFixedValue;
    243       area.AxisX2.Maximum = Content.VisualProperties.SecondXAxisMaximumFixedValue;
    244       area.AxisY.Minimum = Content.VisualProperties.YAxisMinimumFixedValue;
    245       area.AxisY.Maximum = Content.VisualProperties.YAxisMaximumFixedValue;
    246       area.AxisY2.Minimum = Content.VisualProperties.SecondYAxisMinimumFixedValue;
    247       area.AxisY2.Maximum = Content.VisualProperties.SecondYAxisMaximumFixedValue;
     238
     239      if (!Content.VisualProperties.XAxisMinimumAuto && !double.IsNaN(Content.VisualProperties.XAxisMinimumFixedValue)) area.AxisX.Minimum = Content.VisualProperties.XAxisMinimumFixedValue;
     240      #region Workaround for bug in RecalculateAxesScale() that would assign -1
     241      else {
     242        if (area.AxisX.IsStartedFromZero
     243        && chart.Series.Where(x => x.XAxisType == AxisType.Primary).Any()
     244        && chart.Series.Where(x => x.XAxisType == AxisType.Primary).SelectMany(x => x.Points).Any()) {
     245          double minX = chart.Series.Where(x => x.XAxisType == AxisType.Primary).SelectMany(x => x.Points).Select(x => x.XValue).Min();
     246          if (minX >= 0 && area.AxisX.Minimum < 0) area.AxisX.Minimum = 0;
     247        }
     248      }
     249      #endregion
     250      if (!Content.VisualProperties.XAxisMaximumAuto && !double.IsNaN(Content.VisualProperties.XAxisMaximumFixedValue)) area.AxisX.Maximum = Content.VisualProperties.XAxisMaximumFixedValue;
     251      if (!Content.VisualProperties.SecondXAxisMinimumAuto && !double.IsNaN(Content.VisualProperties.SecondXAxisMinimumFixedValue)) area.AxisX2.Minimum = Content.VisualProperties.SecondXAxisMinimumFixedValue;
     252      #region Workaround for bug in RecalculateAxesScale() that would assign -1
     253      else {
     254        if (area.AxisX2.IsStartedFromZero
     255         && chart.Series.Where(x => x.XAxisType == AxisType.Secondary).Any()
     256         && chart.Series.Where(x => x.XAxisType == AxisType.Secondary).SelectMany(x => x.Points).Any()) {
     257          double minX2 = chart.Series.Where(x => x.XAxisType == AxisType.Secondary).SelectMany(x => x.Points).Select(x => x.XValue).Min();
     258          if (minX2 >= 0 && area.AxisX2.Minimum < 0) area.AxisX2.Minimum = 0;
     259        }
     260      }
     261      #endregion
     262      if (!Content.VisualProperties.SecondXAxisMaximumAuto && !double.IsNaN(Content.VisualProperties.SecondXAxisMaximumFixedValue)) area.AxisX2.Maximum = Content.VisualProperties.SecondXAxisMaximumFixedValue;
     263      if (!Content.VisualProperties.YAxisMinimumAuto && !double.IsNaN(Content.VisualProperties.YAxisMinimumFixedValue)) area.AxisY.Minimum = Content.VisualProperties.YAxisMinimumFixedValue;
     264      if (!Content.VisualProperties.YAxisMaximumAuto && !double.IsNaN(Content.VisualProperties.YAxisMaximumFixedValue)) area.AxisY.Maximum = Content.VisualProperties.YAxisMaximumFixedValue;
     265      if (!Content.VisualProperties.SecondYAxisMinimumAuto && !double.IsNaN(Content.VisualProperties.SecondYAxisMinimumFixedValue)) area.AxisY2.Minimum = Content.VisualProperties.SecondYAxisMinimumFixedValue;
     266      if (!Content.VisualProperties.SecondYAxisMaximumAuto && !double.IsNaN(Content.VisualProperties.SecondYAxisMaximumFixedValue)) area.AxisY2.Maximum = Content.VisualProperties.SecondYAxisMaximumFixedValue;
     267      if (area.AxisX.Minimum > area.AxisX.Maximum) area.AxisX.Maximum = area.AxisX.Minimum + 1;
     268      if (area.AxisX2.Minimum > area.AxisX2.Maximum) area.AxisX2.Maximum = area.AxisX2.Minimum + 1;
     269      if (area.AxisY.Minimum > area.AxisY.Maximum) area.AxisY.Maximum = area.AxisY.Minimum + 1;
     270      if (area.AxisY2.Minimum > area.AxisY2.Maximum) area.AxisY2.Maximum = area.AxisY2.Minimum + 1;
    248271    }
    249272
     
    278301      if (invisibleSeries.Contains(series))
    279302        invisibleSeries.Remove(series);
    280       chart.ChartAreas[0].RecalculateAxesScale();
     303      RecalculateAxesScale(chart.ChartAreas[0]);
    281304    }
    282305
     
    296319      else {
    297320        ConfigureChartArea(chart.ChartAreas[0]);
     321        RecalculateAxesScale(chart.ChartAreas[0]); // axes min/max could have changed
    298322      }
    299323    }
     
    359383        ConfigureSeries(series, row);
    360384        FillSeriesWithRowValues(series, row);
    361         chart.ChartAreas[0].RecalculateAxesScale();
     385        RecalculateAxesScale(chart.ChartAreas[0]);
    362386      }
    363387    }
     
    383407            rowSeries.Points.Clear();
    384408            FillSeriesWithRowValues(rowSeries, row);
     409            RecalculateAxesScale(chart.ChartAreas[0]);
    385410            UpdateYCursorInterval();
    386411          }
     
    399424            rowSeries.Points.Clear();
    400425            FillSeriesWithRowValues(rowSeries, row);
     426            RecalculateAxesScale(chart.ChartAreas[0]);
    401427            UpdateYCursorInterval();
    402428          }
     
    426452              }
    427453            }
     454            RecalculateAxesScale(chart.ChartAreas[0]);
    428455            UpdateYCursorInterval();
    429456          }
     
    442469            rowSeries.Points.Clear();
    443470            FillSeriesWithRowValues(rowSeries, row);
     471            RecalculateAxesScale(chart.ChartAreas[0]);
    444472            UpdateYCursorInterval();
    445473          }
     
    459487            rowSeries.Points.Clear();
    460488            FillSeriesWithRowValues(rowSeries, row);
     489            RecalculateAxesScale(chart.ChartAreas[0]);
    461490            UpdateYCursorInterval();
    462491          }
     
    511540          FillSeriesWithRowValues(series, row);
    512541          this.chart.Legends[series.Legend].ForeColor = Color.Black;
     542          RecalculateAxesScale(chart.ChartAreas[0]);
    513543          UpdateYCursorInterval();
    514544        }
     
    580610      else rounding = 10;
    581611      return rounding * base10;
     612    }
     613
     614    private double HumanRoundMax(double max) {
     615      double base10;
     616      if (max > 0) base10 = Math.Pow(10.0, Math.Floor(Math.Log10(max)));
     617      else base10 = Math.Pow(10.0, Math.Ceiling(Math.Log10(-max)));
     618      double rounding = (max > 0) ? base10 : -base10;
     619      while (rounding < max) rounding += base10;
     620      return rounding;
    582621    }
    583622
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.Designer.cs

    r6020 r6032  
    145145      this.yAxisPrimaryTitleTextBox.Location = new System.Drawing.Point(63, 23);
    146146      this.yAxisPrimaryTitleTextBox.Name = "yAxisPrimaryTitleTextBox";
    147       this.yAxisPrimaryTitleTextBox.Size = new System.Drawing.Size(243, 20);
     147      this.yAxisPrimaryTitleTextBox.Size = new System.Drawing.Size(221, 20);
    148148      this.yAxisPrimaryTitleTextBox.TabIndex = 1;
    149149      this.yAxisPrimaryTitleTextBox.Validated += new System.EventHandler(this.yPrimaryTitleTextBox_Validated);
     
    207207      this.xAxisPrimaryTitleTextBox.Location = new System.Drawing.Point(63, 23);
    208208      this.xAxisPrimaryTitleTextBox.Name = "xAxisPrimaryTitleTextBox";
    209       this.xAxisPrimaryTitleTextBox.Size = new System.Drawing.Size(245, 20);
     209      this.xAxisPrimaryTitleTextBox.Size = new System.Drawing.Size(221, 20);
    210210      this.xAxisPrimaryTitleTextBox.TabIndex = 1;
    211211      this.xAxisPrimaryTitleTextBox.Validated += new System.EventHandler(this.xPrimaryTitleTextBox_Validated);
     
    234234      this.xAxisPrimaryMaximumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    235235      this.xAxisPrimaryMaximumFixedTextBox.Name = "xAxisPrimaryMaximumFixedTextBox";
    236       this.xAxisPrimaryMaximumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     236      this.xAxisPrimaryMaximumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    237237      this.xAxisPrimaryMaximumFixedTextBox.TabIndex = 2;
    238238      this.xAxisPrimaryMaximumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.xAxisPrimaryMaximumFixedTextBox_Validating);
     
    276276      this.xAxisPrimaryMinimumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    277277      this.xAxisPrimaryMinimumFixedTextBox.Name = "xAxisPrimaryMinimumFixedTextBox";
    278       this.xAxisPrimaryMinimumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     278      this.xAxisPrimaryMinimumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    279279      this.xAxisPrimaryMinimumFixedTextBox.TabIndex = 2;
    280280      this.xAxisPrimaryMinimumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.xAxisPrimaryMinimumFixedTextBox_Validating);
     
    334334      this.xAxisSecondaryTitleTextBox.Location = new System.Drawing.Point(63, 23);
    335335      this.xAxisSecondaryTitleTextBox.Name = "xAxisSecondaryTitleTextBox";
    336       this.xAxisSecondaryTitleTextBox.Size = new System.Drawing.Size(245, 20);
     336      this.xAxisSecondaryTitleTextBox.Size = new System.Drawing.Size(221, 20);
    337337      this.xAxisSecondaryTitleTextBox.TabIndex = 1;
    338338      this.xAxisSecondaryTitleTextBox.Validated += new System.EventHandler(this.xSecondaryTitleTextBox_Validated);
     
    370370      this.xAxisSecondaryMaximumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    371371      this.xAxisSecondaryMaximumFixedTextBox.Name = "xAxisSecondaryMaximumFixedTextBox";
    372       this.xAxisSecondaryMaximumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     372      this.xAxisSecondaryMaximumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    373373      this.xAxisSecondaryMaximumFixedTextBox.TabIndex = 2;
    374374      this.xAxisSecondaryMaximumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.xAxisSecondaryMaximumFixedTextBox_Validating);
     
    412412      this.xAxisSecondaryMinimumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    413413      this.xAxisSecondaryMinimumFixedTextBox.Name = "xAxisSecondaryMinimumFixedTextBox";
    414       this.xAxisSecondaryMinimumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     414      this.xAxisSecondaryMinimumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    415415      this.xAxisSecondaryMinimumFixedTextBox.TabIndex = 2;
    416416      this.xAxisSecondaryMinimumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.xAxisSecondaryMinimumFixedTextBox_Validating);
     
    596596      this.yAxisSecondaryMaximumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    597597      this.yAxisSecondaryMaximumFixedTextBox.Name = "yAxisSecondaryMaximumFixedTextBox";
    598       this.yAxisSecondaryMaximumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     598      this.yAxisSecondaryMaximumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    599599      this.yAxisSecondaryMaximumFixedTextBox.TabIndex = 2;
    600600      this.yAxisSecondaryMaximumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.yAxisSecondaryMaximumFixedTextBox_Validating);
     
    638638      this.yAxisSecondaryMinimumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    639639      this.yAxisSecondaryMinimumFixedTextBox.Name = "yAxisSecondaryMinimumFixedTextBox";
    640       this.yAxisSecondaryMinimumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     640      this.yAxisSecondaryMinimumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    641641      this.yAxisSecondaryMinimumFixedTextBox.TabIndex = 2;
    642642      this.yAxisSecondaryMinimumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.yAxisSecondaryMinimumFixedTextBox_Validating);
     
    713713      this.yAxisPrimaryMaximumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    714714      this.yAxisPrimaryMaximumFixedTextBox.Name = "yAxisPrimaryMaximumFixedTextBox";
    715       this.yAxisPrimaryMaximumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     715      this.yAxisPrimaryMaximumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    716716      this.yAxisPrimaryMaximumFixedTextBox.TabIndex = 2;
    717717      this.yAxisPrimaryMaximumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.yAxisPrimaryMaximumFixedTextBox_Validating);
     
    755755      this.yAxisPrimaryMinimumFixedTextBox.Location = new System.Drawing.Point(126, 2);
    756756      this.yAxisPrimaryMinimumFixedTextBox.Name = "yAxisPrimaryMinimumFixedTextBox";
    757       this.yAxisPrimaryMinimumFixedTextBox.Size = new System.Drawing.Size(117, 20);
     757      this.yAxisPrimaryMinimumFixedTextBox.Size = new System.Drawing.Size(95, 20);
    758758      this.yAxisPrimaryMinimumFixedTextBox.TabIndex = 2;
    759759      this.yAxisPrimaryMinimumFixedTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.yAxisPrimaryMinimumFixedTextBox_Validating);
  • branches/histogram/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.cs

    r6020 r6032  
    161161        double val;
    162162        if (double.TryParse(tb.Text, out val)) {
    163           Content.XAxisMinimumFixedValue = val;
    164           errorProvider.SetError(tb, string.Empty);
     163          if (val >= Content.XAxisMaximumFixedValue) {
     164            errorProvider.SetError(tb, "Number must be smaller than maximum.");
     165            e.Cancel = true;
     166          } else {
     167            Content.XAxisMinimumFixedValue = val;
     168            errorProvider.SetError(tb, string.Empty);
     169          }
    165170        } else {
    166171          errorProvider.SetError(tb, "Not a valid number.");
     
    175180        double val;
    176181        if (double.TryParse(tb.Text, out val)) {
    177           Content.XAxisMaximumFixedValue = val;
    178           errorProvider.SetError(tb, string.Empty);
     182          if (val <= Content.XAxisMinimumFixedValue) {
     183            errorProvider.SetError(tb, "Number must be greater than minimum.");
     184            e.Cancel = true;
     185          } else {
     186            Content.XAxisMaximumFixedValue = val;
     187            errorProvider.SetError(tb, string.Empty);
     188          }
    179189        } else {
    180190          errorProvider.SetError(tb, "Not a valid number.");
     
    189199        double val;
    190200        if (double.TryParse(tb.Text, out val)) {
    191           Content.SecondXAxisMinimumFixedValue = val;
    192           errorProvider.SetError(tb, string.Empty);
     201          if (val >= Content.SecondXAxisMaximumFixedValue) {
     202            errorProvider.SetError(tb, "Number must be smaller than maximum.");
     203            e.Cancel = true;
     204          } else {
     205            Content.SecondXAxisMinimumFixedValue = val;
     206            errorProvider.SetError(tb, string.Empty);
     207          }
    193208        } else {
    194209          errorProvider.SetError(tb, "Not a valid number.");
     
    203218        double val;
    204219        if (double.TryParse(tb.Text, out val)) {
    205           Content.SecondXAxisMaximumFixedValue = val;
    206           errorProvider.SetError(tb, string.Empty);
     220          if (val <= Content.SecondXAxisMinimumFixedValue) {
     221            errorProvider.SetError(tb, "Number must be greater than minimum.");
     222            e.Cancel = true;
     223          } else {
     224            Content.SecondXAxisMaximumFixedValue = val;
     225            errorProvider.SetError(tb, string.Empty);
     226          }
    207227        } else {
    208228          errorProvider.SetError(tb, "Not a valid number.");
     
    217237        double val;
    218238        if (double.TryParse(tb.Text, out val)) {
    219           Content.YAxisMinimumFixedValue = val;
    220           errorProvider.SetError(tb, string.Empty);
     239          if (val >= Content.YAxisMaximumFixedValue) {
     240            errorProvider.SetError(tb, "Number must be smaller than maximum.");
     241            e.Cancel = true;
     242          } else {
     243            Content.YAxisMinimumFixedValue = val;
     244            errorProvider.SetError(tb, string.Empty);
     245          }
    221246        } else {
    222247          errorProvider.SetError(tb, "Not a valid number.");
     
    231256        double val;
    232257        if (double.TryParse(tb.Text, out val)) {
    233           Content.YAxisMaximumFixedValue = val;
    234           errorProvider.SetError(tb, string.Empty);
     258          if (val <= Content.YAxisMinimumFixedValue) {
     259            errorProvider.SetError(tb, "Number must be greater than minimum.");
     260            e.Cancel = true;
     261          } else {
     262            Content.YAxisMaximumFixedValue = val;
     263            errorProvider.SetError(tb, string.Empty);
     264          }
    235265        } else {
    236266          errorProvider.SetError(tb, "Not a valid number.");
     
    245275        double val;
    246276        if (double.TryParse(tb.Text, out val)) {
    247           Content.SecondYAxisMinimumFixedValue = val;
    248           errorProvider.SetError(tb, string.Empty);
     277          if (val >= Content.SecondYAxisMaximumFixedValue) {
     278            errorProvider.SetError(tb, "Number must be smaller than maximum.");
     279            e.Cancel = true;
     280          } else {
     281            Content.SecondYAxisMinimumFixedValue = val;
     282            errorProvider.SetError(tb, string.Empty);
     283          }
    249284        } else {
    250285          errorProvider.SetError(tb, "Not a valid number.");
     
    259294        double val;
    260295        if (double.TryParse(tb.Text, out val)) {
    261           Content.SecondYAxisMaximumFixedValue = val;
    262           errorProvider.SetError(tb, string.Empty);
     296          if (val <= Content.SecondYAxisMinimumFixedValue) {
     297            errorProvider.SetError(tb, "Number must be greater than minimum.");
     298            e.Cancel = true;
     299          } else {
     300            Content.SecondYAxisMaximumFixedValue = val;
     301            errorProvider.SetError(tb, string.Empty);
     302          }
    263303        } else {
    264304          errorProvider.SetError(tb, "Not a valid number.");
  • branches/histogram/HeuristicLab.Encodings.PermutationEncoding

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Parameters/3.3/ValueParameter.cs

    r5843 r6032  
    5454    public ValueParameter(string name, string description, T value) : base(name, description, value) { }
    5555    public ValueParameter(string name, string description, T value, bool getsCollected) : base(name, description, value, getsCollected) { }
     56                                                                                 
     57    protected T CreateDefaultValue() {
     58      Type type = typeof(T);
     59      if (type.IsAbstract) return null;
     60      ConstructorInfo defaultConstructor = type.GetConstructor(Type.EmptyTypes);
     61      if (defaultConstructor == null) return null;
    5662
    57     protected T CreateDefaultValue() {
    58       ConstructorInfo defaultConstructor = typeof(T).GetConstructor(Type.EmptyTypes);
    59       if (defaultConstructor != null)
    60         return (T)defaultConstructor.Invoke(new object[0]);
    61       return null;
     63      return (T)defaultConstructor.Invoke(new object[0]);
    6264    }
    6365
  • branches/histogram/HeuristicLab.Persistence

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Problems.DataAnalysis

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Problems.VehicleRouting

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/histogram/HeuristicLab.Problems.VehicleRouting.Views

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.