From 2c90e0fcb14a92cf91b13546f21729e8e3c00f64 Mon Sep 17 00:00:00 2001 From: Licshee Date: Thu, 4 Feb 2016 12:35:57 +0800 Subject: [PATCH] code style --- .../Controller/System/SystemProxy.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/shadowsocks-csharp/Controller/System/SystemProxy.cs b/shadowsocks-csharp/Controller/System/SystemProxy.cs index c7ed0d28..29560ff4 100644 --- a/shadowsocks-csharp/Controller/System/SystemProxy.cs +++ b/shadowsocks-csharp/Controller/System/SystemProxy.cs @@ -102,12 +102,16 @@ namespace Shadowsocks.Controller var connections = registry.GetValueNames(); foreach (var each in connections) { - if (!(each.Equals("DefaultConnectionSettings") - || each.Equals("LAN Connection") - || each.Equals("SavedLegacySettings"))) + switch (each) { - //set all the connections's proxy as the lan - registry.SetValue(each, defaultValue); + case "DefaultConnectionSettings": + case "LAN Connection": + case "SavedLegacySettings": + continue; + default: + //set all the connections's proxy as the lan + registry.SetValue(each, defaultValue); + continue; } } NotifyIE();