From 3f5c104935be95967b8828646b5b5cdbc398bb24 Mon Sep 17 00:00:00 2001 From: Christian Wade Date: Fri, 13 Dec 2019 21:26:04 -0800 Subject: [PATCH] Upgrade settings file --- BismNormalizer/AlmToolkit/Program.cs | 15 ++++++++++++++- .../AlmToolkit/Properties/AssemblyInfo.cs | 4 ++-- BismNormalizer/BismNormalizer.sln | 1 - .../BismNormalizer/Settings.Designer.cs | 16 ++++++++++++++-- BismNormalizer/BismNormalizer/Settings.settings | 3 +++ BismNormalizer/BismNormalizer/app.config | 3 +++ 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/BismNormalizer/AlmToolkit/Program.cs b/BismNormalizer/AlmToolkit/Program.cs index 6dd832e..7e00369 100644 --- a/BismNormalizer/AlmToolkit/Program.cs +++ b/BismNormalizer/AlmToolkit/Program.cs @@ -1,4 +1,5 @@ -using Microsoft.AnalysisServices; +using BismNormalizer; +using Microsoft.AnalysisServices; using System; using System.Collections.Generic; using System.IO; @@ -20,6 +21,18 @@ namespace AlmToolkit Application.SetCompatibleTextRenderingDefault(false); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); + //If new install, see if need to migrate settings file from previous version + try + { + if (Settings.Default.UpgradeRequired) + { + Settings.Default.Upgrade(); + Settings.Default.UpgradeRequired = false; + Settings.Default.Save(); + } + } + catch { } + if (args != null && args.Length > 0) { if (args.Length > 1) diff --git a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs index 71073f9..4cc0a49 100644 --- a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs +++ b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.0.5")] -[assembly: AssemblyFileVersion("4.0.0.5")] +[assembly: AssemblyVersion("4.0.0.7")] +[assembly: AssemblyFileVersion("4.0.0.7")] diff --git a/BismNormalizer/BismNormalizer.sln b/BismNormalizer/BismNormalizer.sln index ce97149..1a916cf 100644 --- a/BismNormalizer/BismNormalizer.sln +++ b/BismNormalizer/BismNormalizer.sln @@ -48,7 +48,6 @@ Global {849693FC-AD82-4323-8A96-D6A0F6D97566}.Release|x64.ActiveCfg = Release|Any CPU {849693FC-AD82-4323-8A96-D6A0F6D97566}.Release|x64.Build.0 = Release|Any CPU {3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|x64.ActiveCfg = Debug|Any CPU {3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Debug|x64.Build.0 = Debug|Any CPU {3AE5D06F-A054-4AD1-83A9-9F0B8B1FC0B4}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/BismNormalizer/BismNormalizer/Settings.Designer.cs b/BismNormalizer/BismNormalizer/Settings.Designer.cs index 5cec16e..dc61f6c 100644 --- a/BismNormalizer/BismNormalizer/Settings.Designer.cs +++ b/BismNormalizer/BismNormalizer/Settings.Designer.cs @@ -12,10 +12,10 @@ namespace BismNormalizer { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - public static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { @@ -334,5 +334,17 @@ namespace BismNormalizer { this["LastBimFileLocation"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool UpgradeRequired { + get { + return ((bool)(this["UpgradeRequired"])); + } + set { + this["UpgradeRequired"] = value; + } + } } } diff --git a/BismNormalizer/BismNormalizer/Settings.settings b/BismNormalizer/BismNormalizer/Settings.settings index cf02c0a..e1cebae 100644 --- a/BismNormalizer/BismNormalizer/Settings.settings +++ b/BismNormalizer/BismNormalizer/Settings.settings @@ -80,5 +80,8 @@ + + True + \ No newline at end of file diff --git a/BismNormalizer/BismNormalizer/app.config b/BismNormalizer/BismNormalizer/app.config index 92cb015..6a55175 100644 --- a/BismNormalizer/BismNormalizer/app.config +++ b/BismNormalizer/BismNormalizer/app.config @@ -85,6 +85,9 @@ + + True +