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-05-16 11:29:37 +03:00
|
|
|
<MenuItem Padding="0,5" Header="Trojan-Go" Command="{Binding AddTrojanGoCommand}"></MenuItem>
|
2021-05-14 14:07:19 +03:00
|
|
|
<MenuItem Padding="0,5" Header="NaiveProxy"></MenuItem>
|
|
|
|
</MenuItem>
|
|
|
|
|
2021-05-23 09:24:13 +03:00
|
|
|
<!--<MenuItem Header="{DynamicResource MainMenuActions}" Padding="10,3">
|
2021-05-14 14:07:19 +03:00
|
|
|
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuActionsExportSettings}"></MenuItem>
|
|
|
|
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuActionsExportSubscribe}"></MenuItem>
|
2021-05-23 09:24:13 +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>
|
|
|
|
<MenuItem Padding="0,5" Header="{DynamicResource MainMenuLanguageCn}" Click="SetSimpleChinese"></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>
|
|
|
|
</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"
|
|
|
|
IsReadOnly="True"
|
|
|
|
SelectionUnit="Cell"
|
|
|
|
BorderBrush="#eee"
|
|
|
|
BorderThickness="1">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="40">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<CheckBox ></CheckBox>
|
|
|
|
</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-23 09:24:13 +03:00
|
|
|
Width="200">
|
|
|
|
<DataGridTextColumn.Header>
|
|
|
|
<TextBlock Text="{DynamicResource MainDataGridColumnType}" />
|
|
|
|
</DataGridTextColumn.Header>
|
|
|
|
</DataGridTextColumn>
|
2021-05-14 14:07:19 +03:00
|
|
|
|
2021-05-15 11:45:36 +03:00
|
|
|
<DataGridTemplateColumn Header="{DynamicResource MainDataGridColumnAction}" Width="400">
|
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-05-15 11:45:36 +03:00
|
|
|
Padding="12,3"
|
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-05-15 11:45:36 +03:00
|
|
|
Padding="12,3"
|
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"
|
|
|
|
Padding="12,3"
|
|
|
|
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-05-15 11:45:36 +03:00
|
|
|
Padding="12,3"
|
2021-05-14 14:07:19 +03:00
|
|
|
Content="{DynamicResource MainDataGridColumnActionDelete}" />
|
|
|
|
</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>
|