From cd2eb1c2b13d15dd58842d8eabea978075979554 Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 14 Dec 2015 19:59:27 +0000 Subject: WinGui: Ability to Force Preset updates change tidy up --- win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'win/CS/HandBrakeWPF/Services/Presets/PresetService.cs') diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index de1aefbf8..6e6935f00 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -43,7 +43,7 @@ namespace HandBrakeWPF.Services.Presets { #region Private Variables - public const int ForcePresetReset = 0; + public const int ForcePresetReset = 2; public static string UserPresetCatgoryName = "User Presets"; private readonly string presetFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.json"; private readonly ObservableCollection presets = new ObservableCollection(); @@ -544,11 +544,13 @@ namespace HandBrakeWPF.Services.Presets } // Force Upgrade of presets - if (this.userSettingService.GetUserSetting(UserSettingConstants.ForcePresetReset) > ForcePresetReset) + if (this.userSettingService.GetUserSetting(UserSettingConstants.ForcePresetReset) < ForcePresetReset) { + this.userSettingService.SetUserSetting(UserSettingConstants.ForcePresetReset, ForcePresetReset); + string fileName = this.ArchivePresetFile(this.presetFile); this.errorService.ShowMessageBox( - Resources.PresetService_PresetsOutOfDate + Resources.Presets_PresetForceReset + Environment.NewLine + Environment.NewLine + Resources.PresetService_ArchiveFile + fileName, Resources.PresetService_UnableToLoad, MessageBoxButton.OK, -- cgit v1.2.3