2014-03-23 16:17:41 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Wox.Infrastructure.Storage;
|
|
|
|
|
|
2014-03-29 15:52:57 +08:00
|
|
|
|
namespace Wox.Plugin.SystemPlugins.CMD
|
2014-03-23 16:17:41 +08:00
|
|
|
|
{
|
2014-12-15 22:58:49 +08:00
|
|
|
|
public class CMDStorage : JsonStrorage<CMDStorage>
|
2014-03-23 16:17:41 +08:00
|
|
|
|
{
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public Dictionary<string, int> CMDHistory = new Dictionary<string, int>();
|
|
|
|
|
|
|
|
|
|
protected override string ConfigName
|
|
|
|
|
{
|
|
|
|
|
get { return "CMDHistory"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddCmdHistory(string cmdName)
|
|
|
|
|
{
|
|
|
|
|
if (CMDHistory.ContainsKey(cmdName))
|
|
|
|
|
{
|
|
|
|
|
CMDHistory[cmdName] += 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CMDHistory.Add(cmdName, 1);
|
|
|
|
|
}
|
|
|
|
|
Save();
|
|
|
|
|
}
|
2014-12-18 19:22:47 +08:00
|
|
|
|
|
2014-03-23 16:17:41 +08:00
|
|
|
|
}
|
|
|
|
|
}
|