1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-12-01 17:46:05 +03:00
ProxySU/ProxySU_Core/Views/MainWindow.xaml

172 lines
10 KiB
Plaintext
Raw Normal View History

2021-02-25 04:59:06 +03:00
<metro:MetroWindow x:Class="ProxySU_Core.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProxySU_Core"
mc:Ignorable="d"
BorderThickness="1"
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
TextElement.FontSize="14"
2021-04-19 07:12:23 +03:00
Title="ProxySU Core" Height="670" Width="1050">
2021-02-25 04:59:06 +03:00
<mah:MetroWindow.LeftWindowCommands>
<mah:WindowCommands>
<Button Click="LaunchGitHubSite" ToolTip="Open up the GitHub site">
2021-03-09 13:05:45 +03:00
github
2021-02-25 04:59:06 +03:00
</Button>
</mah:WindowCommands>
</mah:MetroWindow.LeftWindowCommands>
<mah:MetroWindow.RightWindowCommands>
<mah:WindowCommands>
<StackPanel Orientation="Horizontal" Margin="0,0,20,0">
<TextBlock Text="{DynamicResource LanguageText}" VerticalAlignment="Center" Margin="0,0,20,0" />
<ComboBox
SelectionChanged="ChangeLanguage"
2021-04-26 05:43:50 +03:00
x:Name="cmbLanguage"
2021-02-25 04:59:06 +03:00
SelectedIndex="0">
<ComboBoxItem x:Name="zh_cn" Content="{DynamicResource LanguageChinese}"></ComboBoxItem>
<ComboBoxItem x:Name="en" Content="{DynamicResource LanguageEnglish}"></ComboBoxItem>
</ComboBox>
</StackPanel>
</mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>
<Window.Resources>
<DataTemplate x:Key="HostTagTemplate">
<TextBlock Text="{Binding Tag}" />
</DataTemplate>
</Window.Resources>
<Grid>
<TabControl
2021-04-19 07:12:23 +03:00
BorderThickness="0,1,0,0"
BorderBrush="#DDD"
2021-02-25 04:59:06 +03:00
Background="#fff"
2021-04-19 07:12:23 +03:00
Padding="20">
2021-02-25 04:59:06 +03:00
<TabItem
Width="160"
2021-04-19 07:12:23 +03:00
Height="40"
2021-02-25 04:59:06 +03:00
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="{DynamicResource TabItemHeaderAppDeployment}">
<StackPanel Orientation="Vertical">
2021-04-19 07:12:23 +03:00
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="5,0,0,0">
2021-02-25 04:59:06 +03:00
<Button
2021-03-17 06:58:56 +03:00
Content="{DynamicResource AddHost}"
Click="AddHost"
2021-04-26 05:43:50 +03:00
Width="140"/>
2021-03-17 06:58:56 +03:00
<Button
Margin="10,0,0,0"
2021-04-26 05:43:50 +03:00
Content="{DynamicResource ViewConfig}"
2021-03-17 06:58:56 +03:00
Click="ExportXraySettings"
2021-04-26 05:43:50 +03:00
Width="140" />
2021-03-17 06:58:56 +03:00
<Button
Margin="10,0,0,0"
2021-04-26 05:43:50 +03:00
Content="{DynamicResource ViewSub}"
2021-03-17 06:58:56 +03:00
Click="ExportXraySub"
2021-04-26 05:43:50 +03:00
Width="140" />
2021-02-25 04:59:06 +03:00
</StackPanel>
2021-03-04 11:25:36 +03:00
<DataGrid ItemsSource="{Binding Records}"
2021-04-19 07:12:23 +03:00
Margin="0,10,0,0"
2021-02-25 04:59:06 +03:00
IsReadOnly="True"
x:Name="DataGrid"
CellStyle="{StaticResource DataGridCell}"
Style="{StaticResource MaterialDesignDataGrid}"
ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
SelectionUnit="FullRow"
BorderBrush="#eee"
BorderThickness="1"
2021-04-18 15:09:07 +03:00
VerticalScrollBarVisibility="Auto"
2021-04-19 07:12:23 +03:00
HorizontalScrollBarVisibility="Auto"
2021-04-18 15:09:07 +03:00
Height="500"
2021-04-19 07:12:23 +03:00
Width="1000"
2021-02-25 04:59:06 +03:00
AutoGenerateColumns="False">
<DataGrid.Columns>
2021-04-30 06:33:58 +03:00
<DataGridCheckBoxColumn Binding="{Binding Path=IsChecked, UpdateSourceTrigger=PropertyChanged}"
2021-03-17 06:58:56 +03:00
IsReadOnly="False"
2021-04-30 06:33:58 +03:00
Width="80">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{DynamicResource MainTableSelection}" />
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<DataGridTextColumn Binding="{Binding Path=Host.Tag}" Width="180">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainTableRemark}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Host.Address}" Width="180">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainTableHost}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Host.Port}" Width="100">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainTablePort}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Host.Proxy.Type}" Width="100">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainTableProxy}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
2021-02-25 04:59:06 +03:00
<DataGridTemplateColumn>
<DataGridTemplateColumn.Header>
2021-04-30 06:33:58 +03:00
<TextBlock Text="{DynamicResource MainTableActions}" />
2021-02-25 04:59:06 +03:00
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
2021-04-26 05:43:50 +03:00
<Button Content="{DynamicResource MainTableControl}" FontSize="12" Height="24" Click="Connect" />
<Button Content="{DynamicResource MainTableViewConfig}" FontSize="12" Height="24" Margin="10,0,0,0" Click="ShowClientInfo" />
<Button Content="{DynamicResource MainTableEditor}" FontSize="12" Height="24" Margin="10,0,0,0" Click="EditHost" />
<Button Content="{DynamicResource MainTableDelete}" FontSize="12" Height="24" Margin="10,0,0,0" Click="DeleteHost" BorderBrush="IndianRed" Background="IndianRed" />
2021-02-25 04:59:06 +03:00
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</TabItem>
<TabItem
2021-04-19 07:12:23 +03:00
Width="160"
Height="40"
FontSize="15"
2021-02-25 04:59:06 +03:00
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
2021-04-30 06:33:58 +03:00
Header="{DynamicResource TabItemHeaderReadme}">
2021-02-25 04:59:06 +03:00
<StackPanel>
2021-04-19 07:12:23 +03:00
<StackPanel Margin="0,0,0,0">
<TextBlock Margin="0,0,0,5" Text="新书指引:" FontWeight="Black" />
2021-04-05 05:22:43 +03:00
<TextBlock Text="1. 【添加主机】,填写主机信息及节点配置信息,保存。" />
<TextBlock Text="2. 点【控制台】,自动连接主机,连接成功后,点【一键安装】,待输出 “请尽情享用吧” 代表安装完成。" />
<TextBlock Text="3. 在【查看配置】中可以查看节点配置信息,选中【导出配置】可以复制所有节点的分享拦截。" />
</StackPanel>
2021-04-19 07:12:23 +03:00
<StackPanel Margin="0,20,0,0">
<TextBlock Margin="0,0,0,5" Text="自定义功能" FontWeight="Black" />
2021-04-05 05:22:43 +03:00
<TextBlock Text="【更新配置】用户想修改节点的信息比如增加一个websocket或修改用户id在【编辑】中修改保存后不需要重新安装了这个功能就可以更新配置。" />
<TextBlock Text="【更新内核】更新官方xray-core的最新版本。" />
<TextBlock Text="【卸载代理】:卸载 域名证书、caddy服务、xray内核一些安装过程中的基础功能不影响不卸载会影响到您的系统请自行处理。" />
<TextBlock Text="【续签证书】:默认是会自动续签的,但由于各种平台的基础环境不一样,可能有些会续签失败,这个功能可手动续签证书。" />
<TextBlock Text="【上传证书】:上传自有证书,将您的证书 crt 和 key 文件打包zip上传即可。" />
<TextBlock Text="【上传网站】上传伪装静态网站静态网站必须根目录有一个index.html文件请自行检查。" />
</StackPanel>
2021-04-19 07:12:23 +03:00
<StackPanel Margin="0,20,0,0">
<TextBlock Margin="0,0,0,5" Text="关于v3版本" FontWeight="Black" />
2021-04-05 05:22:43 +03:00
<TextBlock Text="初步以xray为基础方便自动安装、修改、卸载看建议再考虑其他方式如有需要请先用v2的版本。" />
</StackPanel>
2021-02-25 04:59:06 +03:00
</StackPanel>
</TabItem>
</TabControl>
</Grid>
</metro:MetroWindow>