Exemplo n.º 1
0
        private async Task LoadGroupData(ClubAspect aspect, ClubAspectVM vm)
        {
            vm.Items.Clear();

            try
            {
                var items = await aspect.LoadData();

                foreach (var i in items)
                    vm.Items.Add(i);


                vm.None = items.Count() == 0;
                vm.IsBusy = false;
                vm.HasNoData = false;
            }
            catch (Exception e)
            {
                vm.IsBusy = false;
                vm.HasNoData = true;
            }
            return; 
        }
Exemplo n.º 2
0
        private void LoadGroups()
        {
            foreach (ClubAspect a in GlobalConfig.Aspects)
            {
                var g = new ClubAspectVM(a.Name, a.Title) { Orientation = a.IsSingleColumn?Orientation.Horizontal:Orientation.Vertical, MaxColumns = a.IsSingleColumn?1:-1 };
                this.AllGroups.Add(g);
                g.IsBusy = true;
            }

            //var group1 = new ClubAspectVM("execs",
            //        "Committee");
            //this.AllGroups.Add(group1);
            //group1.IsBusy = true;

            //var group2 = new ClubAspectVM("events",
            //        "Events");
            //group2.Orientation = Orientation.Horizontal;
            //group2.MaxColumns = 1;
            //this.AllGroups.Add(group2);
            //group2.IsBusy = true;

            //var group3 = new ClubAspectVM("posts",
            //        "Blog Posts");
            //group3.Orientation = Orientation.Horizontal;
            //group3.MaxColumns = 1;
            //this.AllGroups.Add(group3);
            //group3.IsBusy = true;
        }