force loading local default settings on first run

This commit is contained in:
HojouFotytu 2019-01-24 23:05:10 +09:00
parent 94d334ca45
commit 86ca9023b4
3 changed files with 3 additions and 3 deletions

View File

@ -559,6 +559,7 @@ namespace Core.Main
SettingsFiles.CheckPresets(this.PTMagicConfiguration, this.Log, true);
EnforceSettingsReapply = true;
this.StartPTMagicIntervalTimer();
return result;
@ -903,7 +904,7 @@ namespace Core.Main
FileInfo generalSettingsFile = new FileInfo(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "settings.general.json");
FileInfo analyzerSettingsFile = new FileInfo(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "settings.analyzer.json");
if (generalSettingsFile.LastWriteTime > this.LastSettingFileCheck || analyzerSettingsFile.LastWriteTime > this.LastSettingFileCheck)
if (generalSettingsFile.LastWriteTime > this.LastSettingFileCheck || analyzerSettingsFile.LastWriteTime > this.LastSettingFileCheck || EnforceSettingsReapply)
{
Log.DoLogInfo("Detected configuration changes. Reloading settings...");

View File

@ -90,7 +90,6 @@ namespace Core.ProfitTrailer
fileLines.Insert(0, "# ####################################");
fileLines.Insert(0, "# PTMagic_LastChanged = " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString());
fileLines.Insert(0, "# PTMagic_ActiveSetting = " + SystemHelper.StripBadCode(ptmagicInstance.DefaultSettingName, Constants.WhiteListProperties));
fileLines.Insert(0, "# ####### PTMagic Current Setting ########");
fileLines.Insert(0, "# ####################################");
ptmagicInstance.GetType().GetProperty(fileType + "Lines").SetValue(ptmagicInstance, fileLines);

View File

@ -7,7 +7,7 @@ using Core.Helper;
using Core.Main.DataObjects.PTMagicData;
using Microsoft.Extensions.DependencyInjection;
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyVersion("2.1.1")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic