Ejemplo n.º 1
0
 public void onAddPressed(object sender, EventArgs e)
 {
     EditableTodo = new ToDoItem();
     EditableTodo.SetMainWindow(this);
     TodosPanel.Children.Add(EditableTodo);
     TodoItems.Add(EditableTodo);
 }
Ejemplo n.º 2
0
 private void RenderTodoItems()
 {
     foreach (ToDoTask task in repo.CurrentDate.Tasks)
     {
         ToDoItem tdi = new ToDoItem(task);
         tdi.SetMainWindow(this);
         tdi.TodoDescription.IsReadOnly      = true;
         tdi.TodoName.IsReadOnly             = true;
         tdi.TodoDescription.BorderThickness = new Thickness(0);
         tdi.TodoName.BorderThickness        = new Thickness(0);
         tdi.DoneButton.Visibility           = Visibility.Hidden;
         tdi.DeleteButton.Visibility         = Visibility.Visible;
         if (tdi.TodoTask.IsDone)
         {
             tdi.TodoName.TextDecorations = TextDecorations.Strikethrough;
             tdi.TaskCheckBox.IsChecked   = true;
         }
         tdi.TaskCheckBox.Visibility = Visibility.Visible;
         TodosPanel.Children.Add(tdi);
         TodoItems.Add(tdi);
         RenderActualDays();
     }
 }