private void saveProgramFile(StroopProgram newProgram) { if (FileManipulation.StroopProgramExists(prgNameTextBox.Text)) { DialogResult dialogResult = MessageBox.Show(LocRM.GetString("programExists", currentCulture), "", MessageBoxButtons.OKCancel); if (dialogResult != DialogResult.Cancel) { if (newProgram.saveProgramFile()) { MessageBox.Show(LocRM.GetString("programSave", currentCulture)); } this.Parent.Controls.Remove(this); } else { MessageBox.Show(LocRM.GetString("programNotSave", currentCulture)); } } else { if (newProgram.saveProgramFile()) { MessageBox.Show(LocRM.GetString("programSave", currentCulture)); } this.Parent.Controls.Remove(this); } }