Exemplo n.º 1
0
        private void AddTask()
        {
            MessageBox.Show("10");
            AddTaskViewModel ChangeStageVM = new AddTaskViewModel();
            AddTaskView      ChangeStageV  = new AddTaskView();

            ChangeStageV.DataContext  = ChangeStageVM;
            AddTaskViewModel.OnClose += (closeResult) =>
            {
                ChangeStageV.Close();
            };
            ChangeStageV.ShowDialog();
        }
Exemplo n.º 2
0
        public void OpenWindow()
        {
            AttachAdorner(dockPanel, adorner);
            TaskVM taskVM  = new TaskVM();
            var    addTask = new AddTaskView()
            {
                Owner       = GetWindow(mainWindow),
                DataContext = taskVM
            };

            if (addTask.ShowDialog().Value)
            {
                TasksVM.Tasks.Add(taskVM);
            }
        }