Beispiel #1
0
        private void _view_CreateTaskButtonClicked(object sender, EventArgs e)
        {
            INewTaskModel    model     = new NewTaskModel();
            NewTaskView      view      = new NewTaskView();
            NewTaskPresenter presenter = new NewTaskPresenter(model, view);

            DialogResult result = view.ShowDialog();

            if (result != DialogResult.None)
            {
                if (result == DialogResult.OK)
                {
                    _model.AddTask(model.NewTask);
                }

                view.Close();
            }
        }
Beispiel #2
0
        private void Execute(object param)
        {
            switch (param.ToString())
            {
            case "Confirm":
                _view.Issue        = Issue;
                _view.DialogResult = true;
                _view.Close();
                break;

            case "Cancel":
                _view.DialogResult = false;
                break;

            case "Add":
                break;
            }
        }