NewPlusProperties.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.IO; 7 using System.Text.Json; 8 using System.Text.Json.Serialization; 9 10 namespace Microsoft.PowerToys.Settings.UI.Library 11 { 12 public class NewPlusProperties 13 { 14 public const string ModuleName = "NewPlus"; 15 16 public NewPlusProperties() 17 { 18 HideFileExtension = new BoolProperty(true); 19 HideStartingDigits = new BoolProperty(true); 20 TemplateLocation = new StringProperty(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates")); 21 ReplaceVariables = new BoolProperty(false); 22 } 23 24 [JsonPropertyName("HideFileExtension")] 25 public BoolProperty HideFileExtension { get; set; } 26 27 [JsonPropertyName("HideStartingDigits")] 28 public BoolProperty HideStartingDigits { get; set; } 29 30 [JsonPropertyName("TemplateLocation")] 31 public StringProperty TemplateLocation { get; set; } 32 33 [JsonPropertyName("ReplaceVariables")] 34 public BoolProperty ReplaceVariables { get; set; } 35 36 public override string ToString() => JsonSerializer.Serialize(this, SettingsSerializationContext.Default.NewPlusProperties); 37 } 38 }