private void AddTask()
 {
     TodoTasks.Add(new TaskModel
     {
         Name  = "New Task",
         Notes = ""
     });
 }
Пример #2
0
 public void AddTask(TodoTask task)
 {
     task.Id       = Guid.NewGuid();
     task.IconData = _geometryData.Info;
     task.Type     = TaskType.Info;
     task.Title    = Title;
     TodoTasks.Add(task);
     ToDoTask = new TodoTask {
         CanBeFinished = true
     };
 }
Пример #3
0
        public async Task ReadTasksAsync(string taskPath)
        {
            var tasks = await _taskService.ReadTaskAsync(taskPath, TodoTasks).ConfigureAwait(true);

            TodoTasks.Clear();
            foreach (var todoTask in tasks)
            {
                if (todoTask.Type != TaskType.Info)
                {
                    continue;
                }
                todoTask.IconData = _geometryData.Info;
                TodoTasks.Add(todoTask);
            }
        }
 private void CreateUserTasks(IEnumerable <Transaction> wrongAccountPayments, string reference)
 {
     foreach (var transaction in wrongAccountPayments)
     {
         var ledgerAccount = this.ledgerBuckets[transaction.BudgetBucket];
         TodoTasks.Add(
             new TransferTask(
                 $"A {transaction.BudgetBucket.Code} payment for {transaction.Amount:C} on the {transaction.Date:d} has been made from {transaction.Account}, but funds are stored in {ledgerAccount}. Use reference {reference}",
                 true)
         {
             Amount             = -transaction.Amount,
             SourceAccount      = ledgerAccount,
             DestinationAccount = transaction.Account,
             BucketCode         = transaction.BudgetBucket.Code,
             Reference          = reference
         });
     }
 }
Пример #5
0
 public void DeleteTask(TodoTask task)
 {
     TodoTasks.Remove(task);
 }