Flow.Launcher/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs

42 lines
966 B
C#
Raw Permalink Normal View History

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