2026-03-27 18:59:17 -04:00
|
|
|
using Avalonia.Controls;
|
|
|
|
|
using Avalonia.Interactivity;
|
2026-06-06 05:49:24 -05:00
|
|
|
using LANCommander.Launcher.ViewModels;
|
2026-03-27 18:59:17 -04:00
|
|
|
using LANCommander.Launcher.Settings.Enums;
|
|
|
|
|
|
2026-06-06 05:49:24 -05:00
|
|
|
namespace LANCommander.Launcher.Views;
|
2026-03-27 18:59:17 -04:00
|
|
|
|
|
|
|
|
public partial class GamesListView : UserControl
|
|
|
|
|
{
|
|
|
|
|
public GamesListView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GridViewButton_Click(object? sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (DataContext is GamesCollectionViewModel vm)
|
|
|
|
|
vm.SelectedViewType = GameViewType.Grid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ListViewButton_Click(object? sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (DataContext is GamesCollectionViewModel vm)
|
|
|
|
|
vm.SelectedViewType = GameViewType.List;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void HorizontalViewButton_Click(object? sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (DataContext is GamesCollectionViewModel vm)
|
|
|
|
|
vm.SelectedViewType = GameViewType.Horizontal;
|
|
|
|
|
}
|
|
|
|
|
}
|