Changeset 5150 for trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs
- Timestamp:
- 12/21/10 16:08:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs
r4722 r5150 53 53 else 54 54 columnNames = new List<string>(value); 55 OnColumnNamesChanged(); 55 56 } 56 57 } … … 67 68 else 68 69 rowNames = new List<string>(value); 70 OnRowNamesChanged(); 69 71 } 70 72 } … … 94 96 while (rowNames.Count < value) 95 97 rowNames.Add("Row " + rowNames.Count); 98 OnRowsChanged(); 99 OnRowNamesChanged(); 96 100 OnReset(); 97 101 } … … 111 115 while (columnNames.Count < value) 112 116 columnNames.Add("Column " + columnNames.Count); 117 OnColumnsChanged(); 118 OnColumnNamesChanged(); 113 119 OnReset(); 114 120 } … … 167 173 } 168 174 protected StringMatrix(int rows, int columns, IEnumerable<string> columnNames, IEnumerable<string> rowNames) 169 : this(rows, columns, columnNames) {175 : this(rows, columns, columnNames) { 170 176 RowNames = rowNames; 171 177 } … … 186 192 ColumnNames = columnNames; 187 193 } 188 protected StringMatrix(string[,] elements, IEnumerable<string> columnNames, IEnumerable<string> rowNames)189 : this(elements, columnNames) {194 protected StringMatrix(string[,] elements, IEnumerable<string> columnNames, IEnumerable<string> rowNames) 195 : this(elements, columnNames) { 190 196 RowNames = rowNames; 191 197 } … … 245 251 } 246 252 253 #region events 254 public event EventHandler ColumnsChanged; 255 protected virtual void OnColumnsChanged() { 256 EventHandler handler = ColumnsChanged; 257 if (handler != null) 258 handler(this, EventArgs.Empty); 259 } 260 public event EventHandler RowsChanged; 261 protected virtual void OnRowsChanged() { 262 EventHandler handler = RowsChanged; 263 if (handler != null) 264 handler(this, EventArgs.Empty); 265 } 247 266 public event EventHandler ColumnNamesChanged; 248 267 protected virtual void OnColumnNamesChanged() { … … 275 294 OnToStringChanged(); 276 295 } 296 #endregion 277 297 278 298 #region IStringConvertibleMatrix Members
Note: See TracChangeset
for help on using the changeset viewer.