Fix Untis homework comparison and student selection
This commit is contained in:
1 parent
1291b24478
commit
f3e23ad207
8 files changed
+372
-66
No files matched your search
@@ -1,5 +1,9 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Interactivity;
|
||||
using LehrerApp.Desktop.Services;
|
||||
using LehrerApp.Desktop.ViewModels.Groups;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace LehrerApp.Desktop.Views.Groups;
|
||||
|
||||
@@ -8,4 +12,13 @@ public partial class WebUntisHomeworkComparisonDialog : Window
|
||||
public WebUntisHomeworkComparisonDialog() => InitializeComponent();
|
||||
|
||||
private void OnClose(object? sender, RoutedEventArgs e) => Close();
|
||||
|
||||
private async void OnCopyToClipboardClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button { DataContext: LocalOnlyHomeworkRow row }) return;
|
||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||
if (clipboard is null) return;
|
||||
await clipboard.SetTextAsync(row.ClipboardText);
|
||||
App.Services.GetRequiredService<NotificationService>().ShowSuccess("In die Zwischenablage kopiert.");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user