Beispiel #1
0
 private void RemoveTask_button_Click(object sender, EventArgs e)
 {
     try
     {
         TaskAdministration.RemoveTask(Task);
         this.DialogResult = DialogResult.OK;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
        private void TaskToAppointment_button_Click(object sender, EventArgs e)
        {
            CalendarEvent calendarTask = new CalendarEvent(Task.Titel, Task.Notes, DateTime.Now, DateTime.Now, Task.AccountEmail);
            AgendaAddForm form         = new AgendaAddForm(Account, CalendarEventAdministration, calendarTask);

            this.Visible = false;
            form.Detail_Refresh();
            var closing = form.ShowDialog();

            if (closing == DialogResult.Yes)
            {
                CalendarEventAdministration = form.CalendarEventAdministration;
                TaskAdministration.RemoveTask(Task);
                this.DialogResult = DialogResult.OK;
            }
            else if (closing == DialogResult.OK)
            {
                CalendarEventAdministration = form.CalendarEventAdministration;
                this.Visible = true;
            }
        }