private void saveButton_Click(object sender, EventArgs e) { //Check for errors string errors = newProject.ErrorCheck(); if (errors != "") { MessageBox.Show(this, "Project could not be saved because of the following errors:\n" + errors); return; } //Copy the edited project onto the old one oldProject.CloneFrom(newProject); //Save the project after closing the form if (editMode == Ogmo.ProjectEditMode.ErrorOnLoad) { finishAction = Ogmo.FinishProjectEditAction.LoadAndSaveProject; } else { finishAction = Ogmo.FinishProjectEditAction.SaveProject; } //Close the project editor Close(); }
private void cancelButton_Click(object sender, EventArgs e) { if (editMode == Ogmo.ProjectEditMode.NormalEdit) finishAction = Ogmo.FinishProjectEditAction.None; else finishAction = Ogmo.FinishProjectEditAction.CloseProject; Close(); }
private void cancelButton_Click(object sender, EventArgs e) { if (editMode == Ogmo.ProjectEditMode.NormalEdit) { finishAction = Ogmo.FinishProjectEditAction.None; } else { finishAction = Ogmo.FinishProjectEditAction.CloseProject; } Close(); }
private void saveButton_Click(object sender, EventArgs e) { //Check for errors string errors = newProject.ErrorCheck(); if (errors != "") { MessageBox.Show(this, "Project could not be saved because of the following errors:\n" + errors); return; } //Copy the edited project onto the old one oldProject.CloneFrom(newProject); //Save the project after closing the form if (editMode == Ogmo.ProjectEditMode.ErrorOnLoad) finishAction = Ogmo.FinishProjectEditAction.LoadAndSaveProject; else finishAction = Ogmo.FinishProjectEditAction.SaveProject; //Close the project editor Close(); }