Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/11/13 16:47:11 (11 years ago)
Author:
sforsten
Message:

#2018:

  • renamed the structs and methods in IStringConvertibleMatrix
  • added MatrixValuesChangedEventArgs in IStringConvertibleMatrix
  • added methods SetValues(MatrixValues<T>) in ValueTypeMatrix
  • fixed bugs in StringConvertibleMatrixView: DataGridView has now at least one column and dataGridView_CellValidating does not set e.Cancel to true anymore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ImprovingStringConvertibleMatrix/HeuristicLab.Data/3.3/Interfaces/IStringConvertibleMatrix.cs

    r9286 r9306  
    3737    string GetValue(int rowIndex, int columnIndex);
    3838    bool SetValue(string value, int rowIndex, int columnIndex);
    39     bool SetValue(RowColumnValue rowColumnValue);
    40     bool SetValue(IEnumerable<RowColumnValue> rowColumnValues);
     39    bool SetValue(MatrixValue<string> matrixValue);
     40    bool SetValues(IEnumerable<MatrixValue<string>> matrixValues);
    4141
    4242    event EventHandler ColumnsChanged;
     
    4545    event EventHandler RowNamesChanged;
    4646    event EventHandler SortableViewChanged;
    47     event EventHandler<EventArgs<IEnumerable<Position>>> ItemsChanged;
     47    event EventHandler<MatrixValuesChangedEventArgs> ItemsChanged;
    4848    event EventHandler Reset;
    4949  }
    50   public struct Position {
    51     public readonly int Row, Column;
    52     public Position(int row, int column) {
     50  public class MatrixValuesChangedEventArgs : EventArgs<IEnumerable<MatrixPosition>> {
     51    public MatrixValuesChangedEventArgs(IEnumerable<MatrixPosition> matrixPositions) : base(matrixPositions) { }
     52  }
     53  public struct MatrixPosition {
     54    public int Row { get; private set; }
     55    public int Column { get; private set; }
     56    public MatrixPosition(int row, int column)
     57      : this() {
    5358      Row = row;
    5459      Column = column;
    5560    }
    5661  }
    57   public struct RowColumnValue {
    58     public readonly Position Position;
    59     public readonly string Value;
     62  public struct MatrixValue<T> {
     63    public MatrixPosition Position { get; private set; }
     64    public T Value { get; private set; }
    6065
    61     public RowColumnValue(Position position, string value) {
     66    public MatrixValue(MatrixPosition position, T value)
     67      : this() {
    6268      Position = position;
    6369      Value = value;
Note: See TracChangeset for help on using the changeset viewer.