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