Index: Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj =================================================================== diff -u -r1edd0ab99383de32bd499b82d258a04cf9bda260 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 1edd0ab99383de32bd499b82d258a04cf9bda260) +++ Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -90,7 +90,6 @@ ExceptionDialog.cs - Fisheye: Tag 60284d242516286b70997e1894fa22b67d7f10ab refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls/Views/IReusableView.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs =================================================================== diff -u -r65c12731b5bc4f7dd185b779c801b9ee319e4e3a -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs (.../AvalonDockDockingManager.cs) (revision 65c12731b5bc4f7dd185b779c801b9ee319e4e3a) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs (.../AvalonDockDockingManager.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -30,7 +30,6 @@ public event EventHandler ViewActivated; public event Action ViewSelectionMouseDown; - private static readonly Bitmap LockImage = Resources.lock_edit; private readonly DockingManager dockingManager; private readonly ViewLocation[] dockingLocations; @@ -176,12 +175,6 @@ control.TextChanged -= ControlOnTextChanged; } - var reusable = view as IReusableView; - if (reusable != null) - { - reusable.LockedChanged -= ReusableLockedChanged; - } - views.Remove(view); if (views.Count != hostControls.Count) @@ -562,12 +555,6 @@ private void AddDocumentView(IView view) { - var reusable = view as IReusableView; - if (reusable != null) - { - reusable.LockedChanged += ReusableLockedChanged; - } - var hostControl = new WindowsFormsHost { Child = (Control) view @@ -631,28 +618,9 @@ hostControls.RemoveAt(index); } - private void ReusableLockedChanged(object sender, EventArgs e) - { - var view = sender as IView; - if (view == null) - { - return; - } - - var document = GetLayoutContent(view) as LayoutDocument; - if (document == null) - { - return; - } - - document.IconSource = GetImage(view); - } - private ImageSource GetImage(IView view) { - var reusable = view as IReusableView; - var isLocked = reusable != null && reusable.Locked; - return BitmapImageFromBitmap(isLocked ? LockImage : view.ViewInfo.Image); + return BitmapImageFromBitmap(view.ViewInfo.Image); } private LayoutContent GetLayoutContent(IView view) Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs =================================================================== diff -u -r1a47be2a9f0336ef0d0d5bd6971e8e1cc3cbbfa4 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision 1a47be2a9f0336ef0d0d5bd6971e8e1cc3cbbfa4) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -199,9 +199,7 @@ private IEnumerable GetViewsForData(IEnumerable viewsToCheck, object data) { return data != null - ? GetOpenViewsFor(viewsToCheck, data, (v, vi) => - !(v is IReusableView && !((IReusableView) v).Locked && - data.GetType().Implements(vi.DataType))) + ? GetOpenViewsFor(viewsToCheck, data) : Enumerable.Empty(); } @@ -226,31 +224,12 @@ { viewInfo.OnActivateView(view, data); viewList.ActiveView = view; - return true; - } - var reusableView = viewList.OfType() - .FirstOrDefault(rv => - !rv.Locked && - IsDataForView(rv, viewData) && - viewInfo.ViewDataType == GetViewInfoForView(rv).ViewDataType); - - if (reusableView != null) - { - // Set reusable view data - reusableView.Data = viewData; - viewInfo.AfterCreate(reusableView, data); - viewInfo.OnActivateView(reusableView, data); - viewList.ActiveView = reusableView; - - if (viewList.UpdateViewNameAction != null) - { - viewList.UpdateViewNameAction(reusableView); - } return true; } viewList.Add(CreateViewForData(data, viewInfo)); + return true; } Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.Designer.cs =================================================================== diff -u -r83983e75750425584a9d6c2c1361d72992bf9077 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.Designer.cs (.../ViewSelectionContextMenuController.Designer.cs) (revision 83983e75750425584a9d6c2c1361d72992bf9077) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.Designer.cs (.../ViewSelectionContextMenuController.Designer.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -34,7 +34,6 @@ this.menuItemClose = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemCloseOther = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemCloseAll = new System.Windows.Forms.ToolStripMenuItem(); - this.menuItemLockUnlock = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip.SuspendLayout(); this.SuspendLayout(); // @@ -43,8 +42,7 @@ this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuItemClose, this.menuItemCloseOther, - this.menuItemCloseAll, - this.menuItemLockUnlock}); + this.menuItemCloseAll}); this.contextMenuStrip.Name = "contextMenuStrip1"; resources.ApplyResources(this.contextMenuStrip, "contextMenuStrip"); // @@ -66,13 +64,6 @@ resources.ApplyResources(this.menuItemCloseAll, "menuItemCloseAll"); this.menuItemCloseAll.Click += new System.EventHandler(this.MenuItemCloseAllClick); // - // menuItemLockUnlock - // - this.menuItemLockUnlock.Image = global::Core.Common.Gui.Properties.Resources.lock_edit; - this.menuItemLockUnlock.Name = "menuItemLockUnlock"; - resources.ApplyResources(this.menuItemLockUnlock, "menuItemLockUnlock"); - this.menuItemLockUnlock.Click += new System.EventHandler(this.LockToolStripMenuItemClick); - // // ViewSelectionContextMenuController // resources.ApplyResources(this, "$this"); @@ -90,6 +81,5 @@ private System.Windows.Forms.ToolStripMenuItem menuItemClose; private System.Windows.Forms.ToolStripMenuItem menuItemCloseOther; private System.Windows.Forms.ToolStripMenuItem menuItemCloseAll; - private System.Windows.Forms.ToolStripMenuItem menuItemLockUnlock; } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.cs =================================================================== diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.cs (.../ViewSelectionContextMenuController.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.cs (.../ViewSelectionContextMenuController.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -1,8 +1,6 @@ using System; using System.Windows.Forms; -using Core.Common.Controls; using Core.Common.Controls.Views; -using Core.Common.Gui.Properties; namespace Core.Common.Gui.Forms.ViewManager { @@ -35,23 +33,6 @@ menuItemClose.Enabled = selectedView != null; menuItemCloseAll.Enabled = viewManager.Count > 0; menuItemCloseOther.Enabled = selectedView != null && viewManager.Count > 1; - - var lockable = selectedView as IReusableView; - menuItemLockUnlock.Visible = lockable != null; - - if (lockable != null) - { - if (lockable.Locked) - { - menuItemLockUnlock.Text = Resources.ViewSelectionContextMenuController_UpdateMenuItemsValidity_Unlock; - menuItemLockUnlock.Image = null; - } - else - { - menuItemLockUnlock.Text = Resources.ViewSelectionContextMenuController_UpdateMenuItemsValidity_Lock; - menuItemLockUnlock.Image = Resources.lock_edit; - } - } } private void MenuItemCloseClick(object sender, EventArgs e) @@ -68,10 +49,5 @@ { viewManager.Clear(); } - - private void LockToolStripMenuItemClick(object sender, EventArgs e) - { - ((IReusableView) selectedView).Locked = !((IReusableView) selectedView).Locked; - } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.resx =================================================================== diff -u -r83983e75750425584a9d6c2c1361d72992bf9077 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.resx (.../ViewSelectionContextMenuController.resx) (revision 83983e75750425584a9d6c2c1361d72992bf9077) +++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionContextMenuController.resx (.../ViewSelectionContextMenuController.resx) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -122,31 +122,25 @@ - 159, 22 + 206, 22 Tabblad sluiten - 159, 22 + 206, 22 Andere tabbladen sluiten - 159, 22 + 206, 22 Alle tabbladen sluiten - - 159, 22 - - - Vastzetten/Losmaken - - 160, 92 + 207, 92 contextMenuStrip @@ -178,12 +172,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - menuItemLockUnlock - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ViewSelectionContextMenuController Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -2542,24 +2542,6 @@ } /// - /// Looks up a localized string similar to Vastzetten. - /// - public static string ViewSelectionContextMenuController_UpdateMenuItemsValidity_Lock { - get { - return ResourceManager.GetString("ViewSelectionContextMenuController_UpdateMenuItemsValidity_Lock", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Losmaken. - /// - public static string ViewSelectionContextMenuController_UpdateMenuItemsValidity_Unlock { - get { - return ResourceManager.GetString("ViewSelectionContextMenuController_UpdateMenuItemsValidity_Unlock", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Argument 'Sender' moet een instantie van het type 'Control' zijn. /// public static string ViewSelectionMouseController_OnViewSelectionMouseDown_Sender_must_be_non_null_and_of_type_Control { Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx =================================================================== diff -u -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -340,9 +340,6 @@ ..\Resources\folder_edit.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Vastzetten - ..\Resources\cog_active.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -463,9 +460,6 @@ Bedrijf - - Losmaken - Annuleer alle activiteiten Index: Core/Common/test/Core.Common.Test/Core.Common.Test.csproj =================================================================== diff -u -r257d05c151e5c8e1f661870752d8a3783633924b -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/test/Core.Common.Test/Core.Common.Test.csproj (.../Core.Common.Test.csproj) (revision 257d05c151e5c8e1f661870752d8a3783633924b) +++ Core/Common/test/Core.Common.Test/Core.Common.Test.csproj (.../Core.Common.Test.csproj) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -97,12 +97,6 @@ True Resources.resx - - UserControl - - - TestReusableView.cs - UserControl Index: Core/Common/test/Core.Common.Test/Gui/Forms/AvalonDockDockingManagerTest.cs =================================================================== diff -u -r28e7cc0bd810e74ac836f2de5e61497e94c693dd -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/test/Core.Common.Test/Gui/Forms/AvalonDockDockingManagerTest.cs (.../AvalonDockDockingManagerTest.cs) (revision 28e7cc0bd810e74ac836f2de5e61497e94c693dd) +++ Core/Common/test/Core.Common.Test/Gui/Forms/AvalonDockDockingManagerTest.cs (.../AvalonDockDockingManagerTest.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -38,31 +38,6 @@ } [Test] - public void LockingAndUnlockingViewSetsLockIcon() - { - var mocks = new MockRepository(); - var dockManager = mocks.Stub(); - var view = new ReusableTestView - { - ViewInfo = new ViewInfo() - }; - - var dock = new AvalonDockDockingManager(dockManager, new[] - { - ViewLocation.Document - }); - dock.Add(view, ViewLocation.Document); - - var layout = TypeUtils.CallPrivateMethod(dock, "GetLayoutContent", view); - - Assert.IsNull(layout.IconSource); //null because view doesn't have its own image - view.Locked = true; - Assert.IsNotNull(layout.IconSource); //(lock) image set - view.Locked = false; - Assert.IsNull(layout.IconSource); - } - - [Test] public void SwitchingTabCausesOldTabsActiveControlToLoseFocusTools9109() { var view = new TestView Index: Core/Common/test/Core.Common.Test/Gui/ViewListTest.cs =================================================================== diff -u -rfa33f7c078c5d17f92f6a519f147a0a371593944 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/test/Core.Common.Test/Gui/ViewListTest.cs (.../ViewListTest.cs) (revision fa33f7c078c5d17f92f6a519f147a0a371593944) +++ Core/Common/test/Core.Common.Test/Gui/ViewListTest.cs (.../ViewListTest.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -67,38 +67,11 @@ } [Test] - public void OpeningAViewForAObjectShouldUseNewViewForLockedReusableView() + public void OpeningAViewForAObjectShouldUseNewView() { - // for example if we have a open functionview. Opening a view for another function should use the existing functionview var viewList = new ViewList(new TestDockingManager(), ViewLocation.Left); var viewResolver = new ViewResolver(viewList, new ViewInfo[] { - new ViewInfo() - }, null); - - var testObject = new object(); - viewResolver.OpenViewForData(testObject); - - var viewForTestObject = (TestReusableView) viewList[0]; - Assert.AreEqual(testObject, viewForTestObject.Data); - - // lock the view so it can't be used for other data - viewForTestObject.Locked = true; - - var otherObject = new object(); - viewResolver.OpenViewForData(otherObject); - - // no extra views. the first view now renders the other object - Assert.AreEqual(2, viewList.Count); - Assert.AreEqual(otherObject, viewList[1].Data); - } - - [Test] - public void OpeningAViewForAObjectShouldUseNewViewForNonLockableView() - { - var viewList = new ViewList(new TestDockingManager(), ViewLocation.Left); - var viewResolver = new ViewResolver(viewList, new ViewInfo[] - { new ViewInfo() }, null); @@ -118,29 +91,6 @@ } [Test] - public void OpeningAViewForAObjectShouldUsingExistingReusableView() - { - // for example if we have a open functionview. Opening a view for another function should use the existing functionview - var viewList = new ViewList(new TestDockingManager(), ViewLocation.Left); - var viewResolver = new ViewResolver(viewList, new ViewInfo[] - { - new ViewInfo() - }, null); - - var testObject = new object(); - viewResolver.OpenViewForData(testObject); - var viewForTestObject = (TestReusableView) viewList[0]; - Assert.AreEqual(testObject, viewForTestObject.Data); - - var otherObject = new object(); - viewResolver.OpenViewForData(otherObject); - - // no extra views. the first view now renders the other object - Assert.AreEqual(1, viewList.Count); - Assert.AreEqual(otherObject, viewList[0].Data); - } - - [Test] public void ReplacingAViewGivesAddAndRemoveEvents() { // get a view manager @@ -249,7 +199,7 @@ { Description = "Object view" }, - new ViewInfo + new ViewInfo { Description = "String view" } // string inherits from object @@ -261,7 +211,7 @@ var view = viewList.ActiveView; Assert.AreEqual(data, view.Data); - Assert.AreEqual(typeof(ReusableTestView), view.GetType()); + Assert.AreEqual(typeof(TestViewDerivative), view.GetType()); } } } \ No newline at end of file Fisheye: Tag 60284d242516286b70997e1894fa22b67d7f10ab refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Test/TestObjects/TestReusableView.Designer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 60284d242516286b70997e1894fa22b67d7f10ab refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Test/TestObjects/TestReusableView.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Test/TestObjects/TestView.cs =================================================================== diff -u -r1edd0ab99383de32bd499b82d258a04cf9bda260 -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/test/Core.Common.Test/TestObjects/TestView.cs (.../TestView.cs) (revision 1edd0ab99383de32bd499b82d258a04cf9bda260) +++ Core/Common/test/Core.Common.Test/TestObjects/TestView.cs (.../TestView.cs) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -1,5 +1,4 @@ -using System; -using System.Windows.Forms; +using System.Windows.Forms; using Core.Common.Controls; using Core.Common.Controls.Views; @@ -17,29 +16,9 @@ public ViewInfo ViewInfo { get; set; } } - public class ReusableTestView : TestView, IReusableView + public class TestViewDerivative : TestView { - public event EventHandler LockedChanged; - private bool locked; - public bool Locked - { - get - { - return locked; - } - set - { - if (!Equals(locked, value)) - { - locked = value; - if (LockedChanged != null) - { - LockedChanged(this, EventArgs.Empty); - } - } - } - } } public class TestWrapper Index: Core/Common/uml/Core.Common.Gui.UML/ViewManager.cd =================================================================== diff -u -rfefc0cc505a41a79d4643c80335484daf4ca30ce -r60284d242516286b70997e1894fa22b67d7f10ab --- Core/Common/uml/Core.Common.Gui.UML/ViewManager.cd (.../ViewManager.cd) (revision fefc0cc505a41a79d4643c80335484daf4ca30ce) +++ Core/Common/uml/Core.Common.Gui.UML/ViewManager.cd (.../ViewManager.cd) (revision 60284d242516286b70997e1894fa22b67d7f10ab) @@ -11,10 +11,6 @@ - - - -