Adjusting settings to leverage base class (#5127)

* renaming / deleting file

* adding in base class

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-21 14:06:39 -07:00
committed by GitHub
parent d01b93ae5f
commit 398991f3c1
30 changed files with 202 additions and 274 deletions

View File

@@ -3,16 +3,19 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public abstract class BasePTModuleSettings public abstract class BasePTModuleSettings
{ {
// Gets or sets name of the powertoy module. // Gets or sets name of the powertoy module.
public string name { get; set; } [JsonPropertyName("name")]
public string Name { get; set; }
// Gets or sets the powertoys version. // Gets or sets the powertoys version.
public string version { get; set; } [JsonPropertyName("version")]
public string Version { get; set; }
// converts the current to a json string. // converts the current to a json string.
public virtual string ToJsonString() public virtual string ToJsonString()

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
@@ -10,18 +11,14 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public const string ModuleName = "ColorPicker"; public const string ModuleName = "ColorPicker";
public ColorPickerProperties properties { get; set; } [JsonPropertyName("properties")]
public ColorPickerProperties Properties { get; set; }
public ColorPickerSettings() public ColorPickerSettings()
{ {
properties = new ColorPickerProperties(); Properties = new ColorPickerProperties();
version = "1"; Version = "1";
name = ModuleName; Name = ModuleName;
}
public override string ToJsonString()
{
return JsonSerializer.Serialize(this);
} }
public virtual void Save() public virtual void Save()

View File

@@ -23,7 +23,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
this.FancyzonesShowOnAllMonitors = new BoolProperty(); this.FancyzonesShowOnAllMonitors = new BoolProperty();
this.FancyzonesZoneHighlightColor = new StringProperty(ConfigDefaults.DefaultFancyZonesZoneHighlightColor); this.FancyzonesZoneHighlightColor = new StringProperty(ConfigDefaults.DefaultFancyZonesZoneHighlightColor);
this.FancyzonesHighlightOpacity = new IntProperty(50); this.FancyzonesHighlightOpacity = new IntProperty(50);
this.FancyzonesEditorHotkey = new KeyBoardKeysProperty( this.FancyzonesEditorHotkey = new KeyboardKeysProperty(
new HotkeySettings() new HotkeySettings()
{ {
Win = true, Win = true,
@@ -82,7 +82,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public IntProperty FancyzonesHighlightOpacity { get; set; } public IntProperty FancyzonesHighlightOpacity { get; set; }
[JsonPropertyName("fancyzones_editor_hotkey")] [JsonPropertyName("fancyzones_editor_hotkey")]
public KeyBoardKeysProperty FancyzonesEditorHotkey { get; set; } public KeyboardKeysProperty FancyzonesEditorHotkey { get; set; }
[JsonPropertyName("fancyzones_excluded_apps")] [JsonPropertyName("fancyzones_excluded_apps")]
public StringProperty FancyzonesExcludedApps { get; set; } public StringProperty FancyzonesExcludedApps { get; set; }

View File

@@ -2,35 +2,20 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class FancyZonesSettings public class FancyZonesSettings : BasePTModuleSettings
{ {
public FancyZonesSettings() public FancyZonesSettings()
{ {
this.Version = string.Empty; Version = string.Empty;
this.Name = string.Empty; Name = string.Empty;
this.Properties = new FZConfigProperties(); Properties = new FZConfigProperties();
} }
[JsonPropertyName("version")]
public string Version { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("properties")] [JsonPropertyName("properties")]
public FZConfigProperties Properties { get; set; } public FZConfigProperties Properties { get; set; }
public string ToJsonString()
{
return JsonSerializer.Serialize(this);
}
} }
} }

View File

@@ -1,19 +0,0 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.PowerToys.Settings.UI.Lib
{
public interface IPowerToySettings
{
string name { get; set; }
string version { get; set; }
string ToJsonString();
}
}

View File

@@ -22,7 +22,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
ImageresizerTiffCompressOption = new IntProperty(); ImageresizerTiffCompressOption = new IntProperty();
ImageresizerFileName = new StringProperty("%1 (%2)"); ImageresizerFileName = new StringProperty("%1 (%2)");
ImageresizerSizes = new ImageresizerSizes(new ObservableCollection<ImageSize>() ImageresizerSizes = new ImageResizerSizes(new ObservableCollection<ImageSize>()
{ {
new ImageSize(0, "Small", ResizeFit.Fit, 854, 480, ResizeUnit.Pixel), new ImageSize(0, "Small", ResizeFit.Fit, 854, 480, ResizeUnit.Pixel),
new ImageSize(1, "Medium", ResizeFit.Fit, 1366, 768, ResizeUnit.Pixel), new ImageSize(1, "Medium", ResizeFit.Fit, 1366, 768, ResizeUnit.Pixel),
@@ -32,7 +32,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
ImageresizerKeepDateModified = new BoolProperty(); ImageresizerKeepDateModified = new BoolProperty();
ImageresizerFallbackEncoder = new StringProperty(new System.Guid("19e4a5aa-5662-4fc5-a0c0-1758028e1057").ToString()); ImageresizerFallbackEncoder = new StringProperty(new System.Guid("19e4a5aa-5662-4fc5-a0c0-1758028e1057").ToString());
ImageresizerCustomSize = new ImageresizerCustomSizeProperty(new ImageSize(4, "custom", ResizeFit.Fit, 1024, 640, ResizeUnit.Pixel)); ImageresizerCustomSize = new ImageResizerCustomSizeProperty(new ImageSize(4, "custom", ResizeFit.Fit, 1024, 640, ResizeUnit.Pixel));
} }
[JsonPropertyName("imageresizer_selectedSizeIndex")] [JsonPropertyName("imageresizer_selectedSizeIndex")]
@@ -60,7 +60,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public StringProperty ImageresizerFileName { get; set; } public StringProperty ImageresizerFileName { get; set; }
[JsonPropertyName("imageresizer_sizes")] [JsonPropertyName("imageresizer_sizes")]
public ImageresizerSizes ImageresizerSizes { get; set; } public ImageResizerSizes ImageresizerSizes { get; set; }
[JsonPropertyName("imageresizer_keepDateModified")] [JsonPropertyName("imageresizer_keepDateModified")]
public BoolProperty ImageresizerKeepDateModified { get; set; } public BoolProperty ImageresizerKeepDateModified { get; set; }
@@ -69,7 +69,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public StringProperty ImageresizerFallbackEncoder { get; set; } public StringProperty ImageresizerFallbackEncoder { get; set; }
[JsonPropertyName("imageresizer_customSize")] [JsonPropertyName("imageresizer_customSize")]
public ImageresizerCustomSizeProperty ImageresizerCustomSize { get; set; } public ImageResizerCustomSizeProperty ImageresizerCustomSize { get; set; }
public string ToJsonString() public string ToJsonString()
{ {

View File

@@ -2,33 +2,26 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class ImageResizerSettings public class ImageResizerSettings : BasePTModuleSettings
{ {
[JsonPropertyName("version")] public const string ModuleName = "Image Resizer";
public string Version { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("properties")] [JsonPropertyName("properties")]
public ImageResizerProperties Properties { get; set; } public ImageResizerProperties Properties { get; set; }
public ImageResizerSettings() public ImageResizerSettings()
{ {
this.Version = "1"; Version = "1";
this.Name = "Image Resizer"; Name = ModuleName;
this.Properties = new ImageResizerProperties(); Properties = new ImageResizerProperties();
} }
public string ToJsonString() public override string ToJsonString()
{ {
var options = new JsonSerializerOptions var options = new JsonSerializerOptions
{ {

View File

@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
{
public class ImagerResizerKeepDateModified
{
[JsonPropertyName("value")]
public bool Value { get; set; }
public ImagerResizerKeepDateModified()
{
Value = false;
}
}
}

View File

@@ -1,22 +1,22 @@
using System; // Copyright (c) Microsoft Corporation
using System.Collections.Generic; // The Microsoft Corporation licenses this file to you under the MIT license.
using System.Text; // See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class ImageResizerCustomSizeProperty
public class ImageresizerCustomSizeProperty
{ {
[JsonPropertyName("value")] [JsonPropertyName("value")]
public ImageSize Value { get; set; } public ImageSize Value { get; set; }
public ImageresizerCustomSizeProperty() public ImageResizerCustomSizeProperty()
{ {
this.Value = new ImageSize(); Value = new ImageSize();
} }
public ImageresizerCustomSizeProperty(ImageSize value) public ImageResizerCustomSizeProperty(ImageSize value)
{ {
Value = value; Value = value;
} }

View File

@@ -1,19 +1,19 @@
using System; // Copyright (c) Microsoft Corporation
using System.Collections.Generic; // The Microsoft Corporation licenses this file to you under the MIT license.
using System.Text; // See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class ImageResizerFallbackEncoder
public class ImageresizerFallbackEncoder
{ {
[JsonPropertyName("value")] [JsonPropertyName("value")]
public string Value { get; set; } public string Value { get; set; }
public ImageresizerFallbackEncoder() public ImageResizerFallbackEncoder()
{ {
this.Value = string.Empty; Value = string.Empty;
} }
} }
} }

View File

@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
{
public class ImageresizerKeepDateModified
{
[JsonPropertyName("value")]
public bool Value { get; set; }
public ImageresizerKeepDateModified()
{
this.Value = false;
}
}
}

View File

@@ -2,27 +2,23 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class ImageResizerSizes
public class ImageresizerSizes
{ {
[JsonPropertyName("value")] [JsonPropertyName("value")]
public ObservableCollection<ImageSize> Value { get; set; } public ObservableCollection<ImageSize> Value { get; set; }
public ImageresizerSizes() public ImageResizerSizes()
{ {
this.Value = new ObservableCollection<ImageSize>(); Value = new ObservableCollection<ImageSize>();
} }
public ImageresizerSizes(ObservableCollection<ImageSize> value) public ImageResizerSizes(ObservableCollection<ImageSize> value)
{ {
Value = value; Value = value;
} }

View File

@@ -2,23 +2,20 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class KeyBoardKeysProperty public class KeyboardKeysProperty
{ {
public KeyBoardKeysProperty() public KeyboardKeysProperty()
{ {
this.Value = new HotkeySettings(); Value = new HotkeySettings();
} }
public KeyBoardKeysProperty(HotkeySettings hkSettings) public KeyboardKeysProperty(HotkeySettings hkSettings)
{ {
this.Value = hkSettings; Value = hkSettings;
} }
[JsonPropertyName("value")] [JsonPropertyName("value")]

View File

@@ -2,10 +2,6 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
@@ -18,21 +14,15 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public KeyboardManagerSettings() public KeyboardManagerSettings()
{ {
Properties = new KeyboardManagerProperties(); Properties = new KeyboardManagerProperties();
version = "1"; Version = "1";
name = "_unset_"; Name = "_unset_";
} }
public KeyboardManagerSettings(string ptName) public KeyboardManagerSettings(string ptName)
{ {
Properties = new KeyboardManagerProperties(); Properties = new KeyboardManagerProperties();
version = "1"; Version = "1";
name = ptName; Name = ptName;
}
// converts the current to a json string.
public override string ToJsonString()
{
return JsonSerializer.Serialize(this);
} }
} }
} }

View File

@@ -3,20 +3,22 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class PowerLauncherSettings : BasePTModuleSettings public class PowerLauncherSettings : BasePTModuleSettings
{ {
public const string POWERTOYNAME = "PowerToys Run"; public const string ModuleName = "PowerToys Run";
public PowerLauncherProperties properties { get; set; } [JsonPropertyName("properties")]
public PowerLauncherProperties Properties { get; set; }
public PowerLauncherSettings() public PowerLauncherSettings()
{ {
properties = new PowerLauncherProperties(); Properties = new PowerLauncherProperties();
version = "1"; Version = "1";
name = POWERTOYNAME; Name = ModuleName;
} }
public virtual void Save() public virtual void Save()
@@ -27,7 +29,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
WriteIndented = true, WriteIndented = true,
}; };
SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), POWERTOYNAME); SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), ModuleName);
} }
} }
} }

View File

@@ -17,15 +17,15 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public PowerPreviewSettings() public PowerPreviewSettings()
{ {
properties = new PowerPreviewProperties(); properties = new PowerPreviewProperties();
version = "1"; Version = "1";
name = "File Explorer"; Name = "File Explorer";
} }
public PowerPreviewSettings(string ptName) public PowerPreviewSettings(string ptName)
{ {
properties = new PowerPreviewProperties(); properties = new PowerPreviewProperties();
version = "1"; Version = "1";
name = ptName; Name = ptName;
} }
public override string ToJsonString() public override string ToJsonString()

View File

@@ -2,45 +2,42 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class PowerRenameSettings : BasePTModuleSettings public class PowerRenameSettings : BasePTModuleSettings
{ {
public PowerRenameProperties properties { get; set; } public const string ModuleName = "PowerRename";
[JsonPropertyName("properties")]
public PowerRenameProperties Properties { get; set; }
public PowerRenameSettings() public PowerRenameSettings()
{ {
properties = new PowerRenameProperties(); Properties = new PowerRenameProperties();
version = "1"; Version = "1";
name = "PowerRename"; Name = ModuleName;
} }
public PowerRenameSettings(PowerRenameLocalProperties localProperties) public PowerRenameSettings(PowerRenameLocalProperties localProperties)
{ {
properties = new PowerRenameProperties(); Properties = new PowerRenameProperties();
properties.PersistState.Value = localProperties.PersistState; Properties.PersistState.Value = localProperties.PersistState;
properties.MRUEnabled.Value = localProperties.MRUEnabled; Properties.MRUEnabled.Value = localProperties.MRUEnabled;
properties.MaxMRUSize.Value = localProperties.MaxMRUSize; Properties.MaxMRUSize.Value = localProperties.MaxMRUSize;
properties.ShowIcon.Value = localProperties.ShowIcon; Properties.ShowIcon.Value = localProperties.ShowIcon;
properties.ExtendedContextMenuOnly.Value = localProperties.ExtendedContextMenuOnly; Properties.ExtendedContextMenuOnly.Value = localProperties.ExtendedContextMenuOnly;
version = "1"; Version = "1";
name = "PowerRename"; Name = ModuleName;
} }
public PowerRenameSettings(string ptName) public PowerRenameSettings(string ptName)
{ {
properties = new PowerRenameProperties(); Properties = new PowerRenameProperties();
version = "1"; Version = "1";
name = ptName; Name = ptName;
}
public override string ToJsonString()
{
return JsonSerializer.Serialize(this);
} }
} }
} }

View File

@@ -2,35 +2,22 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib namespace Microsoft.PowerToys.Settings.UI.Lib
{ {
public class ShortcutGuideSettings public class ShortcutGuideSettings : BasePTModuleSettings
{ {
public ShortcutGuideSettings() public const string ModuleName = "Shortcut Guide";
{
Name = "Shortcut Guide";
Properties = new ShortcutGuideProperties();
Version = "1.0";
}
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("properties")] [JsonPropertyName("properties")]
public ShortcutGuideProperties Properties { get; set; } public ShortcutGuideProperties Properties { get; set; }
[JsonPropertyName("version")] public ShortcutGuideSettings()
public string Version { get; set; }
public string ToJsonString()
{ {
return JsonSerializer.Serialize(this); Name = ModuleName;
Properties = new ShortcutGuideProperties();
Version = "1.0";
} }
} }
} }

View File

@@ -62,14 +62,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return _colorPickerSettings.properties.ChangeCursor; return _colorPickerSettings.Properties.ChangeCursor;
} }
set set
{ {
if (_colorPickerSettings.properties.ChangeCursor != value) if (_colorPickerSettings.Properties.ChangeCursor != value)
{ {
_colorPickerSettings.properties.ChangeCursor = value; _colorPickerSettings.Properties.ChangeCursor = value;
OnPropertyChanged(nameof(ChangeCursor)); OnPropertyChanged(nameof(ChangeCursor));
NotifySettingsChanged(); NotifySettingsChanged();
} }
@@ -80,14 +80,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return _colorPickerSettings.properties.ActivationShortcut; return _colorPickerSettings.Properties.ActivationShortcut;
} }
set set
{ {
if (_colorPickerSettings.properties.ActivationShortcut != value) if (_colorPickerSettings.Properties.ActivationShortcut != value)
{ {
_colorPickerSettings.properties.ActivationShortcut = value; _colorPickerSettings.Properties.ActivationShortcut = value;
OnPropertyChanged(nameof(ActivationShortcut)); OnPropertyChanged(nameof(ActivationShortcut));
NotifySettingsChanged(); NotifySettingsChanged();
} }
@@ -98,14 +98,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return (int)_colorPickerSettings.properties.CopiedColorRepresentation; return (int)_colorPickerSettings.Properties.CopiedColorRepresentation;
} }
set set
{ {
if (_colorPickerSettings.properties.CopiedColorRepresentation != (ColorRepresentationType)value) if (_colorPickerSettings.Properties.CopiedColorRepresentation != (ColorRepresentationType)value)
{ {
_colorPickerSettings.properties.CopiedColorRepresentation = (ColorRepresentationType)value; _colorPickerSettings.Properties.CopiedColorRepresentation = (ColorRepresentationType)value;
OnPropertyChanged(nameof(CopiedColorRepresentationIndex)); OnPropertyChanged(nameof(CopiedColorRepresentationIndex));
NotifySettingsChanged(); NotifySettingsChanged();
} }

View File

@@ -106,7 +106,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
SettingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json"); SettingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json");
_advancedSizes = value; _advancedSizes = value;
Settings.Properties.ImageresizerSizes = new ImageresizerSizes(value); Settings.Properties.ImageresizerSizes = new ImageResizerSizes(value);
SettingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); SettingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName);
OnPropertyChanged("Sizes"); OnPropertyChanged("Sizes");
} }

