Beispiel #1
0
        public async void SaveReport()
        {
            ReportWriter   reportWriter   = new ReportWriter();
            FileSavePicker fileSavePicker = new FileSavePicker();

            fileSavePicker.SuggestedStartLocation = PickerLocationId.Desktop;
            fileSavePicker.FileTypeChoices.Add("Plain Text", new List <string>()
            {
                ".txt"
            });
            fileSavePicker.SuggestedFileName = "New Report";

            StorageFile file = await fileSavePicker.PickSaveFileAsync();

            if (file != null)
            {
                reportWriter.GenerateReportProgramme(ThisProgramme, file);
            }
        }