コード例 #1
0
        private void ManageProjectScopeButtonClick(object sender, EventArgs e)
        {
            var projectScopeForm = new ProjectScopeForm(this, Session);

            projectScopeForm.UpdateAndShow();
            Hide();
        }
コード例 #2
0
        private void AddTaskButtonClick(object sender, EventArgs e)
        {
            Session.ProjectScope.UpdateTask(MakeTaskFromFormValues());
            AlreadySaved = true;

            ProjectScopeForm.UpdateAndShow();
            Close();
        }
コード例 #3
0
        private void SaveTaskAsTemplateButtonClick(object sender, EventArgs e)
        {
            Session.ProjectTaskTemplates.AddTemplate(MakeTemplateFromFormValues());
            Session.ProjectTaskTemplatesPersister.PersistTemplates(Session.ProjectTaskTemplates, Session.TemplatesPath);

            ProjectScopeForm.UpdateAndShow();
            Close();
        }
コード例 #4
0
        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;
        }
コード例 #5
0
        private void ManageProjectScopeButtonClick(object sender, EventArgs e)
        {
            var projectScopeForm = new ProjectScopeForm(this, Session);

            projectScopeForm.UpdateAndShow();
            Hide();
        }