public void createNoteClicked(object sender, RoutedEventArgs e) { AbstractActionSender actionSender = new ActionSender(); if (ImportantCheckBox.IsChecked == true) { Console.WriteLine("important note checked"); actionSender.Implementor = new ImportantImplementation(TopicAction, TextAction, IsImportantAction); } else { Console.WriteLine("not important note"); actionSender.Implementor = new NotImportantImplementation(TopicAction, TextAction); } actionSender.SendNoteInfo(TopicFieldText, TextFieldText); DateTime deadline = new DateTime(); try { deadline = (DateTime)DeadlinePicker.SelectedDate; } catch (Exception ex) { Console.WriteLine(ex.Message); } if (deadline < DateTime.Today) { Console.WriteLine("Deadline is in the past, and is not been setted"); } else { DeadlineAction(deadline); } this.Close(); }
public override void CallSender() { TA = TSender; TA.BeginInvoke(null, null); }