FileLocksmithSettings.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System; 6 using System.Text.Json.Serialization; 7 8 using Microsoft.PowerToys.Settings.UI.Library.Interfaces; 9 10 namespace Microsoft.PowerToys.Settings.UI.Library 11 { 12 public class FileLocksmithSettings : BasePTModuleSettings, ISettingsConfig 13 { 14 public const string ModuleName = "File Locksmith"; 15 public const string ModuleVersion = "1"; 16 17 [JsonPropertyName("properties")] 18 public FileLocksmithProperties Properties { get; set; } 19 20 public FileLocksmithSettings() 21 { 22 Name = ModuleName; 23 Version = ModuleVersion; 24 Properties = new FileLocksmithProperties(); 25 } 26 27 public FileLocksmithSettings(FileLocksmithLocalProperties localProperties) 28 { 29 ArgumentNullException.ThrowIfNull(localProperties); 30 31 Properties = new FileLocksmithProperties(); 32 Properties.ExtendedContextMenuOnly.Value = localProperties.ExtendedContextMenuOnly; 33 Version = "1"; 34 Name = ModuleName; 35 } 36 37 public string GetModuleName() 38 { 39 return Name; 40 } 41 42 public bool UpgradeSettingsConfiguration() 43 { 44 return false; 45 } 46 } 47 }