private async void Page_Loaded(object sender, RoutedEventArgs e) { settings = await new UwpMemory().Read("settings.json", new Settings { }); Todoist = new TodoistService(settings.TodoistKey, settings.TodoistUserAgent); try { todayLabel = await Todoist.GetLabel("today"); } catch (Exception ex) { await ContentDialogTodoistKey.ShowAsync(); Todoist = new TodoistService(settings.TodoistKey, settings.TodoistUserAgent); todayLabel = await Todoist.GetLabel("today"); } Projects = Order(await Todoist.GetProjects()).ToList(); Labels = await Todoist.GetLabels(); Items = await Todoist.GetItems(); await new NotificationHandler().UpdateNotifications(Todoist); await Singleton <LiveTileService> .Instance.SampleUpdate(Todoist); OnPropertyChanged(nameof(InstanceLabels)); OnPropertyChanged(nameof(InstanceProjects)); OnPropertyChanged(nameof(InstanceItems)); parser = new TodoistParser(Projects, Labels); RedoTodos(); isLoaded = true; }