Files
LehrerApp/LehrerApp.Desktop/Views/MainWindow.axaml.cs
T
adminandClaude Sonnet 5 48d07a2b99 Datensicherheit: Backup, Verschlüsselung, App-Sperre (Kapitel 13.3)
Automatisches rollierendes Backup der Datenbank beim Start mit
Wiederherstellung über die Einstellungen, versionierte Schema-Migration,
optionale Passwort-Verschlüsselung der LiteDB-Datei und eine App-Sperre
nach Inaktivität mit eigenem Passwort.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 13:07:36 +02:00

28 lines
728 B
C#

using Avalonia.Controls;
using Avalonia.Input;
using LehrerApp.Desktop.ViewModels;
namespace LehrerApp.Desktop.Views;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
PointerMoved += (_, _) => NotifyActivity();
PointerPressed += (_, _) => NotifyActivity();
KeyDown += (_, _) => NotifyActivity();
}
private void NotifyActivity()
{
if (DataContext is MainWindowViewModel vm) vm.AppLock.NotifyActivity();
}
private void OnLockScreenKeyDown(object? sender, KeyEventArgs e)
{
if (e.Key == Key.Enter && DataContext is MainWindowViewModel vm)
vm.AppLock.UnlockCommand.Execute(null);
}
}