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; }