Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Analysis
- Property svn:mergeinfo changed
-
branches/PersistenceSpeedUp/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs
r5445 r6760 20 20 #endregion 21 21 22 using System; 22 23 using System.ComponentModel; 23 24 using System.Drawing; … … 36 37 Columns, 37 38 Points, 38 Bars 39 Bars, 40 Histogram 41 } 42 #endregion 43 #region LineStyle 44 public enum DataRowLineStyle { 45 Dash, 46 DashDot, 47 DashDotDot, 48 Dot, 49 NotSet, 50 Solid 39 51 } 40 52 #endregion … … 60 72 } 61 73 } 74 private bool secondXAxis; 75 public bool SecondXAxis { 76 get { return secondXAxis; } 77 set { 78 if (secondXAxis != value) { 79 secondXAxis = value; 80 OnPropertyChanged("SecondXAxis"); 81 } 82 } 83 } 62 84 private Color color; 63 85 public Color Color { … … 70 92 } 71 93 } 94 private DataRowLineStyle lineStyle; 95 public DataRowLineStyle LineStyle { 96 get { return lineStyle; } 97 set { 98 if (lineStyle != value) { 99 lineStyle = value; 100 OnPropertyChanged("LineStyle"); 101 } 102 } 103 } 72 104 private bool startIndexZero; 73 105 public bool StartIndexZero { … … 77 109 startIndexZero = value; 78 110 OnPropertyChanged("StartIndexZero"); 111 } 112 } 113 } 114 private int lineWidth; 115 public int LineWidth { 116 get { return lineWidth; } 117 set { 118 if (lineWidth != value) { 119 lineWidth = value; 120 OnPropertyChanged("LineWidth"); 121 } 122 } 123 } 124 private int bins; 125 public int Bins { 126 get { return bins; } 127 set { 128 if (bins != value) { 129 bins = value; 130 OnPropertyChanged("Bins"); 131 } 132 } 133 } 134 private bool exactBins; 135 public bool ExactBins { 136 get { return exactBins; } 137 set { 138 if (exactBins != value) { 139 exactBins = value; 140 OnPropertyChanged("ExactBins"); 141 } 142 } 143 } 144 private string displayName; 145 public string DisplayName { 146 get { return displayName == null ? String.Empty : displayName; } 147 set { 148 if (displayName != value) { 149 if (value == null && displayName != String.Empty) { 150 displayName = String.Empty; 151 OnPropertyChanged("DisplayName"); 152 } else if (value != null) { 153 displayName = value; 154 OnPropertyChanged("DisplayName"); 155 } 79 156 } 80 157 } … … 92 169 set { secondYAxis = value; } 93 170 } 171 [Storable(Name = "SecondXAxis")] 172 private bool StorableSecondXAxis { 173 get { return secondXAxis; } 174 set { secondXAxis = value; } 175 } 94 176 [Storable(Name = "Color")] 95 177 private Color StorableColor { … … 97 179 set { color = value; } 98 180 } 181 [Storable(Name = "LineStyle")] 182 private DataRowLineStyle StorableLineStyle { 183 get { return lineStyle; } 184 set { lineStyle = value; } 185 } 99 186 [Storable(Name = "StartIndexZero")] 100 187 private bool StorableStartIndexZero { 101 188 get { return startIndexZero; } 102 189 set { startIndexZero = value; } 190 } 191 [Storable(Name = "LineWidth")] 192 private int StorableLineWidth { 193 get { return lineWidth; } 194 set { lineWidth = value; } 195 } 196 [Storable(Name = "Bins")] 197 private int StorableBins { 198 get { return bins; } 199 set { bins = value; } 200 } 201 [Storable(Name = "ExactBins")] 202 private bool StorableExactBins { 203 get { return exactBins; } 204 set { exactBins = value; } 205 } 206 [Storable(Name = "DisplayName")] 207 private string StorableDisplayName { 208 get { return displayName; } 209 set { displayName = value; } 103 210 } 104 211 #endregion … … 110 217 this.chartType = original.chartType; 111 218 this.secondYAxis = original.secondYAxis; 219 this.secondXAxis = original.secondXAxis; 112 220 this.color = original.color; 221 this.lineStyle = original.lineStyle; 113 222 this.startIndexZero = original.startIndexZero; 223 this.lineWidth = original.lineWidth; 224 this.bins = original.bins; 225 this.exactBins = original.exactBins; 226 this.displayName = original.displayName; 114 227 } 115 228 public DataRowVisualProperties() { 116 229 chartType = DataRowChartType.Line; 117 230 secondYAxis = false; 231 secondXAxis = false; 118 232 color = Color.Empty; 233 lineStyle = DataRowLineStyle.Solid; 119 234 startIndexZero = false; 235 lineWidth = 1; 236 bins = 10; 237 exactBins = false; 238 displayName = String.Empty; 239 } 240 public DataRowVisualProperties(string displayName) 241 : this() { 242 this.displayName = displayName; 120 243 } 121 244 … … 129 252 if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); 130 253 } 254 255 [StorableHook(HookType.AfterDeserialization)] 256 private void AfterDeserialization() { 257 // BackwardsCompatibility3.3 258 #region Backwards compatible code, remove with 3.4 259 if (secondXAxis == default(bool) 260 && lineStyle == default(DataRowLineStyle) 261 && lineWidth == default(int) && bins == default(int) && exactBins == default(bool) 262 && displayName == default(string)) { 263 secondXAxis = false; 264 lineStyle = DataRowLineStyle.Solid; 265 lineWidth = 1; 266 bins = 10; 267 exactBins = false; 268 displayName = String.Empty; 269 } 270 #endregion 271 } 131 272 } 132 273 }
Note: See TracChangeset
for help on using the changeset viewer.