mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
25 lines
660 B
C#
25 lines
660 B
C#
using Avalonia.Input;
|
|
using Avalonia.Markup.Xaml;
|
|
using Avalonia.ReactiveUI;
|
|
using RedBookPlayer.GUI.ViewModels;
|
|
|
|
namespace RedBookPlayer.GUI.Views
|
|
{
|
|
public class MainWindow : ReactiveWindow<MainViewModel>
|
|
{
|
|
public MainWindow() => InitializeComponent();
|
|
|
|
/// <summary>
|
|
/// Initialize the main window
|
|
/// </summary>
|
|
void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|
// Add handlers
|
|
Closing += ViewModel.ExecuteStop;
|
|
AddHandler(DragDrop.DropEvent, ViewModel.ExecuteLoadDragDrop);
|
|
KeyDown += ViewModel.ExecuteKeyPress;
|
|
}
|
|
}
|
|
} |