增加IsShuttingDownFromTray标志位
This commit is contained in:
@@ -29,6 +29,12 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
|
||||
public string Title => $"SpineViewer - v{App.Version}";
|
||||
|
||||
/// <summary>
|
||||
/// 指示是否通过托盘图标进行退出
|
||||
/// </summary>
|
||||
public bool IsShuttingDownFromTray => _isShuttingDownFromTray;
|
||||
private bool _isShuttingDownFromTray;
|
||||
|
||||
public bool? CloseToTray
|
||||
{
|
||||
get => _closeToTray;
|
||||
@@ -101,8 +107,13 @@ namespace SpineViewer.ViewModels.MainWindow
|
||||
});
|
||||
private RelayCommand _cmd_SwitchWallpaperView;
|
||||
|
||||
public RelayCommand Cmd_Exit => _cmd_Exit ??= new(App.Current.Shutdown);
|
||||
private RelayCommand? _cmd_Exit;
|
||||
public RelayCommand Cmd_ExitFromTray => _cmd_ExitFromTray ??= new(() =>
|
||||
{
|
||||
_isShuttingDownFromTray = true;
|
||||
OnPropertyChanged(nameof(IsShuttingDownFromTray));
|
||||
App.Current.Shutdown();
|
||||
});
|
||||
private RelayCommand? _cmd_ExitFromTray;
|
||||
|
||||
/// <summary>
|
||||
/// 打开工作区
|
||||
|
||||
Reference in New Issue
Block a user