Add debug constants and don't check updates in debug.

Refactored cell formatting

Made GridEntry thread safe

Moved PictureStorage set defaults into constructor.
This commit is contained in:
Michael Bucari-Tovo 2021-08-09 20:07:15 -06:00
parent ab82e7c99c
commit 2ef746a94c
7 changed files with 49 additions and 94 deletions

View file

@ -13,7 +13,11 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>5.4.9.79</Version>
<Version>5.4.9.120</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<ItemGroup>

View file

@ -59,7 +59,10 @@ namespace LibationLauncher
ensureSerilogConfig(config);
configureLogging(config);
logStartupState(config);
#if !DEBUG
checkForUpdate(config);
#endif
Application.Run(new Form1());
}
@ -145,7 +148,7 @@ namespace LibationLauncher
CancelInstallation();
}
#region migrate to v5.0.0 re-register device if device info not in settings
#region migrate to v5.0.0 re-register device if device info not in settings
private static void migrate_to_v5_0_0(Configuration config)
{
if (!config.Exists(nameof(config.AllowLibationFixup)))
@ -187,9 +190,9 @@ namespace LibationLauncher
}
}
}
#endregion
#endregion
#region migrate to v5.2.0
#region migrate to v5.2.0
// get rid of meta-directories, combine DownloadsInProgressEnum and DecryptInProgressEnum => InProgress
private static void migrate_to_v5_2_0__pre_config()
{
@ -231,9 +234,9 @@ namespace LibationLauncher
if (!config.Exists(nameof(config.DecryptToLossy)))
config.DecryptToLossy = false;
}
#endregion
#endregion
#region migrate to v5.4.1 see comment
#region migrate to v5.4.1 see comment
// this 'migration' is a bit different. it intentionally runs each time Libation is started. its job will be fulfilled when I eventually
// implement the portion which removes FilePaths.json, at which time this method will be a proper migration
//
@ -297,7 +300,7 @@ namespace LibationLauncher
debugStopwatch.Stop();
var debugTotal = debugStopwatch.Elapsed;
}
#endregion
#endregion
private static void ensureSerilogConfig(Configuration config)
{
@ -418,6 +421,7 @@ namespace LibationLauncher
if (latest is null)
return;
var latestVersionString = latest.TagName.Trim('v');
if (!Version.TryParse(latestVersionString, out var latestRelease))
return;