public void remomeCurrentTask()
 {
     if (currentChild != null && currentTask != null)
     {
         DBWorker.removeCurrentTask(currentChild.getChild(), currentTask.getTask());
         currentChild.getChild().currentTasks.Remove(currentTask.getTask().DBId);
         Destroy(currentTask.gameObject);
         currentTask = null;
     }
 }
    public void addTaskToCurrent(TaskNote tn)
    {
        TaskNote taskNote = (TaskNote)Instantiate(taskNotePrefab, tasksLayout);

        taskNote.transform.localScale = new Vector3(1, 1, 1);
        taskNote.setTask(tn.getTask());
        currentChild.getChild().currentTasks.Add(taskNote.getTask().DBId);

        DBWorker.addCurrentTask(currentChild.getChild(), tn.getTask());

        showAddTask(false);
    }
 public void openTaskEditor(bool createNewTask)
 {
     if (createNewTask)
     {
         DataTransfer.Task = null;
         Application.LoadLevel(2);
     }
     else
     {
         if (currentTask != null)
         {
             DataTransfer.Task = (createNewTask ? null : currentTask.getTask());
             Application.LoadLevel(2);
         }
     }
 }
 public void taskChoised(TaskNote taskNote)
 {
     currentTaskView.setTask((taskNote == null ? null : taskNote.getTask()));
     if (currentTask != null)
     {
         currentTask.setCurrent(false);
     }
     currentTask = taskNote;
     if (currentTask != null)
     {
         currentTask.setCurrent();
     }
 }