mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Move some user settings to its own dll (cmd,folder plugin and etc)
This commit is contained in:
@@ -1,19 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using System.IO;
|
||||
|
||||
namespace Wox.Plugin.CMD
|
||||
{
|
||||
public class CMDStorage : JsonStrorage<CMDStorage>
|
||||
{
|
||||
[JsonProperty]
|
||||
public bool ReplaceWinR { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public bool LeaveCmdOpen { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public Dictionary<string, int> CMDHistory = new Dictionary<string, int>();
|
||||
|
||||
protected override string ConfigFolder
|
||||
{
|
||||
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
|
||||
}
|
||||
|
||||
protected override string ConfigName
|
||||
{
|
||||
get { return "CMDHistory"; }
|
||||
}
|
||||
|
||||
protected override CMDStorage LoadDefault()
|
||||
{
|
||||
ReplaceWinR = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void AddCmdHistory(string cmdName)
|
||||
{
|
||||
if (CMDHistory.ContainsKey(cmdName))
|
||||
|
||||
Reference in New Issue
Block a user