Beispiel #1
0
 public void OnExportHistory()
 {
     if (currentSet.ArrowCount < 1)
     {
         MessageBox.Show(GlobalStrings.NoDataToExport);
         return;
     }
     save.InitialDirectory = DataExporter.ExportDirectory;
     save.Title            = GlobalStrings.SerializerExportToFile;
     save.FileName         = "";
     save.Filter           = DataExporter.AvailableExportFormats;
     if (save.ShowDialog() != DialogResult.Cancel)
     {
         var dataConverter = new DataConverter(currentSet, historyView);
         var dataExporter  = new DataExporter(save.FilterIndex);
         dataExporter.ExportFailed     += OnFailed;
         dataExporter.ExportSuccessful += OnExportSuccessful;
         dataExporter.ExportToFile(dataConverter.ConvertToArray(true), save.FileName);
     }
 }