diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
index eebf8674c9..c5db94732f 100644
--- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
@@ -11,6 +11,7 @@
// but WITHOUT ANY WARRANTY
//
+#nullable enable
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -28,6 +29,7 @@ using System.Runtime.InteropServices.ComTypes;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Controls;
using System.Windows.Media.Imaging;
using HandyControl.Controls;
using HandyControl.Data;
@@ -53,6 +55,7 @@ using Stylet;
using ComboBox = System.Windows.Controls.ComboBox;
using DarkModeType = MaaWpfGui.Configuration.GUI.DarkModeType;
using Timer = System.Timers.Timer;
+using Window = HandyControl.Controls.Window;
namespace MaaWpfGui.ViewModels.UI
{
@@ -4105,14 +4108,25 @@ namespace MaaWpfGui.ViewModels.UI
TestLinkImage = Instances.AsstProxy.AsstGetImage();
TestLinkInfo = "Finish";
Instances.AsstProxy.AsstStop();
- }
-
- private bool _showTestLinkImage = false;
-
- public bool ShowTestLinkImage
- {
- get => _showTestLinkImage;
- set => SetAndNotify(ref _showTestLinkImage, value);
+ if (TestLinkImage is null)
+ {
+ TestLinkInfo = "Image is null";
+ }
+ else
+ {
+ Window popupWindow = new Window
+ {
+ Width = TestLinkImage.PixelWidth,
+ Height = TestLinkImage.PixelHeight,
+ Content = new Image
+ {
+ Width = TestLinkImage.PixelWidth,
+ Height = TestLinkImage.PixelHeight,
+ Source = TestLinkImage
+ }
+ };
+ popupWindow.ShowDialog();
+ }
}
private BitmapImage? _testLinkImage;
diff --git a/src/MaaWpfGui/Views/UserControl/ConnectSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/ConnectSettingsUserControl.xaml
index e30bab88bf..c260cb9531 100644
--- a/src/MaaWpfGui/Views/UserControl/ConnectSettingsUserControl.xaml
+++ b/src/MaaWpfGui/Views/UserControl/ConnectSettingsUserControl.xaml
@@ -170,12 +170,6 @@
Command="{s:Action TestLinkAndGetImage}"
Content="Test" />
-