using Avalonia.Controls; using Avalonia.Interactivity; using LehrerApp.Desktop.ViewModels; namespace LehrerApp.Desktop.Views; public partial class DevicePairingDialog : Window { // Wird von außen gesetzt – Pfad zur lokalen DB public string TargetDbPath { get; set; } = ""; // Signal: App-Neustart nötig public bool RestartRequested { get; private set; } public DevicePairingDialog() { InitializeComponent(); } private void OnClose(object? sender, RoutedEventArgs e) => Close(); private async void OnRestore(object? sender, RoutedEventArgs e) { if (DataContext is DevicePairingViewModel vm) await vm.RestoreCommand.ExecuteAsync(TargetDbPath); } private void OnRestartRequested(object? sender, RoutedEventArgs e) { RestartRequested = true; Close(); } }