From ef47e8e509dc77ee58ad31b98af3229f30b7a669 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Fri, 10 Nov 2017 19:34:51 +0900 Subject: [PATCH] =?utf8?q?SetAutoProxyUrl=E3=82=92SetAutoConfigUrl?= =?utf8?q?=E3=81=AB=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/ProxyManager.cs | 4 ++-- KancolleSniffer/SystemProxy.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/KancolleSniffer/ProxyManager.cs b/KancolleSniffer/ProxyManager.cs index 186c326..c57b195 100644 --- a/KancolleSniffer/ProxyManager.cs +++ b/KancolleSniffer/ProxyManager.cs @@ -123,7 +123,7 @@ namespace KancolleSniffer private void SetAutoProxyUrl() { var url = $"http://localhost:{_config.Proxy.Listen}/proxy.pac"; - _systemProxy.SetAutoProxyUrl(url); + _systemProxy.SetAutoConfigUrl(url); if (_checkerTask != null && !_checkerTask.IsCompleted) { _stopEvent.Set(); @@ -139,7 +139,7 @@ namespace KancolleSniffer if (!proxy.IsLoopback) { File.AppendAllText("proxy.log", $"[{DateTime.Now:g}] proxy setting vanished.\r\n"); - _systemProxy.SetAutoProxyUrl(url); + _systemProxy.SetAutoConfigUrl(url); } } while (!_stopEvent.WaitOne(1000)); }); diff --git a/KancolleSniffer/SystemProxy.cs b/KancolleSniffer/SystemProxy.cs index 6c57a5e..8398076 100644 --- a/KancolleSniffer/SystemProxy.cs +++ b/KancolleSniffer/SystemProxy.cs @@ -35,7 +35,7 @@ namespace KancolleSniffer if (regkey == null) return; _prevUrl = regkey.GetValue(_regName) as string ?? "delete"; - using (var zones = regkey?.OpenSubKey(@"Zones\1", true)) + using (var zones = regkey.OpenSubKey(@"Zones\1", true)) { if (zones == null) return; @@ -46,7 +46,7 @@ namespace KancolleSniffer } } - public void SetAutoProxyUrl(string url) + public void SetAutoConfigUrl(string url) { SaveSettings(); using (var regkey = Registry.CurrentUser.OpenSubKey(_regPath, true)) -- 2.11.0