Add animated classroom grouping with saved editable plans
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
admin committed 2026-09-29 22:17:49 +02:00
1 parent d4b1419f9a
commit f0462bd2a1
27 files changed
+775 -46

No files matched your search

@@ -15,6 +15,7 @@ public partial class TeachingModeWindow : Window
private static readonly Dictionary<Guid, TeachingModeWindow> OpenWindows = [];
private readonly DispatcherTimer _clock = new() { Interval = TimeSpan.FromSeconds(1) };
private WindowState _previousState = WindowState.Maximized;
private StudentGroupGeneratorWindow? _studentGroupGeneratorWindow;
public static void Open(Lesson lesson)
{
@@ -66,6 +67,20 @@ public partial class TeachingModeWindow : Window
}
private void OnFullScreen(object? sender, RoutedEventArgs e) => ToggleFullScreen();
private void OnOpenStudentGroups(object? sender, RoutedEventArgs e)
{
if (_studentGroupGeneratorWindow is not null)
{
_studentGroupGeneratorWindow.Activate();
return;
}
if (DataContext is not TeachingModeViewModel vm) return;
_studentGroupGeneratorWindow = StudentGroupGeneratorWindow.Create(vm.LessonInfo.GroupId,
useTodayAttendance: vm.LessonDate == DateOnly.FromDateTime(DateTime.Today));
_studentGroupGeneratorWindow.Closed += (_, _) => _studentGroupGeneratorWindow = null;
_studentGroupGeneratorWindow.Show(this);
}
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);