Settings.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 Microsoft.CmdPal.Ext.WindowWalker.Helpers; 6 7 namespace Microsoft.CmdPal.Ext.WindowWalker.UnitTests; 8 9 public class Settings : ISettingsInterface 10 { 11 private readonly bool resultsFromVisibleDesktopOnly; 12 private readonly bool subtitleShowPid; 13 private readonly bool subtitleShowDesktopName; 14 private readonly bool confirmKillProcess; 15 private readonly bool killProcessTree; 16 private readonly bool openAfterKillAndClose; 17 private readonly bool hideKillProcessOnElevatedProcesses; 18 private readonly bool hideExplorerSettingInfo; 19 private readonly bool inMruOrder; 20 private readonly bool useWindowIcon; 21 22 public Settings( 23 bool resultsFromVisibleDesktopOnly = false, 24 bool subtitleShowPid = false, 25 bool subtitleShowDesktopName = true, 26 bool confirmKillProcess = true, 27 bool killProcessTree = false, 28 bool openAfterKillAndClose = false, 29 bool hideKillProcessOnElevatedProcesses = false, 30 bool hideExplorerSettingInfo = true, 31 bool inMruOrder = true, 32 bool useWindowIcon = true) 33 { 34 this.resultsFromVisibleDesktopOnly = resultsFromVisibleDesktopOnly; 35 this.subtitleShowPid = subtitleShowPid; 36 this.subtitleShowDesktopName = subtitleShowDesktopName; 37 this.confirmKillProcess = confirmKillProcess; 38 this.killProcessTree = killProcessTree; 39 this.openAfterKillAndClose = openAfterKillAndClose; 40 this.hideKillProcessOnElevatedProcesses = hideKillProcessOnElevatedProcesses; 41 this.hideExplorerSettingInfo = hideExplorerSettingInfo; 42 this.inMruOrder = inMruOrder; 43 this.useWindowIcon = useWindowIcon; 44 } 45 46 public bool ResultsFromVisibleDesktopOnly => resultsFromVisibleDesktopOnly; 47 48 public bool SubtitleShowPid => subtitleShowPid; 49 50 public bool SubtitleShowDesktopName => subtitleShowDesktopName; 51 52 public bool ConfirmKillProcess => confirmKillProcess; 53 54 public bool KillProcessTree => killProcessTree; 55 56 public bool OpenAfterKillAndClose => openAfterKillAndClose; 57 58 public bool HideKillProcessOnElevatedProcesses => hideKillProcessOnElevatedProcesses; 59 60 public bool HideExplorerSettingInfo => hideExplorerSettingInfo; 61 62 public bool InMruOrder => inMruOrder; 63 64 public bool UseWindowIcon => useWindowIcon; 65 }