Beispiel #1
0
        private async Task LoadTasksFromDb()
        {
            var tasks = await new StorageService().GetTasks(Id);


            foreach (var asanaTask in tasks)
            {
                FillTaskCommands(asanaTask);
                await MapperService.FillSubtasksInfo(asanaTask);
            }

            Tasks.Clear();
            Tasks.AddRange(tasks);



            Project.TasksCount = ActiveTasks.Count;

            if (IsPinned)
            {
                PinService.CreateUpdateStartTileAsync(Project.name, Project.TasksCountText,
                                                      PinService.GetProjectDetailsUri(Id), false);
            }



            NotifyAll();
        }
Beispiel #2
0
 void PinToStart(object sender)
 {
     if (IsPinned)
     {
         PinService.RemoveTile(PinService.GetProjectDetailsUri(Id));
         IsPinned = false;
     }
     else
     {
         PinService.CreateUpdateStartTile(Project.name, Project.TasksCountText, PinService.GetProjectDetailsUri(Id), true);
         IsPinned = true;
     }
 }
Beispiel #3
0
        protected override async void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            Container.Resolve <IMessagePublisher>().Register(this);

            var id = long.Parse(NavigationManager.GetQueryParameter("id"));

            Id = id;
            var project = await new StorageService().Find <AsanaProject>(Id);

            //project.notes = TextHelper.SafeTruncate(project.notes, 100);
            Project = project;

            IsPinned = PinService.Exists(PinService.GetProjectDetailsUri(Id));
        }