From 532a53c97123e462963dcb33ee513a017800c667 Mon Sep 17 00:00:00 2001 From: Gang Zhuo Date: Sat, 21 Mar 2015 19:07:58 +0800 Subject: [PATCH] revert --- shadowsocks-csharp/Data/cn.txt | 5 ++--- shadowsocks-csharp/View/MenuViewController.cs | 18 ++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/shadowsocks-csharp/Data/cn.txt b/shadowsocks-csharp/Data/cn.txt index 80c2bbf7..22a6478b 100644 --- a/shadowsocks-csharp/Data/cn.txt +++ b/shadowsocks-csharp/Data/cn.txt @@ -45,7 +45,7 @@ QRCode=二维码 Local PAC=使用本地 PAC Online PAC=使用在线 PAC Update Online PAC URL=更新在线 PAC 网址 -Please input PAC Url, e.g. http://autoproxy2pac.appspot.com/pac/proxy/127.0.0.1/1080=请输入 PAC 网址,例如:http://autoproxy2pac.appspot.com/pac/proxy/127.0.0.1/1080 +Please input PAC Url=请输入 PAC 网址 # Messages @@ -70,5 +70,4 @@ No QRCode found. Try to zoom in or move it to the center of the screen.=未发 Failed to decode QRCode=无法解析二维码 Failed to update registry=无法修改注册表 System Proxy On: =系统代理已启用: -Running: Port {0}=正在运行:端口 {0} -Please input a valid url=请输入一个有效的网址 \ No newline at end of file +Running: Port {0}=正在运行:端口 {0} \ No newline at end of file diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index 365276b0..53284975 100755 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -515,20 +515,10 @@ namespace Shadowsocks.View private void UpdateOnlinePACURLItem_Click(object sender, EventArgs e) { string origPacUrl = controller.GetConfiguration().pacUrl; - string pacUrl = null; - while (true) - { - pacUrl = Microsoft.VisualBasic.Interaction.InputBox( - I18N.GetString("Please input PAC Url, e.g. http://autoproxy2pac.appspot.com/pac/proxy/127.0.0.1/1080"), - I18N.GetString("Update Online PAC URL"), - pacUrl == null ? origPacUrl : pacUrl, -1, -1); - if (!string.IsNullOrEmpty(pacUrl) && !System.Text.RegularExpressions.Regex.IsMatch(pacUrl, - @"^http(s)?://([a-zA-Z0-9_-]+)+(\.[a-zA-Z0-9_-]+)+((/|\?)[\w \.\/\?%&= ]*)?$", System.Text.RegularExpressions.RegexOptions.IgnoreCase)) - MessageBox.Show(I18N.GetString("Please input a valid url")); - else - break; - } - + string pacUrl = Microsoft.VisualBasic.Interaction.InputBox( + I18N.GetString("Please input PAC Url"), + I18N.GetString("Update Online PAC URL"), + origPacUrl, -1, -1); if (!string.IsNullOrEmpty(pacUrl) && pacUrl != origPacUrl) { controller.SavePACUrl(pacUrl);