mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[TUI] Implement changing path.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Aaru.Tui.ViewModels.Windows;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace Aaru.Tui.Views.Windows;
|
||||
@@ -11,6 +12,18 @@ public partial class MainWindow : Window
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ListBox_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(e.Key == Key.Enter)
|
||||
{
|
||||
if(DataContext is MainWindowViewModel vm && vm.OpenSelectedFileCommand.CanExecute(null))
|
||||
{
|
||||
vm.OpenSelectedFileCommand.Execute(null);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user