private void ManageProjectScopeButtonClick(object sender, EventArgs e) { var projectScopeForm = new ProjectScopeForm(this, Session); projectScopeForm.UpdateAndShow(); Hide(); }
private void AddTaskButtonClick(object sender, EventArgs e) { Session.ProjectScope.UpdateTask(MakeTaskFromFormValues()); AlreadySaved = true; ProjectScopeForm.UpdateAndShow(); Close(); }
private void SaveTaskAsTemplateButtonClick(object sender, EventArgs e) { Session.ProjectTaskTemplates.AddTemplate(MakeTemplateFromFormValues()); Session.ProjectTaskTemplatesPersister.PersistTemplates(Session.ProjectTaskTemplates, Session.TemplatesPath); ProjectScopeForm.UpdateAndShow(); Close(); }
private void EditTaskFormClosing(object sender, FormClosingEventArgs e) { if (AlreadySaved) { return; } var answer = MessageBox.Show(Resources.EditTaskForm_SaveChanges, Resources.EditTaskForm_SaveChangesCaption, MessageBoxButtons.YesNoCancel); if (answer == DialogResult.Yes) { Session.ProjectScope.AddTask(MakeTaskFromFormValues()); ProjectScopeForm.UpdateAndShow(); return; } if (answer == DialogResult.No) { ProjectScopeForm.UpdateAndShow(); return; } e.Cancel = true; }