mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
@@ -749,6 +749,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">Force display of MAA</system:String>
|
||||
<system:String x:Key="Restart">Restart</system:String>
|
||||
<system:String x:Key="Exit">Exit</system:String>
|
||||
<!-- !TrayIcon -->
|
||||
<!-- About -->
|
||||
|
||||
@@ -748,6 +748,7 @@
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">MAAの強制表示</system:String>
|
||||
<system:String x:Key="Restart">重启动</system:String>
|
||||
<system:String x:Key="Exit">終了</system:String>
|
||||
<!-- !TrayIcon -->
|
||||
<!-- About -->
|
||||
|
||||
@@ -751,6 +751,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">MAA 강제 표시</system:String>
|
||||
<system:String x:Key="Restart">재개</system:String>
|
||||
<system:String x:Key="Exit">종료</system:String>
|
||||
<!-- !TrayIcon -->
|
||||
<!-- About -->
|
||||
|
||||
@@ -752,6 +752,7 @@
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">强制显示MAA</system:String>
|
||||
<system:String x:Key="Restart">重启</system:String>
|
||||
<system:String x:Key="Exit">退出</system:String>
|
||||
<!-- !TrayIcon -->
|
||||
<!-- About -->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- 設定 -->
|
||||
<system:String x:Key="Settings">設定</system:String>
|
||||
<system:String x:Key="GeneralSettings">常規設定</system:String>
|
||||
@@ -739,6 +742,7 @@
|
||||
<!-- !AsstProxy -->
|
||||
<!-- TrayIcon -->
|
||||
<system:String x:Key="ForceShow">強制顯示 MAA</system:String>
|
||||
<system:String x:Key="Restart">重啓</system:String>
|
||||
<system:String x:Key="Exit">退出</system:String>
|
||||
<!-- !TrayIcon -->
|
||||
<!-- About -->
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<MenuItem Name="switchLangMenu" Header="{DynamicResource SwitchLanguage}" />
|
||||
<MenuItem Name="forceShowMenu" Header="{DynamicResource ForceShow}" />
|
||||
<MenuItem Name="useTrayMenu" Header="{DynamicResource HideTray}" />
|
||||
<MenuItem Name="restartMenu" Header="{DynamicResource Restart}" />
|
||||
<MenuItem Name="exitMenu" Header="{DynamicResource Exit}" />
|
||||
</ContextMenu>
|
||||
</hc:NotifyIcon.ContextMenu>
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace MaaWpfGui.Views.UI
|
||||
stopMenu.Click += StopTask;
|
||||
forceShowMenu.Click += ForceShow;
|
||||
useTrayMenu.Click += UseTray;
|
||||
restartMenu.Click += App_restart;
|
||||
exitMenu.Click += App_exit;
|
||||
|
||||
foreach (var lang in LocalizationHelper.SupportedLanguages)
|
||||
@@ -113,6 +114,14 @@ namespace MaaWpfGui.Views.UI
|
||||
_logger.Information("Use tray icon: {0}", Instances.SettingsViewModel.UseTray);
|
||||
}
|
||||
|
||||
private void App_restart(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (Instances.TaskQueueViewModel.ConfirmExit())
|
||||
{
|
||||
Bootstrapper.ShutdownAndRestartWithoutArgs();
|
||||
}
|
||||
}
|
||||
|
||||
private void App_exit(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (Instances.TaskQueueViewModel.ConfirmExit())
|
||||
|
||||
Reference in New Issue
Block a user