mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
80ec16b9bd
Finish moving ProgramSetting into featureBox
34 lines
768 B
C#
34 lines
768 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Newtonsoft.Json;
|
|
using Wox.Infrastructure.Storage;
|
|
|
|
namespace Wox.Plugin.SystemPlugins.CMD
|
|
{
|
|
public class CMDStorage : BaseStorage<CMDStorage>
|
|
{
|
|
[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();
|
|
}
|
|
}
|
|
}
|