Fisheye: Tag dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Commands/CreateNewProjectCommand.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Commands/OpenProjectCommand.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -r85053cd7be8aa42587cc2b0e25d6b98b5a5c2893 -rdabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 85053cd7be8aa42587cc2b0e25d6b98b5a5c2893)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0)
@@ -119,8 +119,6 @@
-
-
Form
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -r85053cd7be8aa42587cc2b0e25d6b98b5a5c2893 -rdabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 85053cd7be8aa42587cc2b0e25d6b98b5a5c2893)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0)
@@ -16,8 +16,6 @@
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;
@@ -63,9 +61,6 @@
private IEnumerable ribbonCommandHandlers;
- private readonly CreateNewProjectCommand newProjectCommand;
- private readonly OpenProjectCommand openProjectCommand;
-
///
/// This is used when user selects non-contextual tab explicitly. Then we won't activate contextual tab on the next view activation.
///
@@ -83,9 +78,6 @@
windowInteropHelper = new WindowInteropHelper(this);
- newProjectCommand = new CreateNewProjectCommand { Gui = gui };
- openProjectCommand = new OpenProjectCommand { Gui = gui };
-
log.Info(Properties.Resources.MainWindow_MainWindow_Main_window_created_);
}
@@ -536,7 +528,7 @@
{
try
{
- openProjectCommand.Execute(path);
+ Gui.CommandHandler.OpenExistingProject(path);
RecentProjectsTabControl.Items.Remove(newItem);
RecentProjectsTabControl.Items.Insert(1, newItem);
}
@@ -655,9 +647,8 @@
private void OnFileNewClicked(object sender, RoutedEventArgs e)
{
- newProjectCommand.Execute();
-
// Original code:
+ Gui.CommandHandler.CreateNewProject();
ValidateItems();
}
Index: Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs
===================================================================
diff -u -r85053cd7be8aa42587cc2b0e25d6b98b5a5c2893 -rdabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0
--- Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision 85053cd7be8aa42587cc2b0e25d6b98b5a5c2893)
+++ Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0)
@@ -42,9 +42,6 @@
guiExportHandler = CreateGuiExportHandler();
}
- ///
- /// Loads a new instance of .
- ///
public void CreateNewProject()
{
CloseProject();
@@ -82,7 +79,7 @@
///
/// Location of the storage file.
/// true if an existing has been loaded, false otherwise.
- private bool OpenExistingProject(string filePath)
+ public bool OpenExistingProject(string filePath)
{
Log.Info(Resources.Project_existing_opening_project);
Index: Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs
===================================================================
diff -u -r85053cd7be8aa42587cc2b0e25d6b98b5a5c2893 -rdabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0
--- Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision 85053cd7be8aa42587cc2b0e25d6b98b5a5c2893)
+++ Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0)
@@ -16,27 +16,37 @@
bool SaveProjectAs();
///
+ /// Creates a new project.
+ ///
+ ///
+ /// The creation action might be cancelled (due to user interaction).
+ ///
+ void CreateNewProject();
+
+ ///
/// Saves the project to the currently selected location.
///
/// Returns if the project was succesfully saved.
bool SaveProject();
///
- /// Creates a new project.
+ /// Opens an existing project.
///
///
- /// The creation action might be cancelled (due to user interaction).
+ /// The opening action might be cancelled (due to user interaction).
///
- void CreateNewProject();
+ /// Whether or not an existing project was correctly opened.
+ bool OpenExistingProject();
///
- /// Opens an existing project.
+ /// 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();
+ bool OpenExistingProject(string filePath);
///
/// Closes the current project.
Fisheye: Tag dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/Commands/CreateNewProjectCommandTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/Commands/OpenProjectCommandTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj
===================================================================
diff -u -r173fe221a98b3d8dfb9e0aeee0d93504ad899730 -rdabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0
--- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision 173fe221a98b3d8dfb9e0aeee0d93504ad899730)
+++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision dabbb3aa0306dcbd00ee3bf340e1d5c4ce1687f0)
@@ -56,8 +56,6 @@
-
-