mirror of https://github.com/2dust/v2rayN
Previous and next proxy setting
parent
0d5a9fcf4a
commit
51576b54c3
|
@ -1,9 +1,9 @@
|
|||
<Application
|
||||
x:Class="v2rayN.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
ShutdownMode="OnExplicitShutdown"
|
||||
StartupUri="Views/MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
@ -34,6 +34,12 @@
|
|||
Left="8"
|
||||
Right="8"
|
||||
Top="8" />
|
||||
<Thickness
|
||||
x:Key="OutlinedTextBoxDefaultPadding"
|
||||
Bottom="12"
|
||||
Left="16"
|
||||
Right="12"
|
||||
Top="12" />
|
||||
<Style
|
||||
x:Key="ModuleTitle"
|
||||
BasedOn="{StaticResource MaterialDesignTextBlock}"
|
||||
|
@ -129,6 +135,7 @@
|
|||
BasedOn="{StaticResource MaterialDesignOutlinedTextBox}"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||
<Setter Property="Padding" Value="{StaticResource OutlinedTextBoxDefaultPadding}" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="MyGroupBox"
|
||||
|
@ -142,6 +149,13 @@
|
|||
TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Margin" Value="-2,0" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="MyOutlinedTextComboBox"
|
||||
BasedOn="{StaticResource MaterialDesignOutlinedComboBox}"
|
||||
TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||
<Setter Property="Padding" Value="{StaticResource OutlinedTextBoxDefaultPadding}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -447,6 +447,15 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Next proxy remarks 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvNextProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("LvNextProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Port 的本地化字符串。
|
||||
/// </summary>
|
||||
|
@ -456,6 +465,24 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Previous proxy remakrs 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvPrevProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("LvPrevProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please make sure the remarks exists and is unique 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvPrevProfileTip {
|
||||
get {
|
||||
return ResourceManager.GetString("LvPrevProfileTip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remarks 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
@ -1153,4 +1153,13 @@
|
|||
<data name="TbHeaderType8" xml:space="preserve">
|
||||
<value>Congestion control</value>
|
||||
</data>
|
||||
<data name="LvPrevProfile" xml:space="preserve">
|
||||
<value>Previous proxy remakrs</value>
|
||||
</data>
|
||||
<data name="LvNextProfile" xml:space="preserve">
|
||||
<value>Next proxy remarks</value>
|
||||
</data>
|
||||
<data name="LvPrevProfileTip" xml:space="preserve">
|
||||
<value>Please make sure the remarks exists and is unique</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1150,4 +1150,13 @@
|
|||
<data name="TbHeaderType8" xml:space="preserve">
|
||||
<value>拥塞控制算法</value>
|
||||
</data>
|
||||
<data name="LvPrevProfile" xml:space="preserve">
|
||||
<value>前置代理别名</value>
|
||||
</data>
|
||||
<data name="LvNextProfile" xml:space="preserve">
|
||||
<value>落地代理別名</value>
|
||||
</data>
|
||||
<data name="LvPrevProfileTip" xml:space="preserve">
|
||||
<value>请确保别名存在并唯一</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1138,4 +1138,13 @@
|
|||
<data name="menuAddTuicServer" xml:space="preserve">
|
||||
<value>新增[Tuic]伺服器</value>
|
||||
</data>
|
||||
<data name="LvPrevProfile" xml:space="preserve">
|
||||
<value>前置代理別名</value>
|
||||
</data>
|
||||
<data name="LvNextProfile" xml:space="preserve">
|
||||
<value>落地代理別名</value>
|
||||
</data>
|
||||
<data name="LvPrevProfileTip" xml:space="preserve">
|
||||
<value>請確保別名存在並且唯一</value>
|
||||
</data>
|
||||
</root>
|
|
@ -69,6 +69,8 @@ namespace v2rayN.ViewModels
|
|||
item.sort = SelectedSource.sort;
|
||||
item.filter = SelectedSource.filter;
|
||||
item.convertTarget = SelectedSource.convertTarget;
|
||||
item.prevProfile = SelectedSource.prevProfile;
|
||||
item.nextProfile = SelectedSource.nextProfile;
|
||||
}
|
||||
|
||||
if (ConfigHandler.AddSubItem(_config, item) == 0)
|
||||
|
|
|
@ -97,17 +97,17 @@
|
|||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Vertical">
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnBrowse"
|
||||
Width="100"
|
||||
Margin="2,0,8,0"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbBrowse}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnEdit"
|
||||
Width="100"
|
||||
Margin="2,2,8,0"
|
||||
Width="80"
|
||||
Margin="2,0"
|
||||
Content="{x:Static resx:ResUI.TbEdit}"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
@ -126,9 +126,8 @@
|
|||
Width="200"
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="{DynamicResource StdFontSize}"
|
||||
MaxDropDownHeight="1000"
|
||||
Style="{StaticResource MaterialDesignOutlinedComboBox}" />
|
||||
Style="{StaticResource MyOutlinedTextComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
|
|
|
@ -30,17 +30,38 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<DockPanel Margin="8">
|
||||
<Grid
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center"
|
||||
DockPanel.Dock="Bottom">
|
||||
<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}"
|
||||
Cursor="Hand"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</Grid>
|
||||
<ScrollViewer
|
||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<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">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
@ -51,6 +72,8 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -209,9 +232,8 @@
|
|||
Grid.Column="1"
|
||||
Margin="4"
|
||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvConvertTargetTip}"
|
||||
FontSize="{DynamicResource StdFontSize}"
|
||||
MaxDropDownHeight="1000"
|
||||
Style="{StaticResource MaterialDesignOutlinedComboBox}" />
|
||||
Style="{StaticResource MyOutlinedTextComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="8"
|
||||
|
@ -229,32 +251,44 @@
|
|||
VerticalAlignment="Top"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
</Grid>
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
x:Name="btnSave"
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="9"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
Content="{x:Static resx:ResUI.TbConfirm}"
|
||||
Cursor="Hand"
|
||||
Style="{StaticResource DefButton}" />
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.LvPrevProfile}" />
|
||||
<TextBox
|
||||
x:Name="txtPrevProfile"
|
||||
Grid.Row="9"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
Click="btnCancel_Click"
|
||||
Content="{x:Static resx:ResUI.TbCancel}"
|
||||
Cursor="Hand"
|
||||
IsCancel="true"
|
||||
Style="{StaticResource DefButton}" />
|
||||
VerticalAlignment="Top"
|
||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvPrevProfileTip}"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="10"
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.LvNextProfile}" />
|
||||
<TextBox
|
||||
x:Name="txtNextProfile"
|
||||
Grid.Row="10"
|
||||
Grid.Column="1"
|
||||
Width="400"
|
||||
Margin="4"
|
||||
VerticalAlignment="Top"
|
||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvPrevProfileTip}"
|
||||
AcceptsReturn="True"
|
||||
Style="{StaticResource MyOutlinedTextBox}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</reactiveui:ReactiveWindow>
|
|
@ -43,6 +43,8 @@ namespace v2rayN.Views
|
|||
this.Bind(ViewModel, vm => vm.SelectedSource.sort, v => v.txtSort.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.filter, v => v.txtFilter.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.convertTarget, v => v.cmbConvertTarget.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.prevProfile, v => v.txtPrevProfile.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.nextProfile, v => v.txtNextProfile.Text).DisposeWith(disposables);
|
||||
|
||||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue