Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/08/19 15:55:01 (6 years ago)
Author:
chaider
Message:

#2971 use methodes to operate on IntervalCollection dictionary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalCollectionView.cs

    r16921 r16927  
    6969
    7070
    71       var variablesCount = Content.getIntervals().Count;
     71      var variablesCount = Content.GetIntervals().Count;
    7272
    7373      DataGridViewRow[] rows = new DataGridViewRow[variablesCount];
     
    9393      for (var i = 0; i < dataGridView.RowCount; ++i) {
    9494        var key = (string)dataGridView.Rows[i].HeaderCell.Value;
    95         dataGridView.Rows[i].Cells[0].Value = Content.getInterval(key).LowerBound;
    96         dataGridView.Rows[i].Cells[1].Value = Content.getInterval(key).UpperBound;
     95        dataGridView.Rows[i].Cells[0].Value = Content.GetInterval(key).LowerBound;
     96        dataGridView.Rows[i].Cells[1].Value = Content.GetInterval(key).UpperBound;
    9797      }
    9898    }
    9999
    100100    private void SetRowsHeader() {
    101       for (var i = 0; i < Content.getIntervals().Count; ++i) {
    102         var item = Content.getIntervals().ElementAt(i);
     101      for (var i = 0; i < Content.GetIntervals().Count; ++i) {
     102        var item = Content.GetIntervals().ElementAt(i);
    103103        dataGridView.Rows[i].HeaderCell.Value = item.Key;
    104104      }
     
    115115      if (e.ColumnIndex < 0 || e.RowIndex < 0) return;
    116116
    117       var lowerBound = e.ColumnIndex == 0 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.getInterval(key).LowerBound;
    118       var upperBound = e.ColumnIndex == 1 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.getInterval(key).UpperBound;
     117      var lowerBound = e.ColumnIndex == 0 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.GetInterval(key).LowerBound;
     118      var upperBound = e.ColumnIndex == 1 ? double.Parse(dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) : Content.GetInterval(key).UpperBound;
    119119
    120120      // update if there was a change
    121       if (lowerBound != Content.getInterval(key).LowerBound ||
    122         upperBound != Content.getInterval(key).UpperBound)
    123         Content.VariableIntervals[key] = new Interval(lowerBound, upperBound);
     121      if (lowerBound != Content.GetInterval(key).LowerBound ||
     122        upperBound != Content.GetInterval(key).UpperBound)
     123        Content.SetInterval(key, new Interval(lowerBound, upperBound));
    124124    }
    125125
Note: See TracChangeset for help on using the changeset viewer.