Make load profile function handle later versions of config file

This change makes the ProfileRepository handle loading json config files from later versions of DM without causing an exception. This will mean that you can install later model config files and still have them work ok.
This commit is contained in:
Terry MacDonald 2022-01-21 18:09:04 +13:00
parent b50b49af74
commit 195820bea6
3 changed files with 5 additions and 5 deletions

View File

@ -26,8 +26,8 @@ using System.Resources;
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
// Version information
[assembly: AssemblyVersion("2.2.0.52")]
[assembly: AssemblyFileVersion("2.2.0.52")]
[assembly: AssemblyVersion("2.2.0.54")]
[assembly: AssemblyFileVersion("2.2.0.54")]
[assembly: NeutralResourcesLanguageAttribute( "en" )]
[assembly: CLSCompliant(true)]

View File

@ -705,7 +705,7 @@ namespace DisplayMagicianShared
{
JsonSerializerSettings mySerializerSettings = new JsonSerializerSettings
{
MissingMemberHandling = MissingMemberHandling.Error,
MissingMemberHandling = MissingMemberHandling.Ignore,
NullValueHandling = NullValueHandling.Include,
//NullValueHandling = NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Include,

View File

@ -71,7 +71,7 @@ namespace DisplayMagician.UIForms
}
else
{
logger.Warn($"DisplayProfileForm/Apply_Click: Error applying the Profile {_selectedProfile.Name}. Unable to change the display layout.");
logger.Error($"DisplayProfileForm/Apply_Click: Error applying the Profile {_selectedProfile.Name}. Unable to change the display layout.");
}
// Also refresh the right-click menu (if we have a main form loaded)
@ -274,7 +274,7 @@ namespace DisplayMagician.UIForms
logger.Error($"DisplayProfileForm/DisplayProfileForm_Load: Waiting to run the UpdateActiveProfile as there is another Task running!");
}
Program.AppBackgroundTaskSemaphoreSlim.Wait();
logger.Error($"DisplayProfileForm/DisplayProfileForm_Load: Running the UpdateActiveProfile as there are no other Tasks running!");
logger.Trace($"DisplayProfileForm/DisplayProfileForm_Load: Running the UpdateActiveProfile as there are no other Tasks running!");
ProfileRepository.UpdateActiveProfile();
Program.AppBackgroundTaskSemaphoreSlim.Release();