2023-04-27 20:41:07 +02:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
2023-04-26 12:01:35 +02:00
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Markup.Xaml;
|
2023-04-27 20:41:07 +02:00
|
|
|
using Ocarina2.Models;
|
2023-04-26 12:01:35 +02:00
|
|
|
using Ocarina2.ViewModels;
|
|
|
|
|
|
|
|
namespace Ocarina2.Views;
|
|
|
|
|
|
|
|
public partial class LibraryView : UserControl
|
|
|
|
{
|
|
|
|
public LibraryView()
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void InitializeComponent()
|
|
|
|
{
|
|
|
|
AvaloniaXamlLoader.Load(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void MusicBox_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
|
|
|
{
|
2023-04-27 20:41:07 +02:00
|
|
|
if (sender is not ListBox b) return;
|
|
|
|
(DataContext as MainWindowViewModel)?.FileSelected(b.SelectedItem as MusicFile);
|
|
|
|
|
2023-04-26 12:01:35 +02:00
|
|
|
}
|
|
|
|
}
|