mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 14:46:08 +03:00
添加资源工具栏,内容后续填加
This commit is contained in:
parent
1bb1827e1c
commit
97e701c9a8
@ -136,6 +136,7 @@
|
||||
<Button Content="测试生成v2rayN导入格式" Grid.Column="3" Grid.Row="0" Margin="10.334,10,10,10" Click="Button_Click_3"></Button>
|
||||
<Button Content="测试生成config.json文件" Grid.Column="2" Grid.Row="1" Margin="9.667,10,9.666,9.667" Click="Button_Click_4"></Button>
|
||||
<Button Content="测试时间" Grid.Column="4" Grid.Row="0" Margin="10,10,10.333,10" Click="Button_Click_5"></Button>
|
||||
<Button Content="测试字符串操作" Grid.Column="3" Grid.Row="1" Margin="10" Click="Button_Click_6"></Button>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
@ -147,7 +148,39 @@
|
||||
</TabItem>
|
||||
<TabItem Header="资源工具" Width="150" Height="30">
|
||||
<Grid>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Button x:Name="ButtonWebBrowserHomePage" Content="主页" Grid.Column="0" Grid.Row="0" Margin="5" Click="ButtonWebBrowserHomePage_Click"></Button>
|
||||
<Button x:Name="ButtonWebBrowserForward" Content="前进" Grid.Column="1" Grid.Row="0" Margin="5" Click="ButtonWebBrowserForward_Click"></Button>
|
||||
<Button x:Name="ButtonWebBrowserBack" Content="后退" Grid.Column="2" Grid.Row="0" Margin="5" Click="ButtonWebBrowserBack_Click"/>
|
||||
<TextBox x:Name="TextBoxWebBrowserProxyUrl" Grid.Column="3" Grid.Row="0" Grid.ColumnSpan="5" Margin="5"></TextBox>
|
||||
<Button x:Name="ButtonWebBrowserProxyGo" Content="Go" Grid.Column="8" Grid.Row="0" Margin="5" Click="ButtonWebBrowserProxyGo_Click"></Button>
|
||||
<WebBrowser x:Name="WebBrowserResourcesAndTools" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="9" Grid.RowSpan="13" Source="https://github.com/proxysu/windows/wiki/ResourcesAndTools" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
@ -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,6 +1074,66 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ namespace ProxySU
|
||||
Directory.CreateDirectory(folder);//创建该文件夹
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user