From 97e701c9a82c4b44472827d05b054abbfaf01644 Mon Sep 17 00:00:00 2001 From: ProxySU Date: Thu, 2 Apr 2020 20:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=84=E6=BA=90=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=EF=BC=8C=E5=86=85=E5=AE=B9=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E5=A1=AB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProxySU/MainWindow.xaml | 35 +++++++++++- ProxySU/MainWindow.xaml.cs | 71 ++++++++++++++++++++++++- ProxySU/ResultClientInformation.xaml.cs | 2 +- 3 files changed, 105 insertions(+), 3 deletions(-) diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index ac8aa4c..ab8316f 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -136,6 +136,7 @@ + @@ -147,7 +148,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 2ce56dd..d180d4d 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -878,6 +878,7 @@ namespace ProxySU MessageBox.Show("尚未完善,敬请期待"); } + #region 测试面板上的代码设置 //测试接收到的模板参数 private void Button_Click(object sender, RoutedEventArgs e) { @@ -1002,6 +1003,14 @@ namespace ProxySU } } } + private void Button_Click_6(object sender, RoutedEventArgs e) + { + string testfirst = "0123456789"; + int startnum = 3, lenth = 4; + string resultstr = testfirst.Substring(startnum, lenth); + MessageBox.Show(resultstr); + + } private void Button_Click_5(object sender, RoutedEventArgs e) { @@ -1065,7 +1074,67 @@ namespace ProxySU // TimeZoneInfo.ConvertTimeToUtc(dateNow)); } - + #endregion + + private void ButtonWebBrowserBack_Click(object sender, RoutedEventArgs e) + { + try + { + WebBrowserResourcesAndTools.GoBack(); + } + catch(Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + private void ButtonWebBrowserForward_Click(object sender, RoutedEventArgs e) + { + try + { + WebBrowserResourcesAndTools.GoForward(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + private void ButtonWebBrowserHomePage_Click(object sender, RoutedEventArgs e) + { + try + { + WebBrowserResourcesAndTools.Source=new Uri("https://github.com/proxysu/windows/wiki/ResourcesAndTools"); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + private void ButtonWebBrowserProxyGo_Click(object sender, RoutedEventArgs e) + { + try + { + string urlStartchar = TextBoxWebBrowserProxyUrl.Text.Substring(0, 4); + MessageBox.Show(urlStartchar); + if (String.Equals(urlStartchar,"http")==true) + { + WebBrowserResourcesAndTools.Source = new Uri(TextBoxWebBrowserProxyUrl.Text); + } + else + { + WebBrowserResourcesAndTools.Source = new Uri("https://"+TextBoxWebBrowserProxyUrl.Text); + } + + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + } } diff --git a/ProxySU/ResultClientInformation.xaml.cs b/ProxySU/ResultClientInformation.xaml.cs index 7250d2c..3849a0f 100644 --- a/ProxySU/ResultClientInformation.xaml.cs +++ b/ProxySU/ResultClientInformation.xaml.cs @@ -264,7 +264,7 @@ namespace ProxySU Directory.CreateDirectory(folder);//创建该文件夹   return true; } - catch (Exception ex) + catch (Exception) { return false; }