2015-01-03 15:20:34 +08:00
|
|
|
|
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
|
|
|
|
{
|
2016-05-19 16:04:31 +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;
|
2016-04-21 08:53:21 +08:00
|
|
|
|
public bool ReplaceWinR { get; set; } = true;
|
2016-05-19 16:04:31 +08:00
|
|
|
|
public bool LeaveShellOpen { get; set; }
|
2016-04-21 08:53:21 +08:00
|
|
|
|
public Dictionary<string, int> Count = new Dictionary<string, int>();
|
2015-01-05 22:41:17 +08:00
|
|
|
|
|
2014-03-23 16:17:41 +08:00
|
|
|
|
public void AddCmdHistory(string cmdName)
|
|
|
|
|
{
|
2016-04-21 08:53:21 +08:00
|
|
|
|
if (Count.ContainsKey(cmdName))
|
2014-03-23 16:17:41 +08:00
|
|
|
|
{
|
2016-04-21 08:53:21 +08:00
|
|
|
|
Count[cmdName] += 1;
|
2014-03-23 16:17:41 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2016-04-21 08:53:21 +08:00
|
|
|
|
Count.Add(cmdName, 1);
|
2014-03-23 16:17:41 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-05-19 16:04:31 +08:00
|
|
|
|
|
|
|
|
|
public enum Shell
|
|
|
|
|
{
|
2016-06-24 05:53:30 +08:00
|
|
|
|
Cmd = 0,
|
2016-05-19 16:04:31 +08:00
|
|
|
|
Powershell = 1,
|
|
|
|
|
RunCommand = 2,
|
|
|
|
|
|
|
|
|
|
}
|
2014-03-23 16:17:41 +08:00
|
|
|
|
}
|