Esempio n. 1
0
 /// <summary>
 /// This function is responsible for the operation of the buttons.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MyButtonClickEvent(object sender, EventArgs e)
 {
     if (sender == buttonAdd)
     {
         addItem.CreateTask(taskValidation, dayRepository, taskRepository, dayMapper, textBoxName, textBoxDate, richTextBoxDescription, statusValue, priorityValue);
     }
     else if (sender == buttonEdit)
     {
         addItem.CreateTask(taskValidation, dayRepository, taskRepository, dayMapper, textBoxName, textBoxDate, richTextBoxDescription, statusValue, priorityValue);
     }
     else if (sender == buttonClose)
     {
         this.Close();
     }
 }