View File

@@ -25,18 +25,18 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
// Propagate changes to Power Launcher through IPC // Propagate changes to Power Launcher through IPC
ShellPage.DefaultSndMSGCallback( ShellPage.DefaultSndMSGCallback(
string.Format("{{ \"powertoys\": {{ \"{0}\": {1} }} }}", PowerLauncherSettings.POWERTOYNAME, JsonSerializer.Serialize(settings))); string.Format("{{ \"powertoys\": {{ \"{0}\": {1} }} }}", PowerLauncherSettings.ModuleName, JsonSerializer.Serialize(settings)));
}; };
if (SettingsUtils.SettingsExists(PowerLauncherSettings.POWERTOYNAME)) if (SettingsUtils.SettingsExists(PowerLauncherSettings.ModuleName))
{ {
settings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.POWERTOYNAME); settings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.ModuleName);
} }
else else
{ {
settings = new PowerLauncherSettings(); settings = new PowerLauncherSettings();
settings.properties.open_powerlauncher.Alt = true; settings.Properties.open_powerlauncher.Alt = true;
settings.properties.open_powerlauncher.Code = (int)Windows.System.VirtualKey.Space; settings.Properties.open_powerlauncher.Code = (int)Windows.System.VirtualKey.Space;
settings.properties.maximum_number_of_results = 4; settings.Properties.maximum_number_of_results = 4;
callback(settings); callback(settings);
} }
@@ -87,14 +87,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.search_result_preference; return settings.Properties.search_result_preference;
} }
set set
{ {
if (settings.properties.search_result_preference != value) if (settings.Properties.search_result_preference != value)
{ {
settings.properties.search_result_preference = value; settings.Properties.search_result_preference = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -104,14 +104,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.search_type_preference; return settings.Properties.search_type_preference;
} }
set set
{ {
if (settings.properties.search_type_preference != value) if (settings.Properties.search_type_preference != value)
{ {
settings.properties.search_type_preference = value; settings.Properties.search_type_preference = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -121,14 +121,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.maximum_number_of_results; return settings.Properties.maximum_number_of_results;
} }
set set
{ {
if (settings.properties.maximum_number_of_results != value) if (settings.Properties.maximum_number_of_results != value)
{ {
settings.properties.maximum_number_of_results = value; settings.Properties.maximum_number_of_results = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -138,14 +138,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.open_powerlauncher; return settings.Properties.open_powerlauncher;
} }
set set
{ {
if (settings.properties.open_powerlauncher != value) if (settings.Properties.open_powerlauncher != value)
{ {
settings.properties.open_powerlauncher = value; settings.Properties.open_powerlauncher = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -155,14 +155,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.open_file_location; return settings.Properties.open_file_location;
} }
set set
{ {
if (settings.properties.open_file_location != value) if (settings.Properties.open_file_location != value)
{ {
settings.properties.open_file_location = value; settings.Properties.open_file_location = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -172,14 +172,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.copy_path_location; return settings.Properties.copy_path_location;
} }
set set
{ {
if (settings.properties.copy_path_location != value) if (settings.Properties.copy_path_location != value)
{ {
settings.properties.copy_path_location = value; settings.Properties.copy_path_location = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -189,14 +189,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.override_win_r_key; return settings.Properties.override_win_r_key;
} }
set set
{ {
if (settings.properties.override_win_r_key != value) if (settings.Properties.override_win_r_key != value)
{ {
settings.properties.override_win_r_key = value; settings.Properties.override_win_r_key = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -206,14 +206,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.override_win_s_key; return settings.Properties.override_win_s_key;
} }
set set
{ {
if (settings.properties.override_win_s_key != value) if (settings.Properties.override_win_s_key != value)
{ {
settings.properties.override_win_s_key = value; settings.Properties.override_win_s_key = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -223,14 +223,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.ignore_hotkeys_in_fullscreen; return settings.Properties.ignore_hotkeys_in_fullscreen;
} }
set set
{ {
if (settings.properties.ignore_hotkeys_in_fullscreen != value) if (settings.Properties.ignore_hotkeys_in_fullscreen != value)
{ {
settings.properties.ignore_hotkeys_in_fullscreen = value; settings.Properties.ignore_hotkeys_in_fullscreen = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -240,14 +240,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.clear_input_on_launch; return settings.Properties.clear_input_on_launch;
} }
set set
{ {
if (settings.properties.clear_input_on_launch != value) if (settings.Properties.clear_input_on_launch != value)
{ {
settings.properties.clear_input_on_launch = value; settings.Properties.clear_input_on_launch = value;
UpdateSettings(); UpdateSettings();
} }
} }
@@ -257,14 +257,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{ {
get get
{ {
return settings.properties.disable_drive_detection_warning; return settings.Properties.disable_drive_detection_warning;
} }
set set
{ {
if (settings.properties.disable_drive_detection_warning != value) if (settings.Properties.disable_drive_detection_warning != value)
{ {
settings.properties.disable_drive_detection_warning = value; settings.Properties.disable_drive_detection_warning = value;
UpdateSettings(); UpdateSettings();
} }
} }

View File

@@ -29,11 +29,11 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
SettingsUtils.SaveSettings(localSettings.ToJsonString(), ModuleName, "power-rename-settings.json"); SettingsUtils.SaveSettings(localSettings.ToJsonString(), ModuleName, "power-rename-settings.json");
} }
_powerRenameEnabledOnContextMenu = Settings.properties.ShowIcon.Value; _powerRenameEnabledOnContextMenu = Settings.Properties.ShowIcon.Value;
_powerRenameEnabledOnContextExtendedMenu = Settings.properties.ExtendedContextMenuOnly.Value; _powerRenameEnabledOnContextExtendedMenu = Settings.Properties.ExtendedContextMenuOnly.Value;
_powerRenameRestoreFlagsOnLaunch = Settings.properties.PersistState.Value; _powerRenameRestoreFlagsOnLaunch = Settings.Properties.PersistState.Value;
_powerRenameMaxDispListNumValue = Settings.properties.MaxMRUSize.Value; _powerRenameMaxDispListNumValue = Settings.Properties.MaxMRUSize.Value;
_autoComplete = Settings.properties.MRUEnabled.Value; _autoComplete = Settings.Properties.MRUEnabled.Value;
GeneralSettings generalSettings; GeneralSettings generalSettings;
try try
@@ -94,7 +94,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _autoComplete) if (value != _autoComplete)
{ {
_autoComplete = value; _autoComplete = value;
Settings.properties.MRUEnabled.Value = value; Settings.Properties.MRUEnabled.Value = value;
RaisePropertyChanged(); RaisePropertyChanged();
RaisePropertyChanged("GlobalAndMruEnabled"); RaisePropertyChanged("GlobalAndMruEnabled");
} }
@@ -122,7 +122,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _powerRenameEnabledOnContextMenu) if (value != _powerRenameEnabledOnContextMenu)
{ {
_powerRenameEnabledOnContextMenu = value; _powerRenameEnabledOnContextMenu = value;
Settings.properties.ShowIcon.Value = value; Settings.Properties.ShowIcon.Value = value;
RaisePropertyChanged(); RaisePropertyChanged();
} }
} }
@@ -140,7 +140,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _powerRenameEnabledOnContextExtendedMenu) if (value != _powerRenameEnabledOnContextExtendedMenu)
{ {
_powerRenameEnabledOnContextExtendedMenu = value; _powerRenameEnabledOnContextExtendedMenu = value;
Settings.properties.ExtendedContextMenuOnly.Value = value; Settings.Properties.ExtendedContextMenuOnly.Value = value;
RaisePropertyChanged(); RaisePropertyChanged();
} }
} }
@@ -158,7 +158,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _powerRenameRestoreFlagsOnLaunch) if (value != _powerRenameRestoreFlagsOnLaunch)
{ {
_powerRenameRestoreFlagsOnLaunch = value; _powerRenameRestoreFlagsOnLaunch = value;
Settings.properties.PersistState.Value = value; Settings.Properties.PersistState.Value = value;
RaisePropertyChanged(); RaisePropertyChanged();
} }
} }
@@ -176,7 +176,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _powerRenameMaxDispListNumValue) if (value != _powerRenameMaxDispListNumValue)
{ {
_powerRenameMaxDispListNumValue = value; _powerRenameMaxDispListNumValue = value;
Settings.properties.MaxMRUSize.Value = value; Settings.Properties.MaxMRUSize.Value = value;
RaisePropertyChanged(); RaisePropertyChanged();
} }
} }

View File

@@ -6,8 +6,8 @@ namespace Microsoft.PowerToys.Settings.UnitTest
{ {
public BasePTSettingsTest() public BasePTSettingsTest()
{ {
this.name = string.Empty; Name = string.Empty;
this.version = string.Empty; Version = string.Empty;
} }
} }
} }

View File

@@ -19,7 +19,7 @@ namespace ViewModelTests
var colorPickerSettings = new ColorPickerSettings(); var colorPickerSettings = new ColorPickerSettings();
SettingsUtils.SaveSettings(generalSettings.ToJsonString()); SettingsUtils.SaveSettings(generalSettings.ToJsonString());
SettingsUtils.SaveSettings(colorPickerSettings.ToJsonString(), colorPickerSettings.name, ModuleName + ".json"); SettingsUtils.SaveSettings(colorPickerSettings.ToJsonString(), colorPickerSettings.Name, ModuleName + ".json");
} }
[TestCleanup] [TestCleanup]

View File

@@ -45,8 +45,8 @@ namespace ViewModelTests
viewModel.SearchTypePreference = "SearchOptionsAreNotValidated"; viewModel.SearchTypePreference = "SearchOptionsAreNotValidated";
Assert.AreEqual(sendCallbackMock.TimesSent, 2); Assert.AreEqual(sendCallbackMock.TimesSent, 2);
Assert.IsTrue(mockSettings.properties.search_result_preference == "SearchOptionsAreNotValidated"); Assert.IsTrue(mockSettings.Properties.search_result_preference == "SearchOptionsAreNotValidated");
Assert.IsTrue(mockSettings.properties.search_type_preference == "SearchOptionsAreNotValidated"); Assert.IsTrue(mockSettings.Properties.search_type_preference == "SearchOptionsAreNotValidated");
} }
public void AssertHotkeySettings(HotkeySettings setting, bool win, bool ctrl, bool alt, bool shift, int code) public void AssertHotkeySettings(HotkeySettings setting, bool win, bool ctrl, bool alt, bool shift, int code)
@@ -85,7 +85,7 @@ namespace ViewModelTests
Assert.AreEqual(4, sendCallbackMock.TimesSent); Assert.AreEqual(4, sendCallbackMock.TimesSent);
AssertHotkeySettings( AssertHotkeySettings(
mockSettings.properties.open_powerlauncher, mockSettings.Properties.open_powerlauncher,
true, true,
false, false,
false, false,
@@ -93,7 +93,7 @@ namespace ViewModelTests
(int)Windows.System.VirtualKey.S (int)Windows.System.VirtualKey.S
); );
AssertHotkeySettings( AssertHotkeySettings(
mockSettings.properties.open_file_location, mockSettings.Properties.open_file_location,
false, false,
true, true,
false, false,
@@ -101,7 +101,7 @@ namespace ViewModelTests
(int)Windows.System.VirtualKey.A (int)Windows.System.VirtualKey.A
); );
AssertHotkeySettings( AssertHotkeySettings(
mockSettings.properties.open_console, mockSettings.Properties.open_console,
false, false,
false, false,
true, true,
@@ -109,7 +109,7 @@ namespace ViewModelTests
(int)Windows.System.VirtualKey.D (int)Windows.System.VirtualKey.D
); );
AssertHotkeySettings( AssertHotkeySettings(
mockSettings.properties.copy_path_location, mockSettings.Properties.copy_path_location,
false, false,
false, false,
false, false,
@@ -127,8 +127,8 @@ namespace ViewModelTests
Assert.AreEqual(1, sendCallbackMock.TimesSent); Assert.AreEqual(1, sendCallbackMock.TimesSent);
Assert.IsTrue(mockSettings.properties.override_win_r_key); Assert.IsTrue(mockSettings.Properties.override_win_r_key);
Assert.IsFalse(mockSettings.properties.override_win_s_key); Assert.IsFalse(mockSettings.Properties.override_win_s_key);
} }
[TestMethod] [TestMethod]
@@ -139,7 +139,7 @@ namespace ViewModelTests
// Assert // Assert
Assert.AreEqual(1, sendCallbackMock.TimesSent); Assert.AreEqual(1, sendCallbackMock.TimesSent);
Assert.IsTrue(mockSettings.properties.disable_drive_detection_warning); Assert.IsTrue(mockSettings.Properties.disable_drive_detection_warning);
} }
} }
} }

