Beispiel #1
0
        void _view_AddTaskEvent(object sender, EventArgs e)
        {
            Model.Task       task       = new Model.Task();
            IBrowser         browser    = new TaskBrowser();
            BrowserPresenter bPresenter = new BrowserPresenter(browser);

            bPresenter.Finished += bPresenter_Finished;
            bPresenter.ShowDialog(task);
        }
Beispiel #2
0
        void _view_EditTaskEvent(object sender, EventArgs e)
        {
            if (_view.getTaskList().SelectedItem == null)
            {
                throw new Exception("Задание не выбрано");
            }
            Model.Task       task       = _view.getTaskList().SelectedItem as Model.Task;
            IBrowser         browser    = new TaskBrowser();
            BrowserPresenter bPresenter = new BrowserPresenter(browser);

            bPresenter.Finished += bPresenter_Finished;
            bPresenter.ShowDialog(task, true);
        }