This commit is contained in:
Reza Bakhshi Laktasaraei 2025-04-14 07:26:39 +03:30 committed by GitHub
commit 24ee911fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 522 additions and 455 deletions

File diff suppressed because it is too large Load diff

View file

@ -1416,4 +1416,7 @@
<data name="menuExportConfig" xml:space="preserve">
<value>صادر کردن سرور</value>
</data>
<data name="MoreOptions" xml:space="preserve">
<value>گزینه‌های بیشتر</value>
</data>
</root>

View file

@ -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 +1419,4 @@
<data name="menuExportConfig" xml:space="preserve">
<value>Export server</value>
</data>
</root>
</root>

View file

@ -1416,4 +1416,7 @@
<data name="menuExportConfig" xml:space="preserve">
<value>Export Configuration</value>
</data>
</root>
<data name="MoreOptions" xml:space="preserve">
<value>More Options</value>
</data>
</root>

View file

@ -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>
@ -1416,4 +1419,4 @@
<data name="menuExportConfig" xml:space="preserve">
<value>Export server</value>
</data>
</root>
</root>

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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
}

View file

@ -27,14 +27,16 @@
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.MsgFilterTitle}"
materialDesign:TextFieldAssist.HasClearButton="True"
IsEditable="True"
Style="{StaticResource DefComboBox}" />
Style="{StaticResource DefComboBox}"
AutomationProperties.Name="{x:Static resx:ResUI.MsgFilterTitle}" />
<Button
x:Name="btnCopy"
Width="24"
Height="24"
Margin="{StaticResource MarginLeftRight8}"
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
@ -43,7 +45,8 @@
Height="24"
Margin="{StaticResource MarginLeftRight8}"
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
@ -55,7 +58,8 @@
x:Name="togAutoRefresh"
Margin="{StaticResource MarginLeftRight8}"
HorizontalAlignment="Left"
IsChecked="True" />
IsChecked="True"
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoRefresh}" />
<TextBlock
Margin="{StaticResource MarginLeftRight8}"
VerticalAlignment="Center"
@ -65,7 +69,8 @@
x:Name="togScrollToEnd"
Margin="{StaticResource MarginLeftRight8}"
HorizontalAlignment="Left"
IsChecked="True" />
IsChecked="True"
AutomationProperties.Name="{x:Static resx:ResUI.TbAutoScrollToEnd}" />
</WrapPanel>
<TextBox
Name="txtMsg"
@ -103,4 +108,4 @@
</TextBox.ContextMenu>
</TextBox>
</DockPanel>
</reactiveui:ReactiveUserControl>
</reactiveui:ReactiveUserControl>