Browse Source

Improve

pull/4711/head
2dust 10 months ago
parent
commit
9d43465eab
  1. 21
      v2rayN/v2rayN/Views/AddServer2Window.xaml
  2. 14
      v2rayN/v2rayN/Views/AddServer2Window.xaml.cs
  3. 27
      v2rayN/v2rayN/Views/AddServerWindow.xaml
  4. 19
      v2rayN/v2rayN/Views/DNSSettingWindow.xaml
  5. 35
      v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml
  6. 19
      v2rayN/v2rayN/Views/OptionSettingWindow.xaml
  7. 23
      v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml
  8. 21
      v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
  9. 23
      v2rayN/v2rayN/Views/RoutingSettingWindow.xaml
  10. 27
      v2rayN/v2rayN/Views/SubEditWindow.xaml

21
v2rayN/v2rayN/Views/AddServer2Window.xaml

@ -24,27 +24,26 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="0"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="1"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<ScrollViewer
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
HorizontalScrollBarVisibility="Auto"
@ -120,13 +119,11 @@
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}" />

14
v2rayN/v2rayN/Views/AddServer2Window.xaml.cs

@ -51,18 +51,6 @@ namespace v2rayN.Views
private void Window_Loaded(object sender, RoutedEventArgs e)
{
txtRemarks.Focus();
}
private void btnCancel_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (ViewModel?.IsModified == true)
{
this.DialogResult = true;
}
else
{
this.Close();
}
}
}
}
}

27
v2rayN/v2rayN/Views/AddServerWindow.xaml

@ -1,12 +1,12 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.AddServerWindow"
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: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:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuServers}"
@ -24,27 +24,26 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="0"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="1"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<ScrollViewer
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
HorizontalScrollBarVisibility="Auto"

19
v2rayN/v2rayN/Views/DNSSettingWindow.xaml

@ -24,27 +24,26 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="0"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="1"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<TabControl HorizontalContentAlignment="Left">

35
v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml

@ -1,12 +1,12 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.GlobalHotkeySettingWindow"
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: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:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSetting}"
@ -25,34 +25,33 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnReset"
Grid.Column="0"
Margin="4"
Width="100"
Margin="8,0"
Click="btnReset_Click"
Content="{x:Static resx:ResUI.TbReset}"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnSave"
Grid.Column="1"
Margin="4"
Click="btnSave_Click"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="2"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<ScrollViewer
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
HorizontalScrollBarVisibility="Auto"

19
v2rayN/v2rayN/Views/OptionSettingWindow.xaml

@ -24,27 +24,26 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="0"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="1"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<TabControl HorizontalContentAlignment="Left">
<TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">

23
v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml

@ -140,17 +140,13 @@
Text="{x:Static resx:ResUI.TbRoutingTips}" />
</Grid>
<Grid
<StackPanel
Margin="8"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
HorizontalAlignment="Right"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<StackPanel
Grid.Column="0"
Width="600"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<CheckBox x:Name="chkAutoSort">
@ -159,20 +155,19 @@
</StackPanel>
<Button
x:Name="btnSave"
Grid.Column="1"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="2"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<Grid Margin="{StaticResource SettingItemMargin}">
<Grid.ColumnDefinitions>

21
v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml

@ -72,31 +72,26 @@
</ToolBar>
</ToolBarTray>
<Grid
<StackPanel
Margin="8"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
HorizontalAlignment="Right"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="1"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="2"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<Grid Margin="8" DockPanel.Dock="Top">
<Grid.RowDefinitions>

23
v2rayN/v2rayN/Views/RoutingSettingWindow.xaml

@ -125,38 +125,33 @@
</ToolBar>
</ToolBarTray>
<Grid
<StackPanel
Margin="8"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
HorizontalAlignment="Right"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<StackPanel
Grid.Column="0"
Width="600"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.TbRoutingTips}" />
</StackPanel>
<Button
x:Name="btnSave"
Grid.Column="1"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="2"
Margin="4"
Width="100"
Margin="8,0"
Click="btnCancel_Click"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<DockPanel>
<TabControl x:Name="tabAdvanced">

27
v2rayN/v2rayN/Views/SubEditWindow.xaml

@ -1,12 +1,12 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.SubEditWindow"
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: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:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSubSetting}"
@ -31,27 +31,26 @@
</ResourceDictionary>
</Window.Resources>
<DockPanel Margin="8">
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="4"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Grid.Column="0"
Margin="4"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnCancel"
Grid.Column="1"
Margin="4"
Width="100"
Margin="8,0"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
Style="{StaticResource DefButton}" />
</Grid>
</StackPanel>
<ScrollViewer
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
HorizontalScrollBarVisibility="Auto"

Loading…
Cancel
Save