View File

@@ -25,7 +25,7 @@ namespace ViewModelTests
PowerPreviewSettings powerpreview = new PowerPreviewSettings(); PowerPreviewSettings powerpreview = new PowerPreviewSettings();
SettingsUtils.SaveSettings(generalSettings.ToJsonString()); SettingsUtils.SaveSettings(generalSettings.ToJsonString());
SettingsUtils.SaveSettings(powerpreview.ToJsonString(), powerpreview.name); SettingsUtils.SaveSettings(powerpreview.ToJsonString(), powerpreview.Name);
} }
[TestCleanup] [TestCleanup]

View File

@@ -26,7 +26,7 @@ namespace ViewModelTests
PowerRenameSettings powerRename = new PowerRenameSettings(); PowerRenameSettings powerRename = new PowerRenameSettings();
SettingsUtils.SaveSettings(generalSettings.ToJsonString()); SettingsUtils.SaveSettings(generalSettings.ToJsonString());
SettingsUtils.SaveSettings(powerRename.ToJsonString(), powerRename.name, "power-rename-settings.json"); SettingsUtils.SaveSettings(powerRename.ToJsonString(), powerRename.Name, "power-rename-settings.json");
} }
[TestCleanup] [TestCleanup]
@@ -73,7 +73,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg => ShellPage.DefaultSndMSGCallback = msg =>
{ {
PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg); PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg);
Assert.IsTrue(snd.Powertoys.PowerRename.properties.MRUEnabled.Value); Assert.IsTrue(snd.Powertoys.PowerRename.Properties.MRUEnabled.Value);
}; };
// act // act
@@ -139,7 +139,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg => ShellPage.DefaultSndMSGCallback = msg =>
{ {
PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg); PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg);
Assert.IsTrue(snd.Powertoys.PowerRename.properties.ShowIcon.Value); Assert.IsTrue(snd.Powertoys.PowerRename.Properties.ShowIcon.Value);
}; };
// act // act
@@ -156,7 +156,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg => ShellPage.DefaultSndMSGCallback = msg =>
{ {
PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg); PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg);
Assert.IsTrue(snd.Powertoys.PowerRename.properties.ShowIcon.Value); Assert.IsTrue(snd.Powertoys.PowerRename.Properties.ShowIcon.Value);
}; };
// act // act
@@ -173,7 +173,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg => ShellPage.DefaultSndMSGCallback = msg =>
{ {
PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg); PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg);
Assert.IsTrue(snd.Powertoys.PowerRename.properties.PersistState.Value); Assert.IsTrue(snd.Powertoys.PowerRename.Properties.PersistState.Value);
}; };
// act // act
@@ -190,7 +190,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg => ShellPage.DefaultSndMSGCallback = msg =>
{ {
PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg); PowerRenameSettingsIPCMessage snd = JsonSerializer.Deserialize<PowerRenameSettingsIPCMessage>(msg);
Assert.AreEqual(20, snd.Powertoys.PowerRename.properties.MaxMRUSize.Value); Assert.AreEqual(20, snd.Powertoys.PowerRename.Properties.MaxMRUSize.Value);
}; };
// act // act

