This commit is contained in:
2026-03-29 23:47:31 +02:00
commit 216d5d2280
75 changed files with 5702 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
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();
}
}