mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Merge ffe09ca5ea
into 23eeb8ff55
This commit is contained in:
commit
fc64926526
10 changed files with 527 additions and 452 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">
|
||||
<value>صادر کردن سرور</value>
|
||||
</data>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>گزینههای بیشتر</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>További lehetőségek</value>
|
||||
</data>
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>A megosztási link másolása a vágólapra sikerült</value>
|
||||
</data>
|
||||
|
|
|
@ -1416,4 +1416,7 @@
|
|||
<data name="menuExportConfig" xml:space="preserve">
|
||||
<value>Export Configuration</value>
|
||||
</data>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>More Options</value>
|
||||
</data>
|
||||
</root>
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>Больше опций</value>
|
||||
</data>
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>Экспортирование URL в буфер обмена успешно завершено</value>
|
||||
</data>
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>更多选项</value>
|
||||
</data>
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>导出分享链接至剪贴板成功</value>
|
||||
</data>
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="MoreOptions" xml:space="preserve">
|
||||
<value>更多選項</value>
|
||||
</data>
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>匯出分享链接至剪貼簿成功</value>
|
||||
</data>
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem Padding="8,0"
|
||||
<MenuItem Padding="8,0" Width="86"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuSetting}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
@ -289,6 +289,7 @@
|
|||
</Menu>
|
||||
|
||||
<materialDesign:PopupBox
|
||||
x:Name="themePopupBox"
|
||||
Padding="-2"
|
||||
HorizontalAlignment="Right"
|
||||
StaysOpen="True"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
using System.ComponentModel;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
|
@ -23,6 +25,8 @@ public partial class MainWindow
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
Loaded += MainWindow_Loaded;
|
||||
|
||||
_config = AppHandler.Instance.Config;
|
||||
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)
|
||||
{
|
||||
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
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.MsgFilterTitle}"
|
||||
IsEditable="True"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
Style="{StaticResource DefComboBox}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.MsgFilterTitle}" />
|
||||
<Button
|
||||
x:Name="btnCopy"
|
||||
Width="24"
|
||||
|
@ -36,7 +37,8 @@
|
|||
Margin="{StaticResource MarginLeftRight8}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuMsgViewCopyAll}"
|
||||
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" />
|
||||
</Button>
|
||||
<Button
|
||||
|
@ -46,7 +48,8 @@
|
|||
Margin="{StaticResource MarginLeftRight8}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuMsgViewClear}"
|
||||
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" />
|
||||
</Button>
|
||||
<TextBlock
|
||||
|
@ -58,8 +61,13 @@
|
|||
x:Name="togAutoRefresh"
|
||||
Margin="{StaticResource MarginLeftRight8}"
|
||||
HorizontalAlignment="Left"
|
||||
<<<<<<< HEAD
|
||||
IsChecked="True"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoRefresh}" />
|
||||
=======
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoRefresh}"
|
||||
IsChecked="True" />
|
||||
>>>>>>> 456ffb200a76caccad8ad5528bf602492b98ae31
|
||||
<TextBlock
|
||||
Margin="{StaticResource MarginLeftRight8}"
|
||||
VerticalAlignment="Center"
|
||||
|
@ -69,8 +77,13 @@
|
|||
x:Name="togScrollToEnd"
|
||||
Margin="{StaticResource MarginLeftRight8}"
|
||||
HorizontalAlignment="Left"
|
||||
<<<<<<< HEAD
|
||||
IsChecked="True"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
|
||||
=======
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoScrollToEnd}"
|
||||
IsChecked="True" />
|
||||
>>>>>>> 456ffb200a76caccad8ad5528bf602492b98ae31
|
||||
</WrapPanel>
|
||||
<TextBox
|
||||
Name="txtMsg"
|
||||
|
|
Loading…
Reference in a new issue