Esempio n. 1
0
 public AddTaskViewModel(AddTaskWindow ThisWindow)
 {
     AddCommand = new RelayCommand(o =>
     {
         ThisWindow.Close();
     });
 }
Esempio n. 2
0
 public void AddTask(AddTaskWindow newTask) //action for AddTaskWindow
 {
     try
     {
         Controller.AddTask(Email, Title, Description, DueDate);
         MessageBox.Show("Task added successfully!");
         newTask.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }