Index: Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj
===================================================================
diff -u -r34af24d6bf23796e627fd03b7532d4abe6fc715c -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 34af24d6bf23796e627fd03b7532d4abe6fc715c)
+++ Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -71,10 +71,8 @@
3.5
-
-
@@ -121,10 +119,6 @@
{3bbfd65b-b277-4e50-ae6d-bd24c3434609}
Core.Common.Base
-
-
- {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98}
- Core.Common.Utils
False
Index: Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj
===================================================================
diff -u -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj (.../Core.Common.Geometry.csproj) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1)
+++ Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj (.../Core.Common.Geometry.csproj) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -34,10 +34,6 @@
..\..\..\..\packages\NetTopologySuite.1.14\lib\net40-client\NetTopologySuite.dll
True
-
- ..\..\..\..\packages\NetTopologySuite.1.14\lib\net40-client\PowerCollections.dll
- True
-
Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -92,18 +92,6 @@
..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.dll
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Expression.dll
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
-
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -493,13 +493,11 @@
};
}
- if (viewController.ViewHost == null)
+ if (viewController.ViewHost != null)
{
- return;
+ viewController.ViewHost.AddToolView(messageWindow, ToolViewLocation.Bottom);
+ viewController.ViewHost.SetImage(messageWindow, Properties.Resources.application_view_list);
}
-
- viewController.ViewHost.AddToolView(messageWindow, ToolViewLocation.Bottom);
- viewController.ViewHost.SetImage(messageWindow, Properties.Resources.application_view_list);
}
private void OnFileSaveClicked(object sender, RoutedEventArgs e)
@@ -577,18 +575,11 @@
// get all ribbon controls
ribbonCommandHandlers = pluginsHost.Plugins.Where(p => p.RibbonCommandHandler != null).Select(p => p.RibbonCommandHandler).ToArray();
- foreach (var ribbonExtension in ribbonCommandHandlers)
+ foreach (var ribbonControl in ribbonCommandHandlers.Select(rch => rch.GetRibbonControl()))
{
- var ribbonControl = ribbonExtension.GetRibbonControl();
-
// fill contextual groups from plugins
- foreach (var group in ribbonControl.ContextualGroups)
+ foreach (var group in ribbonControl.ContextualGroups.Where(group => Ribbon.ContextualGroups.All(g => g.Name != group.Name)))
{
- if (Ribbon.ContextualGroups.Any(g => g.Name == group.Name))
- {
- continue;
- }
-
Ribbon.ContextualGroups.Add(group);
}
@@ -677,13 +668,13 @@
if (active)
{
viewController.ViewHost.Remove(PropertyGrid);
- ButtonShowProperties.IsChecked = false;
}
else
{
InitPropertiesWindowAndActivate();
- ButtonShowProperties.IsChecked = true;
}
+
+ ButtonShowProperties.IsChecked = !active;
}
private void ButtonShowMessages_Click(object sender, RoutedEventArgs e)
@@ -693,13 +684,13 @@
if (active)
{
viewController.ViewHost.Remove(MessageWindow);
- ButtonShowMessages.IsChecked = false;
}
else
{
InitMessagesWindowOrActivate();
- ButtonShowMessages.IsChecked = true;
}
+
+ ButtonShowMessages.IsChecked = !active;
}
private void OnFileHelpLicense_Clicked(object sender, RoutedEventArgs e)
Index: Core/Common/src/Core.Common.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs
===================================================================
diff -u -rb0a6b49616d53055731e23c59b9666313b1cab2b -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision b0a6b49616d53055731e23c59b9666313b1cab2b)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -112,7 +112,6 @@
if (documentViews.Contains(view) || toolViews.Contains(view))
{
SetFocusToView(view);
-
return;
}
@@ -147,7 +146,6 @@
if (documentViews.Contains(view) || toolViews.Contains(view))
{
SetFocusToView(view);
-
return;
}
@@ -164,18 +162,18 @@
toolViews.Add(view);
hostControls.Add(hostControl);
- if (toolViewLocation == ToolViewLocation.Left)
+ switch (toolViewLocation)
{
- leftPane.Children.Add(layoutAnchorable);
+ case ToolViewLocation.Left:
+ leftPane.Children.Add(layoutAnchorable);
+ break;
+ case ToolViewLocation.Bottom:
+ bottomPane.Children.Add(layoutAnchorable);
+ break;
+ case ToolViewLocation.Right:
+ rightPane.Children.Add(layoutAnchorable);
+ break;
}
- else if (toolViewLocation == ToolViewLocation.Bottom)
- {
- bottomPane.Children.Add(layoutAnchorable);
- }
- else if (toolViewLocation == ToolViewLocation.Right)
- {
- rightPane.Children.Add(layoutAnchorable);
- }
SetFocusToView(view);
@@ -352,12 +350,7 @@
private static IView GetView(object content)
{
var windowsFormsHost = content as WindowsFormsHost;
- if (windowsFormsHost != null)
- {
- return windowsFormsHost.Child as IView;
- }
-
- return null;
+ return windowsFormsHost != null ? windowsFormsHost.Child as IView : null;
}
}
}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs
===================================================================
diff -u -r223b2a4edc4ac816051c7eeecb735c34a6246574 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision 223b2a4edc4ac816051c7eeecb735c34a6246574)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -104,11 +104,10 @@
{
return false;
}
- else
- {
- CreateViewFromViewInfo(data, chosenViewInfo);
- return true;
- }
+
+ CreateViewFromViewInfo(data, chosenViewInfo);
+
+ return true;
}
public void CloseAllViewsFor(object data)
@@ -118,12 +117,9 @@
return;
}
- foreach (var view in viewHost.DocumentViews.ToArray())
+ foreach (var view in viewHost.DocumentViews.Where(view => ShouldRemoveViewForData(view, data)))
{
- if (ShouldRemoveViewForData(view, data))
- {
- viewHost.Remove(view);
- }
+ viewHost.Remove(view);
}
}
@@ -172,7 +168,6 @@
if (view != null)
{
viewHost.SetFocusToView(view);
-
return;
}
@@ -237,7 +232,7 @@
private bool IsViewData(IView view, object data)
{
var viewInfo = GetViewInfoForView(view);
- return data.Equals(view.Data) || (IsDataForView(data, GetViewInfoForView(view)) && Equals(viewInfo.GetViewData(data), view.Data));
+ return data.Equals(view.Data) || (IsDataForView(data, viewInfo) && Equals(viewInfo.GetViewData(data), view.Data));
}
private bool IsDataForView(object data, ViewInfo info)
Index: Core/Common/src/Core.Common.Gui/GuiCore.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -87,7 +87,9 @@
if (isAlreadyRunningInstanceOfIGui)
{
isAlreadyRunningInstanceOfIGui = false; // reset to that the consecutive creations won't fail.
- throw new InvalidOperationException(Resources.GuiCore_Only_a_single_instance_of_Ringtoets_is_allowed_at_the_same_time_per_process_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace + instanceCreationStackTrace);
+ throw new InvalidOperationException(
+ string.Format(Resources.GuiCore_Only_a_single_instance_of_Ringtoets_is_allowed_at_the_same_time_per_process_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace_0,
+ instanceCreationStackTrace));
}
if (mainWindow == null)
@@ -517,12 +519,10 @@
private void OnActiveDocumentViewChanged(object sender, EventArgs e)
{
- if (mainWindow == null || mainWindow.IsWindowDisposed)
+ if (mainWindow != null && !mainWindow.IsWindowDisposed)
{
- return;
+ mainWindow.ValidateItems();
}
-
- mainWindow.ValidateItems();
}
private void InitializePlugins()
@@ -579,12 +579,8 @@
StringCollection defaultViews = new StringCollection();
StringCollection defaultViewDataTypes = new StringCollection();
- foreach (Type objectType in DocumentViewController.DefaultViewTypes.Keys)
+ foreach (Type objectType in DocumentViewController.DefaultViewTypes.Keys.Where(objectType => DocumentViewController.DefaultViewTypes[objectType] != null))
{
- if (DocumentViewController.DefaultViewTypes[objectType] == null)
- {
- continue;
- }
defaultViews.Add(DocumentViewController.DefaultViewTypes[objectType].ToString());
defaultViewDataTypes.Add(objectType.ToString());
}
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -645,12 +645,12 @@
}
///
- /// Looks up a localized string similar to Slechts één instantie van de Ringtoets grafische interface is toegestaan per proces. Zorg ervoor dat de vorige instantie correct opgeruimd is. 'Stack trace':.
+ /// Looks up a localized string similar to Slechts één instantie van de Ringtoets grafische interface is toegestaan per proces. Zorg ervoor dat de vorige instantie correct opgeruimd is. 'Stack trace': {0}.
///
- public static string GuiCore_Only_a_single_instance_of_Ringtoets_is_allowed_at_the_same_time_per_process_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace {
+ public static string GuiCore_Only_a_single_instance_of_Ringtoets_is_allowed_at_the_same_time_per_process_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace_0 {
get {
return ResourceManager.GetString("GuiCore_Only_a_single_instance_of_Ringtoets_is_allowed_at_the_same_time_per_proce" +
- "ss_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace", resourceCulture);
+ "ss_Make_sure_that_the_previous_instance_was_disposed_correctly_stack_trace_0", resourceCulture);
}
}
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -328,8 +328,8 @@
Afsluiten
-
- Slechts één instantie van de Ringtoets grafische interface is toegestaan per proces. Zorg ervoor dat de vorige instantie correct opgeruimd is. 'Stack trace':
+
+ Slechts één instantie van de Ringtoets grafische interface is toegestaan per proces. Zorg ervoor dat de vorige instantie correct opgeruimd is. 'Stack trace': {0}
Log Tonen
Index: Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs
===================================================================
diff -u -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab)
+++ Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -25,7 +25,6 @@
using Core.Common.TestUtil;
using NUnit.Extensions.Forms;
using NUnit.Framework;
-using Rhino.Mocks;
namespace Core.Common.Controls.TreeView.Test
{
@@ -1329,9 +1328,7 @@
public void GivenObservableDataOnTreeControl_WhenObserversNotified_ThenNodeForDataChanges()
{
// Given
- var mocks = new MockRepository();
var observable = new TestObservable();
- mocks.ReplayAll();
using (var treeViewControl = new TreeViewControl())
{
@@ -1355,7 +1352,6 @@
// Then
Assert.AreEqual(expectedText, node.Text);
- mocks.VerifyAll();
}
}
Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434
--- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
@@ -41,10 +41,6 @@
..\..\..\..\packages\log4net.2.0.4\lib\net40-full\log4net.dll
True
-
- ..\..\..\..\packages\Fluent.Ribbon.3.4.0\lib\net40\Microsoft.Windows.Shell.dll
- True
-
..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
True
@@ -61,10 +57,6 @@
-
- ..\..\..\..\packages\Fluent.Ribbon.3.4.0\lib\net40\System.Windows.Interactivity.dll
- True
-
@@ -73,22 +65,6 @@
..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.dll
True
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll
- True
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Expression.dll
- True
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll
- True
-
-
- ..\..\..\..\packages\AvalonDock.2.0.2000\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
- True
-
@@ -174,10 +150,6 @@
{f49bd8b2-332a-4c91-a196-8cce0a2c7d98}
Core.Common.Utils
-
- {26214BD0-DAFB-4CFC-8EB2-80C5D53C859E}
- Core.Common.Gui.TestUtil
-
{D749EE4C-CE50-4C17-BF01-9A953028C126}
Core.Common.TestUtil