mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[TUI] Add Main Help dialog with F1 shortcut and Ok command
This commit is contained in:
24
Aaru.Tui/ViewModels/Dialogs/MainHelpDialogViewModel.cs
Normal file
24
Aaru.Tui/ViewModels/Dialogs/MainHelpDialogViewModel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Windows.Input;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Iciclecreek.Avalonia.WindowManager;
|
||||
|
||||
namespace Aaru.Tui.ViewModels.Dialogs;
|
||||
|
||||
public sealed class MainHelpDialogViewModel : ViewModelBase
|
||||
{
|
||||
internal ManagedWindow _dialog = null!;
|
||||
|
||||
|
||||
public MainHelpDialogViewModel(ManagedWindow dialog)
|
||||
{
|
||||
_dialog = dialog;
|
||||
OkCommand = new RelayCommand(Ok);
|
||||
}
|
||||
|
||||
public ICommand OkCommand { get; }
|
||||
|
||||
void Ok()
|
||||
{
|
||||
_dialog.Close(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user