mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Merge d6bd69d631
into 392f6111dd
This commit is contained in:
commit
24ee911fd6
10 changed files with 522 additions and 455 deletions
899
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
899
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -1416,4 +1416,7 @@
|
||||||
<data name="menuExportConfig" xml:space="preserve">
|
<data name="menuExportConfig" xml:space="preserve">
|
||||||
<value>صادر کردن سرور</value>
|
<value>صادر کردن سرور</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>گزینههای بیشتر</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>További lehetőségek</value>
|
||||||
|
</data>
|
||||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||||
<value>A megosztási link másolása a vágólapra sikerült</value>
|
<value>A megosztási link másolása a vágólapra sikerült</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -1416,4 +1416,7 @@
|
||||||
<data name="menuExportConfig" xml:space="preserve">
|
<data name="menuExportConfig" xml:space="preserve">
|
||||||
<value>Export Configuration</value>
|
<value>Export Configuration</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>More Options</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -117,6 +117,9 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>Больше опций</value>
|
||||||
|
</data>
|
||||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||||
<value>Экспортирование URL в буфер обмена успешно завершено</value>
|
<value>Экспортирование URL в буфер обмена успешно завершено</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>更多选项</value>
|
||||||
|
</data>
|
||||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||||
<value>导出分享链接至剪贴板成功</value>
|
<value>导出分享链接至剪贴板成功</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="MoreOptions" xml:space="preserve">
|
||||||
|
<value>更多選項</value>
|
||||||
|
</data>
|
||||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||||
<value>匯出分享链接至剪貼簿成功</value>
|
<value>匯出分享链接至剪貼簿成功</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
</Menu>
|
</Menu>
|
||||||
<Separator />
|
<Separator />
|
||||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||||
<MenuItem Padding="8,0"
|
<MenuItem Padding="8,0" Width="86"
|
||||||
AutomationProperties.Name="{x:Static resx:ResUI.menuSetting}">
|
AutomationProperties.Name="{x:Static resx:ResUI.menuSetting}">
|
||||||
<MenuItem.Header>
|
<MenuItem.Header>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
@ -289,6 +289,7 @@
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
<materialDesign:PopupBox
|
<materialDesign:PopupBox
|
||||||
|
x:Name="themePopupBox"
|
||||||
Padding="-2"
|
Padding="-2"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
StaysOpen="True"
|
StaysOpen="True"
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
@ -23,6 +25,8 @@ public partial class MainWindow
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
Loaded += MainWindow_Loaded;
|
||||||
|
|
||||||
_config = AppHandler.Instance.Config;
|
_config = AppHandler.Instance.Config;
|
||||||
ThreadPool.RegisterWaitForSingleObject(App.ProgramStarted, OnProgramStarted, null, -1, false);
|
ThreadPool.RegisterWaitForSingleObject(App.ProgramStarted, OnProgramStarted, null, -1, false);
|
||||||
|
|
||||||
|
@ -155,6 +159,15 @@ public partial class MainWindow
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var popupBox = themePopupBox;
|
||||||
|
|
||||||
|
var toggleButton = FindVisualChild<ToggleButton>(popupBox, "PART_Toggle");
|
||||||
|
|
||||||
|
AutomationProperties.SetName(toggleButton, ServiceLib.Resx.ResUI.MoreOptions);
|
||||||
|
}
|
||||||
|
|
||||||
private void DelegateSnackMsg(string content)
|
private void DelegateSnackMsg(string content)
|
||||||
{
|
{
|
||||||
Application.Current?.Dispatcher.Invoke((() =>
|
Application.Current?.Dispatcher.Invoke((() =>
|
||||||
|
@ -466,5 +479,26 @@ public partial class MainWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private T FindVisualChild<T>(DependencyObject parent, string name) where T : DependencyObject
|
||||||
|
{
|
||||||
|
if (parent == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
|
||||||
|
{
|
||||||
|
var child = VisualTreeHelper.GetChild(parent, i);
|
||||||
|
if (child is T childType && child is FrameworkElement element && element.Name == name)
|
||||||
|
{
|
||||||
|
return childType;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = FindVisualChild<T>(child, name);
|
||||||
|
if (result != null)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion UI
|
#endregion UI
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,14 +27,16 @@
|
||||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
|
||||||
materialDesign:TextFieldAssist.HasClearButton="True"
|
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||||
IsEditable="True"
|
IsEditable="True"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}"
|
||||||
|
AutomationProperties.Name="{x:Static resx:ResUI.MsgFilterTitle}" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnCopy"
|
x:Name="btnCopy"
|
||||||
Width="24"
|
Width="24"
|
||||||
Height="24"
|
Height="24"
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||||
ToolTip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
|
ToolTip="{x:Static resx:ResUI.menuMsgViewCopyAll}"
|
||||||
|
AutomationProperties.Name="{x:Static resx:ResUI.menuMsgViewCopyAll}">
|
||||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ContentCopy" />
|
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ContentCopy" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
@ -43,7 +45,8 @@
|
||||||
Height="24"
|
Height="24"
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||||
ToolTip="{x:Static resx:ResUI.menuMsgViewClear}">
|
ToolTip="{x:Static resx:ResUI.menuMsgViewClear}"
|
||||||
|
AutomationProperties.Name="{x:Static resx:ResUI.menuMsgViewClear}">
|
||||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Delete" />
|
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Delete" />
|
||||||
</Button>
|
</Button>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
@ -55,7 +58,8 @@
|
||||||
x:Name="togAutoRefresh"
|
x:Name="togAutoRefresh"
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsChecked="True" />
|
IsChecked="True"
|
||||||
|
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoRefresh}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
@ -65,7 +69,8 @@
|
||||||
x:Name="togScrollToEnd"
|
x:Name="togScrollToEnd"
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsChecked="True" />
|
IsChecked="True"
|
||||||
|
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="txtMsg"
|
Name="txtMsg"
|
||||||
|
|
Loading…
Reference in a new issue