private async void FetchTodos(object o)
        {
            parentWindow.Busy = true;
            parentWindow.ClearMessages();

            try
            {
                HabiticaClient client = HabiticaClient.GetInstance();

                IList <HabiticaTodo> templist = await client.GetTodos();

                TodoList.Clear();

                foreach (HabiticaTodo h in templist)
                {
                    TodoList.Add(new VMHabiticaTodo(h));
                }
            }
            catch (Exception e)
            {
                parentWindow.handleException(e);
            }
            finally
            {
                parentWindow.Busy = false;
            }
        }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (hasEnabledFinalTodoListItem && disabledTodoListItem.isComplete && !loading)
        {
            loading = true;
            StartCoroutine(LoadCityScene());
        }

        if (todoList.IsComplete() && !hasEnabledFinalTodoListItem)
        {
            hasEnabledFinalTodoListItem = true;
            todoList.Clear();
            todoList.AddItem(disabledTodoListItem);
            disabledTodoListItem.gameObject.SetActive(true);
        }
    }
Beispiel #3
0
 public void ClearAll()
 {
     _view.ClearAll();
     _todolist.Clear();
 }