mirror of https://github.com/2dust/v2rayN
Refactor
parent
d7c1516ec2
commit
e71525db0e
|
@ -2,10 +2,8 @@
|
|||
x:Class="v2rayN.Views.AddServer2Window"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Views="clr-namespace:v2rayN.Views"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:v2rayN"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
|
@ -25,182 +23,181 @@
|
|||
TextOptions.TextRenderingMode="Auto"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer
|
||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<DockPanel Margin="8">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Content="{x:Static resx:ResUI.TbConfirm}"
|
||||
Cursor="Hand"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</Grid>
|
||||
<ScrollViewer
|
||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Style="{StaticResource ModuleTitle}"
|
||||
Text="{x:Static resx:ResUI.menuServers}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbRemarks}" />
|
||||
|
||||
<TextBox
|
||||
x:Name="txtRemarks"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbAddress}" />
|
||||
<TextBox
|
||||
x:Name="txtAddress"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnBrowse"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbBrowse}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnEdit"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbEdit}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbCoreType}" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
MaxDropDownHeight="1000"
|
||||
Style="{StaticResource MyOutlinedTextComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Orientation="Horizontal">
|
||||
<ToggleButton x:Name="togDisplayLog" HorizontalAlignment="Left" />
|
||||
<TextBlock
|
||||
Margin="8,0"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Style="{StaticResource ModuleTitle}"
|
||||
Text="{x:Static resx:ResUI.menuServers}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TipDisplayLog}" />
|
||||
</StackPanel>
|
||||
Text="{x:Static resx:ResUI.TbRemarks}" />
|
||||
|
||||
<TextBox
|
||||
x:Name="txtRemarks"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbPreSocksPort}" />
|
||||
<TextBox
|
||||
x:Name="txtPreSocksPort"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<StackPanel
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2">
|
||||
<TextBlock
|
||||
Width="500"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TipPreSocksPort}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
Text="{x:Static resx:ResUI.TbAddress}" />
|
||||
<TextBox
|
||||
x:Name="txtAddress"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnBrowse"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbBrowse}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnEdit"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbEdit}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Content="{x:Static resx:ResUI.TbConfirm}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
IsCancel="true"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbCoreType}" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
MaxDropDownHeight="1000"
|
||||
Style="{StaticResource MyOutlinedTextComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Orientation="Horizontal">
|
||||
<ToggleButton x:Name="togDisplayLog" HorizontalAlignment="Left" />
|
||||
<TextBlock
|
||||
Margin="8,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TipDisplayLog}" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbPreSocksPort}" />
|
||||
<TextBox
|
||||
x:Name="txtPreSocksPort"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<StackPanel
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2">
|
||||
<TextBlock
|
||||
Width="500"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TipPreSocksPort}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</reactiveui:ReactiveWindow>
|
|
@ -1,12 +1,12 @@
|
|||
<reactiveui:ReactiveWindow
|
||||
x:Class="v2rayN.Views.AddServerWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
Title="{x:Static resx:ResUI.menuServers}"
|
||||
|
@ -26,8 +26,8 @@
|
|||
<DockPanel Margin="8">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
@ -40,7 +40,6 @@
|
|||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
|
|
|
@ -351,10 +351,5 @@ namespace v2rayN.Views
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,8 +26,8 @@
|
|||
<DockPanel Margin="8">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
@ -40,7 +40,6 @@
|
|||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
|
|
|
@ -58,10 +58,5 @@ namespace v2rayN.Views
|
|||
{
|
||||
Utils.ProcessStart("https://sing-box.sagernet.org/zh/configuration/dns/");
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +1,16 @@
|
|||
<reactiveui:ReactiveWindow
|
||||
x:Class="v2rayN.Views.GlobalHotkeySettingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Views="clr-namespace:v2rayN.Views"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
Title="{x:Static resx:ResUI.menuSetting}"
|
||||
Width="600"
|
||||
Width="700"
|
||||
Height="500"
|
||||
x:TypeArguments="vms:SubEditViewModel"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
|
@ -25,165 +24,163 @@
|
|||
TextOptions.TextRenderingMode="Auto"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer
|
||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid x:Name="gridText" Grid.Row="0">
|
||||
<DockPanel Margin="8">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnReset"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Click="btnReset_Click"
|
||||
Content="{x:Static resx:ResUI.TbReset}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnSave_Click"
|
||||
Content="{x:Static resx:ResUI.TbConfirm}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Grid.Column="2"
|
||||
Margin="4"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
IsCancel="true"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</Grid>
|
||||
<ScrollViewer
|
||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="300" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="gridText" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="400" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Style="{StaticResource ModuleTitle}"
|
||||
Text="{x:Static resx:ResUI.TbGlobalHotkeySetting}" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Style="{StaticResource ModuleTitle}"
|
||||
Text="{x:Static resx:ResUI.TbGlobalHotkeySetting}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbDisplayGUI}" />
|
||||
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey0"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbClearSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey1"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSetSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey2"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbNotChangeSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey3"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSystemProxyPac}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey4"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbDisplayGUI}" />
|
||||
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey0"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbClearSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey1"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSetSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey2"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbNotChangeSystemProxy}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey3"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown" />
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSystemProxyPac}" />
|
||||
<TextBox
|
||||
x:Name="txtGlobalHotkey4"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}"
|
||||
PreviewKeyDown="TxtGlobalHotkey_PreviewKeyDown" />
|
||||
Text="{x:Static resx:ResUI.TbGlobalHotkeySettingTip}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbGlobalHotkeySettingTip}" />
|
||||
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnReset"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Click="btnReset_Click"
|
||||
Content="{x:Static resx:ResUI.TbReset}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnSave_Click"
|
||||
Content="{x:Static resx:ResUI.TbConfirm}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Grid.Column="2"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</reactiveui:ReactiveWindow>
|
|
@ -123,11 +123,6 @@ namespace v2rayN.Views
|
|||
}
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnReset_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (var k in _TextBoxKeyEventItem.Keys)
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<reactiveui:ReactiveWindow
|
||||
x:Class="v2rayN.Views.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
|
||||
xmlns:base="clr-namespace:v2rayN.Base"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:v2rayN.Views"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
Title="v2rayN"
|
||||
Width="900"
|
||||
Height="700"
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<DockPanel Margin="8">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
@ -40,7 +40,6 @@
|
|||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
|
|
|
@ -198,10 +198,5 @@ namespace v2rayN.Views
|
|||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||
});
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,8 +139,8 @@
|
|||
DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="600" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
|
|
|
@ -81,11 +81,6 @@ namespace v2rayN.Views
|
|||
ViewModel.InboundTagItems = clbInboundTag.SelectedItems.Cast<string>().ToList();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void linkRuleobjectDoc_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Utils.ProcessStart("https://www.v2fly.org/config/routing.html#ruleobject");
|
||||
|
|
|
@ -78,8 +78,8 @@
|
|||
DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="600" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
|
|
@ -131,8 +131,8 @@
|
|||
DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="600" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
|
|
|
@ -31,13 +31,10 @@
|
|||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<DockPanel Margin="8">
|
||||
<Grid
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center"
|
||||
DockPanel.Dock="Bottom">
|
||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
@ -50,7 +47,6 @@
|
|||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
|
|
|
@ -54,10 +54,5 @@ namespace v2rayN.Views
|
|||
{
|
||||
txtRemarks.Focus();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue