mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Implement exit menu.
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Aaru.Gui.ViewModels
|
||||
EncodingsCommand = ReactiveCommand.Create(ExecuteEncodingsCommand);
|
||||
PluginsCommand = ReactiveCommand.Create(ExecutePluginsCommand);
|
||||
StatisticsCommand = ReactiveCommand.Create(ExecuteStatisticsCommand);
|
||||
ExitCommand = ReactiveCommand.Create(ExecuteExitCommand);
|
||||
_view = view;
|
||||
}
|
||||
|
||||
@@ -33,6 +34,7 @@ namespace Aaru.Gui.ViewModels
|
||||
public ReactiveCommand<Unit, Unit> EncodingsCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> PluginsCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> StatisticsCommand { get; }
|
||||
public ReactiveCommand<Unit, Unit> ExitCommand { get; }
|
||||
|
||||
internal void ExecuteAboutCommand()
|
||||
{
|
||||
@@ -76,5 +78,7 @@ namespace Aaru.Gui.ViewModels
|
||||
dialog.DataContext = new StatisticsDialogViewModel(dialog);
|
||||
dialog.ShowDialog(_view);
|
||||
}
|
||||
|
||||
internal void ExecuteExitCommand() => (Application.Current.ApplicationLifetime as ClassicDesktopStyleApplicationLifetime)?.Shutdown();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user