Add refresh switch to information window

pull/3165/head
2dust 2023-01-30 14:44:49 +08:00
parent a5871f6cba
commit 46be7aadab
5 changed files with 28 additions and 0 deletions

View File

@ -1861,6 +1861,15 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 AutoRefresh 的本地化字符串。
/// </summary>
public static string TbAutoRefresh {
get {
return ResourceManager.GetString("TbAutoRefresh", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Domain and ip are auto sorted when saving 的本地化字符串。 /// 查找类似 Domain and ip are auto sorted when saving 的本地化字符串。
/// </summary> /// </summary>

View File

@ -1069,4 +1069,7 @@
<data name="TbSettingsEnableDragDropSort" xml:space="preserve"> <data name="TbSettingsEnableDragDropSort" xml:space="preserve">
<value>Enable Server Drag Drop Sort(Require restart)</value> <value>Enable Server Drag Drop Sort(Require restart)</value>
</data> </data>
<data name="TbAutoRefresh" xml:space="preserve">
<value>AutoRefresh</value>
</data>
</root> </root>

View File

@ -1069,4 +1069,7 @@
<data name="TbSettingsEnableDragDropSort" xml:space="preserve"> <data name="TbSettingsEnableDragDropSort" xml:space="preserve">
<value>启用服务器拖放排序(需重启)</value> <value>启用服务器拖放排序(需重启)</value>
</data> </data>
<data name="TbAutoRefresh" xml:space="preserve">
<value>自动刷新</value>
</data>
</root> </root>

View File

@ -27,6 +27,15 @@
Margin="8,0" Margin="8,0"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}" materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
materialDesign:TextFieldAssist.HasClearButton="True" /> materialDesign:TextFieldAssist.HasClearButton="True" />
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAutoRefresh}" />
<ToggleButton
x:Name="togAutoRefresh"
Margin="8,0"
HorizontalAlignment="Left"
IsChecked="True" />
</StackPanel> </StackPanel>
<TextBox <TextBox
Name="txtMsg" Name="txtMsg"

View File

@ -26,6 +26,10 @@ namespace v2rayN.Views
ClearMsg(); ClearMsg();
return; return;
} }
if (!togAutoRefresh.IsChecked.Value)
{
return;
}
var MsgFilter = txtMsgFilter.Text.TrimEx(); var MsgFilter = txtMsgFilter.Text.TrimEx();
if (!Utils.IsNullOrEmpty(MsgFilter)) if (!Utils.IsNullOrEmpty(MsgFilter))
{ {