mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Rename Wox.Plugin.System to Wox.Plugin.SystemPlugins
Finish moving ProgramSetting into featureBox
This commit is contained in:
33
Wox.Plugin.SystemPlugins/CMD/CMDStorage.cs
Normal file
33
Wox.Plugin.SystemPlugins/CMD/CMDStorage.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user