Exemplo n.º 1
0
        private void addMilestone_Recognition(object sender, Microsoft.Ink.InkEditRecognitionEventArgs e)
        {
            string title = e.RecognitionResult.ToString();

            AddMilestoneDialog dlg = new AddMilestoneDialog(CurrentProject, title);

            if (DialogResult.OK == dlg.ShowDialog(this))
            {
                HourglassDialog dialog = new HourglassDialog();
                dialog.Message = "Creating milestone...";
                dialog.Show();
                Application.DoEvents();

                using (dialog)
                {
                    CurrentProject.CreateMilestone(title, dlg.Deadline, dlg.Responsible,
                    dlg.Notify);
                }

                RefreshMilestones();
            }

            ClearInput();
        }
Exemplo n.º 2
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Milestone milestone = SelectedMilestone;
            Project project = CurrentProject;

            if (project != null && milestone != null)
            {
                AddMilestoneDialog dlg = new AddMilestoneDialog(project, null, milestone);
                if (DialogResult.OK == dlg.ShowDialog(this))
                {
                    milestone.Update(milestone.Title, dlg.Deadline,
                        dlg.Responsible, dlg.ShiftOthers, dlg.AvoidWeekends,
                        dlg.Notify);
                    RefreshMilestones();
                }
            }
        }