moved FUpdateSettings to the right place

This commit is contained in:
Asval 2019-12-08 20:49:12 +01:00
parent ea73151cf1
commit 959c8836af
2 changed files with 12 additions and 10 deletions

View File

@ -39,16 +39,6 @@ namespace FModel
AutoUpdater.CheckForUpdateEvent += UIHelper.AutoUpdaterOnCheckForUpdateEvent;
AutoUpdater.Start("https://dl.dropbox.com/s/3kv2pukqu6tj1r0/FModel.xml?dl=0");
// Copy user settings from previous application version if necessary
if (FProp.Default.FUpdateSettings)
{
FProp.Default.Upgrade();
FProp.Default.FUpdateSettings = false;
FProp.Default.Save();
DebugHelper.WriteLine("User settings copied from previous version");
}
DebugHelper.WriteUserSettings();
await Task.Run(() =>

View File

@ -5,6 +5,7 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using FProp = FModel.Properties.Settings;
namespace FModel
{
@ -98,7 +99,18 @@ namespace FModel
get
{
string filename = string.Format("FModel-Log-{0:yyyy-MM-dd}.txt", DateTime.Now);
// Copy user settings from previous application version if necessary
if (FProp.Default.FUpdateSettings)
{
FProp.Default.Upgrade();
FProp.Default.FUpdateSettings = false;
FProp.Default.Save();
DebugHelper.WriteLine("User settings copied from previous version");
}
FoldersUtility.LoadFolders();
return Path.Combine(Properties.Settings.Default.FOutput_Path + "\\Logs", filename);
}
}