From 4352e04cc49ef9089905457ecc5b33df7af6f51a Mon Sep 17 00:00:00 2001 From: Harabe-x Date: Wed, 17 Jan 2024 21:46:36 +0100 Subject: [PATCH] Changed assembly version --- PixaiBot/AssemblyInfo.cs | 6 +++--- .../Data Management/InitialConfiguration.cs | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/PixaiBot/AssemblyInfo.cs b/PixaiBot/AssemblyInfo.cs index 634ca1e..2f11e80 100644 --- a/PixaiBot/AssemblyInfo.cs +++ b/PixaiBot/AssemblyInfo.cs @@ -9,6 +9,6 @@ //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] -[assembly: AssemblyVersion("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] -[assembly: AssemblyInformationalVersion("1.2.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] +[assembly: AssemblyInformationalVersion("1.3.0")] \ No newline at end of file diff --git a/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs b/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs index d37fde3..861af85 100644 --- a/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs +++ b/PixaiBot/Business Logic/Data Management/InitialConfiguration.cs @@ -45,7 +45,7 @@ public static void CreateDirectories() /// public static void CreateConfigFile() { - if (File.Exists(UserConfigPath)) return; + var userConfig = new UserConfig() { @@ -65,7 +65,14 @@ public static void CreateConfigFile() /// public static void CreateStatisticsFile() { - if (File.Exists(StatisticsFilePath)) return; + if (File.Exists(StatisticsFilePath)) + { + var currentStatistics = JsonReader.ReadStatisticsFile(StatisticsFilePath); + if (currentStatistics.BotVersion == BotVersion) return; + currentStatistics.BotVersion = BotVersion; + JsonWriter.WriteJson(currentStatistics, StatisticsFilePath); + return; + }; var statistics = new BotStatistics() {