1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-25 06:36:08 +03:00
ProxySU/ProxySuper.WPF/Views/HomeView.xaml

141 lines
8.7 KiB
Plaintext
Raw Normal View History

2021-05-14 14:07:19 +03:00
<views:MvxWpfView x:Class="ProxySuper.WPF.Views.HomeView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySuper.WPF.Views"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Menu Background="White" Grid.Row="0" BorderThickness="0,0,0,2" BorderBrush="#eee">
<MenuItem Header="{DynamicResource MainMenuAddHost}" Padding="10,3">
2021-05-16 04:12:47 +03:00
<MenuItem Padding="0,5" Header="Xray" Command="{Binding AddXrayCommand}"></MenuItem>
2021-08-20 06:52:45 +03:00
<MenuItem Padding="0,5" Header="V2ray" Command="{Binding AddV2rayCommand}"></MenuItem>
<MenuItem Padding="0,5" Header="MTProto-Go" Command="{Binding AddMTProtoGoCommand}"></MenuItem>
2021-05-16 11:29:37 +03:00
<MenuItem Padding="0,5" Header="Trojan-Go" Command="{Binding AddTrojanGoCommand}"></MenuItem>
2021-05-25 13:28:37 +03:00
<MenuItem Padding="0,5" Header="NaiveProxy" Command="{Binding AddNaiveProxyCommand}"></MenuItem>
2021-07-02 13:35:25 +03:00
<MenuItem Padding="0,5" Header="Brook" Command="{Binding AddBrookCommand}"></MenuItem>
2023-02-27 12:26:55 +03:00
<MenuItem Padding="0,5" Header="Hysteria" Command="{Binding AddHysteriaCommand}"></MenuItem>
2021-05-14 14:07:19 +03:00
</MenuItem>
2021-05-25 13:28:37 +03:00
<MenuItem Header="{DynamicResource MainMenuActions}" Padding="10,3">
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuActionsExportSettings}" Click="ShowShareLinks"></MenuItem>
2021-07-08 13:37:32 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuActionsGetRoot}" Click="GetRoot"></MenuItem>
2021-05-25 13:28:37 +03:00
</MenuItem>
2021-05-14 14:07:19 +03:00
<MenuItem Header="{DynamicResource MainMenuLanguage}" Padding="10,3">
2021-05-22 12:14:27 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuLanguageEn}" Click="SetEnglish"></MenuItem>
2021-05-25 13:28:37 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuLanguageTw}" Click="SetTwCN"></MenuItem>
2021-05-22 12:14:27 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuLanguageCn}" Click="SetSimpleChinese"></MenuItem>
2023-04-01 06:41:46 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuLanguageFr}" Click="SetIrFA"></MenuItem>
2021-05-14 14:07:19 +03:00
</MenuItem>
<MenuItem Header="{DynamicResource MainMenuHelper}" Padding="10,3">
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuHelperGithub}" Click="LaunchGitHubSite"></MenuItem>
2021-05-29 06:43:06 +03:00
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuHelperUseRoot}" Click="LaunchUseRootSite"></MenuItem>
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuHelperCertQuestion}" Click="LaunchCertQuestion"></MenuItem>
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuHelperPrivateKey}" Click="LaunchPrivateKeyQuestion"></MenuItem>
2021-05-14 14:07:19 +03:00
</MenuItem>
</Menu>
<StackPanel Grid.Row="1" Margin="0,10">
<DataGrid AutoGenerateColumns="False"
2021-05-22 12:14:27 +03:00
Name="DataGrid"
2021-05-14 14:07:19 +03:00
ItemsSource="{Binding Records}"
VerticalContentAlignment="Bottom"
2021-05-26 11:22:18 +03:00
VerticalScrollBarVisibility="Auto"
MaxHeight="450"
2021-05-14 14:07:19 +03:00
IsReadOnly="True"
SelectionUnit="Cell"
BorderBrush="#eee"
BorderThickness="1">
<DataGrid.Columns>
<DataGridTemplateColumn Width="40">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
2021-05-25 13:28:37 +03:00
<CheckBox IsChecked="{Binding IsChecked,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged
}" />
2021-05-14 14:07:19 +03:00
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Host.Tag}"
2021-05-23 09:24:13 +03:00
Width="120">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainDataGridColumnTag}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
2021-05-14 14:07:19 +03:00
<DataGridTextColumn Binding="{Binding Host.Address}"
2021-05-23 09:24:13 +03:00
Width="200">
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainDataGridColumnAddress}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
2021-05-14 14:07:19 +03:00
<DataGridTextColumn Binding="{Binding Type}"
2021-05-26 11:22:18 +03:00
Width="120">
2021-05-23 09:24:13 +03:00
<DataGridTextColumn.Header>
<TextBlock Text="{DynamicResource MainDataGridColumnType}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
2021-05-14 14:07:19 +03:00
2023-05-02 16:39:40 +03:00
<DataGridTemplateColumn Width="400">
<DataGridTemplateColumn.Header>
<TextBlock Text="{DynamicResource MainDataGridColumnAction}" />
</DataGridTemplateColumn.Header>
2021-05-14 14:07:19 +03:00
<DataGridTemplateColumn.CellTemplate>
2021-05-16 04:12:47 +03:00
<ItemContainerTemplate>
2021-05-14 14:07:19 +03:00
<StackPanel Orientation="Horizontal">
2021-05-23 09:24:13 +03:00
<Button Command="{Binding DataContext.InstallCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
2021-05-14 14:07:19 +03:00
Margin="5,0"
2021-08-21 06:56:20 +03:00
Padding="5,2"
2021-05-14 14:07:19 +03:00
Content="{DynamicResource MainDataGridColumnActionInstall}" />
2021-05-16 04:12:47 +03:00
2021-05-23 09:24:13 +03:00
<Button Command="{Binding DataContext.EditCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
2021-05-14 14:07:19 +03:00
Margin="5,0"
2021-08-21 06:56:20 +03:00
Padding="5,2"
2021-05-14 14:07:19 +03:00
Content="{DynamicResource MainDataGridColumnActionEdit}" />
2021-05-22 06:12:26 +03:00
2021-05-23 09:24:13 +03:00
<Button Command="{Binding DataContext.ViewConfigCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
2021-05-22 06:12:26 +03:00
Margin="5,0"
2021-08-21 06:56:20 +03:00
Padding="5,2"
2021-05-22 06:12:26 +03:00
Content="{DynamicResource MainDataGridColumnActionViewConfig}" />
2021-05-23 09:24:13 +03:00
<Button Command="{Binding DataContext.RemoveCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
2021-05-14 14:07:19 +03:00
Margin="5,0"
2021-08-21 06:56:20 +03:00
Padding="5,2"
2021-05-14 14:07:19 +03:00
Content="{DynamicResource MainDataGridColumnActionDelete}" />
2021-08-21 06:56:20 +03:00
<Button Command="{Binding DataContext.SortUpCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
Margin="5,0"
Padding="5,2"
Content="{DynamicResource MainDataGridColumnActionSortUp}" />
<Button Command="{Binding DataContext.SortDoneCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
CommandParameter="{Binding Id}"
Margin="5,0"
Padding="5,2"
Content="{DynamicResource MainDataGridColumnActionSortDone}" />
2021-05-14 14:07:19 +03:00
</StackPanel>
2021-05-16 04:12:47 +03:00
</ItemContainerTemplate>
2021-05-14 14:07:19 +03:00
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Grid>
</views:MvxWpfView>