private bool WriteSaveData(SaveDataFile saveData, string path) { bool result = false; try { saveData.Store(path); result = true; } catch (IOException ex) { ShowErrorDialog(ex.Message); } catch (InvalidDataException ex) { ShowErrorDialog(ex.Message); } return(result); }