View File

@@ -60,9 +60,9 @@ namespace ColorPicker.Settings
var settings = SettingsUtils.GetSettings<ColorPickerSettings>(ColorPickerModuleName); var settings = SettingsUtils.GetSettings<ColorPickerSettings>(ColorPickerModuleName);
if (settings != null) if (settings != null)
{ {
ChangeCursor.Value = settings.properties.ChangeCursor; ChangeCursor.Value = settings.Properties.ChangeCursor;
ActivationShortcut.Value = settings.properties.ActivationShortcut.ToString(); ActivationShortcut.Value = settings.Properties.ActivationShortcut.ToString();
CopiedColorRepresentation.Value = settings.properties.CopiedColorRepresentation; CopiedColorRepresentation.Value = settings.Properties.CopiedColorRepresentation;
} }
retry = false; retry = false;

View File

@@ -202,8 +202,8 @@ namespace Microsoft.Plugin.Indexer
} }
public void UpdateSettings(PowerLauncherSettings settings) public void UpdateSettings(PowerLauncherSettings settings)
{ {
_settings.MaxSearchCount = settings.properties.maximum_number_of_results; _settings.MaxSearchCount = settings.Properties.maximum_number_of_results;
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = settings.properties.disable_drive_detection_warning; _driveDetection.IsDriveDetectionWarningCheckBoxSelected = settings.Properties.disable_drive_detection_warning;
} }
public Control CreateSettingPanel() public Control CreateSettingPanel()
{ {

View File

@@ -26,7 +26,7 @@ namespace PowerLauncher
{ {
_settings = settings; _settings = settings;
// Set up watcher // Set up watcher
_watcher = Microsoft.PowerToys.Settings.UI.Lib.Utilities.Helper.GetFileWatcher(PowerLauncherSettings.POWERTOYNAME, "settings.json", OverloadSettings); _watcher = Microsoft.PowerToys.Settings.UI.Lib.Utilities.Helper.GetFileWatcher(PowerLauncherSettings.ModuleName, "settings.json", OverloadSettings);
// Load initial settings file // Load initial settings file
OverloadSettings(); OverloadSettings();
@@ -41,9 +41,9 @@ namespace PowerLauncher
retry = false; retry = false;
try try
{ {
var overloadSettings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.POWERTOYNAME); var overloadSettings = SettingsUtils.GetSettings<PowerLauncherSettings>(PowerLauncherSettings.ModuleName);
var openPowerlauncher = ConvertHotkey(overloadSettings.properties.open_powerlauncher); var openPowerlauncher = ConvertHotkey(overloadSettings.Properties.open_powerlauncher);
if (_settings.Hotkey != openPowerlauncher) if (_settings.Hotkey != openPowerlauncher)
{ {
_settings.Hotkey = openPowerlauncher; _settings.Hotkey = openPowerlauncher;
@@ -56,14 +56,14 @@ namespace PowerLauncher
shellSettings.UpdateSettings(overloadSettings); shellSettings.UpdateSettings(overloadSettings);
} }
if (_settings.MaxResultsToShow != overloadSettings.properties.maximum_number_of_results) if (_settings.MaxResultsToShow != overloadSettings.Properties.maximum_number_of_results)
{ {
_settings.MaxResultsToShow = overloadSettings.properties.maximum_number_of_results; _settings.MaxResultsToShow = overloadSettings.Properties.maximum_number_of_results;
} }
if (_settings.IgnoreHotkeysOnFullscreen != overloadSettings.properties.ignore_hotkeys_in_fullscreen) if (_settings.IgnoreHotkeysOnFullscreen != overloadSettings.Properties.ignore_hotkeys_in_fullscreen)
{ {
_settings.IgnoreHotkeysOnFullscreen = overloadSettings.properties.ignore_hotkeys_in_fullscreen; _settings.IgnoreHotkeysOnFullscreen = overloadSettings.Properties.ignore_hotkeys_in_fullscreen;
} }
var indexer = PluginManager.AllPlugins.Find(p => p.Metadata.Name.Equals("Windows Indexer Plugin", StringComparison.OrdinalIgnoreCase)); var indexer = PluginManager.AllPlugins.Find(p => p.Metadata.Name.Equals("Windows Indexer Plugin", StringComparison.OrdinalIgnoreCase));
@@ -73,9 +73,9 @@ namespace PowerLauncher
indexerSettings.UpdateSettings(overloadSettings); indexerSettings.UpdateSettings(overloadSettings);
} }
if (_settings.ClearInputOnLaunch != overloadSettings.properties.clear_input_on_launch) if (_settings.ClearInputOnLaunch != overloadSettings.Properties.clear_input_on_launch)
{ {
_settings.ClearInputOnLaunch = overloadSettings.properties.clear_input_on_launch; _settings.ClearInputOnLaunch = overloadSettings.Properties.clear_input_on_launch;
} }
} }
// the settings application can hold a lock on the settings.json file which will result in a IOException. // the settings application can hold a lock on the settings.json file which will result in a IOException.