From 3efeb4a0a6cd531b13a206251e76fae1e7cef6ea Mon Sep 17 00:00:00 2001 From: bao-qian Date: Sun, 19 Jun 2016 16:18:43 +0100 Subject: [PATCH] Refactoring proxy, part 2 --- Plugins/Wox.Plugin.PluginManagement/Main.cs | 4 ++-- Plugins/Wox.Plugin.WebSearch/Main.cs | 2 +- .../SuggestionSources/Baidu.cs | 6 +---- .../SuggestionSources/Google.cs | 6 +---- .../SuggestionSources/ISuggestionSource.cs | 12 +++------- Wox.Core/Plugin/ExecutablePlugin.cs | 2 -- Wox.Core/Plugin/JsonPRCModel.cs | 12 ---------- Wox.Core/Plugin/PluginManager.cs | 3 +-- Wox.Core/Plugin/PluginsLoader.cs | 2 +- Wox.Core/Plugin/PythonPlugin.cs | 2 -- Wox.Core/Resource/Internationalization.cs | 3 ++- Wox.Core/Resource/Theme.cs | 4 ++-- Wox.Core/Updater.cs | 5 ++-- Wox.Core/Wox.Core.csproj | 4 ---- Wox.Infrastructure/Http/Http.cs | 23 ++++++++++--------- .../UserSettings/HttpProxy.cs | 0 .../UserSettings/PluginHotkey.cs | 2 +- .../UserSettings/PluginSettings.cs | 2 +- .../UserSettings/Settings.cs | 10 ++------ Wox.Infrastructure/Wox.Infrastructure.csproj | 4 ++++ Wox.Plugin/IHttpProxy.cs | 11 --------- Wox.Plugin/PluginInitContext.cs | 6 ++--- Wox.Plugin/Wox.Plugin.csproj | 1 - Wox/ActionKeywords.xaml.cs | 2 +- Wox/App.xaml.cs | 2 +- Wox/CustomQueryHotkeySetting.xaml.cs | 2 +- Wox/Languages/de.xaml | 6 ++--- Wox/Languages/en.xaml | 6 ++--- Wox/Languages/fr.xaml | 6 ++--- Wox/Languages/ja.xaml | 6 ++--- Wox/Languages/nl.xaml | 6 ++--- Wox/Languages/pl.xaml | 6 ++--- Wox/Languages/ru.xaml | 6 ++--- Wox/Languages/zh-cn.xaml | 6 ++--- Wox/Languages/zh-tw.xaml | 6 ++--- Wox/MainWindow.xaml.cs | 2 +- Wox/SettingWindow.xaml | 21 +++++++++-------- Wox/SettingWindow.xaml.cs | 16 ++++++------- Wox/ViewModel/MainViewModel.cs | 8 +------ Wox/ViewModel/ResultsViewModel.cs | 2 +- Wox/ViewModel/SettingWindowViewModel.cs | 9 +++++++- 41 files changed, 98 insertions(+), 146 deletions(-) rename {Wox.Core => Wox.Infrastructure}/UserSettings/HttpProxy.cs (100%) rename {Wox.Core => Wox.Infrastructure}/UserSettings/PluginHotkey.cs (80%) rename {Wox.Core => Wox.Infrastructure}/UserSettings/PluginSettings.cs (97%) rename {Wox.Core => Wox.Infrastructure}/UserSettings/Settings.cs (87%) delete mode 100644 Wox.Plugin/IHttpProxy.cs diff --git a/Plugins/Wox.Plugin.PluginManagement/Main.cs b/Plugins/Wox.Plugin.PluginManagement/Main.cs index 7af6db9257..eba7618251 100644 --- a/Plugins/Wox.Plugin.PluginManagement/Main.cs +++ b/Plugins/Wox.Plugin.PluginManagement/Main.cs @@ -113,7 +113,7 @@ namespace Wox.Plugin.PluginManagement string json; try { - json = Http.Get(pluginSearchUrl + pluginName, context.Proxy).Result; + json = Http.Get(pluginSearchUrl + pluginName).Result; } catch (WebException e) { @@ -156,7 +156,7 @@ namespace Wox.Plugin.PluginManagement try { - Http.Download(pluginUrl, filePath, context.Proxy); + Http.Download(pluginUrl, filePath); } catch (WebException e) { diff --git a/Plugins/Wox.Plugin.WebSearch/Main.cs b/Plugins/Wox.Plugin.WebSearch/Main.cs index e06b28dfde..43f92fad15 100644 --- a/Plugins/Wox.Plugin.WebSearch/Main.cs +++ b/Plugins/Wox.Plugin.WebSearch/Main.cs @@ -104,7 +104,7 @@ namespace Wox.Plugin.WebSearch private async Task> Suggestions(string keyword, string subtitle, WebSearch webSearch) { - var source = SuggestionSource.GetSuggestionSource(_settings.WebSearchSuggestionSource, Context); + var source = SuggestionSource.GetSuggestionSource(_settings.WebSearchSuggestionSource); if (source != null) { var suggestions = await source.GetSuggestions(keyword); diff --git a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Baidu.cs index 2b889cb78d..a2a5b62fe2 100644 --- a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Baidu.cs +++ b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Baidu.cs @@ -24,7 +24,7 @@ namespace Wox.Plugin.WebSearch.SuggestionSources try { const string api = "http://suggestion.baidu.com/su?json=1&wd="; - result = await Http.Get(api + Uri.EscapeUriString(query), Proxy, "GB2312"); + result = await Http.Get(api + Uri.EscapeUriString(query), "GB2312"); } catch (WebException e) { @@ -61,9 +61,5 @@ namespace Wox.Plugin.WebSearch.SuggestionSources return new List(); } - - public Baidu(IHttpProxy httpProxy) : base(httpProxy) - { - } } } diff --git a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Google.cs index 5cea59a8e9..95097f9a65 100644 --- a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Google.cs +++ b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/Google.cs @@ -19,7 +19,7 @@ namespace Wox.Plugin.WebSearch.SuggestionSources try { const string api = "https://www.google.com/complete/search?output=chrome&q="; - result = await Http.Get(api + Uri.EscapeUriString(query), Proxy); + result = await Http.Get(api + Uri.EscapeUriString(query)); } catch (WebException e) { @@ -48,9 +48,5 @@ namespace Wox.Plugin.WebSearch.SuggestionSources } return new List(); } - - public Google(IHttpProxy httpProxy) : base(httpProxy) - { - } } } diff --git a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/ISuggestionSource.cs b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/ISuggestionSource.cs index 8c654ecd44..f7317b8b04 100644 --- a/Plugins/Wox.Plugin.WebSearch/SuggestionSources/ISuggestionSource.cs +++ b/Plugins/Wox.Plugin.WebSearch/SuggestionSources/ISuggestionSource.cs @@ -6,24 +6,18 @@ namespace Wox.Plugin.WebSearch.SuggestionSources public abstract class SuggestionSource { public virtual string Domain { get; set; } - public IHttpProxy Proxy { get; set; } - - public SuggestionSource(IHttpProxy httpProxy) - { - Proxy = httpProxy; - } public abstract Task> GetSuggestions(string query); - public static SuggestionSource GetSuggestionSource(string name, PluginInitContext context) + public static SuggestionSource GetSuggestionSource(string name) { switch (name.ToLower()) { case "google": - return new Google(context.Proxy); + return new Google(); case "baidu": - return new Baidu(context.Proxy); + return new Baidu(); default: return null; diff --git a/Wox.Core/Plugin/ExecutablePlugin.cs b/Wox.Core/Plugin/ExecutablePlugin.cs index 0bb27ae860..43992095eb 100644 --- a/Wox.Core/Plugin/ExecutablePlugin.cs +++ b/Wox.Core/Plugin/ExecutablePlugin.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; -using Wox.Core.UserSettings; using Wox.Plugin; namespace Wox.Core.Plugin @@ -28,7 +27,6 @@ namespace Wox.Core.Plugin { Method = "query", Parameters = new object[] { query.Search }, - HttpProxy = HttpProxy.Instance }; _startInfo.Arguments = $"\"{request}\""; diff --git a/Wox.Core/Plugin/JsonPRCModel.cs b/Wox.Core/Plugin/JsonPRCModel.cs index 2ea8fa8c9a..a6e40e02ce 100644 --- a/Wox.Core/Plugin/JsonPRCModel.cs +++ b/Wox.Core/Plugin/JsonPRCModel.cs @@ -100,18 +100,6 @@ namespace Wox.Core.Plugin /// public class JsonRPCServerRequestModel : JsonRPCRequestModel { - public IHttpProxy HttpProxy { get; set; } - - public override string ToString() - { - string rpc = base.ToString(); - if (HttpProxy != null) - { - rpc += string.Format(@",\""proxy\"":{{\""enabled\"":{0},\""server\"":\""{1}\"",\""port\"":{2},\""username\"":\""{3}\"",\""password\"":\""{4}\""}}", - HttpProxy.Enabled.ToString().ToLower(), HttpProxy.Server, HttpProxy.Port, HttpProxy.UserName, HttpProxy.Password); - } - return rpc + "}"; - } } /// diff --git a/Wox.Core/Plugin/PluginManager.cs b/Wox.Core/Plugin/PluginManager.cs index a50c4b663e..d2f768bb63 100644 --- a/Wox.Core/Plugin/PluginManager.cs +++ b/Wox.Core/Plugin/PluginManager.cs @@ -5,11 +5,11 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Wox.Core.Resource; -using Wox.Core.UserSettings; using Wox.Infrastructure; using Wox.Infrastructure.Exception; using Wox.Infrastructure.Logger; using Wox.Infrastructure.Storage; +using Wox.Infrastructure.UserSettings; using Wox.Plugin; namespace Wox.Core.Plugin @@ -83,7 +83,6 @@ namespace Wox.Core.Plugin pair.Plugin.Init(new PluginInitContext { CurrentPluginMetadata = pair.Metadata, - Proxy = HttpProxy.Instance, API = API }); }); diff --git a/Wox.Core/Plugin/PluginsLoader.cs b/Wox.Core/Plugin/PluginsLoader.cs index b62a9a9c7e..b2132eb4ae 100644 --- a/Wox.Core/Plugin/PluginsLoader.cs +++ b/Wox.Core/Plugin/PluginsLoader.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; -using Wox.Core.UserSettings; using Wox.Infrastructure.Exception; using Wox.Infrastructure.Logger; +using Wox.Infrastructure.UserSettings; using Wox.Plugin; namespace Wox.Core.Plugin diff --git a/Wox.Core/Plugin/PythonPlugin.cs b/Wox.Core/Plugin/PythonPlugin.cs index d13a192f67..e8b1ba20d6 100644 --- a/Wox.Core/Plugin/PythonPlugin.cs +++ b/Wox.Core/Plugin/PythonPlugin.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; -using Wox.Core.UserSettings; using Wox.Plugin; namespace Wox.Core.Plugin @@ -28,7 +27,6 @@ namespace Wox.Core.Plugin { Method = "query", Parameters = new object[] { query.Search }, - HttpProxy = HttpProxy.Instance }; //Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable _startInfo.Arguments = $"-B \"{context.CurrentPluginMetadata.ExecuteFilePath}\" \"{request}\""; diff --git a/Wox.Core/Resource/Internationalization.cs b/Wox.Core/Resource/Internationalization.cs index 4396fd2495..4da7abd97c 100644 --- a/Wox.Core/Resource/Internationalization.cs +++ b/Wox.Core/Resource/Internationalization.cs @@ -5,13 +5,14 @@ using System.Linq; using System.Windows; using Wox.Infrastructure.Exception; using Wox.Infrastructure.Logger; +using Wox.Infrastructure.UserSettings; using Wox.Plugin; namespace Wox.Core.Resource { public class Internationalization : Resource { - public UserSettings.Settings Settings { get; set; } + public Settings Settings { get; set; } public Internationalization() { diff --git a/Wox.Core/Resource/Theme.cs b/Wox.Core/Resource/Theme.cs index d3473ad90b..391456d2c7 100644 --- a/Wox.Core/Resource/Theme.cs +++ b/Wox.Core/Resource/Theme.cs @@ -7,15 +7,15 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Interop; using System.Windows.Media; -using Wox.Core.UserSettings; using Wox.Infrastructure.Logger; +using Wox.Infrastructure.UserSettings; namespace Wox.Core.Resource { public class Theme : Resource { private static List themeDirectories = new List(); - public UserSettings.Settings Settings { get; set; } + public Settings Settings { get; set; } public Theme() { diff --git a/Wox.Core/Updater.cs b/Wox.Core/Updater.cs index cb3d0483ac..ee51385399 100644 --- a/Wox.Core/Updater.cs +++ b/Wox.Core/Updater.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Squirrel; -using Wox.Core.UserSettings; using Wox.Infrastructure.Http; using Wox.Infrastructure.Logger; @@ -19,7 +18,7 @@ namespace Wox.Core public static async void UpdateApp() { - var client = new WebClient {Proxy = Http.WebProxy(HttpProxy.Instance)}; + var client = new WebClient {Proxy = Http.WebProxy()}; var downloader = new FileDownloader(client); try @@ -67,7 +66,7 @@ namespace Wox.Core string response; try { - response = await Http.Get(githubAPI, HttpProxy.Instance); + response = await Http.Get(githubAPI); } catch (WebException e) { diff --git a/Wox.Core/Wox.Core.csproj b/Wox.Core/Wox.Core.csproj index fcba73e752..18fd58e103 100644 --- a/Wox.Core/Wox.Core.csproj +++ b/Wox.Core/Wox.Core.csproj @@ -110,7 +110,6 @@ - @@ -127,9 +126,6 @@ - - - diff --git a/Wox.Infrastructure/Http/Http.cs b/Wox.Infrastructure/Http/Http.cs index b96d3c79cf..bd55a468dc 100644 --- a/Wox.Infrastructure/Http/Http.cs +++ b/Wox.Infrastructure/Http/Http.cs @@ -3,26 +3,27 @@ using System.Net; using System.Text; using System.Threading.Tasks; using JetBrains.Annotations; -using Wox.Plugin; +using Wox.Infrastructure.UserSettings; namespace Wox.Infrastructure.Http { public static class Http { - public static IWebProxy WebProxy(IHttpProxy proxy) + public static HttpProxy Proxy { private get; set; } + public static IWebProxy WebProxy() { - if (proxy != null && proxy.Enabled && !string.IsNullOrEmpty(proxy.Server)) + if (Proxy != null && Proxy.Enabled && !string.IsNullOrEmpty(Proxy.Server)) { - if (string.IsNullOrEmpty(proxy.UserName) || string.IsNullOrEmpty(proxy.Password)) + if (string.IsNullOrEmpty(Proxy.UserName) || string.IsNullOrEmpty(Proxy.Password)) { - var webProxy = new WebProxy(proxy.Server, proxy.Port); + var webProxy = new WebProxy(Proxy.Server, Proxy.Port); return webProxy; } else { - var webProxy = new WebProxy(proxy.Server, proxy.Port) + var webProxy = new WebProxy(Proxy.Server, Proxy.Port) { - Credentials = new NetworkCredential(proxy.UserName, proxy.Password) + Credentials = new NetworkCredential(Proxy.UserName, Proxy.Password) }; return webProxy; } @@ -34,20 +35,20 @@ namespace Wox.Infrastructure.Http } /// Can't download file - public static void Download([NotNull] string url, [NotNull] string filePath, IHttpProxy proxy) + public static void Download([NotNull] string url, [NotNull] string filePath) { - var client = new WebClient { Proxy = WebProxy(proxy) }; + var client = new WebClient { Proxy = WebProxy() }; client.DownloadFile(url, filePath); } /// Can't get response from http get - public static async Task Get([NotNull] string url, IHttpProxy proxy, string encoding = "UTF-8") + public static async Task Get([NotNull] string url, string encoding = "UTF-8") { HttpWebRequest request = WebRequest.CreateHttp(url); request.Method = "GET"; request.Timeout = 10 * 1000; - request.Proxy = WebProxy(proxy); + request.Proxy = WebProxy(); request.UserAgent = @"Mozilla/5.0 (Trident/7.0; rv:11.0) like Gecko"; var response = await request.GetResponseAsync() as HttpWebResponse; if (response != null) diff --git a/Wox.Core/UserSettings/HttpProxy.cs b/Wox.Infrastructure/UserSettings/HttpProxy.cs similarity index 100% rename from Wox.Core/UserSettings/HttpProxy.cs rename to Wox.Infrastructure/UserSettings/HttpProxy.cs diff --git a/Wox.Core/UserSettings/PluginHotkey.cs b/Wox.Infrastructure/UserSettings/PluginHotkey.cs similarity index 80% rename from Wox.Core/UserSettings/PluginHotkey.cs rename to Wox.Infrastructure/UserSettings/PluginHotkey.cs index 3f2e7be979..aef90a3839 100644 --- a/Wox.Core/UserSettings/PluginHotkey.cs +++ b/Wox.Infrastructure/UserSettings/PluginHotkey.cs @@ -1,6 +1,6 @@ using Wox.Plugin; -namespace Wox.Core.UserSettings +namespace Wox.Infrastructure.UserSettings { public class CustomPluginHotkey : BaseModel { diff --git a/Wox.Core/UserSettings/PluginSettings.cs b/Wox.Infrastructure/UserSettings/PluginSettings.cs similarity index 97% rename from Wox.Core/UserSettings/PluginSettings.cs rename to Wox.Infrastructure/UserSettings/PluginSettings.cs index 158054c4e3..cc84d609e1 100644 --- a/Wox.Core/UserSettings/PluginSettings.cs +++ b/Wox.Infrastructure/UserSettings/PluginSettings.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Wox.Plugin; -namespace Wox.Core.UserSettings +namespace Wox.Infrastructure.UserSettings { public class PluginsSettings : BaseModel { diff --git a/Wox.Core/UserSettings/Settings.cs b/Wox.Infrastructure/UserSettings/Settings.cs similarity index 87% rename from Wox.Core/UserSettings/Settings.cs rename to Wox.Infrastructure/UserSettings/Settings.cs index ca58e2fe72..2e8ec13417 100644 --- a/Wox.Core/UserSettings/Settings.cs +++ b/Wox.Infrastructure/UserSettings/Settings.cs @@ -1,11 +1,10 @@ using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using Newtonsoft.Json; using Wox.Plugin; -namespace Wox.Core.UserSettings +namespace Wox.Infrastructure.UserSettings { public class Settings : BaseModel { @@ -49,12 +48,7 @@ namespace Wox.Core.UserSettings public bool RememberLastLaunchLocation { get; set; } public bool IgnoreHotkeysOnFullscreen { get; set; } - public string ProxyServer { get; set; } - public bool ProxyEnabled { get; set; } - public int ProxyPort { get; set; } - public string ProxyUserName { get; set; } - public string ProxyPassword { get; set; } - + public HttpProxy Proxy { get; set; } = new HttpProxy(); } [Obsolete] diff --git a/Wox.Infrastructure/Wox.Infrastructure.csproj b/Wox.Infrastructure/Wox.Infrastructure.csproj index 018d34a73b..31c4c21287 100644 --- a/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -92,6 +92,10 @@ + + + + diff --git a/Wox.Plugin/IHttpProxy.cs b/Wox.Plugin/IHttpProxy.cs deleted file mode 100644 index 2fbded80f9..0000000000 --- a/Wox.Plugin/IHttpProxy.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Wox.Plugin -{ - public interface IHttpProxy - { - bool Enabled { get; } - string Server { get; } - int Port { get; } - string UserName { get; } - string Password { get; } - } -} \ No newline at end of file diff --git a/Wox.Plugin/PluginInitContext.cs b/Wox.Plugin/PluginInitContext.cs index c8e3e04852..efa7d442ac 100644 --- a/Wox.Plugin/PluginInitContext.cs +++ b/Wox.Plugin/PluginInitContext.cs @@ -1,4 +1,6 @@ -namespace Wox.Plugin +using System; + +namespace Wox.Plugin { public class PluginInitContext { @@ -8,7 +10,5 @@ /// Public APIs for plugin invocation /// public IPublicAPI API { get; set; } - - public IHttpProxy Proxy { get; set; } } } diff --git a/Wox.Plugin/Wox.Plugin.csproj b/Wox.Plugin/Wox.Plugin.csproj index 3a2a19c1a6..ad26617909 100644 --- a/Wox.Plugin/Wox.Plugin.csproj +++ b/Wox.Plugin/Wox.Plugin.csproj @@ -66,7 +66,6 @@ - diff --git a/Wox/ActionKeywords.xaml.cs b/Wox/ActionKeywords.xaml.cs index 8d3769d703..676eade660 100644 --- a/Wox/ActionKeywords.xaml.cs +++ b/Wox/ActionKeywords.xaml.cs @@ -1,8 +1,8 @@ using System.Windows; using Wox.Core.Plugin; using Wox.Core.Resource; -using Wox.Core.UserSettings; using Wox.Infrastructure.Exception; +using Wox.Infrastructure.UserSettings; using Wox.Plugin; namespace Wox diff --git a/Wox/App.xaml.cs b/Wox/App.xaml.cs index 1afae043ef..77bade7005 100644 --- a/Wox/App.xaml.cs +++ b/Wox/App.xaml.cs @@ -4,10 +4,10 @@ using System.Timers; using System.Windows; using Wox.Core; using Wox.Core.Plugin; -using Wox.Core.UserSettings; using Wox.Helper; using Wox.Infrastructure.Image; using Wox.Infrastructure.Logger; +using Wox.Infrastructure.UserSettings; using Wox.ViewModel; using Stopwatch = Wox.Infrastructure.Stopwatch; diff --git a/Wox/CustomQueryHotkeySetting.xaml.cs b/Wox/CustomQueryHotkeySetting.xaml.cs index 83f47daa76..233c3b2b87 100644 --- a/Wox/CustomQueryHotkeySetting.xaml.cs +++ b/Wox/CustomQueryHotkeySetting.xaml.cs @@ -6,8 +6,8 @@ using System.Windows; using NHotkey; using NHotkey.Wpf; using Wox.Core.Resource; -using Wox.Core.UserSettings; using Wox.Infrastructure.Hotkey; +using Wox.Infrastructure.UserSettings; namespace Wox { diff --git a/Wox/Languages/de.xaml b/Wox/Languages/de.xaml index ca9a11d8b8..e009d2b385 100644 --- a/Wox/Languages/de.xaml +++ b/Wox/Languages/de.xaml @@ -59,9 +59,9 @@ Wollen Sie die {0} Plugin Tastenkombination wirklich löschen? - Proxy - Aktiviere Proxy - Server + HTTP Proxy + Aktiviere HTTP Proxy + HTTP Server Port Benutzername Passwort diff --git a/Wox/Languages/en.xaml b/Wox/Languages/en.xaml index fc31c706ba..93c85c83f3 100644 --- a/Wox/Languages/en.xaml +++ b/Wox/Languages/en.xaml @@ -59,9 +59,9 @@ Are you sure you want to delete {0} plugin hotkey? - Proxy - Enable Proxy - Server + HTTP Proxy + Enable HTTP Proxy + HTTP Server Port User Name Password diff --git a/Wox/Languages/fr.xaml b/Wox/Languages/fr.xaml index 471f0f21b3..0cb513a088 100644 --- a/Wox/Languages/fr.xaml +++ b/Wox/Languages/fr.xaml @@ -59,9 +59,9 @@ Voulez-vous vraiment supprimer {0} raccourci(s) ? - Proxy - Activer le proxy - Serveur + HTTP Proxy + Activer le HTTP proxy + HTTP Serveur Port Utilisateur Mot de passe diff --git a/Wox/Languages/ja.xaml b/Wox/Languages/ja.xaml index bf872d6f1c..ea8c636e31 100644 --- a/Wox/Languages/ja.xaml +++ b/Wox/Languages/ja.xaml @@ -59,9 +59,9 @@ {0} プラグインのホットキーを本当に削除しますか? - プロキシ - プロキシを有効化 - サーバ + HTTP プロキシ + HTTP プロキシを有効化 + HTTP サーバ ポート ユーザ名 パスワード diff --git a/Wox/Languages/nl.xaml b/Wox/Languages/nl.xaml index 018166d24d..e81cdd585c 100644 --- a/Wox/Languages/nl.xaml +++ b/Wox/Languages/nl.xaml @@ -59,9 +59,9 @@ Weet u zeker dat je {0} plugin sneltoets wilt verwijderen? - Proxy - Enable Proxy - Server + HTTP Proxy + Enable HTTP Proxy + HTTP Server Poort Gebruikersnaam Wachtwoord diff --git a/Wox/Languages/pl.xaml b/Wox/Languages/pl.xaml index d6249afa8a..6d1c226686 100644 --- a/Wox/Languages/pl.xaml +++ b/Wox/Languages/pl.xaml @@ -59,9 +59,9 @@ Czy jesteś pewien że chcesz usunąć skrót klawiszowy {0} wtyczki? - Serwer proxy - Używaj proxy - Serwer + Serwer proxy HTTP + Używaj HTTP proxy + HTTP Serwer Port Nazwa użytkownika Hasło diff --git a/Wox/Languages/ru.xaml b/Wox/Languages/ru.xaml index 3bc8f46e08..8fd55053b1 100644 --- a/Wox/Languages/ru.xaml +++ b/Wox/Languages/ru.xaml @@ -59,9 +59,9 @@ Вы уверены что хотите удалить горячую клавишу для плагина {0}? - Прокси - Включить прокси - Сервер + HTTP Прокси + Включить HTTP прокси + HTTP Сервер Порт Логин Пароль diff --git a/Wox/Languages/zh-cn.xaml b/Wox/Languages/zh-cn.xaml index 352ff3b0c3..177c2a4546 100644 --- a/Wox/Languages/zh-cn.xaml +++ b/Wox/Languages/zh-cn.xaml @@ -59,9 +59,9 @@ 你确定要删除插件 {0} 的热键吗? - 代理 - 启用代理 - 服务器 + HTTP 代理 + 启用 HTTP 代理 + HTTP 服务器 端口 用户名 密码 diff --git a/Wox/Languages/zh-tw.xaml b/Wox/Languages/zh-tw.xaml index a5705dee3e..d16c484862 100644 --- a/Wox/Languages/zh-tw.xaml +++ b/Wox/Languages/zh-tw.xaml @@ -59,9 +59,9 @@ 確定要刪除外掛 {0} 的熱鍵嗎? - 代理 - 啟用代理 - 伺服器 + HTTP 代理 + 啟用 HTTP 代理 + HTTP 伺服器 Port 使用者 密碼 diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index a76642328d..1d41cfcbb2 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -6,8 +6,8 @@ using System.Windows.Media.Animation; using System.Windows.Controls; using Wox.Core.Plugin; using Wox.Core.Resource; -using Wox.Core.UserSettings; using Wox.Helper; +using Wox.Infrastructure.UserSettings; using Wox.ViewModel; using Screen = System.Windows.Forms.Screen; using ContextMenu = System.Windows.Forms.ContextMenu; diff --git a/Wox/SettingWindow.xaml b/Wox/SettingWindow.xaml index b50c17531d..1f85073ff5 100644 --- a/Wox/SettingWindow.xaml +++ b/Wox/SettingWindow.xaml @@ -3,8 +3,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:wox="clr-namespace:Wox" - xmlns:s="clr-namespace:Wox.Core.UserSettings;assembly=Wox.Core" xmlns:vm="clr-namespace:Wox.ViewModel" + xmlns:userSettings="clr-namespace:Wox.Infrastructure.UserSettings;assembly=Wox.Infrastructure" + xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Class="Wox.SettingWindow" mc:Ignorable="d" Icon="Images\app.png" @@ -276,14 +277,14 @@ - + - + @@ -304,10 +305,10 @@ - + - + @@ -319,15 +320,15 @@ - + - + - + - + -