Move some user settings to its own dll (cmd,folder plugin and etc)

This commit is contained in:
qianlifeng
2015-01-05 22:41:17 +08:00
parent 6162904c59
commit ce451e4dd4
62 changed files with 342 additions and 222 deletions

View File

@@ -1,7 +1,9 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Wox.Infrastructure.Storage;
using Wox.Plugin;
using System.IO;
namespace Wox.Storage
{
@@ -10,6 +12,19 @@ namespace Wox.Storage
[JsonProperty]
private Dictionary<string, int> records = new Dictionary<string, int>();
protected override string ConfigFolder
{
get
{
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
if (userProfilePath == null)
{
throw new ArgumentException("Environment variable USERPROFILE is empty");
}
return Path.Combine(Path.Combine(userProfilePath, ".Wox"), "Config");
}
}
protected override string ConfigName
{
get { return "UserSelectedRecords"; }