Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/28/10 00:38:56 (14 years ago)
Author:
swagner
Message:

Worked on flexible coloring of data rows and on changing the initial index from 1 to 0 (#925)

File:
1 edited

Legend:

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

    r4644 r4648  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using System.Drawing;
    2526
    2627namespace HeuristicLab.Analysis {
     
    3940    #endregion
    4041
    41     [Storable(DefaultValue = DataRowChartType.Line)]
    4242    private DataRowChartType chartType;
    4343    public DataRowChartType ChartType {
     
    5050      }
    5151    }
    52     [Storable(DefaultValue = false)]
    5352    private bool secondYAxis;
    5453    public bool SecondYAxis {
     
    6160      }
    6261    }
     62    private Color color;
     63    public Color Color {
     64      get { return color; }
     65      set {
     66        if (color != value) {
     67          color = value;
     68          OnPropertyChanged("Color");
     69        }
     70      }
     71    }
     72    private bool startIndexZero;
     73    public bool StartIndexZero {
     74      get { return startIndexZero; }
     75      set {
     76        if (startIndexZero != value) {
     77          startIndexZero = value;
     78          OnPropertyChanged("StartIndexZero");
     79        }
     80      }
     81    }
     82
     83    #region Persistence Properties
     84    [Storable(Name = "ChartType")]
     85    private DataRowChartType StorableChartType {
     86      get { return chartType; }
     87      set { chartType = value; }
     88    }
     89    [Storable(Name = "SecondYAxis")]
     90    private bool StorableSecondYAxis {
     91      get { return secondYAxis; }
     92      set { secondYAxis = value; }
     93    }
     94    [Storable(Name = "Color")]
     95    private Color StorableColor {
     96      get { return color; }
     97      set { color = value; }
     98    }
     99    [Storable(Name = "StartIndexZero")]
     100    private bool StorableStartIndexZero {
     101      get { return startIndexZero; }
     102      set { startIndexZero = value; }
     103    }
     104    #endregion
    63105
    64106    public DataRowVisualProperties() {
    65107      chartType = DataRowChartType.Line;
    66108      secondYAxis = false;
     109      color = Color.Empty;
     110      startIndexZero = false;
    67111    }
    68     public DataRowVisualProperties(DataRowChartType chartType, bool secondYAxis) {
     112    public DataRowVisualProperties(DataRowChartType chartType, bool secondYAxis, Color color, bool startIndexZero) {
    69113      this.chartType = chartType;
    70114      this.secondYAxis = secondYAxis;
     115      this.color = color;
     116      this.startIndexZero = startIndexZero;
    71117    }
    72118    [StorableConstructor]
     
    77123      clone.chartType = chartType;
    78124      clone.secondYAxis = secondYAxis;
     125      clone.color = color;
     126      clone.startIndexZero = startIndexZero;
    79127      return clone;
    80128    }
Note: See TracChangeset for help on using the changeset viewer.