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,33 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
namespace LehrerApp.Desktop.Views.Groups;
public partial class AddGroupDialog : Window
{
public bool Saved { get; private set; }
public AddGroupDialog()
{
InitializeComponent();
}
private void OnSave(object? sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.Groups.AddGroupDialogViewModel vm)
{
if (vm.SaveCommand.CanExecute(null))
{
vm.SaveCommand.Execute(null);
if (vm.Result is not null)
{
Saved = true;
Close(true);
}
}
}
}
private void OnCancel(object? sender, RoutedEventArgs e) =>
Close(false);
}