Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs
===================================================================
diff -u -r0fb8cd7144263c9f0979e756f2eae017b2991870 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 0fb8cd7144263c9f0979e756f2eae017b2991870)
+++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -38,6 +38,7 @@
using Core.Common.Gui;
using Core.Common.Gui.Appenders;
using Core.Common.Gui.Forms.MainWindow;
+using Core.Common.Gui.Settings;
using Core.Plugins.CommonTools;
using Core.Plugins.DotSpatial;
using Core.Plugins.OxyPlot;
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ActiveViewChangeEventArgs.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Appenders/RingtoetsUserDataFolderConverter.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Appenders/RingtoetsUserDataFolderConverter.cs (.../RingtoetsUserDataFolderConverter.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/Appenders/RingtoetsUserDataFolderConverter.cs (.../RingtoetsUserDataFolderConverter.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -21,6 +21,9 @@
using System;
using System.IO;
+
+using Core.Common.Gui.Settings;
+
using log4net.Util;
namespace Core.Common.Gui.Appenders
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ApplicationFeatureCommandHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Commands/ApplicationFeatureCommandHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/ApplicationFeatureCommandHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/ApplicationFeatureCommandHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,95 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Windows.Forms;
+
+using Core.Common.Gui.Forms.MainWindow;
+using Core.Common.Gui.Forms.PropertyGridView;
+using Core.Common.Gui.Properties;
+using Core.Common.Gui.Selection;
+using Core.Common.Gui.Settings;
+
+using log4net;
+using log4net.Appender;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// This class provides concrete implementations for .
+ ///
+ public class ApplicationFeatureCommandHandler : IApplicationFeatureCommands
+ {
+ private readonly IPropertyResolver propertyResolver;
+ private readonly IMainWindow mainWindow;
+ private readonly IApplicationSelection applicationSelection;
+
+ public ApplicationFeatureCommandHandler(IPropertyResolver propertyResolver, IMainWindow mainWindow, IApplicationSelection applicationSelection)
+ {
+ this.propertyResolver = propertyResolver;
+ this.mainWindow = mainWindow;
+ this.applicationSelection = applicationSelection;
+ }
+
+ ///
+ /// Makes the properties window visible and updates the to the
+ /// given .
+ ///
+ /// The object for which to show its properties.
+ public void ShowPropertiesFor(object obj)
+ {
+ ((MainWindow)mainWindow).InitPropertiesWindowAndActivate();
+ applicationSelection.Selection = obj;
+ }
+
+ public bool CanShowPropertiesFor(object obj)
+ {
+ return propertyResolver.GetObjectProperties(obj) != null;
+ }
+
+ public void OpenLogFileExternal()
+ {
+ bool logFileOpened = false;
+
+ try
+ {
+ var fileAppender =
+ LogManager.GetAllRepositories().SelectMany(r => r.GetAppenders()).OfType
+ ().FirstOrDefault();
+ if (fileAppender != null)
+ {
+ var logFile = fileAppender.File;
+ Process.Start(logFile);
+ logFileOpened = true;
+ }
+ }
+ catch (Exception) { }
+
+ if (!logFileOpened)
+ {
+ MessageBox.Show(Resources.GuiCommandHandler_OpenLogFileExternal_Unable_to_open_log_file_Opening_log_file_directory_instead, Resources.GuiCommandHandler_OpenLogFileExternal_Unable_to_open_log_file);
+ Process.Start(SettingsHelper.GetApplicationLocalUserSettingsDirectory());
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/ExportImportCommandHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/ExportImportCommandHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/ExportImportCommandHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,105 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+
+using Core.Common.Base.IO;
+using Core.Common.Base.Plugin;
+using Core.Common.Gui.Properties;
+
+using log4net;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Class responsible for exporting and importing of data.
+ ///
+ public class ExportImportCommandHandler : IExportImportCommandHandler
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(ExportImportCommandHandler));
+
+ private readonly ApplicationCore applicationCore;
+
+ private readonly IDocumentViewController documentViewController;
+
+ private readonly GuiImportHandler importHandler;
+ private readonly GuiExportHandler exportHandler;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ ///
+ ///
+ public ExportImportCommandHandler(IWin32Window dialogParent, ApplicationCore applicationCore, IDocumentViewController documentViewController)
+ {
+ this.applicationCore = applicationCore;
+ this.documentViewController = documentViewController;
+ importHandler = new GuiImportHandler(dialogParent, this.applicationCore);
+ exportHandler = new GuiExportHandler(dialogParent,
+ o => this.applicationCore.GetSupportedFileExporters(o),
+ o => this.documentViewController.DocumentViewsResolver.CreateViewForData(o));
+ }
+
+ public bool CanImportOn(object obj)
+ {
+ return applicationCore.GetSupportedFileImporters(obj).Any();
+ }
+
+ public void ImportOn(object target, IFileImporter importer = null)
+ {
+ try
+ {
+ if (importer == null)
+ {
+ importHandler.ImportDataTo(target);
+ }
+ else
+ {
+ importHandler.ImportUsingImporter(importer, target);
+ }
+ }
+ catch (Exception)
+ {
+ log.ErrorFormat(Resources.GuiCommandHandler_ImportOn_Unable_to_import_on_0_, target);
+ }
+ }
+
+ public bool CanExportFrom(object obj)
+ {
+ return applicationCore.GetSupportedFileExporters(obj).Any();
+ }
+
+ public void ExportFrom(object data, IFileExporter exporter = null)
+ {
+ if (exporter == null)
+ {
+ exportHandler.ExportFrom(data);
+ }
+ else
+ {
+ exportHandler.GetExporterDialog(exporter, data);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,129 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+
+using Core.Common.Base.IO;
+using Core.Common.Controls.Views;
+using Core.Common.Gui.Forms;
+using Core.Common.Gui.Properties;
+
+using log4net;
+
+namespace Core.Common.Gui.Commands
+{
+ public class GuiExportHandler
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(GuiExportHandler));
+ private static readonly Bitmap brickImage = Resources.brick;
+
+ private readonly IWin32Window dialogParent;
+
+ // TODO: refactor it, remove Funcs - too complicated design, initialize exporters in a different way
+ public GuiExportHandler(IWin32Window dialogParent, Func> fileExportersGetter, Func viewGetter)
+ {
+ this.dialogParent = dialogParent;
+ FileExportersGetter = fileExportersGetter;
+ ViewGetter = viewGetter;
+ }
+
+ public void ExportFrom(object item)
+ {
+ var exporter = GetSupportedExporterForItemUsingDialog(item);
+ if (exporter == null)
+ {
+ return;
+ }
+ GetExporterDialog(exporter, item);
+ }
+
+ public void GetExporterDialog(IFileExporter exporter, object selectedItem)
+ {
+ ExporterItemUsingFileOpenDialog(exporter, selectedItem);
+ }
+
+ private Func> FileExportersGetter { get; set; }
+ private Func ViewGetter { get; set; }
+
+ private IFileExporter GetSupportedExporterForItemUsingDialog(object itemToExport)
+ {
+ var sourceType = itemToExport.GetType();
+ var selectExporterDialog = new SelectItemDialog(dialogParent);
+
+ var fileExporters = FileExportersGetter(itemToExport);
+
+ //if there is only one available exporter use that.
+ if (!fileExporters.Any())
+ {
+ MessageBox.Show(Resources.GuiExportHandler_GetSupportedExporterForItemUsingDialog_No_exporter_for_this_item_available);
+ log.Warn(String.Format(Resources.GuiExportHandler_GetSupportedExporterForItemUsingDialog_No_exporter_for_this_item_0_available, sourceType));
+ return null;
+ }
+
+ //if there is only one available exporter use that.
+ if (fileExporters.Count() == 1)
+ {
+ return fileExporters.ElementAt(0);
+ }
+
+ foreach (var fileExporter in fileExporters)
+ {
+ selectExporterDialog.AddItemType(fileExporter.Name, fileExporter.Category, fileExporter.Image ?? brickImage, null);
+ }
+
+ if (selectExporterDialog.ShowDialog() == DialogResult.OK)
+ {
+ return fileExporters.First(i => i.Name == selectExporterDialog.SelectedItemTypeName);
+ }
+
+ return null;
+ }
+
+ private void ExporterItemUsingFileOpenDialog(IFileExporter exporter, object item)
+ {
+ log.Info(Resources.GuiExportHandler_ExporterItemUsingFileOpenDialog_Start_exporting);
+
+ var windowTitle = string.Format(Resources.GuiExportHandler_ExporterItemUsingFileOpenDialog_Select_a_DataType_0_file_to_export_to, exporter.Name);
+ var saveFileDialog = new SaveFileDialog
+ {
+ Filter = exporter.FileFilter,
+ Title = windowTitle,
+ FilterIndex = 2
+ };
+
+ if (saveFileDialog.ShowDialog(dialogParent) == DialogResult.OK)
+ {
+ if (exporter.Export(item, saveFileDialog.FileName))
+ {
+ log.Info(Resources.GuiExportHandler_ExporterItemUsingFileOpenDialog_Finished_exporting);
+ }
+ else
+ {
+ log.Warn(Resources.GuiExportHandler_ExporterItemUsingFileOpenDialog_Export_failed);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,136 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using System.Windows.Forms;
+
+using Core.Common.Base.IO;
+using Core.Common.Base.Plugin;
+using Core.Common.Base.Service;
+using Core.Common.Gui.Forms;
+using Core.Common.Gui.Forms.ProgressDialog;
+using Core.Common.Gui.Properties;
+
+using log4net;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Class responsible for import handling.
+ ///
+ public class GuiImportHandler
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(GuiImportHandler));
+
+ private readonly IWin32Window dialogParent;
+ private readonly ApplicationCore applicationCore;
+
+ public GuiImportHandler(IWin32Window dialogParent, ApplicationCore applicationCore)
+ {
+ this.dialogParent = dialogParent;
+ this.applicationCore = applicationCore;
+ }
+
+ public void ImportUsingImporter(IFileImporter importer, object target)
+ {
+ GetImportedItemsUsingFileOpenDialog(importer, target);
+ }
+
+ public void ImportDataTo(object target)
+ {
+ ImportToItem(target);
+ }
+
+ public IFileImporter GetSupportedImporterForTargetType(object target)
+ {
+ var selectImporterDialog = new SelectItemDialog(dialogParent);
+
+ var importers = applicationCore.GetSupportedFileImporters(target);
+ //if there is only one available exporter use that.
+ if (!importers.Any())
+ {
+ MessageBox.Show(Resources.GuiImportHandler_GetSupportedImporterForTargetType_No_importer_available_for_this_item, Resources.GuiImportHandler_GetSupportedImporterForTargetType_Error);
+ log.ErrorFormat(Resources.GuiImportHandler_GetSupportedImporterForTargetType_No_importer_available_for_this_item_0_, target);
+ return null;
+ }
+
+ //if there is only one available importer use that.
+ if (importers.Count() == 1)
+ {
+ return importers.ElementAt(0);
+ }
+
+ foreach (IFileImporter importer in importers)
+ {
+ var category = string.IsNullOrEmpty(importer.Category) ? Resources.GuiImportHandler_GetSupportedImporterForTargetType_Data_Import : importer.Category;
+ var itemImage = importer.Image ?? Resources.brick;
+
+ selectImporterDialog.AddItemType(importer.Name, category, itemImage, null);
+ }
+
+ if (selectImporterDialog.ShowDialog() == DialogResult.OK)
+ {
+ var importerName = selectImporterDialog.SelectedItemTypeName;
+ return importers.First(i => i.Name == importerName);
+ }
+
+ return null;
+ }
+
+ private void ImportToItem(object item)
+ {
+ var importer = GetSupportedImporterForTargetType(item);
+ if (importer == null)
+ {
+ return;
+ }
+
+ GetImportedItemsUsingFileOpenDialog(importer, item);
+ }
+
+ ///
+ ///
+ ///
+ /// Item to import
+ ///
+ ///
+ private void GetImportedItemsUsingFileOpenDialog(IFileImporter importer, object target)
+ {
+ var windowTitle = string.Format(Resources.GuiImportHandler_GetImportedItemsUsingFileOpenDialog_Select_a_DataType_0_file_to_import_from, importer.Name);
+ var dialog = new OpenFileDialog
+ {
+ Filter = importer.FileFilter,
+ Multiselect = true,
+ Title = windowTitle,
+ RestoreDirectory = true
+ };
+
+ if (dialog.ShowDialog(dialogParent) != DialogResult.OK)
+ {
+ return;
+ }
+
+ log.Info(Resources.GuiImportHandler_GetImportedItemsUsingFileOpenDialog_Start_importing_data);
+
+ ActivityProgressDialogRunner.Run(dialogParent, dialog.FileNames.Select(f => new FileImportActivity(importer, target, f)));
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/IApplicationFeatureCommands.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/IApplicationFeatureCommands.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/IApplicationFeatureCommands.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,44 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Interface that declares application feature manipulation.
+ ///
+ public interface IApplicationFeatureCommands
+ {
+ ///
+ /// Activates the propertyGrid toolbox
+ ///
+ ///
+ void ShowPropertiesFor(object obj);
+
+ ///
+ /// Indicates if there is a property view object for some object.
+ ///
+ ///
+ /// true if a property view is defined, false otherwise.
+ bool CanShowPropertiesFor(object obj);
+
+ void OpenLogFileExternal();
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/ICommandsOwner.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/ICommandsOwner.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/ICommandsOwner.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,40 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Object that holds the commands available within the application.
+ ///
+ public interface ICommandsOwner
+ {
+ ///
+ /// Gets or sets CommandHandler.
+ ///
+ IApplicationFeatureCommands ApplicationCommands { get; }
+
+ IStorageCommands StorageCommands { get; }
+
+ IProjectCommands ProjectCommands { get; }
+
+ IViewCommands ViewCommands { get; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/IExportImportCommandHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/IExportImportCommandHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/IExportImportCommandHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,47 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using Core.Common.Base.IO;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Interface declaring commands/methods related to importing and exporting data.
+ ///
+ public interface IExportImportCommandHandler
+ {
+ ///
+ /// Indicates if there are importers for the current Gui.Selection
+ ///
+ ///
+ bool CanImportOn(object obj);
+
+ ///
+ /// Indicates if there are exporters for the current Gui.Selection
+ ///
+ ///
+ bool CanExportFrom(object obj);
+
+ void ExportFrom(object data, IFileExporter exporter = null);
+
+ void ImportOn(object target, IFileImporter importer = null);
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/IProjectCommands.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/IProjectCommands.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/IProjectCommands.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,46 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+
+using Core.Common.Base.Data;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Interface declaring a set of methods related to adding data to an instance of .
+ ///
+ public interface IProjectCommands
+ {
+ ///
+ /// Presents the user with a dialog from which items can be selected and then created. The items are retrieved
+ /// using the DataItemInfo objects of plugins. The item is NOT added to the project or wrapped in a DataItem.
+ ///
+ ///
+ /// The predicate which must evaluate to true for an item type to be included in the list
+ object AddNewChildItem(object parent, IEnumerable childItemTypes);
+
+ void AddNewItem(object parent);
+
+ void AddItemToProject(object item);
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/IStorageCommands.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/IStorageCommands.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/IStorageCommands.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,77 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+using Core.Common.Base.Data;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Interface for exposing commands/methods related to saving/loading a .
+ ///
+ public interface IStorageCommands : IDisposable
+ {
+ ///
+ /// Creates a new project.
+ ///
+ ///
+ /// The creation action might be cancelled (due to user interaction).
+ ///
+ void CreateNewProject();
+
+ ///
+ /// Saves the project to a new location.
+ ///
+ /// Returns if the project was successfully saved.
+ bool SaveProjectAs();
+
+ ///
+ /// Saves the project to the currently selected location.
+ ///
+ /// Returns if the project was successfully saved.
+ bool SaveProject();
+
+ ///
+ /// Opens an existing project.
+ ///
+ ///
+ /// The opening action might be cancelled (due to user interaction).
+ ///
+ /// Whether or not an existing project was correctly opened.
+ bool OpenExistingProject();
+
+ ///
+ /// Opens an existing project from file.
+ ///
+ /// The path to the existing project file.
+ ///
+ /// The opening action might be cancelled (due to user interaction).
+ ///
+ /// Whether or not an existing project was correctly opened.
+ bool OpenExistingProject(string filePath);
+
+ ///
+ /// Closes the current project.
+ ///
+ void CloseProject();
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/IViewCommands.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/IViewCommands.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/IViewCommands.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,53 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Interface declaring methods related to manipulating views within the application.
+ ///
+ public interface IViewCommands
+ {
+ ///
+ /// Presents the user with a dialog to choose an editor for the selected dataitem
+ ///
+ void OpenSelectViewDialog();
+
+ void OpenViewForSelection();
+
+ void OpenView(object dataObject);
+
+ void RemoveAllViewsForItem(object dataObject);
+
+ ///
+ ///
+ ///
+ /// true if there is a default view for the current selection
+ bool CanOpenViewFor(object obj);
+
+ ///
+ ///
+ /// true if there are more supported views for the current selection
+ bool CanOpenSelectViewDialog();
+
+ object GetDataOfActiveView();
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/ProjectCommandsHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/ProjectCommandsHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/ProjectCommandsHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,137 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+using Core.Common.Base.Plugin;
+using Core.Common.Gui.Forms;
+using Core.Common.Gui.Properties;
+using Core.Common.Gui.Selection;
+
+using log4net;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// This class provides concrete implementation for ;
+ ///
+ public class ProjectCommandsHandler : IProjectCommands
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(ProjectCommandsHandler));
+
+ private readonly IProjectOwner projectOwner;
+ private readonly IWin32Window dialogOwner;
+ private readonly ApplicationCore applicationCore;
+ private readonly IApplicationSelection applicationSelection;
+ private readonly IDocumentViewController documentViewController;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ProjectCommandsHandler(IProjectOwner projectOwner, IWin32Window dialogParent,
+ ApplicationCore applicationCore, IApplicationSelection applicationSelection,
+ IDocumentViewController documentViewController)
+ {
+ this.projectOwner = projectOwner;
+ dialogOwner = dialogParent;
+ this.applicationCore = applicationCore;
+ this.applicationSelection = applicationSelection;
+ this.documentViewController = documentViewController;
+ }
+
+ public object AddNewChildItem(object parent, IEnumerable childItemValueTypes)
+ {
+ using (var selectDataDialog = CreateSelectionDialogWithItems(GetSupportedDataItemInfosByValueTypes(parent, childItemValueTypes).ToList()))
+ {
+ if (selectDataDialog.ShowDialog() == DialogResult.OK)
+ {
+ return GetNewDataObject(selectDataDialog, parent);
+ }
+ return null;
+ }
+ }
+
+ public void AddNewItem(object parent)
+ {
+ if (projectOwner.Project == null)
+ {
+ log.Error(Resources.GuiCommandHandler_AddNewItem_There_needs_to_be_a_project_to_add_an_item);
+ }
+
+ using (var selectDataDialog = CreateSelectionDialogWithItems(applicationCore.GetSupportedDataItemInfos(parent).ToList()))
+ {
+ if (selectDataDialog.ShowDialog() == DialogResult.OK)
+ {
+ var newItem = GetNewDataObject(selectDataDialog, parent);
+ if (newItem != null)
+ {
+ AddItemToProject(newItem);
+
+ applicationSelection.Selection = newItem;
+ documentViewController.DocumentViewsResolver.OpenViewForData(applicationSelection.Selection);
+ }
+ }
+ }
+ }
+
+ public void AddItemToProject(object newItem)
+ {
+ projectOwner.Project.Items.Add(newItem);
+ projectOwner.Project.NotifyObservers();
+ }
+
+ private IEnumerable GetSupportedDataItemInfosByValueTypes(object parent, IEnumerable valueTypes)
+ {
+ return applicationCore.GetSupportedDataItemInfos(parent).Where(dii => valueTypes.Contains(dii.ValueType));
+ }
+
+ private SelectItemDialog CreateSelectionDialogWithItems(IEnumerable dataItemInfos)
+ {
+ var selectDataDialog = new SelectItemDialog(dialogOwner);
+
+ foreach (var dataItemInfo in dataItemInfos)
+ {
+ selectDataDialog.AddItemType(dataItemInfo.Name, dataItemInfo.Category, dataItemInfo.Image, dataItemInfo);
+ }
+
+ return selectDataDialog;
+ }
+
+ private static object GetNewDataObject(SelectItemDialog selectDataDialog, object parent)
+ {
+ var dataItemInfo = selectDataDialog.SelectedItemTag as DataItemInfo;
+ if (dataItemInfo == null)
+ {
+ return null;
+ }
+
+ return dataItemInfo.CreateData != null ? dataItemInfo.CreateData(parent) : null;
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,330 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Specialized;
+using System.IO;
+using System.Windows.Forms;
+
+using Core.Common.Base;
+using Core.Common.Base.Data;
+using Core.Common.Base.Storage;
+using Core.Common.Controls.Views;
+using Core.Common.Gui.Properties;
+using Core.Common.Gui.Selection;
+
+using log4net;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// Class responsible for persistency of .
+ ///
+ public class StorageCommandHandler : IStorageCommands, IObserver
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(StorageCommandHandler));
+
+ private readonly IViewCommands viewCommands;
+ private readonly IMainWindowController mainWindowController;
+ private readonly IProjectOwner projectOwner;
+ private readonly IStoreProject projectPersistor;
+ private readonly IApplicationSelection applicationSelection;
+ private readonly IToolViewController toolViewController;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Class responsible to storing and loading the application project.
+ /// The class owning the application project.
+ /// Class managing the application selection.
+ /// Controller for UI.
+ /// Controller for Tool Windows.
+ /// The view command handler.
+ public StorageCommandHandler(IStoreProject projectStorage, IProjectOwner projectOwner,
+ IApplicationSelection applicationSelection, IMainWindowController mainWindowController,
+ IToolViewController toolViewController, IViewCommands viewCommands)
+ {
+ this.viewCommands = viewCommands;
+ this.mainWindowController = mainWindowController;
+ this.projectOwner = projectOwner;
+ projectPersistor = projectStorage;
+ this.applicationSelection = applicationSelection;
+ this.toolViewController = toolViewController;
+
+ this.projectOwner.ProjectOpened += ApplicationProjectOpened;
+ this.projectOwner.ProjectClosing += ApplicationProjectClosing;
+ }
+
+ public void UpdateObserver()
+ {
+ mainWindowController.RefreshGui();
+ }
+
+ ///
+ /// Closes the current and creates a new (empty) .
+ ///
+ public void CreateNewProject()
+ {
+ CloseProject();
+
+ log.Info(Resources.Project_new_opening);
+ projectOwner.Project = new Project();
+ projectOwner.ProjectFilePath = "";
+ log.Info(Resources.Project_new_successfully_opened);
+
+ mainWindowController.RefreshGui();
+ }
+
+ ///
+ /// Opens a new where a file can be selected to open.
+ ///
+ /// true if an existing has been loaded, false otherwise.
+ public bool OpenExistingProject()
+ {
+ var openFileDialog = new OpenFileDialog
+ {
+ Filter = Resources.Ringtoets_project_file_filter,
+ FilterIndex = 1,
+ RestoreDirectory = true
+ };
+
+ if (openFileDialog.ShowDialog(mainWindowController.MainWindow) != DialogResult.Cancel)
+ {
+ return OpenExistingProject(openFileDialog.FileName);
+ }
+ log.Warn(Resources.Project_existing_project_opening_cancelled);
+ return false;
+ }
+
+ ///
+ /// Loads a , based upon .
+ ///
+ /// Location of the storage file.
+ /// true if an existing has been loaded, false otherwise.
+ public bool OpenExistingProject(string filePath)
+ {
+ log.Info(Resources.Project_existing_opening_project);
+
+ Project loadedProject;
+ try
+ {
+ loadedProject = projectPersistor.LoadProject(filePath);
+ }
+ catch (StorageException e)
+ {
+ log.Warn(e.Message, e.InnerException);
+ log.Warn(Resources.Project_existing_project_opening_failed);
+ return false;
+ }
+
+ if (loadedProject == null)
+ {
+ log.Warn(Resources.Project_existing_project_opening_failed);
+ return false;
+ }
+
+ // Project loaded successfully, close current project
+ CloseProject();
+
+ projectOwner.ProjectFilePath = filePath;
+ projectOwner.Project = loadedProject;
+ projectOwner.Project.Name = Path.GetFileNameWithoutExtension(filePath);
+ projectOwner.Project.NotifyObservers();
+ mainWindowController.RefreshGui();
+ log.Info(Resources.Project_existing_successfully_opened);
+ return true;
+ }
+
+ ///
+ /// Close current project (if any) and related views.
+ ///
+ public void CloseProject()
+ {
+ if (projectOwner.Project == null)
+ {
+ return;
+ }
+
+ // remove views before closing project.
+ viewCommands.RemoveAllViewsForItem(projectOwner.Project);
+
+ projectOwner.Project = null;
+ projectOwner.ProjectFilePath = "";
+ applicationSelection.Selection = null;
+
+ mainWindowController.RefreshGui();
+ }
+
+ ///
+ /// Saves the current to the selected storage file.
+ ///
+ /// Returns true if the save was successful, false otherwise.
+ public bool SaveProjectAs()
+ {
+ var project = projectOwner.Project;
+ if (project == null)
+ {
+ return false;
+ }
+
+ var filePath = OpenRingtoetsProjectFileSaveDialog(project.Name);
+ if (String.IsNullOrWhiteSpace(filePath))
+ {
+ return false;
+ }
+
+ if (!TrySaveProjectAs(projectPersistor, filePath))
+ {
+ return false;
+ }
+
+ // Save was successful, store location
+ projectOwner.ProjectFilePath = filePath;
+ project.Name = Path.GetFileNameWithoutExtension(filePath);
+ project.NotifyObservers();
+ mainWindowController.RefreshGui();
+ log.Info(String.Format(Resources.Project_saving_project_saved_0, project.Name));
+ return true;
+ }
+
+ ///
+ /// Saves the current to the defined storage file.
+ ///
+ /// Returns if the save was successful.
+ public bool SaveProject()
+ {
+ var project = projectOwner.Project;
+ if (project == null)
+ {
+ return false;
+ }
+ var filePath = projectOwner.ProjectFilePath;
+
+ // If filepath is not set, go to SaveAs
+ if (string.IsNullOrWhiteSpace(filePath))
+ {
+ return SaveProjectAs();
+ }
+
+ if (!TrySaveProject(projectPersistor, filePath))
+ {
+ return false;
+ }
+
+ log.Info(String.Format(Resources.Project_saving_project_saved_0, project.Name));
+ return true;
+ }
+
+ public void Dispose()
+ {
+ projectOwner.ProjectOpened -= ApplicationProjectOpened;
+ projectOwner.ProjectClosing -= ApplicationProjectClosing;
+ }
+
+ ///
+ /// Prompts a new to select a location for saving the Ringtoets project file.
+ ///
+ /// A string containing the file name selected in the file dialog box.
+ /// The selected project file, or null otherwise.
+ private static string OpenRingtoetsProjectFileSaveDialog(string projectName)
+ {
+ // show file open dialog and select project file
+ var saveFileDialog = new SaveFileDialog
+ {
+ Filter = string.Format(Resources.Ringtoets_project_file_filter),
+ FilterIndex = 1,
+ RestoreDirectory = true,
+ FileName = string.Format("{0}", projectName)
+ };
+
+ if (saveFileDialog.ShowDialog() != DialogResult.OK)
+ {
+ log.Warn(Resources.Project_saving_project_cancelled);
+ return null;
+ }
+ return saveFileDialog.FileName;
+ }
+
+ private bool TrySaveProjectAs(IStoreProject storage, string filePath)
+ {
+ try
+ {
+ storage.SaveProjectAs(filePath, projectOwner.Project);
+ return true;
+ }
+ catch (StorageException e)
+ {
+ log.Warn(e.Message, e.InnerException);
+ log.Warn(Resources.Project_saving_project_failed);
+ return false;
+ }
+ }
+
+ private bool TrySaveProject(IStoreProject storage, string filePath)
+ {
+ try
+ {
+ storage.SaveProject(filePath, projectOwner.Project);
+ return true;
+ }
+ catch (StorageException e)
+ {
+ log.Warn(e.Message, e.InnerException);
+ log.Warn(Resources.Project_saving_project_failed);
+ return false;
+ }
+ }
+
+ private void ApplicationProjectClosing(Project project)
+ {
+ // clean all views
+ viewCommands.RemoveAllViewsForItem(project);
+
+ if (toolViewController.ToolWindowViews != null)
+ {
+ foreach (IView view in toolViewController.ToolWindowViews)
+ {
+ view.Data = null;
+ }
+ }
+
+ project.Detach(this);
+ }
+
+ private void ApplicationProjectOpened(Project project)
+ {
+ applicationSelection.Selection = project;
+
+ project.Attach(this);
+ }
+
+ private void AddProjectToMruList()
+ {
+ var mruList = (StringCollection) Properties.Settings.Default["mruList"];
+ if (mruList.Contains(projectOwner.ProjectFilePath))
+ {
+ mruList.Remove(projectOwner.ProjectFilePath);
+ }
+
+ mruList.Insert(0, projectOwner.ProjectFilePath);
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Commands/ViewCommandHandler.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Commands/ViewCommandHandler.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Commands/ViewCommandHandler.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,112 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Collections.Generic;
+using System.Linq;
+
+using Core.Common.Controls.Views;
+using Core.Common.Gui.Selection;
+
+namespace Core.Common.Gui.Commands
+{
+ ///
+ /// This class provides concrete implementation of .
+ ///
+ public class ViewCommandHandler : IViewCommands
+ {
+ private readonly IDocumentViewController documentViewController;
+ private readonly IToolViewController toolViewController;
+ private readonly IApplicationSelection applicationSelection;
+ private readonly IGuiPluginsHost guiPluginsHost;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ViewCommandHandler(IDocumentViewController documentViewController, IToolViewController toolViewController,
+ IApplicationSelection applicationSelection, IGuiPluginsHost pluginsHost)
+ {
+ this.documentViewController = documentViewController;
+ this.toolViewController = toolViewController;
+ this.applicationSelection = applicationSelection;
+ guiPluginsHost = pluginsHost;
+ }
+
+ public object GetDataOfActiveView()
+ {
+ return documentViewController.DocumentViews.ActiveView != null ? documentViewController.DocumentViews.ActiveView.Data : null;
+ }
+
+ public bool CanOpenSelectViewDialog()
+ {
+ return applicationSelection.Selection != null && documentViewController.DocumentViewsResolver.GetViewInfosFor(applicationSelection.Selection).Count() > 1;
+ }
+
+ public void OpenSelectViewDialog()
+ {
+ documentViewController.DocumentViewsResolver.OpenViewForData(applicationSelection.Selection, true);
+ }
+
+ public bool CanOpenViewFor(object obj)
+ {
+ return documentViewController.DocumentViewsResolver.GetViewInfosFor(obj).Any();
+ }
+
+ public void OpenView(object dataObject)
+ {
+ documentViewController.DocumentViewsResolver.OpenViewForData(dataObject);
+ }
+
+ public void OpenViewForSelection()
+ {
+ documentViewController.DocumentViewsResolver.OpenViewForData(applicationSelection.Selection);
+ }
+
+ ///
+ /// Removes all document and tool views that are associated to the dataObject and/or its children.
+ ///
+ ///
+ public void RemoveAllViewsForItem(object dataObject)
+ {
+ if (dataObject == null || documentViewController == null || documentViewController.DocumentViews == null || documentViewController.DocumentViews.Count == 0)
+ {
+ return;
+ }
+ foreach (var data in guiPluginsHost.GetAllDataWithViewDefinitionsRecursively(dataObject))
+ {
+ documentViewController.DocumentViewsResolver.CloseAllViewsFor(data);
+ RemoveViewsAndData(toolViewController.ToolWindowViews.Where(v => v.Data == data).ToArray());
+ }
+ }
+
+ private void RemoveViewsAndData(IEnumerable toolViews)
+ {
+ // set all tool windows where dataObject was used to null
+ foreach (var view in toolViews)
+ {
+ view.Data = null;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs (.../ContextMenuBuilder.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs (.../ContextMenuBuilder.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,7 @@
using System;
using System.Windows.Forms;
using Core.Common.Controls.TreeView;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.Properties;
namespace Core.Common.Gui.ContextMenu
Index: Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -21,6 +21,8 @@
using System;
using System.Windows.Forms;
+
+using Core.Common.Gui.Commands;
using Core.Common.Gui.Properties;
namespace Core.Common.Gui.ContextMenu
Index: Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs (.../IContextMenuBuilder.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs (.../IContextMenuBuilder.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,8 @@
using System;
using System.Windows.Forms;
+using Core.Common.Gui.Commands;
+
namespace Core.Common.Gui.ContextMenu
{
///
Index: Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilderProvider.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilderProvider.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilderProvider.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,47 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Windows.Forms;
+
+using Core.Common.Controls.TreeView;
+
+namespace Core.Common.Gui.ContextMenu
+{
+ ///
+ /// Interface which describes classes that are able to provide a .
+ ///
+ public interface IContextMenuBuilderProvider
+ {
+ ///
+ /// Returns a new for creating a
+ /// for the given .
+ ///
+ /// The to have the
+ /// create a for.
+ /// The to use while creating the
+ /// .
+ /// The which can be used to create a
+ /// for .
+ /// Thrown when the instance could
+ /// not be created.
+ IContextMenuBuilder Get(TreeNode treeNode, TreeNodeInfo treeNodeInfo);
+ }
+}
\ No newline at end of file
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ControlHelper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Converters/ExpandableArrayConverter.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Converters/ExpandableArrayConverter.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Converters/ExpandableArrayConverter.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,106 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.ComponentModel;
+using System.Globalization;
+
+using Core.Common.Gui.Properties;
+
+namespace Core.Common.Gui.Converters
+{
+ ///
+ /// with modified conversion to string and shows as array
+ /// starting with index 1 instead of 0.
+ ///
+ public class ExpandableArrayConverter : ArrayConverter
+ {
+ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ var array = value as Array;
+ if (destinationType == typeof(string) && array != null)
+ {
+ return string.Format(Resources.ExpandableArrayConverter_ConvertTo_Count_0_, array.GetLength(0));
+ }
+
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
+
+ public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
+ {
+ PropertyDescriptor[] properties = null;
+ var array = value as Array;
+ if (array != null)
+ {
+ int length = array.GetLength(0);
+ properties = new PropertyDescriptor[length];
+
+ Type type = array.GetType();
+ Type elementType = type.GetElementType();
+ for (int index = 0; index < length; ++index)
+ {
+ properties[index] = new ArrayPropertyDescriptor(type, elementType, index);
+ }
+ }
+ return new PropertyDescriptorCollection(properties);
+ }
+
+ #region Nested Type: ArrayPropertyDescriptor
+
+ ///
+ /// Array element property descriptor used by .
+ /// Properties are named based on their index + 1.
+ ///
+ private class ArrayPropertyDescriptor : SimplePropertyDescriptor
+ {
+ private readonly int index;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Type of the array.
+ /// Type of the elements in .
+ /// Index of the element corresponding with this property descriptor.
+ public ArrayPropertyDescriptor(Type arrayType, Type elementType, int elementIndex)
+ : base(arrayType, "[" + (elementIndex + 1) + "]", elementType, null)
+ {
+ index = elementIndex;
+ }
+
+ public override object GetValue(object instance)
+ {
+ var array = (Array)instance;
+ return array.GetValue(index);
+ }
+
+ public override void SetValue(object instance, object value)
+ {
+ var array = (Array)instance;
+ array.SetValue(value, index);
+ // This class is based on the System.ComponentModel.ArrayConverter.ArrayPropertyDescriptor,
+ // and there the SetValue also called OnValueChanged. Copying that behavior here as well.
+ OnValueChanged(array, EventArgs.Empty);
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Converters/PngToIconConverter.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Converters/PngToIconConverter.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Converters/PngToIconConverter.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,49 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.IO;
+using System.Windows.Data;
+using System.Windows.Media.Imaging;
+
+namespace Core.Common.Gui.Converters
+{
+ public class PngToIconConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ MemoryStream ms = new MemoryStream();
+ ((System.Drawing.Bitmap)value).Save(ms, System.Drawing.Imaging.ImageFormat.Png);
+ BitmapImage image = new BitmapImage();
+ image.BeginInit();
+ ms.Seek(0, SeekOrigin.Begin);
+ image.StreamSource = ms;
+ image.EndInit();
+
+ return image;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -118,7 +118,23 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Form
@@ -127,39 +143,40 @@
MessageWindowDialog.cs
-
-
+
+
+
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
-
Component
-
Form
@@ -168,11 +185,8 @@
-
-
-
@@ -240,12 +254,6 @@
ViewSelectionContextMenuController.cs
-
-
-
-
-
-
True
True
@@ -257,17 +265,8 @@
True
True
-
-
-
-
-
-
-
-
-
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/CustomSettingsProvider.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ExpandableArrayConverter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ExportImportCommandHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Forms/ControlHelper.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Forms/ControlHelper.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Forms/ControlHelper.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace Core.Common.Gui.Forms
+{
+ public static class ControlHelper
+ {
+ [DllImport("user32.dll")]
+ public static extern int SendMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);
+
+ [DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
+ public static extern int SetWindowTheme(IntPtr hWnd, string textSubAppName, string textSubIdList);
+
+ ///
+ /// Call this method on a view if you want to trigger data binding. For example when switching between views, closing a
+ /// view or when performing a save.
+ ///
+ /// control to unfocus / trigger validation
+ /// If 'true', it messes with switch to another control/tab, but it is required
+ /// if you close a view or want the current view to commit any changes.
+ public static void UnfocusActiveControl(IContainerControl containerControl, bool notSwitchingToOtherControl = false)
+ {
+ if (containerControl == null)
+ {
+ return;
+ }
+
+ while (containerControl.ActiveControl is IContainerControl)
+ {
+ containerControl = containerControl.ActiveControl as IContainerControl;
+ }
+
+ var control = containerControl as Control;
+ if (notSwitchingToOtherControl && control != null && !control.ContainsFocus)
+ {
+ control.Focus();
+ }
+
+ containerControl.ActiveControl = null; //unfocus current control, to force binding to happen
+ }
+
+ // Import GetFocus() from user32.dll
+ [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Winapi)]
+ internal static extern IntPtr GetFocus();
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -37,10 +37,15 @@
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
+
+using Core.Common.Gui.Commands;
using Core.Common.Gui.Forms.MainWindow.Interop;
using Core.Common.Gui.Forms.MessageWindow;
using Core.Common.Gui.Forms.Options;
-using Core.Common.Gui.Properties;
+using Core.Common.Gui.Forms.ViewManager;
+
+using Core.Common.Gui.Selection;
+using Core.Common.Gui.Settings;
using Core.Common.Gui.Theme;
using Core.Common.Utils;
using Core.Common.Utils.Events;
@@ -52,6 +57,7 @@
using Xceed.Wpf.AvalonDock.Layout;
using Xceed.Wpf.AvalonDock.Layout.Serialization;
using Xceed.Wpf.AvalonDock.Themes;
+using Settings = Core.Common.Gui.Properties.Settings;
using Button = Fluent.Button;
using Cursors = System.Windows.Input.Cursors;
using WindowsFormApplication = System.Windows.Forms.Application;
@@ -552,7 +558,7 @@
private void AddRecentlyOpenedProjectsToFileMenu()
{
- var mruList = Settings.Default["mruList"] as StringCollection;
+ var mruList = Properties.Settings.Default["mruList"] as StringCollection;
foreach (var recent in mruList)
{
@@ -604,7 +610,7 @@
private void CommitMruToSettings()
{
- var mruList = (StringCollection) Settings.Default["mruList"];
+ var mruList = (StringCollection)Properties.Settings.Default["mruList"];
mruList.Clear();
@@ -783,10 +789,10 @@
private void RestoreWindowAppearance()
{
WindowStartupLocation = WindowStartupLocation.Manual;
- var x = Settings.Default.MainWindow_X;
- var y = Settings.Default.MainWindow_Y;
- var width = Settings.Default.MainWindow_Width;
- var height = Settings.Default.MainWindow_Height;
+ var x = Properties.Settings.Default.MainWindow_X;
+ var y = Properties.Settings.Default.MainWindow_Y;
+ var width = Properties.Settings.Default.MainWindow_Width;
+ var height = Properties.Settings.Default.MainWindow_Height;
var rec = new Rectangle(x, y, width, height);
if (!IsVisibleOnAnyScreen(rec))
@@ -795,7 +801,7 @@
height = Screen.PrimaryScreen.Bounds.Height - 200;
}
- var fs = Settings.Default.MainWindow_FullScreen;
+ var fs = Properties.Settings.Default.MainWindow_FullScreen;
Width = width;
Height = height;
if (fs)
@@ -821,15 +827,15 @@
{
if (WindowState == WindowState.Maximized)
{
- Settings.Default.MainWindow_FullScreen = true;
+ Properties.Settings.Default.MainWindow_FullScreen = true;
}
else
{
- Settings.Default.MainWindow_Width = (int) Width;
- Settings.Default.MainWindow_Height = (int) Height;
- Settings.Default.MainWindow_FullScreen = false;
+ Properties.Settings.Default.MainWindow_Width = (int) Width;
+ Properties.Settings.Default.MainWindow_Height = (int) Height;
+ Properties.Settings.Default.MainWindow_FullScreen = false;
}
- Settings.Default.Save();
+ Properties.Settings.Default.Save();
}
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
Index: Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -27,6 +27,7 @@
using System.Windows.Forms;
using Core.Common.Base;
using Core.Common.Gui.Properties;
+using Core.Common.Gui.Selection;
namespace Core.Common.Gui.Forms.PropertyGridView
{
Index: Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyResolver.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyResolver.cs (.../PropertyResolver.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyResolver.cs (.../PropertyResolver.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
+
+using Core.Common.Gui.Plugin;
using Core.Common.Gui.Properties;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Reflection;
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ActiveViewChangeEventArgs.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ActiveViewChangeEventArgs.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ActiveViewChangeEventArgs.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,40 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+using Core.Common.Controls.Views;
+
+namespace Core.Common.Gui.Forms.ViewManager
+{
+ public class ActiveViewChangeEventArgs : EventArgs
+ {
+ ///
+ /// Current view.
+ ///
+ public IView View { get; set; }
+
+ ///
+ /// Previous view.
+ ///
+ public IView OldView { get; set; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewList.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewList.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewList.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,102 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+
+using Core.Common.Controls.Views;
+using Core.Common.Utils.Events;
+
+namespace Core.Common.Gui.Forms.ViewManager
+{
+ [Flags]
+ public enum ViewLocation
+ {
+ Document = 0x0,
+ Left = 0x1,
+ Right = 0x2,
+ Top = 0x4,
+ Bottom = 0x8,
+ Floating = 0x16
+ };
+
+ ///
+ /// Manages currently displayed views
+ ///
+ public interface IViewList : IList, IDisposable
+ {
+ ///
+ /// Fired before active view has been changed.
+ ///
+ event EventHandler ActiveViewChanging;
+
+ ///
+ /// Fired after active view has been changed.
+ ///
+ 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; }
+
+ ///
+ /// Gets or sets active view, when view is active - its window is activated.
+ ///
+ IView ActiveView { get; set; }
+
+ ///
+ /// Returns all views. Including views inside composite views
+ ///
+ IEnumerable AllViews { get; }
+
+ ///
+ /// Adds a view to the UI.
+ ///
+ ///
+ ///
+ void Add(IView view, ViewLocation viewLocation);
+
+ ///
+ /// Sets the tooltip of the view
+ ///
+ ///
+ ///
+ void SetTooltip(IView view, string tooltip);
+
+ ///
+ /// Updates the name of the view
+ ///
+ ///
+ void UpdateViewName(IView view);
+
+ ///
+ /// Overloaded Clear, removes all views except
+ ///
+ ///
+ void Clear(IView viewToKeep);
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewResolver.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewResolver.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/IViewResolver.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,97 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+
+using Core.Common.Controls.Views;
+using Core.Common.Gui.Plugin;
+
+namespace Core.Common.Gui.Forms.ViewManager
+{
+ public interface IViewResolver
+ {
+ ///
+ /// Default view types registered for data object types.
+ ///
+ /// The keys in this dictionary are the object types and the values the
+ /// corresponding view object types.
+ IDictionary DefaultViewTypes { get; }
+
+ ///
+ /// List of view info objects used for resolving views
+ ///
+ IList ViewInfos { get; }
+
+ ///
+ /// Opens a view for specified data. Using viewprovider to resolve the correct view.
+ ///
+ /// Data to open a view for
+ /// Always present the user with a dialog to choose from
+ bool OpenViewForData(object data, bool alwaysShowDialog = false);
+
+ ///
+ /// Creates a view for the
+ ///
+ /// The data to create a view for
+ /// Function to filter the view infos to use
+ /// A view for data
+ IView CreateViewForData(object data, Func selectViewInfo = null);
+
+ ///
+ /// Check if a view can be created for the .
+ ///
+ /// The data to check for
+ ///
+ bool CanOpenViewFor(object data);
+
+ ///
+ /// Returns all currently opened views for the same data.
+ ///
+ ///
+ ///
+ IList GetViewsForData(object data);
+
+ ///
+ /// Closes all views for .
+ ///
+ ///
+ ///
+ void CloseAllViewsFor(object data);
+
+ ///
+ /// Gives the default viewtype for the given data object.
+ ///
+ ///
+ ///
+ Type GetDefaultViewType(object dataObject);
+
+ ///
+ /// Gets the view info objects for the
+ ///
+ /// Data used for searching the view infos
+ /// The viewType of the view info
+ /// The matching view infos for data and view type
+ IEnumerable GetViewInfosFor(object data, Type viewType = null);
+
+ string GetViewName(IView view);
+ }
+}
\ No newline at end of file
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/GuiCoreSettings.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/GuiExportHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/GuiImportHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/GuiPlugin.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IApplicationFeatureCommands.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IApplicationSelection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ICommandsOwner.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IContextMenuBuilderProvider.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/IDocumentViewController.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/IDocumentViewController.cs (.../IDocumentViewController.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/IDocumentViewController.cs (.../IDocumentViewController.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Controls.Views;
+using Core.Common.Gui.Forms.ViewManager;
namespace Core.Common.Gui
{
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IExportImportCommandHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/IGui.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -23,8 +23,12 @@
using Core.Common.Base.Plugin;
using Core.Common.Base.Storage;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Forms.PropertyGridView;
using Core.Common.Gui.PropertyBag;
+using Core.Common.Gui.Selection;
+using Core.Common.Gui.Settings;
namespace Core.Common.Gui
{
Index: Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs (.../IGuiPluginsHost.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs (.../IGuiPluginsHost.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -23,6 +23,8 @@
using System.Collections;
using System.Collections.Generic;
+using Core.Common.Gui.Plugin;
+
namespace Core.Common.Gui
{
///
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IObjectProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IProjectCommands.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ISettingsOwner.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IStorageCommands.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/IToolViewController.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/IToolViewController.cs (.../IToolViewController.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/IToolViewController.cs (.../IToolViewController.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Controls.Views;
+using Core.Common.Gui.Forms.ViewManager;
namespace Core.Common.Gui
{
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IViewCommands.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IViewList.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IViewResolver.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ItemEventArgs.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ObjectProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Plugin/GuiPlugin.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Plugin/GuiPlugin.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Plugin/GuiPlugin.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,97 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Core.Common.Controls.TreeView;
+using Core.Common.Gui.Forms;
+
+namespace Core.Common.Gui.Plugin
+{
+ ///
+ /// Template class for gui plugin definitions.
+ ///
+ public abstract class GuiPlugin : IDisposable
+ {
+ ///
+ /// Gets or sets the gui.
+ ///
+ public virtual IGui Gui { get; set; }
+
+ ///
+ /// Ribbon command handler (adding tabs, groups, buttons, etc.) which can be provided by the gui plugin.
+ ///
+ public virtual IRibbonCommandHandler RibbonCommandHandler
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+ ///
+ /// Activates the gui plugin.
+ ///
+ public virtual void Activate() {}
+
+ ///
+ /// Deactivates the gui plugin.
+ ///
+ public virtual void Deactivate() {}
+
+ ///
+ /// Property info objects which can be provided by the gui plugin.
+ ///
+ public virtual IEnumerable GetPropertyInfos()
+ {
+ return Enumerable.Empty();
+ }
+
+ ///
+ /// View information objects which can be provided by the gui plugin.
+ ///
+ public virtual IEnumerable GetViewInfoObjects()
+ {
+ yield break;
+ }
+
+ ///
+ /// This method returns an enumeration of .
+ ///
+ /// The enumeration of provided by the .
+ public virtual IEnumerable GetTreeNodeInfos()
+ {
+ yield break;
+ }
+
+ public virtual IEnumerable GetChildDataWithViewDefinitions(object dataObject)
+ {
+ yield break;
+ }
+
+ public virtual void Dispose()
+ {
+ Gui = null;
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Plugin/PropertyInfo.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Plugin/PropertyInfo.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Plugin/PropertyInfo.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,156 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+using Core.Common.Gui.PropertyBag;
+
+namespace Core.Common.Gui.Plugin
+{
+ ///
+ /// Information for creating object properties
+ ///
+ public class PropertyInfo
+ {
+ ///
+ /// The type of the object to create properties for
+ ///
+ public Type ObjectType { get; set; }
+
+ ///
+ /// The type of object properties to create
+ ///
+ public Type PropertyType { get; set; }
+
+ ///
+ /// Function for determining whether or not the property information is relevant in a specfic context
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ /// var propertyInfo = new PropertyInfo < Folder, ModelImplementationFolderProperties} { AdditionalDataCheck = o => GetParent(o) is ModelImplementation };
+ ///
+ ///
+ /// This property breaks the single responsibility principle; besides and an additional method is
+ /// introduced to determine whether or not property information is relevant in a specfic context.
+ ///
+ public Func AdditionalDataCheck { get; set; }
+
+ ///
+ /// Function for obtaining the data that should be set while creating object properties
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ /// var propertyInfo = new PropertyInfo <ModelImplementation, ModelImplementationProperties> { GetObjectPropertiesData = o => o.RunParameters };
+ ///
+ public Func GetObjectPropertiesData { get; set; }
+
+ ///
+ /// Action that must be performed after creating object properties
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ /// var propertyInfo = new PropertyInfo < ModelImplementation, ModelImplementationProperties > { AfterCreate = op => op.AdditionalBooleanProperty = true };
+ ///
+ public Action AfterCreate { get; set; }
+ }
+
+ ///
+ /// Information for creating object properties
+ ///
+ /// The type of the object to create object properties for
+ /// The type of the object properties to create
+ public class PropertyInfo where TProperty : IObjectProperties
+ {
+ ///
+ /// The type of the object to create properties for
+ ///
+ public Type ObjectType
+ {
+ get
+ {
+ return typeof(TObject);
+ }
+ }
+
+ ///
+ /// The type of object properties to create
+ ///
+ public Type PropertyType
+ {
+ get
+ {
+ return typeof(TProperty);
+ }
+ }
+
+ ///
+ /// Function for determining whether or not the property information is relevant in a specfic context
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ ///
+ /// var propertyInfo = new PropertyInfo < Folder, ModelImplementationFolderProperties> { AdditionalDataCheck = o => GetParent(o) is ModelImplementation };
+ ///
+ ///
+ ///
+ /// This property breaks the single responsibility principle; besides and an additional method is
+ /// introduced to determine whether or not property information is relevant in a specfic context.
+ ///
+ public Func AdditionalDataCheck { get; set; }
+
+ ///
+ /// Function for obtaining the data that should be set while creating object properties
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ ///
+ /// var propertyInfo = new PropertyInfo <ModelImplementation, ModelImplementationProperties> { GetObjectPropertiesData = o => o.RunParameters };
+ ///
+ public Func GetObjectPropertiesData { get; set; }
+
+ ///
+ /// Action that must be performed after creating object properties
+ ///
+ ///
+ /// As an example, you could implement this as follows:
+ /// var propertyInfo = new PropertyInfo< ModelImplementation, ModelImplementationProperties> { AfterCreate = op => op.AdditionalBooleanProperty = true };
+ ///
+ public Action AfterCreate { get; set; }
+
+ public static implicit operator PropertyInfo(PropertyInfo pi)
+ {
+ return new PropertyInfo
+ {
+ ObjectType = typeof(TObject),
+ PropertyType = typeof(TProperty),
+ AdditionalDataCheck = pi.AdditionalDataCheck != null
+ ? o => pi.AdditionalDataCheck((TObject) o)
+ : (Func) null,
+ GetObjectPropertiesData = pi.GetObjectPropertiesData != null
+ ? o => pi.GetObjectPropertiesData((TObject) o)
+ : (Func) null,
+ AfterCreate = pi.AfterCreate != null
+ ? op => pi.AfterCreate((TProperty) op)
+ : (Action) null
+ };
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Plugin/PropertyInfoExtensions.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Plugin/PropertyInfoExtensions.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Plugin/PropertyInfoExtensions.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,54 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+using Core.Common.Gui.PropertyBag;
+
+namespace Core.Common.Gui.Plugin
+{
+ ///
+ /// Extensions of
+ ///
+ public static class PropertyInfoExtensions
+ {
+ ///
+ /// Creates object properties based on the combination of and
+ ///
+ /// The property information used for creating the object properties
+ /// The data that will be set to the created object properties instance
+ public static IObjectProperties CreateObjectProperties(this PropertyInfo propertyInfo, object sourceData)
+ {
+ var objectProperties = (IObjectProperties) Activator.CreateInstance(propertyInfo.PropertyType);
+
+ objectProperties.Data = propertyInfo.GetObjectPropertiesData != null
+ ? propertyInfo.GetObjectPropertiesData(sourceData)
+ : sourceData;
+
+ if (propertyInfo.AfterCreate != null)
+ {
+ propertyInfo.AfterCreate(objectProperties);
+ }
+
+ return objectProperties;
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/PngToIconConverter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ProjectCommandsHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Properties/Settings.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/Properties/Settings.cs (.../Settings.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/Properties/Settings.cs (.../Settings.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -24,6 +24,8 @@
using System.Configuration;
using System.IO;
+using Core.Common.Gui.Settings;
+
namespace Core.Common.Gui.Properties
{
// This class allows you to handle specific events on the settings class:
Index: Core/Common/src/Core.Common.Gui/PropertyBag/IObjectProperties.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/PropertyBag/IObjectProperties.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/PropertyBag/IObjectProperties.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,34 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Core.Common.Gui.PropertyBag
+{
+ ///
+ /// Interface for object properties
+ ///
+ public interface IObjectProperties
+ {
+ ///
+ /// The data of the object properties
+ ///
+ object Data { get; set; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,46 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.ComponentModel;
+
+namespace Core.Common.Gui.PropertyBag
+{
+ ///
+ /// Base class for object properties with data of type
+ ///
+ public class ObjectProperties : IObjectProperties
+ {
+ protected T data;
+
+ [Browsable(false)]
+ public virtual object Data
+ {
+ get
+ {
+ return data;
+ }
+ set
+ {
+ data = (T) value;
+ }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/PropertyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/PropertyInfoExtensions.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -35,13 +35,17 @@
using Core.Common.Base.Storage;
using Core.Common.Controls.TreeView;
using Core.Common.Controls.Views;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Forms;
using Core.Common.Gui.Forms.MainWindow;
using Core.Common.Gui.Forms.MessageWindow;
using Core.Common.Gui.Forms.PropertyGridView;
using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Plugin;
using Core.Common.Gui.Properties;
+using Core.Common.Gui.Selection;
+using Core.Common.Gui.Settings;
using Core.Common.Utils.Events;
using Core.Common.Utils.Extensions;
using Core.Common.Utils.Reflection;
@@ -92,7 +96,7 @@
Plugins = new List();
- UserSettings = Settings.Default;
+ UserSettings = Properties.Settings.Default;
viewCommandHandler = new ViewCommandHandler(this, this, this, this);
storageCommandHandler = new StorageCommandHandler(projectStore, this, this, this, this, viewCommandHandler);
@@ -428,11 +432,11 @@
documentViews.IgnoreActivation = false;
toolWindowViews.IgnoreActivation = false;
- if (Settings.Default.SettingsKey.Contains("mruList"))
+ if (Properties.Settings.Default.SettingsKey.Contains("mruList"))
{
- if (Settings.Default["mruList"] == null)
+ if (Properties.Settings.Default["mruList"] == null)
{
- Settings.Default["mruList"] = new StringCollection();
+ Properties.Settings.Default["mruList"] = new StringCollection();
}
}
}
Index: Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,43 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+namespace Core.Common.Gui.Selection
+{
+ ///
+ /// Interface for keeping and notifying changes to the application selection.
+ ///
+ public interface IApplicationSelection
+ {
+ ///
+ /// Gets or sets current selected object(s). Visibility of the menus, toolbars and
+ /// other controls should be updated when selected object is changed. Default
+ /// implementation will also show it in the PropertyGrid.
+ ///
+ object Selection { get; set; }
+
+ ///
+ /// Fired when user changes selection by clicking on it or by setting it using property.
+ ///
+ event EventHandler SelectionChanged;
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,38 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+
+namespace Core.Common.Gui.Selection
+{
+ ///
+ /// Used by IGui.SelectionChanged.
+ ///
+ public class SelectedItemChangedEventArgs : EventArgs
+ {
+ public SelectedItemChangedEventArgs(object item)
+ {
+ Item = item;
+ }
+
+ public object Item { get; private set; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Settings/CustomSettingsProvider.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Settings/CustomSettingsProvider.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Settings/CustomSettingsProvider.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,201 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Configuration;
+using System.IO;
+using System.Linq;
+using System.Xml;
+
+using Core.Common.Gui.Properties;
+
+using log4net;
+
+//snatched from http://www.codeproject.com/KB/vb/CustomSettingsProvider.aspx
+
+namespace Core.Common.Gui.Settings
+{
+ public class PortableSettingsProvider : SettingsProvider
+ {
+ //XML Root Node
+ private const string SETTINGSROOT = "Settings";
+ private static readonly ILog log = LogManager.GetLogger(typeof(PortableSettingsProvider));
+
+ private XmlDocument m_SettingsXML = null;
+
+ public override string ApplicationName
+ {
+ get
+ {
+ if (System.Windows.Forms.Application.ProductName.Trim().Length > 0)
+ {
+ return System.Windows.Forms.Application.ProductName;
+ }
+
+ var fi = new FileInfo(System.Windows.Forms.Application.ExecutablePath);
+ return fi.Name.Substring(0, fi.Name.Length - fi.Extension.Length);
+ }
+ //Do nothing
+ set {}
+ }
+
+ public static string SettingsFileName { get; set; }
+
+ public override void Initialize(string name, NameValueCollection col)
+ {
+ base.Initialize(ApplicationName, col);
+ }
+
+ public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals)
+ {
+ //Iterate through the settings to be stored
+ //Only dirty settings are included in propvals, and only ones relevant to this provider
+ foreach (SettingsPropertyValue propval in propvals)
+ {
+ SetValue(propval);
+ }
+
+ try
+ {
+ SettingsXML.Save(SettingsFileName);
+ }
+ catch
+ {
+ log.ErrorFormat(Resources.PortableSettingsProvider_SetPropertyValues_Error_storing_settings_to_0_, SettingsFileName);
+ }
+ }
+
+ public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection props)
+ {
+ //Create new collection of values
+ var values = new SettingsPropertyValueCollection();
+
+ //Iterate through the settings to be retrieved
+
+ foreach (SettingsProperty setting in props)
+ {
+ var value = new SettingsPropertyValue(setting)
+ {
+ IsDirty = false,
+ SerializedValue = GetValue(setting)
+ };
+ values.Add(value);
+ }
+ return values;
+ }
+
+ private XmlDocument SettingsXML
+ {
+ get
+ {
+ //If we dont hold an xml document, try opening one.
+ //If it doesnt exist then create a new one ready.
+ if (m_SettingsXML == null)
+ {
+ m_SettingsXML = new XmlDocument();
+ var filePath = SettingsFileName;
+ if (File.Exists(filePath))
+ {
+ try
+ {
+ m_SettingsXML.Load(filePath);
+ }
+ catch (Exception)
+ {
+ //Create new document
+ CreateNewSettingsXml();
+ }
+ }
+ else
+ {
+ CreateNewSettingsXml();
+ }
+ }
+
+ return m_SettingsXML;
+ }
+ }
+
+ private void CreateNewSettingsXml()
+ {
+ XmlDeclaration dec = m_SettingsXML.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
+ m_SettingsXML.AppendChild(dec);
+
+ XmlNode nodeRoot;
+
+ nodeRoot = m_SettingsXML.CreateNode(XmlNodeType.Element, SETTINGSROOT, "");
+ m_SettingsXML.AppendChild(nodeRoot);
+ }
+
+ private string GetValue(SettingsProperty setting)
+ {
+ ThrowIfRoaming(setting);
+ var selectSingleNode = SettingsXML.SelectSingleNode("Settings/" + setting.Name);
+ if (selectSingleNode != null)
+ {
+ return selectSingleNode.InnerText;
+ }
+ return (setting.DefaultValue != null) ? setting.DefaultValue.ToString() : "";
+ }
+
+ private void SetValue(SettingsPropertyValue propVal)
+ {
+ ThrowIfRoaming(propVal.Property);
+
+ XmlElement SettingNode;
+
+ try
+ {
+ SettingNode = (XmlElement) SettingsXML.SelectSingleNode(SETTINGSROOT + "/" + propVal.Name);
+ }
+ catch (Exception)
+ {
+ SettingNode = null;
+ }
+
+ //Check to see if the node exists, if so then set its new value
+ if ((SettingNode != null))
+ {
+ SettingNode.InnerText = propVal.SerializedValue.ToString();
+ }
+ else
+ {
+ //Store the value as an element of the Settings Root Node
+ SettingNode = SettingsXML.CreateElement(propVal.Name);
+ SettingNode.InnerText = propVal.SerializedValue.ToString();
+ SettingsXML.SelectSingleNode(SETTINGSROOT).AppendChild(SettingNode);
+ }
+ }
+
+ private static void ThrowIfRoaming(SettingsProperty prop)
+ {
+ //maybe we should treat everything as roaming and simlpy not throw here?
+
+ //Determine if the setting is marked as Roaming
+ if ((from DictionaryEntry d in prop.Attributes select (Attribute) d.Value).OfType().Any())
+ {
+ throw new NotImplementedException(String.Format(Resources.PortableSettingsProvider_ThrowIfRoaming_Setting_0_is_roaming_This_is_not_supported, prop.Name));
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,69 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Core.Common.Gui.Settings
+{
+ ///
+ /// Container for settings in the graphical user interface.
+ ///
+ public class GuiCoreSettings
+ {
+ ///
+ /// The start page url to use in the graphical user interface.
+ ///
+ public string StartPageUrl { get; set; }
+
+ ///
+ /// The support email address to show in the graphical user interface.
+ ///
+ public string SupportEmailAddress { get; set; }
+
+ ///
+ /// The support phone number to show in the graphical user interface.
+ ///
+ public string SupportPhoneNumber { get; set; }
+
+ ///
+ /// The copyright to show in the graphical user interface.
+ ///
+ public string Copyright { get; set; }
+
+ ///
+ /// The license description to show in the graphical user interface.
+ ///
+ public string LicenseDescription { get; set; }
+
+ ///
+ /// The title to show in the main window of the graphical user interface.
+ ///
+ public string MainWindowTitle { get; set; }
+
+ ///
+ /// The path of the license file to use in the graphical interface.
+ ///
+ public string LicenseFilePath { get; set; }
+
+ ///
+ /// The path of the manual file to use in the graphical interface.
+ ///
+ public string ManualFilePath { get; set; }
+ }
+}
Index: Core/Common/src/Core.Common.Gui/Settings/ISettingsOwner.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Settings/ISettingsOwner.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Settings/ISettingsOwner.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,41 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Configuration;
+
+namespace Core.Common.Gui.Settings
+{
+ ///
+ /// Interface declaring the members of the object that holds settings.
+ ///
+ public interface ISettingsOwner
+ {
+ ///
+ /// Gets the fixed settings of the user interface.
+ ///
+ GuiCoreSettings FixedSettings { get; }
+
+ ///
+ /// Gets the user specific settings of the user interface.
+ ///
+ ApplicationSettingsBase UserSettings { get; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -0,0 +1,64 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.IO;
+using System.Reflection;
+
+using Core.Common.Utils.Reflection;
+
+namespace Core.Common.Gui.Settings
+{
+ public static class SettingsHelper
+ {
+ static SettingsHelper()
+ {
+ //set defaults based on executing assembly
+ var info = AssemblyUtils.GetExecutingAssemblyInfo();
+ ApplicationName = info.Product;
+ ApplicationVersion = info.Version;
+ ApplicationCompany = info.Company;
+ }
+
+ public static string ApplicationName { get; private set; }
+
+ public static string ApplicationVersion { get; private set; }
+
+ public static string ApplicationCompany { get; private set; }
+
+ public static string GetApplicationLocalUserSettingsDirectory()
+ {
+ var localSettingsDirectoryPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ var executingAssembly = Assembly.GetExecutingAssembly();
+ var assemblyInfo = AssemblyUtils.GetAssemblyInfo(executingAssembly);
+ var companySettingsDirectoryPath = Path.Combine(localSettingsDirectoryPath, assemblyInfo.Company);
+
+ var appSettingsDirectoryPath = Path.Combine(companySettingsDirectoryPath, ApplicationName + " " + ApplicationVersion);
+
+ if (!Directory.Exists(appSettingsDirectoryPath))
+ {
+ Directory.CreateDirectory(appSettingsDirectoryPath);
+ }
+
+ return appSettingsDirectoryPath;
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/SettingsHelper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/StorageCommandHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 0c64d8a6c718c0aa67403a16c94dd0c10f862455 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/ViewCommandHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs (.../ViewPropertyEditor.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs (.../ViewPropertyEditor.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -23,6 +23,8 @@
using System.ComponentModel;
using System.Drawing.Design;
+using Core.Common.Gui.Commands;
+
namespace Core.Common.Gui
{
///
Index: Core/Common/test/Core.Common.Gui.Test/Appenders/RingtoetsUserDataFolderConverterTest.cs
===================================================================
diff -u -r09e8f3d20ef762a75ac211870d3843b671516983 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/Appenders/RingtoetsUserDataFolderConverterTest.cs (.../RingtoetsUserDataFolderConverterTest.cs) (revision 09e8f3d20ef762a75ac211870d3843b671516983)
+++ Core/Common/test/Core.Common.Gui.Test/Appenders/RingtoetsUserDataFolderConverterTest.cs (.../RingtoetsUserDataFolderConverterTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,6 +1,7 @@
using System.IO;
using Core.Common.Gui.Appenders;
+using Core.Common.Gui.Settings;
using log4net.Util;
Index: Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs
===================================================================
diff -u -r036e0a34388dcbb74900cb6c64242cf194b32783 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs (.../ApplicationFeatureCommandHandlerTest.cs) (revision 036e0a34388dcbb74900cb6c64242cf194b32783)
+++ Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs (.../ApplicationFeatureCommandHandlerTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,8 @@
-using Core.Common.Gui.Forms.MainWindow;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Forms.MainWindow;
using Core.Common.Gui.Forms.PropertyGridView;
+using Core.Common.Gui.Selection;
+
using NUnit.Framework;
using Rhino.Mocks;
Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,6 @@
using System.Windows.Forms;
using Core.Common.Controls.TreeView;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Properties;
using Core.Common.TestUtil;
Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,7 @@
using System;
using System.Windows.Forms;
+
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Properties;
using Core.Common.TestUtil;
Index: Core/Common/test/Core.Common.Gui.Test/ExpandableArrayConverterTest.cs
===================================================================
diff -u -r41c77f9f36ae74a406fd382187426cc06d2b0200 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/ExpandableArrayConverterTest.cs (.../ExpandableArrayConverterTest.cs) (revision 41c77f9f36ae74a406fd382187426cc06d2b0200)
+++ Core/Common/test/Core.Common.Gui.Test/ExpandableArrayConverterTest.cs (.../ExpandableArrayConverterTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,8 @@
using System;
using System.ComponentModel;
+
+using Core.Common.Gui.Converters;
+
using NUnit.Framework;
namespace Core.Common.Gui.Test
Index: Core/Common/test/Core.Common.Gui.Test/SettingsHelperTest.cs
===================================================================
diff -u -r770547be3030f73473282742f9a63ca6805ff74b -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/SettingsHelperTest.cs (.../SettingsHelperTest.cs) (revision 770547be3030f73473282742f9a63ca6805ff74b)
+++ Core/Common/test/Core.Common.Gui.Test/SettingsHelperTest.cs (.../SettingsHelperTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,4 +1,5 @@
-using Core.Common.Utils.Reflection;
+using Core.Common.Gui.Settings;
+using Core.Common.Utils.Reflection;
using NUnit.Framework;
Index: Core/Common/test/Core.Common.Gui.Test/StorageCommandHandlerTest.cs
===================================================================
diff -u -rea29b72881b2f2d9bbda5dd0c799e70e8394f052 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision ea29b72881b2f2d9bbda5dd0c799e70e8394f052)
+++ Core/Common/test/Core.Common.Gui.Test/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,8 @@
using Core.Common.Base.Data;
using Core.Common.Base.Storage;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Selection;
+
using NUnit.Framework;
using Rhino.Mocks;
Index: Core/Common/test/Core.Common.Gui.Test/ViewCommandHandlerTest.cs
===================================================================
diff -u -r036e0a34388dcbb74900cb6c64242cf194b32783 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Gui.Test/ViewCommandHandlerTest.cs (.../ViewCommandHandlerTest.cs) (revision 036e0a34388dcbb74900cb6c64242cf194b32783)
+++ Core/Common/test/Core.Common.Gui.Test/ViewCommandHandlerTest.cs (.../ViewCommandHandlerTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,6 +1,9 @@
using System.Collections.Generic;
using Core.Common.Controls.Views;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Selection;
using NUnit.Framework;
Index: Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs
===================================================================
diff -u -r47ab419402c31a8a2e103b37bf9c05250a2eaa0b -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision 47ab419402c31a8a2e103b37bf9c05250a2eaa0b)
+++ Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,6 +1,7 @@
using System;
using Core.Common.Base.Plugin;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.Forms.MainWindow;
using NUnit.Extensions.Forms;
using NUnit.Framework;
Index: Core/Common/test/Core.Common.Test/Gui/Forms/PropertyGridView/PropertyResolverTest.cs
===================================================================
diff -u -r7de564e0db6835c6821f0ce2303a983a2758e7d0 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Test/Gui/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision 7de564e0db6835c6821f0ce2303a983a2758e7d0)
+++ Core/Common/test/Core.Common.Test/Gui/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Core.Common.Gui;
using Core.Common.Gui.Forms.PropertyGridView;
+using Core.Common.Gui.Plugin;
using Core.Common.Gui.Properties;
using Core.Common.Gui.PropertyBag;
Index: Core/Common/test/Core.Common.Test/Gui/RingtoetsGuiTests.cs
===================================================================
diff -u -r05a035ad71638422c128aba30e06cdcb58ac5609 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Common/test/Core.Common.Test/Gui/RingtoetsGuiTests.cs (.../RingtoetsGuiTests.cs) (revision 05a035ad71638422c128aba30e06cdcb58ac5609)
+++ Core/Common/test/Core.Common.Test/Gui/RingtoetsGuiTests.cs (.../RingtoetsGuiTests.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -5,6 +5,7 @@
using Core.Common.Base.Storage;
using Core.Common.Gui;
using Core.Common.Gui.Forms.MainWindow;
+using Core.Common.Gui.Plugin;
using Core.Common.Test.TestObjects;
using NUnit.Framework;
using Rhino.Mocks;
Index: Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsGuiPlugin.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsGuiPlugin.cs (.../CommonToolsGuiPlugin.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsGuiPlugin.cs (.../CommonToolsGuiPlugin.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -28,7 +28,7 @@
using Core.Common.Utils;
using Core.Plugins.CommonTools.Properties;
using Core.Plugins.CommonTools.Property;
-using PropertyInfo = Core.Common.Gui.PropertyInfo;
+using PropertyInfo = Core.Common.Gui.Plugin.PropertyInfo;
namespace Core.Plugins.CommonTools
{
Index: Core/Plugins/src/Core.Plugins.CommonTools/Property/ProjectProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.CommonTools/Property/ProjectProperties.cs (.../ProjectProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.CommonTools/Property/ProjectProperties.cs (.../ProjectProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,7 @@
using Core.Common.Base.Data;
using Core.Common.Gui;
using Core.Common.Gui.Attributes;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Core.Plugins.CommonTools.Properties;
Index: Core/Plugins/src/Core.Plugins.CommonTools/Property/UrlProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.CommonTools/Property/UrlProperties.cs (.../UrlProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.CommonTools/Property/UrlProperties.cs (.../UrlProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils;
using Core.Common.Utils.Attributes;
using Core.Plugins.CommonTools.Properties;
Index: Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml
===================================================================
diff -u -r2c97a81a5403ee33f12550aaa89fd1f1b3be52ea -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml (.../ChartingRibbon.xaml) (revision 2c97a81a5403ee33f12550aaa89fd1f1b3be52ea)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml (.../ChartingRibbon.xaml) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -7,9 +7,10 @@
xmlns:gui="clr-namespace:Core.Common.Gui;assembly=Core.Common.Gui"
xmlns:p="clr-namespace:Core.Plugins.OxyPlot.Properties"
xmlns:common="clr-namespace:Core.Common.Gui.Properties;assembly=Core.Common.Gui"
+ xmlns:Converters="clr-namespace:Core.Common.Gui.Converters;assembly=Core.Common.Gui"
mc:Ignorable="d" Width="686.4" Height="168" Background="White">
-
+
Index: Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -24,6 +24,7 @@
using Core.Common.Controls.Views;
using Core.Common.Gui;
using Core.Common.Gui.Forms;
+using Core.Common.Gui.Forms.ViewManager;
using Core.Common.Gui.Plugin;
using Core.Components.Charting.Data;
using Core.Plugins.OxyPlot.Commands;
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs (.../ProjectExplorer.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs (.../ProjectExplorer.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -22,7 +22,10 @@
using System;
using System.Windows.Forms;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.Forms;
+using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Selection;
using Core.Plugins.ProjectExplorer.Properties;
using log4net;
using TreeView = Core.Common.Controls.TreeView.TreeView;
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -24,8 +24,12 @@
using Core.Common.Base.Data;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Forms;
+using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Plugin;
+using Core.Common.Gui.Selection;
using Core.Common.Utils.Extensions;
using ProjectExplorerResources = Core.Plugins.ProjectExplorer.Properties.Resources;
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -25,6 +25,9 @@
using Core.Common.Controls.TreeView;
using Core.Common.Controls.Views;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Selection;
+
using TreeView = Core.Common.Controls.TreeView.TreeView;
namespace Core.Plugins.ProjectExplorer
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/Ribbon.xaml
===================================================================
diff -u -r8b0b93c09c3e5b312e000aea70d808fcac0ba6ee -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/Ribbon.xaml (.../Ribbon.xaml) (revision 8b0b93c09c3e5b312e000aea70d808fcac0ba6ee)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/Ribbon.xaml (.../Ribbon.xaml) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -6,9 +6,10 @@
xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
xmlns:resx="clr-namespace:Core.Plugins.ProjectExplorer.Properties"
xmlns:gui="clr-namespace:Core.Common.Gui;assembly=Core.Common.Gui"
+ xmlns:Converters="clr-namespace:Core.Common.Gui.Converters;assembly=Core.Common.Gui"
mc:Ignorable="d" Width="686.4" Height="168" Background="White">
-
+
Index: Core/Plugins/test/Core.Plugins.DotSpatial.Test/DotSpatialGuiPluginTest.cs
===================================================================
diff -u -rdbf6ecaa927e26f430d7c73290df7e825ec04744 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.DotSpatial.Test/DotSpatialGuiPluginTest.cs (.../DotSpatialGuiPluginTest.cs) (revision dbf6ecaa927e26f430d7c73290df7e825ec04744)
+++ Core/Plugins/test/Core.Plugins.DotSpatial.Test/DotSpatialGuiPluginTest.cs (.../DotSpatialGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,6 @@
using System.Linq;
using Core.Common.Gui;
+using Core.Common.Gui.Plugin;
using Core.Components.DotSpatial.Data;
using Core.Plugins.DotSpatial.Forms;
using NUnit.Framework;
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/OpenChartViewCommandTest.cs
===================================================================
diff -u -rf9058d5293ecb785069c5b6b4c554dc6800ee771 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/OpenChartViewCommandTest.cs (.../OpenChartViewCommandTest.cs) (revision f9058d5293ecb785069c5b6b4c554dc6800ee771)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/OpenChartViewCommandTest.cs (.../OpenChartViewCommandTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,4 +1,5 @@
using Core.Common.Gui;
+using Core.Common.Gui.Forms.ViewManager;
using Core.Plugins.OxyPlot.Commands;
using NUnit.Framework;
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs
===================================================================
diff -u -r05a035ad71638422c128aba30e06cdcb58ac5609 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision 05a035ad71638422c128aba30e06cdcb58ac5609)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -7,6 +7,7 @@
using Core.Common.Gui;
using Core.Common.Gui.Forms.MainWindow;
using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Plugin;
using Core.Components.Charting.Data;
using Core.Components.OxyPlot.Forms;
using Core.Plugins.OxyPlot.Forms;
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs (.../ProjectExplorerGuiPluginTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs (.../ProjectExplorerGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -5,6 +5,11 @@
using Core.Common.Base.Plugin;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Forms.ViewManager;
+using Core.Common.Gui.Plugin;
+using Core.Common.Gui.Selection;
+
using NUnit.Framework;
using Rhino.Mocks;
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectTreeViewTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectTreeViewTest.cs (.../ProjectTreeViewTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectTreeViewTest.cs (.../ProjectTreeViewTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -4,6 +4,9 @@
using Core.Common.Base.Data;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Selection;
+
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/TreeNodeInfos/ProjectTreeNodeInfoTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/TreeNodeInfos/ProjectTreeNodeInfoTest.cs (.../ProjectTreeNodeInfoTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/TreeNodeInfos/ProjectTreeNodeInfoTest.cs (.../ProjectTreeNodeInfoTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -2,6 +2,7 @@
using System.Windows.Forms;
using Core.Common.Base.Data;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.TestUtil.ContextMenu;
using Core.Common.TestUtil;
Index: Demo/Ringtoets/src/Demo.Ringtoets/GUIs/DemoProjectGuiPlugin.cs
===================================================================
diff -u -rf9058d5293ecb785069c5b6b4c554dc6800ee771 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Demo/Ringtoets/src/Demo.Ringtoets/GUIs/DemoProjectGuiPlugin.cs (.../DemoProjectGuiPlugin.cs) (revision f9058d5293ecb785069c5b6b4c554dc6800ee771)
+++ Demo/Ringtoets/src/Demo.Ringtoets/GUIs/DemoProjectGuiPlugin.cs (.../DemoProjectGuiPlugin.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,6 @@
using Core.Common.Gui;
using Core.Common.Gui.Forms;
+using Core.Common.Gui.Plugin;
namespace Demo.Ringtoets.GUIs
{
Index: Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml
===================================================================
diff -u -rb1b49c693efe7922bb723c350eeb66494460d8bd -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision b1b49c693efe7922bb723c350eeb66494460d8bd)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -6,6 +6,7 @@
xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
xmlns:resx="clr-namespace:Demo.Ringtoets.Properties"
xmlns:gui="clr-namespace:Core.Common.Gui;assembly=Core.Common.Gui"
+ xmlns:Converters="clr-namespace:Core.Common.Gui.Converters;assembly=Core.Common.Gui"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
@@ -14,7 +15,7 @@
-
+
Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/OpenMapViewCommandTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/OpenMapViewCommandTest.cs (.../OpenMapViewCommandTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/OpenMapViewCommandTest.cs (.../OpenMapViewCommandTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,6 @@
using Core.Common.Controls.Commands;
using Core.Common.Gui;
+using Core.Common.Gui.Forms.ViewManager;
using Core.Components.DotSpatial.Data;
using Demo.Ringtoets.Commands;
using NUnit.Framework;
Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/GUIs/DemoProjectGuiPluginTest.cs
===================================================================
diff -u -rd182ae6d1a6590c4b52b17fd1f59c5b7c3780b48 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Demo/Ringtoets/test/Demo.Ringtoets.Test/GUIs/DemoProjectGuiPluginTest.cs (.../DemoProjectGuiPluginTest.cs) (revision d182ae6d1a6590c4b52b17fd1f59c5b7c3780b48)
+++ Demo/Ringtoets/test/Demo.Ringtoets.Test/GUIs/DemoProjectGuiPluginTest.cs (.../DemoProjectGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,7 @@
using Core.Common.Gui;
using Core.Common.Gui.Forms;
+using Core.Common.Gui.Plugin;
+
using Demo.Ringtoets.GUIs;
using NUnit.Framework;
Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoestDemoProjectRibbonTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoestDemoProjectRibbonTest.cs (.../RingtoestDemoProjectRibbonTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoestDemoProjectRibbonTest.cs (.../RingtoestDemoProjectRibbonTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -4,6 +4,7 @@
using System.Windows.Controls.Primitives;
using Core.Common.Controls.Commands;
using Core.Common.Gui;
+using Core.Common.Gui.Forms.ViewManager;
using Core.Components.DotSpatial.Data;
using Demo.Ringtoets.Ribbons;
using NUnit.Framework;
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs (.../AssessmentSectionBaseProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs (.../AssessmentSectionBaseProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Integration.Data;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DikeAssessmentSectionPropertiesTest.cs
===================================================================
diff -u -r5c044a6799b45bec77af170dca0a84bc434c5f6f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DikeAssessmentSectionPropertiesTest.cs (.../DikeAssessmentSectionPropertiesTest.cs) (revision 5c044a6799b45bec77af170dca0a84bc434c5f6f)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DikeAssessmentSectionPropertiesTest.cs (.../DikeAssessmentSectionPropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,6 @@
using Core.Common.Base;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using NUnit.Framework;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -3,6 +3,9 @@
using Core.Common.Base.Plugin;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.ContextMenu;
+using Core.Common.Gui.Plugin;
+
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Forms.PresentationObjects;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationContextProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationContextProperties.cs (.../PipingCalculationContextProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationContextProperties.cs (.../PipingCalculationContextProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Forms.PresentationObjects;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationGroupContextProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationGroupContextProperties.cs (.../PipingCalculationGroupContextProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingCalculationGroupContextProperties.cs (.../PipingCalculationGroupContextProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -21,6 +21,7 @@
using Core.Common.Gui;
using Core.Common.Gui.Attributes;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -24,6 +24,7 @@
using System.Drawing.Design;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Calculation;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingOutputProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingOutputProperties.cs (.../PipingOutputProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingOutputProperties.cs (.../PipingOutputProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSoilProfileProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSoilProfileProperties.cs (.../PipingSoilProfileProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSoilProfileProperties.cs (.../PipingSoilProfileProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -21,6 +21,8 @@
using System.Linq;
using Core.Common.Gui;
+using Core.Common.Gui.Converters;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/RingtoetsPipingSurfaceLineProperties.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/RingtoetsPipingSurfaceLineProperties.cs (.../RingtoetsPipingSurfaceLineProperties.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/RingtoetsPipingSurfaceLineProperties.cs (.../RingtoetsPipingSurfaceLineProperties.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -21,6 +21,8 @@
using System.Linq;
using Core.Common.Gui;
+using Core.Common.Gui.Converters;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -29,6 +29,8 @@
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Forms;
using Core.Common.Gui.Forms.ProgressDialog;
+using Core.Common.Gui.Plugin;
+
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs
===================================================================
diff -u -r495647ee1c652fecc15eea7fefeab29ae01347fe -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 495647ee1c652fecc15eea7fefeab29ae01347fe)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -2,6 +2,8 @@
using Core.Common.Base;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
+
using NUnit.Framework;
using Rhino.Mocks;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -2,6 +2,7 @@
using Core.Common.Base;
using Core.Common.Gui;
using Core.Common.Gui.Attributes;
+using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Rhino.Mocks;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs
===================================================================
diff -u -r698721e646747d5a5b3a1850e7b4ec46a2857bfa -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 698721e646747d5a5b3a1850e7b4ec46a2857bfa)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -3,6 +3,7 @@
using Core.Common.Base;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
using NUnit.Framework;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingOutputPropertiesTest.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingOutputPropertiesTest.cs (.../PipingOutputPropertiesTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingOutputPropertiesTest.cs (.../PipingOutputPropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,5 +1,7 @@
using System;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
+
using NUnit.Framework;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSoilProfilePropertiesTest.cs
===================================================================
diff -u -r2a49b7243807fe0b95136efd55652201164a6c74 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSoilProfilePropertiesTest.cs (.../PipingSoilProfilePropertiesTest.cs) (revision 2a49b7243807fe0b95136efd55652201164a6c74)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSoilProfilePropertiesTest.cs (.../PipingSoilProfilePropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
+
using NUnit.Framework;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PropertyClasses;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLinePropertiesTest.cs
===================================================================
diff -u -r8df04aa7166563cc67a1b7e70f9f4b8867e454b7 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLinePropertiesTest.cs (.../RingtoetsPipingSurfaceLinePropertiesTest.cs) (revision 8df04aa7166563cc67a1b7e70f9f4b8867e454b7)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLinePropertiesTest.cs (.../RingtoetsPipingSurfaceLinePropertiesTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -1,4 +1,6 @@
using Core.Common.Gui;
+using Core.Common.Gui.PropertyBag;
+
using NUnit.Framework;
using Ringtoets.Piping.Data;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -4,6 +4,7 @@
using Core.Common.Base;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.Forms.MainWindow;
using Core.Common.Gui.TestUtil.ContextMenu;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs
===================================================================
diff -u -r0bfd1f4e2a179c8575045e5af70dce2930665626 -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -3,6 +3,7 @@
using Core.Common.Base;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
using Core.Common.Gui.TestUtil.ContextMenu;
using Core.Common.TestUtil;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0c64d8a6c718c0aa67403a16c94dd0c10f862455
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision 0c64d8a6c718c0aa67403a16c94dd0c10f862455)
@@ -4,6 +4,9 @@
using Core.Common.Base.Plugin;
using Core.Common.Controls.TreeView;
using Core.Common.Gui;
+using Core.Common.Gui.Commands;
+using Core.Common.Gui.Plugin;
+
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Piping.Data;