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,44 +0,0 @@
using Wox.Infrastructure.Storage.UserSettings;
using Wox.Plugin;
namespace Wox.Infrastructure.Http
{
public class HttpProxy : IHttpProxy
{
private static readonly HttpProxy instance = new HttpProxy();
private HttpProxy()
{
}
public static HttpProxy Instance
{
get { return instance; }
}
public bool Enabled
{
get { return UserSettingStorage.Instance.ProxyEnabled; }
}
public string Server
{
get { return UserSettingStorage.Instance.ProxyServer; }
}
public int Port
{
get { return UserSettingStorage.Instance.ProxyPort; }
}
public string UserName
{
get { return UserSettingStorage.Instance.ProxyUserName; }
}
public string Password
{
get { return UserSettingStorage.Instance.ProxyPassword; }
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using System.Drawing;
using System.IO;
using System.Net;
using System.Text;
@@ -8,9 +9,9 @@ namespace Wox.Infrastructure.Http
{
public class HttpRequest
{
public static string Get(string url, string encoding = "UTF-8")
public static string Get(string url, IHttpProxy proxy, string encoding = "UTF-8")
{
return Get(url, encoding, HttpProxy.Instance);
return Get(url, encoding, proxy);
}
private static string Get(string url, string encoding, IHttpProxy proxy)