去除默认的最小化提示弹框
This commit is contained in:
@@ -102,7 +102,7 @@ namespace SpineViewer.Models
|
||||
private bool _wallpaperView;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool? _closeToTray = null;
|
||||
private bool _closeToTray;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _autoRun;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user