Index: Core/Common/src/Core.Common.Base/Data/Project.cs =================================================================== diff -u -r25019cc752a91361f32968c26d48064ed35a916c -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Base/Data/Project.cs (.../Project.cs) (revision 25019cc752a91361f32968c26d48064ed35a916c) +++ Core/Common/src/Core.Common.Base/Data/Project.cs (.../Project.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -1,7 +1,6 @@ using System.Collections.Generic; using Core.Common.Base.Properties; -using Core.Common.Utils.Collections.Generic; namespace Core.Common.Base.Data { Index: Core/Common/src/Core.Common.Controls.Swf/Charting/Chart.cs =================================================================== diff -u -r2da9b71bbdefaeed62c47b673671b7d76502a363 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/Charting/Chart.cs (.../Chart.cs) (revision 2da9b71bbdefaeed62c47b673671b7d76502a363) +++ Core/Common/src/Core.Common.Controls.Swf/Charting/Chart.cs (.../Chart.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -408,7 +408,7 @@ AllowSeriesTypeChange = true; } - private void SeriesCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + private void SeriesCollectionChanged(object sender, NotifyCollectionChangeEventArgs e) { var chartSeries = e.Item as ChartSeries; if (chartSeries == null) Index: Core/Common/src/Core.Common.Controls.Swf/Charting/ChartView.cs =================================================================== diff -u -rc3dd2497d527a0d8f1e7d974f601903d2e426331 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/Charting/ChartView.cs (.../ChartView.cs) (revision c3dd2497d527a0d8f1e7d974f601903d2e426331) +++ Core/Common/src/Core.Common.Controls.Swf/Charting/ChartView.cs (.../ChartView.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -8,7 +8,6 @@ using Core.Common.Controls.Swf.Charting.Customized; using Core.Common.Controls.Swf.Charting.Tools; using Core.Common.Controls.Swf.Properties; -using Core.Common.Utils.Collections.Generic; using Steema.TeeChart; using Steema.TeeChart.Drawing; @@ -144,7 +143,7 @@ } /// - /// Data: in this case ISeries expected in + /// Data: in this case /// [Browsable(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] Index: Core/Common/src/Core.Common.Controls.Swf/Charting/IChart.cs =================================================================== diff -u -r2da9b71bbdefaeed62c47b673671b7d76502a363 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/Charting/IChart.cs (.../IChart.cs) (revision 2da9b71bbdefaeed62c47b673671b7d76502a363) +++ Core/Common/src/Core.Common.Controls.Swf/Charting/IChart.cs (.../IChart.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -5,7 +5,6 @@ using System.Windows.Forms; using Core.Common.Controls.Swf.Charting.Series; -using Core.Common.Utils.Collections.Generic; namespace Core.Common.Controls.Swf.Charting { Index: Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs =================================================================== diff -u -rc3dd2497d527a0d8f1e7d974f601903d2e426331 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs (.../TableView.cs) (revision c3dd2497d527a0d8f1e7d974f601903d2e426331) +++ Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs (.../TableView.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -409,7 +409,7 @@ refreshRequired = true; } - private void DataSourceCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + private void DataSourceCollectionChanged(object sender, NotifyCollectionChangeEventArgs e) { refreshRequired = true; UpdateHeaderColumnSize(); Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeNodePresenter.cs =================================================================== diff -u -reab6a10ef5444e79f4dddd5babbfcd5892d3d97a -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeNodePresenter.cs (.../ITreeNodePresenter.cs) (revision eab6a10ef5444e79f4dddd5babbfcd5892d3d97a) +++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeNodePresenter.cs (.../ITreeNodePresenter.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -144,7 +144,7 @@ /// /// Sender of the event /// Event arguments, e.Item contains object which was added / removed - void OnCollectionChanged(object sender, NotifyCollectionChangingEventArgs e); + void OnCollectionChanged(object sender, NotifyCollectionChangeEventArgs e); // TODO: check it we need to replace these methods with OnKeyPressed() /// Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewController.cs =================================================================== diff -u -ref35125104cc8b0201f9c961049cc6c8a30fb74d -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewController.cs (.../TreeViewController.cs) (revision ef35125104cc8b0201f9c961049cc6c8a30fb74d) +++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewController.cs (.../TreeViewController.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -4,7 +4,7 @@ using System.Windows.Forms; using Core.Common.Controls.Swf.Properties; using Core.Common.Utils.Collections; -using Core.Common.Utils.Collections.Generic; + using log4net; namespace Core.Common.Controls.Swf.TreeViewControls Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewNodePresenterBase.cs =================================================================== diff -u -r529c5b708080eb65abba0502d79869fe549e035a -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewNodePresenterBase.cs (.../TreeViewNodePresenterBase.cs) (revision 529c5b708080eb65abba0502d79869fe549e035a) +++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeViewNodePresenterBase.cs (.../TreeViewNodePresenterBase.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -168,7 +168,7 @@ } } - public void OnCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + public void OnCollectionChanged(object sender, NotifyCollectionChangeEventArgs e) { // TODO: should this code be moved into tree view implementaiton? @@ -260,7 +260,7 @@ /// /// /// - protected virtual void OnCollectionChanged(T childNodeData, ITreeNode parentNode, NotifyCollectionChangingEventArgs e, int newNodeIndex) + protected virtual void OnCollectionChanged(T childNodeData, ITreeNode parentNode, NotifyCollectionChangeEventArgs e, int newNodeIndex) { switch (e.Action) { Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r41f690d1d649d07cdb7a11fce79fff5c343de1bd -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 41f690d1d649d07cdb7a11fce79fff5c343de1bd) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -438,7 +438,7 @@ return Dispatcher.Invoke(method, args); } - private void ToolWindowViews_CollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + private void ToolWindowViews_CollectionChanged(object sender, NotifyCollectionChangeEventArgs e) { if (e.Action != NotifyCollectionChangeAction.Remove) { Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs =================================================================== diff -u -rfefc0cc505a41a79d4643c80335484daf4ca30ce -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs (.../ViewList.cs) (revision fefc0cc505a41a79d4643c80335484daf4ca30ce) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs (.../ViewList.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -407,7 +407,7 @@ { if (CollectionChanged != null) { - CollectionChanged(this, new NotifyCollectionChangingEventArgs(notifyCollectionChangeAction, item, index, -1)); + CollectionChanged(this, new NotifyCollectionChangeEventArgs(notifyCollectionChangeAction, item, index, -1)); } } Index: Core/Common/src/Core.Common.Gui/IViewList.cs =================================================================== diff -u -rfefc0cc505a41a79d4643c80335484daf4ca30ce -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Gui/IViewList.cs (.../IViewList.cs) (revision fefc0cc505a41a79d4643c80335484daf4ca30ce) +++ Core/Common/src/Core.Common.Gui/IViewList.cs (.../IViewList.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using Core.Common.Controls.Views; -using Core.Common.Utils.Collections.Generic; +using Core.Common.Utils.Collections; namespace Core.Common.Gui { @@ -19,7 +19,7 @@ /// /// Manages currently displayed views /// - public interface IViewList : IEventedList, IDisposable + public interface IViewList : IList, IDisposable { /// /// Fired before active view has been changed. @@ -32,6 +32,11 @@ event EventHandler ActiveViewChanged; /// + /// Fired after the view elements in this view list have changed. + /// + event NotifyCollectionChangedEventHandler CollectionChanged; + + /// /// HACK: Hack to disable activation temporarily /// bool IgnoreActivation { get; set; } Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs =================================================================== diff -u -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670) +++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -854,7 +854,7 @@ SetToolTipForView(view); } - private void ToolWindowViewsOnCollectionChanged(object sender, NotifyCollectionChangingEventArgs notifyCollectionChangingEventArgs) + private void ToolWindowViewsOnCollectionChanged(object sender, NotifyCollectionChangeEventArgs notifyCollectionChangeEventArgs) { if (isExiting) { @@ -863,7 +863,7 @@ mainWindow.ValidateItems(); } - private void DocumentViewsCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) + private void DocumentViewsCollectionChanged(object sender, NotifyCollectionChangeEventArgs e) { if (isExiting || documentViews.Count != 0) { Fisheye: Tag 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Collections/Generic/IEnumerableListEditor.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Collections/Generic/IEventedList.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Collections/INotifyCollectionChange.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangeEventArgs.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangeEventArgs.cs (revision 0) +++ Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangeEventArgs.cs (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -0,0 +1,47 @@ +using System.ComponentModel; + +namespace Core.Common.Utils.Collections +{ + /// + /// EventArgs for a collection that include the item and the action. + /// + /// Note: for performance reasons we use fields here instead of properties. + /// + public class NotifyCollectionChangeEventArgs : CancelEventArgs + { + /// + /// Indicate what operation took place such as add, remove etc... + /// + public NotifyCollectionChangeAction Action; + + /// + /// When inserting, this is the position where the item is inserted. + /// + public int Index; + + /// + /// Previous index (if changed). TODO: remove it. This is the index at which the insert was intent + /// + public int OldIndex; + + public NotifyCollectionChangeEventArgs(NotifyCollectionChangeAction action, object item, int index, int oldIndex) + { + Action = action; + Item = item; + Index = index; + OldIndex = oldIndex; + } + + public NotifyCollectionChangeEventArgs() {} + + /// + /// The item added, removed or replaced. On replace the new item is given + /// + public virtual object Item { get; set; } + + /// + /// Item that is replaced. (only filled out on replace) + /// + public virtual object OldItem { get; set; } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangedEventHandler.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangedEventHandler.cs (.../NotifyCollectionChangedEventHandler.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangedEventHandler.cs (.../NotifyCollectionChangedEventHandler.cs) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -1,5 +1,5 @@ namespace Core.Common.Utils.Collections { // TODO: use NotifyCollectionChangeEventArgs as in PropertyChange - public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangingEventArgs e); + public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangeEventArgs e); } \ No newline at end of file Fisheye: Tag 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangingEventArgs.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Utils/Collections/NotifyCollectionChangingEventHandler.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj =================================================================== diff -u -rb26409726de6dd5db534791e43885dd29b7b09b8 -r40a3475dedb6ce5aacbd38a6d7b8445665fb98cd --- Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj (.../Core.Common.Utils.csproj) (revision b26409726de6dd5db534791e43885dd29b7b09b8) +++ Core/Common/src/Core.Common.Utils/Core.Common.Utils.csproj (.../Core.Common.Utils.csproj) (revision 40a3475dedb6ce5aacbd38a6d7b8445665fb98cd) @@ -107,13 +107,10 @@ - - - - + @@ -133,7 +130,6 @@ - @@ -185,6 +181,7 @@ False +