- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Data.Views/3.3/Plugin.cs.frame
r7259 r8331 29 29 /// Plugin class for HeuristicLab.Data.Views plugin. 30 30 /// </summary> 31 [Plugin("HeuristicLab.Data.Views", "3.3. 6.$WCREV$")]31 [Plugin("HeuristicLab.Data.Views", "3.3.7.$WCREV$")] 32 32 [PluginFile("HeuristicLab.Data.Views-3.3.dll", PluginFileType.Assembly)] 33 33 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/ScatterSearch (trunk integration)/HeuristicLab.Data.Views/3.3/Properties/AssemblyInfo.cs.frame
r7259 r8331 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3. 6.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")] -
branches/ScatterSearch (trunk integration)/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r8086 r8331 35 35 [Content(typeof(IStringConvertibleMatrix), true)] 36 36 public partial class StringConvertibleMatrixView : AsynchronousContentView { 37 private int[] virtualRowIndi zes;38 private List<KeyValuePair<int, SortOrder>> sortedColumnIndi zes;37 private int[] virtualRowIndices; 38 private List<KeyValuePair<int, SortOrder>> sortedColumnIndices; 39 39 private RowComparer rowComparer; 40 40 … … 82 82 errorProvider.SetIconAlignment(columnsTextBox, ErrorIconAlignment.MiddleLeft); 83 83 errorProvider.SetIconPadding(columnsTextBox, 2); 84 sortedColumnIndi zes = new List<KeyValuePair<int, SortOrder>>();84 sortedColumnIndices = new List<KeyValuePair<int, SortOrder>>(); 85 85 rowComparer = new RowComparer(); 86 86 } … … 108 108 dataGridView.Rows.Clear(); 109 109 dataGridView.Columns.Clear(); 110 virtualRowIndi zes = new int[0];110 virtualRowIndices = new int[0]; 111 111 } else 112 112 UpdateData(); … … 128 128 columnsTextBox.Text = Content.Columns.ToString(); 129 129 columnsTextBox.Enabled = true; 130 virtualRowIndi zes = Enumerable.Range(0, Content.Rows).ToArray();130 virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray(); 131 131 132 132 if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns && !Content.ReadOnly) … … 178 178 179 179 while (updatedRows < count) { 180 if (virtualRowIndi zes[index] < Content.RowNames.Count())181 dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndi zes[index]);180 if (virtualRowIndices[index] < Content.RowNames.Count()) 181 dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]); 182 182 else 183 183 dataGridView.Rows[index].HeaderCell.Value = "Row " + (index + 1); … … 273 273 if (!dataGridView.ReadOnly) { 274 274 string value = e.Value.ToString(); 275 int rowIndex = virtualRowIndi zes[e.RowIndex];275 int rowIndex = virtualRowIndices[e.RowIndex]; 276 276 e.ParsingApplied = Content.SetValue(value, rowIndex, e.ColumnIndex); 277 277 if (e.ParsingApplied) e.Value = Content.GetValue(rowIndex, e.ColumnIndex); … … 283 283 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 284 284 if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 285 int rowIndex = virtualRowIndi zes[e.RowIndex];285 int rowIndex = virtualRowIndices[e.RowIndex]; 286 286 e.Value = Content.GetValue(rowIndex, e.ColumnIndex); 287 287 } … … 340 340 341 341 for (int i = minRowIndex; i <= maxRowIndex; i++) { 342 int rowIndex = this.virtualRowIndi zes[i];342 int rowIndex = this.virtualRowIndices[i]; 343 343 if (addRowNames) { 344 344 s.Append(Content.RowNames.ElementAt(rowIndex)); … … 399 399 if (Content != null) { 400 400 if (e.Button == MouseButtons.Left && Content.SortableView) { 401 bool addToSortedIndi zes = (Control.ModifierKeys & Keys.Control) == Keys.Control;401 bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control; 402 402 SortOrder newSortOrder = SortOrder.Ascending; 403 if (sortedColumnIndi zes.Any(x => x.Key == e.ColumnIndex)) {404 SortOrder oldSortOrder = sortedColumnIndi zes.Where(x => x.Key == e.ColumnIndex).First().Value;403 if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) { 404 SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == e.ColumnIndex).First().Value; 405 405 int enumLength = Enum.GetValues(typeof(SortOrder)).Length; 406 406 newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString()); 407 407 } 408 408 409 if (!addToSortedIndi zes)410 sortedColumnIndi zes.Clear();411 412 if (sortedColumnIndi zes.Any(x => x.Key == e.ColumnIndex)) {413 int sortedIndex = sortedColumnIndi zes.FindIndex(x => x.Key == e.ColumnIndex);409 if (!addToSortedIndices) 410 sortedColumnIndices.Clear(); 411 412 if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) { 413 int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == e.ColumnIndex); 414 414 if (newSortOrder != SortOrder.None) 415 sortedColumnIndi zes[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);415 sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder); 416 416 else 417 sortedColumnIndi zes.RemoveAt(sortedIndex);417 sortedColumnIndices.RemoveAt(sortedIndex); 418 418 } else 419 419 if (newSortOrder != SortOrder.None) 420 sortedColumnIndi zes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));420 sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder)); 421 421 Sort(); 422 422 } … … 425 425 426 426 protected virtual void ClearSorting() { 427 virtualRowIndi zes = Enumerable.Range(0, Content.Rows).ToArray();428 sortedColumnIndi zes.Clear();427 virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray(); 428 sortedColumnIndices.Clear(); 429 429 UpdateSortGlyph(); 430 430 } 431 431 432 432 private void Sort() { 433 virtualRowIndi zes = Sort(sortedColumnIndizes);433 virtualRowIndices = Sort(sortedColumnIndices); 434 434 UpdateSortGlyph(); 435 435 UpdateRowHeaders(); … … 439 439 int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray(); 440 440 if (sortedColumns.Count() != 0) { 441 rowComparer.SortedIndi zes = sortedColumns;441 rowComparer.SortedIndices = sortedColumns; 442 442 rowComparer.Matrix = Content; 443 443 Array.Sort(newSortedIndex, rowComparer); … … 448 448 foreach (DataGridViewColumn col in this.dataGridView.Columns) 449 449 col.HeaderCell.SortGlyphDirection = SortOrder.None; 450 foreach (KeyValuePair<int, SortOrder> p in sortedColumnIndi zes)450 foreach (KeyValuePair<int, SortOrder> p in sortedColumnIndices) 451 451 this.dataGridView.Columns[p.Key].HeaderCell.SortGlyphDirection = p.Value; 452 452 } … … 457 457 } 458 458 459 private List<KeyValuePair<int, SortOrder>> sortedIndi zes;460 public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndi zes {461 get { return this.sortedIndi zes; }462 set { sortedIndi zes = new List<KeyValuePair<int, SortOrder>>(value); }459 private List<KeyValuePair<int, SortOrder>> sortedIndices; 460 public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndices { 461 get { return this.sortedIndices; } 462 set { sortedIndices = new List<KeyValuePair<int, SortOrder>>(value); } 463 463 } 464 464 private IStringConvertibleMatrix matrix; … … 477 477 if (matrix == null) 478 478 throw new InvalidOperationException("Could not sort IStringConvertibleMatrix if the matrix member is null."); 479 if (sortedIndi zes == null)479 if (sortedIndices == null) 480 480 return 0; 481 481 482 foreach (KeyValuePair<int, SortOrder> pair in sortedIndi zes.Where(p => p.Value != SortOrder.None)) {482 foreach (KeyValuePair<int, SortOrder> pair in sortedIndices.Where(p => p.Value != SortOrder.None)) { 483 483 string1 = matrix.GetValue(x, pair.Key); 484 484 string2 = matrix.GetValue(y, pair.Key);
Note: See TracChangeset
for help on using the changeset viewer.