Changeset 3444
- Timestamp:
- 04/20/10 16:00:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3431 r3444 294 294 295 295 private void Sort() { 296 virtualRowIndizes = Sort(sortedColumnIndizes); 297 UpdateSortGlyph(); 298 dataGridView.Invalidate(); 299 } 300 protected virtual int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) { 296 301 int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray(); 297 if (sortedColumn Indizes.Count!= 0) {298 rowComparer.SortedIndizes = sortedColumn Indizes;302 if (sortedColumns.Count() != 0) { 303 rowComparer.SortedIndizes = sortedColumns; 299 304 rowComparer.Matrix = Content; 300 305 Array.Sort(newSortedIndex, rowComparer); 301 306 } 302 virtualRowIndizes = newSortedIndex; 303 UpdateSortGlyph(); 304 dataGridView.Invalidate(); 305 } 306 307 return newSortedIndex; 308 } 307 309 private void UpdateSortGlyph() { 308 310 foreach (DataGridViewColumn col in this.dataGridView.Columns) … … 332 334 double double1, double2; 333 335 DateTime dateTime1, dateTime2; 336 TimeSpan timeSpan1, timeSpan2; 334 337 string string1, string2; 335 338 … … 346 349 else if (DateTime.TryParse(string1, out dateTime1) && DateTime.TryParse(string2, out dateTime2)) 347 350 result = dateTime1.CompareTo(dateTime2); 351 else if (TimeSpan.TryParse(string1, out timeSpan1) && TimeSpan.TryParse(string2, out timeSpan2)) 352 result = timeSpan1.CompareTo(timeSpan2); 348 353 else { 349 354 if (string1 != null)
Note: See TracChangeset
for help on using the changeset viewer.