- Timestamp:
- 08/11/15 10:11:47 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 23 23 bin 24 24 protoc.exe 25 obj
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/Plugin.cs.frame
r12012 r12843 26 26 /// Plugin class for HeuristicLab.Optimization.Views plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Optimization.Views", "3.3.1 1.$WCREV$")]28 [Plugin("HeuristicLab.Optimization.Views", "3.3.12.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Optimization.Views-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/Properties/AssemblyInfo.cs.frame
r12012 r12843 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3.1 1.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.12.$WCREV$")] -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
r12077 r12843 345 345 switch (axisDimension) { 346 346 case AxisDimension.Color: { 347 value = GetCategoricalValue(-1, run.Color.ToString()); 347 const int colorDimension = -1; 348 if (!categoricalMapping.ContainsKey(colorDimension)) { 349 categoricalMapping[colorDimension] = Content.Where(r => r.Visible) 350 .Select(r => r.Color.Name) 351 .Distinct() 352 .OrderBy(c => c, new NaturalStringComparer()) 353 .Select((c, i) => new { Color = c, Index = i }) 354 .ToDictionary(a => (object)a.Color, a => (double)a.Index); 355 356 } 357 value = GetCategoricalValue(colorDimension, run.Color.Name); 348 358 break; 349 359 } -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionChartAggregationView.cs
r12689 r12843 242 242 dataRowComboBox.Items.Clear(); 243 243 var resultName = (string)dataTableComboBox.SelectedItem; 244 if (resultName == null) return; 245 244 246 var dataTables = from run in Content 245 247 where run.Results.ContainsKey(resultName) -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTableView.cs
r12077 r12843 53 53 base.OnContentChanged(); 54 54 if (Content != null) { 55 runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();56 55 UpdateRowAttributes(); 57 56 } … … 151 150 suppressUpdates = Content.UpdateOfRunsInProgress; 152 151 if (!suppressUpdates) { 152 UpdateData(); 153 153 UpdateRowAttributes(); 154 UpdateData();155 154 } 156 155 } … … 179 178 protected override void ClearSorting() { 180 179 base.ClearSorting(); 181 runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();182 180 UpdateRowAttributes(); 183 181 } … … 198 196 i++; 199 197 } 200 UpdateRowAttributes( );198 UpdateRowAttributes(rebuild: false); 201 199 return newSortedIndex; 202 200 } 203 201 204 private void UpdateRowAttributes() { 202 private void UpdateRowAttributes(bool rebuild = true) { 203 if (rebuild) runToRowMapping = Enumerable.Range(0, Content.Count).ToArray(); 205 204 int runIndex = 0; 206 205 foreach (IRun run in Content) { -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs
r12012 r12843 41 41 private Dictionary<IRun, List<ListViewItem>> itemListViewItemMapping; 42 42 private bool validDragOperation; 43 private bool suppressUpdates; 43 44 44 45 public new IItemCollection<IRun> Content { … … 66 67 Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 67 68 Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 69 if (RunCollection != null) 70 RunCollection.UpdateOfRunsInProgressChanged -= new EventHandler(RunCollection_UpdateOfRunsInProgressChanged); 68 71 foreach (IRun run in itemListViewItemMapping.Keys) { 69 72 DeregisterItemEvents(run); … … 76 79 Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 77 80 Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 81 if (RunCollection != null) 82 RunCollection.UpdateOfRunsInProgressChanged += new EventHandler(RunCollection_UpdateOfRunsInProgressChanged); 78 83 } 79 84 private void DeregisterItemEvents(IRun item) { … … 394 399 #region Content Events 395 400 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) { 401 if (suppressUpdates) return; 396 402 if (InvokeRequired) 397 403 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded), sender, e); … … 407 413 } 408 414 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) { 415 if (suppressUpdates) return; 409 416 if (InvokeRequired) 410 417 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved), sender, e); … … 422 429 } 423 430 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) { 431 if (suppressUpdates) return; 424 432 if (InvokeRequired) 425 433 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset), sender, e); … … 440 448 } 441 449 } 450 private void RunCollection_UpdateOfRunsInProgressChanged(object sender, EventArgs e) { 451 if (InvokeRequired) Invoke((Action<object, EventArgs>)RunCollection_UpdateOfRunsInProgressChanged, sender, e); 452 else { 453 suppressUpdates = RunCollection.UpdateOfRunsInProgress; 454 if (!suppressUpdates) { 455 foreach (IRun item in Content) { 456 //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection 457 ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault(); 458 if (listViewItem != null) RemoveListViewItem(listViewItem); 459 } 460 RebuildImageList(); 461 foreach (IRun item in Content) 462 AddListViewItem(CreateListViewItem(item)); 463 464 AdjustListViewColumnSizes(); 465 analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0; 466 clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly; 467 runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0; 468 } 469 } 470 } 442 471 #endregion 443 472 444 473 #region Item Events 445 474 private void Item_ItemImageChanged(object sender, EventArgs e) { 475 if (suppressUpdates) return; 446 476 if (InvokeRequired) 447 477 Invoke(new EventHandler(Item_ItemImageChanged), sender, e); … … 453 483 } 454 484 private void Item_ToStringChanged(object sender, EventArgs e) { 485 if (suppressUpdates) return; 455 486 if (InvokeRequired) 456 487 Invoke(new EventHandler(Item_ToStringChanged), sender, e); … … 463 494 } 464 495 private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e) { 496 if (suppressUpdates) return; 465 497 if (InvokeRequired) 466 this.Invoke((Action<object, PropertyChangedEventArgs>)Item_PropertyChanged, sender, e);498 Invoke((Action<object, PropertyChangedEventArgs>)Item_PropertyChanged, sender, e); 467 499 else { 468 500 IRun run = (IRun)sender;
Note: See TracChangeset
for help on using the changeset viewer.