[chore:] implemented csv-export access from gui

This commit is contained in:
2026-03-19 08:49:03 +01:00
parent 11d9c641a6
commit 9f298d8ce8

View File

@@ -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);
}
}