Changeset 5995
- Timestamp:
- 04/09/11 14:48:19 (14 years ago)
- Location:
- branches/histogram
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Analysis.Views/3.3/AggregatedHistogramHistoryView.Designer.cs
r5994 r5995 50 50 // histogramControl 51 51 // 52 this.histogramControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 53 | System.Windows.Forms.AnchorStyles.Left) 54 | System.Windows.Forms.AnchorStyles.Right))); 55 this.histogramControl.Location = new System.Drawing.Point(0, 26); 52 this.histogramControl.CalculateExactBins = false; 53 this.histogramControl.Dock = System.Windows.Forms.DockStyle.Fill; 54 this.histogramControl.IncrementNumberOfBins = 1; 55 this.histogramControl.Location = new System.Drawing.Point(0, 0); 56 this.histogramControl.MaximumNumberOfBins = 100000; 57 this.histogramControl.MinimumNumberOfBins = 1; 56 58 this.histogramControl.Name = "histogramControl"; 57 this.histogramControl.Size = new System.Drawing.Size(543, 346); 59 this.histogramControl.NumberOfBins = 10; 60 this.histogramControl.ShowExactCheckbox = true; 61 this.histogramControl.Size = new System.Drawing.Size(543, 372); 58 62 this.histogramControl.TabIndex = 3; 59 63 // 60 // HistogramView64 // AggregatedHistogramHistoryView 61 65 // 62 66 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 63 67 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 64 68 this.Controls.Add(this.histogramControl); 65 this.Name = " HistogramView";69 this.Name = "AggregatedHistogramHistoryView"; 66 70 this.Size = new System.Drawing.Size(543, 372); 67 this.Controls.SetChildIndex(this.histogramControl, 0);68 71 this.ResumeLayout(false); 69 this.PerformLayout();70 72 71 73 } -
branches/histogram/HeuristicLab.Analysis.Views/3.3/AggregatedHistogramHistoryView.cs
r5994 r5995 43 43 44 44 protected override void DeregisterContentEvents() { 45 Content.ItemsAdded -= new CollectionItemsChangedEventHandler<Histogram>(Content_ItemsAdded); 46 Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<Histogram>(Content_ItemsRemoved); 47 Content.CollectionReset -= new CollectionItemsChangedEventHandler<Histogram>(Content_CollectionReset); 45 Content.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_ItemsAdded); 46 Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_ItemsRemoved); 47 Content.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_CollectionReset); 48 Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_CheckedItemsChanged); 48 49 foreach (Histogram h in Content) { 49 50 DeregisterHistogramEvents(h); … … 60 61 protected override void RegisterContentEvents() { 61 62 base.RegisterContentEvents(); 62 Content.ItemsAdded += new CollectionItemsChangedEventHandler<Histogram>(Content_ItemsAdded); 63 Content.ItemsRemoved += new CollectionItemsChangedEventHandler<Histogram>(Content_ItemsRemoved); 64 Content.CollectionReset += new CollectionItemsChangedEventHandler<Histogram>(Content_CollectionReset); 63 Content.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_ItemsAdded); 64 Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_ItemsRemoved); 65 Content.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_CollectionReset); 66 Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<Histogram>>(Content_CheckedItemsChanged); 65 67 foreach (Histogram h in Content) { 66 68 RegisterHistogramEvents(h); … … 84 86 InitializeHistogram(); 85 87 } 86 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<Histogram> e) { 88 private void Content_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<Histogram>> e) { 89 InitializeHistogram(); 90 } 91 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<Histogram>> e) { 87 92 List<double> added = new List<double>(); 88 foreach ( Histogramh in e.Items) {89 RegisterHistogramEvents(h );90 added.AddRange(h.Value s);93 foreach (IndexedItem<Histogram> h in e.Items) { 94 RegisterHistogramEvents(h.Value); 95 added.AddRange(h.Value.Values); 91 96 } 92 97 histogramControl.AddPoints(added); 93 98 } 94 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs< Histogram> e) {95 foreach ( Histogramh in e.Items) {96 DeregisterHistogramEvents(h );99 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Histogram>> e) { 100 foreach (IndexedItem<Histogram> h in e.Items) { 101 DeregisterHistogramEvents(h.Value); 97 102 } 98 103 InitializeHistogram(); 99 104 } 100 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs< Histogram> e) {101 foreach ( Histogramh in e.OldItems) {102 DeregisterHistogramEvents(h );105 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<Histogram>> e) { 106 foreach (IndexedItem<Histogram> h in e.OldItems) { 107 DeregisterHistogramEvents(h.Value); 103 108 } 104 109 InitializeHistogram(); … … 123 128 if (Content == null) return; 124 129 histogramControl.ClearPoints(); 125 var points = Content. SelectMany(x => x.Values);130 var points = Content.CheckedItems.SelectMany(x => x.Value.Values); 126 131 histogramControl.AddPoints(points); 127 132 } -
branches/histogram/HeuristicLab.Analysis.Views/3.3/AggregatedHistogramHistoryView.resx
r5994 r5995 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">121 <value>107, 17</value>122 </metadata>123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">124 <value>17, 17</value>125 </metadata>126 120 </root> -
branches/histogram/HeuristicLab.Analysis/3.3/DataVisualization/HistogramHistory.cs
r5961 r5995 32 32 [Item("HistogramHistory", "Represents history values of histograms.")] 33 33 [StorableClass] 34 public class HistogramHistory : ItemCollection<Histogram> {34 public class HistogramHistory : CheckedItemList<Histogram> { 35 35 public override Image ItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Cab; } … … 41 41 protected HistogramHistory(HistogramHistory original, Cloner cloner) : base(original, cloner) { } 42 42 public HistogramHistory() : base() { } 43 public HistogramHistory(IEnumerable<Histogram> collection) : base( new ItemCollection<Histogram>(collection)) { }43 public HistogramHistory(IEnumerable<Histogram> collection) : base(collection) { } 44 44 45 45 public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset
for help on using the changeset viewer.