Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/11/12 00:25:26 (12 years ago)
Author:
swagner
Message:

Added enhanced version of ScatterPlot (#1892)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/DataTable.cs

    r7259 r8280  
    5959    public NamedItemCollection<DataRow> Rows {
    6060      get { return rows; }
     61      private set {
     62        if (rows != null) throw new InvalidOperationException("Rows already set");
     63        rows = value;
     64        if (rows != null) RegisterRowsEvents();
     65      }
    6166    }
    6267
     
    7378    private IEnumerable<DataRow> StorableRows {
    7479      get { return rows; }
    75       set { rows = new NamedItemCollection<DataRow>(value); }
     80      set { Rows = new NamedItemCollection<DataRow>(value); }
    7681    }
    7782    #endregion
     
    8186    protected DataTable(DataTable original, Cloner cloner)
    8287      : base(original, cloner) {
    83       this.VisualProperties = (DataTableVisualProperties)cloner.Clone(original.visualProperties);
    84       this.rows = cloner.Clone(original.rows);
    85       this.RegisterRowsEvents();
     88      VisualProperties = (DataTableVisualProperties)cloner.Clone(original.visualProperties);
     89      Rows = cloner.Clone(original.rows);
    8690    }
    8791    public DataTable()
    8892      : base() {
    8993      VisualProperties = new DataTableVisualProperties();
    90       rows = new NamedItemCollection<DataRow>();
    91       this.RegisterRowsEvents();
     94      Rows = new NamedItemCollection<DataRow>();
    9295    }
    9396    public DataTable(string name)
    9497      : base(name) {
    9598      VisualProperties = new DataTableVisualProperties(name);
    96       rows = new NamedItemCollection<DataRow>();
    97       this.RegisterRowsEvents();
     99      Rows = new NamedItemCollection<DataRow>();
    98100    }
    99101    public DataTable(string name, string description)
    100102      : base(name, description) {
    101103      VisualProperties = new DataTableVisualProperties(name);
    102       rows = new NamedItemCollection<DataRow>();
    103       this.RegisterRowsEvents();
     104      Rows = new NamedItemCollection<DataRow>();
    104105    }
    105106
     
    217218    }
    218219    IEnumerable<string> IStringConvertibleMatrix.RowNames {
    219       get { return new List<string>(); }
     220      get { return Enumerable.Empty<string>(); }
    220221      set { throw new NotSupportedException(); }
    221222    }
Note: See TracChangeset for help on using the changeset viewer.