Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -41,7 +41,6 @@
True
-
..\..\..\..\packages\System.Data.SQLite.Core.1.0.99.0\lib\net40\System.Data.SQLite.dll
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Ringtoets.rt
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
Binary files differ
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -529,7 +529,7 @@
{
try
{
- Gui.CommandHandler.TryOpenExistingProject(path);
+ Gui.CommandHandler.OpenExistingProject(path);
RecentProjectsTabControl.Items.Remove(newItem);
RecentProjectsTabControl.Items.Insert(1, newItem);
}
@@ -653,7 +653,7 @@
private void OnFileOpenClicked(object sender, RoutedEventArgs e)
{
- var succesful = Gui.CommandHandler.TryOpenExistingProject();
+ var succesful = Gui.CommandHandler.OpenExistingProject();
OnAfterProjectSaveOrOpen(succesful);
}
@@ -662,14 +662,14 @@
//TODO: Implement
// Original code:
- //Gui.CommandHandler.TryCloseProject();
+ //Gui.CommandHandler.CloseProject();
//ValidateItems();
}
private void OnFileNewClicked(object sender, RoutedEventArgs e)
{
// Original code:
- Gui.CommandHandler.TryCreateNewProject();
+ Gui.CommandHandler.CreateNewProject();
ValidateItems();
}
Index: Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -42,17 +42,17 @@
guiExportHandler = CreateGuiExportHandler();
}
- public void TryCreateNewProject()
+ public void CreateNewProject()
{
- if (!TryCloseProject())
+ if (!CloseProject())
{
- Log.Warn(Resources.Opening_new_project_cancelled);
+ Log.Warn(Resources.Project_new_opening_cancelled);
return;
}
- Log.Info(Resources.Opening_new_project);
+ Log.Info(Resources.Project_new_opening);
gui.Project = new Project();
- Log.Info(Resources.New_project_successfully_opened);
+ Log.Info(Resources.Project_new_successfully_opened);
RefreshGui();
}
@@ -61,7 +61,7 @@
/// Opens a new where a file can be selected to open.
///
/// true if an existing has been loaded, false otherwise.
- public bool TryOpenExistingProject()
+ public bool OpenExistingProject()
{
var openFileDialog = new OpenFileDialog
{
@@ -72,9 +72,9 @@
if (openFileDialog.ShowDialog(gui.MainWindow) != DialogResult.Cancel)
{
- return TryOpenExistingProject(openFileDialog.FileName);
+ return OpenExistingProject(openFileDialog.FileName);
}
- Log.Warn(Resources.Opening_existing_project_cancelled);
+ Log.Warn(Resources.Project_existing_project_opening_cancelled);
return false;
}
@@ -83,43 +83,40 @@
///
/// Location of the storage file.
/// true if an existing has been loaded, false otherwise.
- public bool TryOpenExistingProject(string filePath)
+ public bool OpenExistingProject(string filePath)
{
- Log.Info(Resources.Opening_existing_project);
-
+ Log.Info(Resources.Project_existing_opening_project);
var storage = new StorageSqLite(filePath);
if (!storage.TestConnection())
{
- Log.Warn(Resources.Opening_existing_project_failed);
+ Log.Warn(Resources.Project_existing_project_opening_failed);
return false;
}
- var projectFromStorage = storage.LoadProject();
- if (projectFromStorage == null)
- {
- Log.Warn(Resources.Opening_existing_project_failed);
- return false;
- }
// Project loaded successfully, close current project
- if (!TryCloseProject())
+ if (!CloseProject())
{
- Log.Warn(Resources.Opening_existing_project_cancelled);
+ Log.Warn(Resources.Project_existing_project_opening_cancelled);
return false;
}
+
gui.ProjectFilePath = filePath;
- gui.Project = projectFromStorage;
+ gui.Project = storage.LoadProject();
+ if (gui.Project == null)
+ {
+ Log.Warn(Resources.Project_existing_project_opening_failed);
+ return false;
+ }
RefreshGui();
- Log.Info(Resources.Opening_existing_project);
+ Log.Info(Resources.Project_existing_successfully_opened);
return true;
}
- public bool TryCloseProject()
+ public bool CloseProject()
{
if (gui.Project != null)
{
- Log.Info(Resources.GuiCommandHandler_TryCloseProject_Closing_current_project);
-
// DO NOT REMOVE CODE BELOW. If the views are not cleaned up here we access disposable stuff like in issue 4161.
// SO VIEWS SHOULD ALWAYS BE CLOSED!
// remove views before closing project.
@@ -131,8 +128,6 @@
gui.Project = null;
RefreshGui();
-
- Log.Info(Resources.GuiCommandHandler_CloseProject_Project_closed);
}
return true;
Index: Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -16,40 +16,40 @@
bool SaveProject();
///
- /// Tries to create a new project.
+ /// Creates a new project.
///
///
/// The creation action might be cancelled (due to user interaction).
///
- void TryCreateNewProject();
+ void CreateNewProject();
///
- /// Tries to open an existing project.
+ /// Opens an existing project.
///
///
/// The opening action might be cancelled (due to user interaction).
///
/// Whether or not an existing project was correctly opened.
- bool TryOpenExistingProject();
+ bool OpenExistingProject();
///
- /// Tries to open an existing project from file.
+ /// 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 TryOpenExistingProject(string filePath);
+ bool OpenExistingProject(string filePath);
///
- /// Tries to close a project.
+ /// Closes a project.
///
///
/// The closing action might be cancelled (due to user interaction).
///
/// Whether or not the project was correctly closed.
- bool TryCloseProject();
+ bool CloseProject();
///
/// Presents the user with a dialog to choose an editor for the selected dataitem
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -1193,15 +1193,6 @@
}
///
- /// Looks up a localized string similar to Project is gesloten..
- ///
- public static string GuiCommandHandler_CloseProject_Project_closed {
- get {
- return ResourceManager.GetString("GuiCommandHandler_CloseProject_Project_closed", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Kan niet importeren naar {0}..
///
public static string GuiCommandHandler_ImportOn_Unable_to_import_on_0_ {
@@ -1230,15 +1221,6 @@
}
///
- /// Looks up a localized string similar to Sluiten van huidig project..
- ///
- public static string GuiCommandHandler_TryCloseProject_Closing_current_project {
- get {
- return ResourceManager.GetString("GuiCommandHandler_TryCloseProject_Closing_current_project", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Kan geen 'GuiCommandHandler'-afhankelijk element in het contextmenu creëren zonder een 'GuiCommandHandler'..
///
public static string GuiContextMenuItemFactory_Can_not_create_gui_context_menu_items_without_gui {
@@ -1610,15 +1592,6 @@
}
///
- /// Looks up a localized string similar to Nieuw project succesvol geopend..
- ///
- public static string New_project_successfully_opened {
- get {
- return ResourceManager.GetString("New_project_successfully_opened", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
public static System.Drawing.Bitmap newspaper {
@@ -1695,51 +1668,6 @@
}
///
- /// Looks up a localized string similar to Openen van bestaand Ringtoets project..
- ///
- public static string Opening_existing_project {
- get {
- return ResourceManager.GetString("Opening_existing_project", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Openen van bestaand Ringtoets project geannuleerd..
- ///
- public static string Opening_existing_project_cancelled {
- get {
- return ResourceManager.GetString("Opening_existing_project_cancelled", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Het is niet gelukt om het Ringtoets project te laden..
- ///
- public static string Opening_existing_project_failed {
- get {
- return ResourceManager.GetString("Opening_existing_project_failed", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Openen van nieuw Ringtoets project..
- ///
- public static string Opening_new_project {
- get {
- return ResourceManager.GetString("Opening_new_project", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Openen van nieuw Ringtoets project geannuleerd..
- ///
- public static string Opening_new_project_cancelled {
- get {
- return ResourceManager.GetString("Opening_new_project_cancelled", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
public static System.Drawing.Bitmap OptionsHS {
@@ -1877,6 +1805,69 @@
}
///
+ /// Looks up a localized string similar to Openen van bestaand Ringtoets project..
+ ///
+ public static string Project_existing_opening_project {
+ get {
+ return ResourceManager.GetString("Project_existing_opening_project", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Openen van bestaand Ringtoets project geannuleerd..
+ ///
+ public static string Project_existing_project_opening_cancelled {
+ get {
+ return ResourceManager.GetString("Project_existing_project_opening_cancelled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het is niet gelukt om het Ringtoets project te laden..
+ ///
+ public static string Project_existing_project_opening_failed {
+ get {
+ return ResourceManager.GetString("Project_existing_project_opening_failed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Bestaand Ringtoets project succesvol geopend..
+ ///
+ public static string Project_existing_successfully_opened {
+ get {
+ return ResourceManager.GetString("Project_existing_successfully_opened", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Openen van nieuw Ringtoets project..
+ ///
+ public static string Project_new_opening {
+ get {
+ return ResourceManager.GetString("Project_new_opening", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Openen van nieuw Ringtoets project geannuleerd..
+ ///
+ public static string Project_new_opening_cancelled {
+ get {
+ return ResourceManager.GetString("Project_new_opening_cancelled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Nieuw Ringtoets project succesvol geopend..
+ ///
+ public static string Project_new_successfully_opened {
+ get {
+ return ResourceManager.GetString("Project_new_successfully_opened", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Er ging iets fout bij het ophalen van de 'NodePresenters' van alle plugins..
///
public static string ProjectExplorerGuiPlugin_FillProjectTreeViewNodePresentersFromPlugins_Could_not_retrieve_NodePresenters_for_a_plugin {
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx
===================================================================
diff -u -r3a8bff057967bdb42389382472f6ce55789a0ced -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 3a8bff057967bdb42389382472f6ce55789a0ced)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -142,7 +142,7 @@
..\Resources\RelationshipsHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
+
Openen van nieuw Ringtoets project geannuleerd.
@@ -304,7 +304,7 @@
..\Resources\saveHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
+
Openen van bestaand Ringtoets project geannuleerd.
@@ -409,8 +409,8 @@
Berichten
-
- Nieuw project succesvol geopend.
+
+ Nieuw Ringtoets project succesvol geopend.
..\Resources\brick1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -544,7 +544,7 @@
Menu's en werkbalken instellen...
-
+
Openen van nieuw Ringtoets project.
@@ -625,7 +625,7 @@
Eigenschappen
-
+
Openen van bestaand Ringtoets project.
@@ -637,9 +637,6 @@
..\Resources\folder_output.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Project is gesloten.
-
Recent
@@ -745,9 +742,6 @@
Versie
-
- Sluiten van huidig project.
-
Onbekend
@@ -949,7 +943,10 @@
Slechts één DynamicVisibleValidationMethod toegestaan per klasse: {0}.
-
+
Het is niet gelukt om het Ringtoets project te laden.
+
+ Bestaand Ringtoets project succesvol geopend.
+
\ No newline at end of file
Index: Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/RingtoetsGuiIntegrationTest.cs
===================================================================
diff -u -rb824d24e9f2698cfd0ba7f253ffd037266c16dc4 -r8404b9bd4e87e4a097a982ddccba6ecfa5aeec32
--- Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/RingtoetsGuiIntegrationTest.cs (.../RingtoetsGuiIntegrationTest.cs) (revision b824d24e9f2698cfd0ba7f253ffd037266c16dc4)
+++ Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/RingtoetsGuiIntegrationTest.cs (.../RingtoetsGuiIntegrationTest.cs) (revision 8404b9bd4e87e4a097a982ddccba6ecfa5aeec32)
@@ -26,7 +26,7 @@
{
gui.MainWindow = new MainWindow(gui);
gui.Run();
- gui.CommandHandler.TryCloseProject(); //should not trigger exception
+ gui.CommandHandler.CloseProject(); //should not trigger exception
}
}