[chore:] implemented csv-export access from gui
This commit is contained in:
@@ -424,8 +424,22 @@ public partial class MainWindow : Window
|
|||||||
} catch {}
|
} 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user