Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml
===================================================================
diff -u -r3fdd2bee85bdf8b556c52d6706ed887c2b70bed4 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml (.../MainWindow.xaml) (revision 3fdd2bee85bdf8b556c52d6706ed887c2b70bed4)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml (.../MainWindow.xaml) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -75,17 +75,6 @@
-
-
-
-
-
-
-
-
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -21,7 +21,6 @@
using System;
using System.Collections.Generic;
-using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
@@ -37,7 +36,6 @@
using Core.Common.Gui.Selection;
using Core.Common.Gui.Settings;
using Fluent;
-using log4net;
using Button = Fluent.Button;
using Cursors = System.Windows.Input.Cursors;
using WindowsFormApplication = System.Windows.Forms.Application;
@@ -49,8 +47,6 @@
///
public partial class MainWindow : IMainWindow, IDisposable, ISynchronizeInvoke
{
- private static readonly ILog log = LogManager.GetLogger(typeof(MainWindow));
-
///
/// Remember last active contextual tab per view.
///
@@ -412,63 +408,6 @@
}
}
- private void AddRecentlyOpenedProjectsToFileMenu()
- {
- var mruList = Properties.Settings.Default["mruList"] as StringCollection;
-
- foreach (var recent in mruList)
- {
- AddNewMruItem(recent);
- }
- }
-
- private void AddNewMruItem(string path)
- {
- if (!RecentProjectsTabControl.Items.OfType().Any(i => Equals(i.Header, path)))
- {
- var newItem = new TabItem
- {
- Header = path
- };
- newItem.MouseDoubleClick += (sender, args) =>
- {
- if (commands.StorageCommands.OpenExistingProject(path))
- {
- RecentProjectsTabControl.Items.Remove(newItem);
- RecentProjectsTabControl.Items.Insert(1, newItem);
- }
- else
- {
- //remove item from the list if it cannot be retrieved from file
- RecentProjectsTabControl.Items.Remove(newItem);
- log.WarnFormat("{0} {1}", Properties.Resources.MainWindow_AddNewMruItem_Can_t_open_project, path);
- }
-
- CommitMruToSettings();
- ValidateItems();
- Menu.IsOpen = false;
- };
- RecentProjectsTabControl.Items.Add(newItem);
- }
- }
-
- private void CommitMruToSettings()
- {
- var mruList = (StringCollection) Properties.Settings.Default["mruList"];
-
- mruList.Clear();
-
- foreach (TabItem item in RecentProjectsTabControl.Items)
- {
- if (item is SeparatorTabItem) //header
- {
- continue;
- }
-
- mruList.Add(item.Header.ToString());
- }
- }
-
private void UpdateToolWindowButtonState()
{
if (viewController.ViewHost != null)
@@ -502,35 +441,17 @@
private void OnFileSaveClicked(object sender, RoutedEventArgs e)
{
- var saveSuccesful = commands.StorageCommands.SaveProject();
- OnAfterProjectSaveOrOpen(saveSuccesful);
+ commands.StorageCommands.SaveProject();
}
private void OnFileSaveAsClicked(object sender, RoutedEventArgs e)
{
- var saveSuccesful = commands.StorageCommands.SaveProjectAs();
- OnAfterProjectSaveOrOpen(saveSuccesful);
+ commands.StorageCommands.SaveProjectAs();
}
- private void OnAfterProjectSaveOrOpen(bool actionSuccesful)
- {
- //TODO: Implement
-
- // Original code:
- /*
- if (actionSuccesful)
- {
- AddNewMruItem(Gui.ApplicationCore.ProjectFilePath);
- CommitMruToSettings();
- }
- ValidateItems();
- */
- }
-
private void OnFileOpenClicked(object sender, RoutedEventArgs e)
{
- var successful = commands.StorageCommands.OpenExistingProject();
- OnAfterProjectSaveOrOpen(successful);
+ commands.StorageCommands.OpenExistingProject();
}
private void OnFileNewClicked(object sender, RoutedEventArgs e)
@@ -549,8 +470,6 @@
{
WindowState = WindowState.Maximized;
- AddRecentlyOpenedProjectsToFileMenu();
-
FileManualButton.IsEnabled = File.Exists(settings.FixedSettings.ManualFilePath);
LicenseButton.IsEnabled = File.Exists(settings.FixedSettings.LicenseFilePath);
Index: Core/Common/src/Core.Common.Gui/GuiCore.cs
===================================================================
diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
+++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -417,14 +417,6 @@
InitializePlugins();
CopyDefaultViewsFromUserSettings();
-
- if (Properties.Settings.Default.SettingsKey.Contains("mruList"))
- {
- if (Properties.Settings.Default["mruList"] == null)
- {
- Properties.Settings.Default["mruList"] = new StringCollection();
- }
- }
}
private void ShowSplashScreen()
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs
===================================================================
diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.17929
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -872,15 +872,6 @@
}
///
- /// Looks up a localized string similar to Project kan niet worden geopend..
- ///
- public static string MainWindow_AddNewMruItem_Can_t_open_project {
- get {
- return ResourceManager.GetString("MainWindow_AddNewMruItem_Can_t_open_project", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Licentie.
///
public static string MainWindow_LicenseView_Name {
@@ -1234,15 +1225,6 @@
}
///
- /// Looks up a localized string similar to Recent.
- ///
- public static string Ribbon_Recent {
- get {
- return ResourceManager.GetString("Ribbon_Recent", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Log Tonen.
///
public static string Ribbon_Show_Log {
@@ -1279,15 +1261,6 @@
}
///
- /// Looks up a localized string similar to Recente Projecten.
- ///
- public static string Ribbon_TabItem_Recent_Projects {
- get {
- return ResourceManager.GetString("Ribbon_TabItem_Recent_Projects", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Beeld.
///
public static string Ribbon_TabItem_View {
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx
===================================================================
diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -187,9 +187,6 @@
Instelling {0} heeft de niet-ondersteunde waarde 'roaming'.
-
- Project kan niet worden geopend.
-
../Resources/DeleteHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -208,9 +205,6 @@
..\Resources\CopyHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Recente Projecten
-
..\Resources\PropertiesHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -313,9 +307,6 @@
Geen enkele 'Importer' is beschikbaar voor dit element.
-
- Recent
-
Afsluiten
Index: Core/Common/src/Core.Common.Gui/Properties/Settings.Designer.cs
===================================================================
diff -u -r3fdd2bee85bdf8b556c52d6706ed887c2b70bed4 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Properties/Settings.Designer.cs (.../Settings.Designer.cs) (revision 3fdd2bee85bdf8b556c52d6706ed887c2b70bed4)
+++ Core/Common/src/Core.Common.Gui/Properties/Settings.Designer.cs (.../Settings.Designer.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -25,17 +25,6 @@
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Collections.Specialized.StringCollection mruList {
- get {
- return ((global::System.Collections.Specialized.StringCollection)(this["mruList"]));
- }
- set {
- this["mruList"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.Specialized.StringCollection defaultViewDataTypes {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["defaultViewDataTypes"]));
Index: Core/Common/src/Core.Common.Gui/Properties/Settings.cs
===================================================================
diff -u -r223b2a4edc4ac816051c7eeecb735c34a6246574 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Properties/Settings.cs (.../Settings.cs) (revision 223b2a4edc4ac816051c7eeecb735c34a6246574)
+++ Core/Common/src/Core.Common.Gui/Properties/Settings.cs (.../Settings.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -20,7 +20,6 @@
// All rights reserved.
using System.Collections.Specialized;
-using System.ComponentModel;
using System.Configuration;
using System.IO;
@@ -37,14 +36,10 @@
[SettingsProvider(typeof(PortableSettingsProvider))]
public sealed partial class Settings
{
- public Settings()
+ private Settings()
{
PortableSettingsProvider.SettingsFilePath = Path.Combine(SettingsHelper.GetApplicationLocalUserSettingsDirectory(), "user.config");
//add default intances for collections
- if (mruList == null)
- {
- mruList = new StringCollection();
- }
if (defaultViews == null)
{
defaultViews = new StringCollection();
@@ -53,23 +48,6 @@
{
defaultViewDataTypes = new StringCollection();
}
-
- // // To add event handlers for saving and changing settings, uncomment the lines below:
- //
- // this.SettingChanging += this.SettingChangingEventHandler;
- //
- // this.SettingsSaving += this.SettingsSavingEventHandler;
- //
}
-
- private void SettingChangingEventHandler(object sender, SettingChangingEventArgs e)
- {
- // Add code to handle the SettingChangingEvent event here.
- }
-
- private void SettingsSavingEventHandler(object sender, CancelEventArgs e)
- {
- // Add code to handle the SettingsSaving event here.
- }
}
}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/Properties/Settings.settings
===================================================================
diff -u -r3fdd2bee85bdf8b556c52d6706ed887c2b70bed4 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/src/Core.Common.Gui/Properties/Settings.settings (.../Settings.settings) (revision 3fdd2bee85bdf8b556c52d6706ed887c2b70bed4)
+++ Core/Common/src/Core.Common.Gui/Properties/Settings.settings (.../Settings.settings) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -2,9 +2,6 @@
-
-
-
Index: Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -r15112fbb75ed51e38efb261b0608b82eee220f25
--- Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/test/Core.Common.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision 15112fbb75ed51e38efb261b0608b82eee220f25)
@@ -1044,11 +1044,9 @@
private static void AssertDefaultUserSettings(SettingsBase settings)
{
Assert.IsNotNull(settings);
- Assert.AreEqual(4, settings.Properties.Count);
+ Assert.AreEqual(3, settings.Properties.Count);
// Note: Cannot assert particular values, as they can be changed by user.
- var mruList = (StringCollection) settings["mruList"];
- Assert.IsNotNull(mruList);
var defaultViewDataTypes = (StringCollection) settings["defaultViewDataTypes"];
Assert.IsNotNull(defaultViewDataTypes);
var defaultViews = (StringCollection) settings["defaultViews"];