去除默认的最小化提示弹框

This commit is contained in:
ww-rm
2025-10-16 23:54:07 +08:00
parent c90713ffe7
commit b178e48e84
4 changed files with 4 additions and 9 deletions

View File

@@ -102,7 +102,7 @@ namespace SpineViewer.Models
private bool _wallpaperView;
[ObservableProperty]
private bool? _closeToTray = null;
private bool _closeToTray;
[ObservableProperty]
private bool _autoRun;

View File

@@ -35,12 +35,12 @@ namespace SpineViewer.ViewModels.MainWindow
public bool IsShuttingDownFromTray => _isShuttingDownFromTray;
private bool _isShuttingDownFromTray;
public bool? CloseToTray
public bool CloseToTray
{
get => _closeToTray;
set => SetProperty(ref _closeToTray, value);
}
private bool? _closeToTray = null;
private bool _closeToTray;
public string AutoRunWorkspaceConfigPath
{

View File

@@ -295,7 +295,7 @@ namespace SpineViewer.ViewModels.MainWindow
set => SetProperty(_vmMain.SFMLRendererViewModel.WallpaperView, value, v => _vmMain.SFMLRendererViewModel.WallpaperView = v);
}
public bool? CloseToTray
public bool CloseToTray
{
get => _vmMain.CloseToTray;
set => SetProperty(_vmMain.CloseToTray, value, v => _vmMain.CloseToTray = v);

View File

@@ -238,11 +238,6 @@ public partial class MainWindow : Window
{
if (!_vm.IsShuttingDownFromTray)
{
if (_vm.CloseToTray is null)
{
_vm.PreferenceViewModel.CloseToTray = MessagePopupService.YesNo(AppResource.Str_CloseToTrayQuest);
_vm.PreferenceViewModel.SavePreference();
}
if (_vm.CloseToTray is true)
{
Hide();