pull/4711/head
2dust 2024-01-27 10:57:40 +08:00
parent e71525db0e
commit 6f22b74154
9 changed files with 82 additions and 20 deletions

View File

@ -1906,6 +1906,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 Auto ScrollToEnd 的本地化字符串。
/// </summary>
public static string TbAutoScrollToEnd {
get {
return ResourceManager.GetString("TbAutoScrollToEnd", resourceCulture);
}
}
/// <summary>
/// 查找类似 Domain, ip, process are auto sorted when saving 的本地化字符串。
/// </summary>
@ -2338,6 +2347,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 (Domain or IP or ProcName) and Port and Protocol and InboundTag =&gt; OutboundTag 的本地化字符串。
/// </summary>
public static string TbRuleMatchingTips {
get {
return ResourceManager.GetString("TbRuleMatchingTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 Ruleobject Doc 的本地化字符串。
/// </summary>

View File

@ -1183,4 +1183,10 @@
<data name="TbPath7" xml:space="preserve">
<value>obfs password</value>
</data>
<data name="TbRuleMatchingTips" xml:space="preserve">
<value>(Domain or IP or ProcName) and Port and Protocol and InboundTag =&gt; OutboundTag</value>
</data>
<data name="TbAutoScrollToEnd" xml:space="preserve">
<value>Auto ScrollToEnd</value>
</data>
</root>

View File

@ -1180,4 +1180,10 @@
<data name="TbPath7" xml:space="preserve">
<value>混淆密码(obfs password)</value>
</data>
<data name="TbRuleMatchingTips" xml:space="preserve">
<value>(Domain 或 IP 或 进程名) 与 Port 与 Protocol 与 InboundTag =&gt; OutboundTag</value>
</data>
<data name="TbAutoScrollToEnd" xml:space="preserve">
<value>自动滚动到末尾</value>
</data>
</root>

View File

@ -1153,4 +1153,10 @@
<data name="TbSettingsEnableIPv6Address" xml:space="preserve">
<value>啟用IPv6</value>
</data>
<data name="TbRuleMatchingTips" xml:space="preserve">
<value>(Domain 或 IP 或 进程名) 与 Port 与 Protocol 与 InboundTag =&gt; OutboundTag</value>
</data>
<data name="TbAutoScrollToEnd" xml:space="preserve">
<value>自动滚动到末尾</value>
</data>
</root>

View File

@ -101,7 +101,7 @@ namespace v2rayN.ViewModels
private void BrowseServer()
{
UI.Show(ResUI.CustomServerTips);
//UI.Show(ResUI.CustomServerTips);
if (UI.OpenFileDialog(out string fileName,
"Config|*.json|YAML|*.yaml;*.yml|All|*.*") != true)

View File

@ -195,6 +195,13 @@
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TipPreSocksPort}"
TextWrapping="Wrap" />
<TextBlock
Width="500"
Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.CustomServerTips}"
TextWrapping="Wrap" />
</StackPanel>
</Grid>
</Grid>

View File

@ -3,11 +3,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
@ -41,6 +39,16 @@
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
<ToggleButton
x:Name="togScrollToEnd"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
</StackPanel>
<TextBox
Name="txtMsg"

View File

@ -9,9 +9,9 @@ namespace v2rayN.Views
{
public partial class MsgView
{
private static Config _config;
private static Config? _config;
private string lastMsgFilter;
private string lastMsgFilter = string.Empty;
private bool lastMsgFilterNotAvailable;
public MsgView()
@ -65,6 +65,11 @@ namespace v2rayN.Views
lastMsgFilter = MsgFilter;
ShowMsg(msg);
if (togScrollToEnd.IsChecked ?? true)
{
txtMsg.ScrollToEnd();
}
}
private void ShowMsg(string msg)
@ -78,7 +83,6 @@ namespace v2rayN.Views
{
this.txtMsg.AppendText(Environment.NewLine);
}
txtMsg.ScrollToEnd();
}
public void ClearMsg()

View File

@ -4,7 +4,6 @@
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:resx="clr-namespace:v2rayN.Resx"
@ -36,6 +35,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
@ -52,6 +52,13 @@
Margin="4"
MaxDropDownHeight="1000"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="0"
Grid.Column="2"
Margin="4"
HorizontalAlignment="Left"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbRuleMatchingTips}" />
<TextBlock
Grid.Row="1"
@ -68,6 +75,16 @@
Margin="4"
HorizontalAlignment="Left"
Style="{StaticResource DefTextBox}" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
Margin="4"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}">
<Hyperlink Click="linkRuleobjectDoc_Click">
<TextBlock Text="{x:Static resx:ResUI.TbRuleobjectDoc}" />
</Hyperlink>
</TextBlock>
<TextBlock
Grid.Row="2"
@ -115,18 +132,8 @@
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="4"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}">
<Hyperlink Click="linkRuleobjectDoc_Click">
<TextBlock Text="{x:Static resx:ResUI.TbRuleobjectDoc}" />
</Hyperlink>
</TextBlock>
<TextBlock
Grid.Row="5"
Grid.Column="1"
Grid.Row="4"
Grid.Column="2"
Margin="4"
HorizontalAlignment="Left"
Style="{StaticResource ToolbarTextBlock}"
@ -144,7 +151,7 @@
</Grid.ColumnDefinitions>
<StackPanel
Grid.Column="0"
HorizontalAlignment="Left"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<CheckBox x:Name="chkAutoSort">
<TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.TbAutoSort}" />