From 9f298d8ce80bd2052e160f38b6585d7cd39d11b1 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Thu, 19 Mar 2026 08:49:03 +0100 Subject: [PATCH] [chore:] implemented csv-export access from gui --- MainWindow.axaml.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 5a1a49a..140633d 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -424,8 +424,22 @@ public partial class MainWindow : Window } catch {} } - private void BtnExportCourseCSV_OnClick(object? sender, RoutedEventArgs e) + private async void BtnExportCourseCSV_OnClick(object? sender, RoutedEventArgs e) { - // export as csv here + var topLevel = GetTopLevel(this); + var file = await topLevel!.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions + { + Title = "CSV-Datei speichern", + SuggestedFileType = new FilePickerFileType(".csv-Datei") + { + Patterns = new[] { "*.csv" } + } + + }); + + if (file == null) return; + + ExportUtility.ExportToCSV(file.Path.AbsolutePath); + } } \ No newline at end of file