private void ExportCarGeneratorsCSV(string path) { CarGenerator[] data = CurrentSaveData.CarGenerators.CarGeneratorsArray; try { CarGeneratorCsvHelper.Write(data, path); } catch (IOException ex) { ShowErrorDialog(ex.Message); StatusText = Strings.StatusMessageExportUnsuccessful; return; } catch (InvalidDataException ex) { ShowErrorDialog(ex.Message); StatusText = Strings.StatusMessageExportUnsuccessful; return; } ShowExportSuccessDialog(); StatusText = string.Format(Strings.StatusMessageExportSuccessful, path); }