LANCommander/LANCommander.Launcher.Avalonia/ViewModels/ManualViewerViewModel.cs
Aaron Powell a9020e4e4c feat: Add PDF manual viewer using AvaloniaPdfViewer
- Added AvaloniaPdfViewer NuGet package (0.0.2-pre) for PDF rendering
- Created ManualViewerWindow to display game manuals
- Created ManualViewerViewModel with title and file path binding
- Added ManualViewModel for managing manual items in the action bar
- Added LoadManuals() to GameActionBarViewModel to load available manuals
- Added manual button (📖) to GameActionBarView with dropdown for multiple manuals
- Manuals are detected from game media with MediaType.Manual
2026-01-20 09:48:42 +11:00

28 lines
636 B
C#

using System;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public partial class ManualViewerViewModel : ViewModelBase
{
[ObservableProperty]
private string _title = "Manual";
[ObservableProperty]
private string _filePath = string.Empty;
public Action? CloseAction { get; set; }
public ManualViewerViewModel(string title, string filePath)
{
Title = title;
FilePath = filePath;
}
[RelayCommand]
private void Close()
{
CloseAction?.Invoke();
}
}