PowerToys/Plugins/Wox.Plugin.Shell/Settings.cs

35 lines
769 B
C#
Raw Normal View History

using System.Collections.Generic;
2014-03-23 16:17:41 +08:00
2016-06-24 05:53:30 +08:00
namespace Wox.Plugin.Shell
2014-03-23 16:17:41 +08:00
{
public class Settings
2014-03-23 16:17:41 +08:00
{
2016-06-24 05:53:30 +08:00
public Shell Shell { get; set; } = Shell.Cmd;
public bool ReplaceWinR { get; set; } = true;
public bool LeaveShellOpen { get; set; }
2019-12-10 17:24:18 +08:00
public bool RunAsAdministrator { get; set; } = true;
public Dictionary<string, int> Count = new Dictionary<string, int>();
2014-03-23 16:17:41 +08:00
public void AddCmdHistory(string cmdName)
{
if (Count.ContainsKey(cmdName))
2014-03-23 16:17:41 +08:00
{
Count[cmdName] += 1;
2014-03-23 16:17:41 +08:00
}
else
{
Count.Add(cmdName, 1);
2014-03-23 16:17:41 +08:00
}
}
}
public enum Shell
{
2016-06-24 05:53:30 +08:00
Cmd = 0,
Powershell = 1,
RunCommand = 2,
}
2014-03-23 16:17:41 +08:00
}