Example #1
0
        private async void LoadActivities()
        {
            IsBusy = true;

            try
            {
                var activity = await this.SimediaSDK.ActivityService.ActiveActivityAsync();

                //List<Section> sesionlist = new List<Section>();
                //foreach (var item in activity.data)
                //{
                //    var grouptasks = activity.included.Where(c => c.id == item.relationships.task.data.id);
                //    var sesion = new Section
                //    {
                //        Title = item.attributes.name,
                //        List = grouptasks,
                //    };
                //    sesionlist.Add(sesion);
                //}
                //List = sesionlist;

                var pr = new ProjectAcute {
                    Name = "TESTING", Description = "DESCRIPTION"
                };
                var pr1 = new ProjectAcute {
                    Name = "TESTING 1", Description = "DESCRIPTION 2"
                };
                var pr2 = new ProjectAcute {
                    Name = "TESTING 3", Description = "DESCRIPTION 3"
                };
                Project = new ObservableCollection <ProjectAcute>();
                Project.Add(pr);
                Project.Add(pr1);
                Project.Add(pr2);

                /*var groupedProjects = Projects
                 *  //.OrderBy(c => c.Group.Order)
                 *  //.GroupBy(c => c.Group.Name.ToUpper())
                 *  .Select(c => new ObservableGroupCollection<Project>(c))
                 *  .ToList();
                 *
                 * Projects = new ObservableCollection<Project>(groupedProjects);*/
            }
            catch (Exception ex)
            {
                //await DisplayDataErrorMessage();
            }
            finally
            {
                IsBusy = false;
            }
        }
Example #2
0
        public AccordionViewPage(ProjectAcute projec, ObservableCollection <Section> list)
        {
            instance = this;

            this.Title = projec.Name;
            var settings = new ToolbarItem
            {
                Icon    = "hamburger.png",
                Command = new Command(this.OpenMenu),
            };

            SimediaSDK = new SimediaSDK("https://acute360.com/");
            this.ToolbarItems.Add(settings);


            var template = new DataTemplate(typeof(TaskListPage));
            //var template = new DataTemplate(typeof(DefaultTemplate));


            var view = new AccordionView(template);

            //var view = new Page1(template);
            view.SetBinding(AccordionView.ItemsSourceProperty, "List");
            view.Template.SetBinding(AcuteSectionView.TitleProperty, "Title");
            view.Template.SetBinding(AcuteSectionView.DescriptionProperty, "Description");
            view.Template.SetBinding(AcuteSectionView.DueDateProperty, "DueDate");
            view.Template.SetBinding(AcuteSectionView.ItemsSourceProperty, "List");

            //view.BindingContext = new AccordionPageModel();

            view.BindingContext = new ViewModel
            {
                List = list
            };

            this.Content = view;
        }
 private async Task MoreProject(ProjectAcute project)
 {
     SelectedProject = project;
     await App.Navigator.PushAsync(new AccordionViewPage(project, List));
 }