From 0757d8050c267444ec46b2d5af18dad3dfb2d07a Mon Sep 17 00:00:00 2001 From: avosskuehler Date: Thu, 6 Jan 2022 22:10:26 +0100 Subject: [PATCH] BUGFIX: Viana Settings File was not correct deployed. --- Setup/Setup/Config.wxi | 2 +- VianaNET/Application/RecentFiles.cs | 8 ++++++-- VianaNET/Logging/ErrorLogger.cs | 7 ++----- VianaNET/Properties/AssemblyInfo.cs | 6 +++--- VianaNET/VianaNET.csproj | 8 ++++---- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Setup/Setup/Config.wxi b/Setup/Setup/Config.wxi index 83eaf31..3c2ae68 100644 --- a/Setup/Setup/Config.wxi +++ b/Setup/Setup/Config.wxi @@ -9,7 +9,7 @@ - + diff --git a/VianaNET/Application/RecentFiles.cs b/VianaNET/Application/RecentFiles.cs index 08435bd..d0a9d14 100644 --- a/VianaNET/Application/RecentFiles.cs +++ b/VianaNET/Application/RecentFiles.cs @@ -104,6 +104,12 @@ public class RecentFiles : DependencyObject, INotifyPropertyChanged private RecentFiles() { this.appSettings = Settings.Default; + this.appSettings.SettingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "VianaNET"); + if (!Directory.Exists(this.appSettings.SettingsPath)) + { + Directory.CreateDirectory(this.appSettings.SettingsPath); + } + maxNumItems = this.appSettings.NumberOfRecentFiles; this.Load(); @@ -155,8 +161,6 @@ public ObservableCollection RecentFilesCollection /// public string SettingsFile => Path.Combine(this.appSettings.SettingsPath, "VianaRecentFileList.xml"); - - /////////////////////////////////////////////////////////////////////////////// // Public methods // /////////////////////////////////////////////////////////////////////////////// diff --git a/VianaNET/Logging/ErrorLogger.cs b/VianaNET/Logging/ErrorLogger.cs index 94ee36e..2177f5d 100644 --- a/VianaNET/Logging/ErrorLogger.cs +++ b/VianaNET/Logging/ErrorLogger.cs @@ -99,7 +99,7 @@ public static void ProcessException(Exception ex, bool showMessageBox) string message = GetLogEntryForException(innerException); WriteLine(message); - + if (showMessageBox) { VianaDialog dlg = new VianaDialog("Exception occured", ex.Message, message, true); @@ -118,10 +118,7 @@ public static void WriteLine(string line) // Use always ErrorLog.txt in LocalApplicationData if (logWriter == null) { - fs = - new FileStream( - Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\VianaNETErrorLog.txt", - FileMode.Append); + fs = new FileStream(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "VianaNET", "VianaNETErrorLog.txt"), FileMode.Append); logWriter = new StreamWriter(fs); } diff --git a/VianaNET/Properties/AssemblyInfo.cs b/VianaNET/Properties/AssemblyInfo.cs index 5b1562d..b477d45 100644 --- a/VianaNET/Properties/AssemblyInfo.cs +++ b/VianaNET/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Freie Universität Berlin")] [assembly: AssemblyProduct("Viana.NET")] -[assembly: AssemblyCopyright("Copyright @ Dr. Adrian Voßkühler 2021")] +[assembly: AssemblyCopyright("Copyright @ Dr. Adrian Voßkühler 2022")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -49,6 +49,6 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.2.*")] -[assembly: AssemblyFileVersion("6.2.1")] +[assembly: AssemblyVersion("6.3.*")] +[assembly: AssemblyFileVersion("6.3.1")] [assembly: Guid("1E23CAD1-6F4B-4a08-BF9B-91E27D8E2503")] diff --git a/VianaNET/VianaNET.csproj b/VianaNET/VianaNET.csproj index 4595804..40c4d0b 100644 --- a/VianaNET/VianaNET.csproj +++ b/VianaNET/VianaNET.csproj @@ -939,22 +939,22 @@ False - Exclude - True + Exclude + True File False - Exclude - True + Exclude + True File