public ServiceController(UserService svc) : base(UITableViewStyle.Grouped)
        {
            try {
                Title = svc.Name;

                Service = svc;

                _queries = new DialogSection("Queries");

                _feeds = new List <DialogSection> ();
                _feeds.Add(new DialogSection("Feeds"));

                _loadingSection = new DialogSection();
                _loadingElement = new LoadingElement();
                _loadingElement.Start();
                _loadingSection.Add(_loadingElement);

                Sections.AddRange(_feeds);

                Sections.Add(_loadingSection);

                NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add, HandleAddButton);
            } catch (Exception error) {
                Log.Error(error);
            }
        }
        public MovOrgContainerViewModel(ISectionsFactory sectionsFactory)
        {
            sectionsFactory.ErrorHandler = this;

            var sections = sectionsFactory.GenerateSections();

            Sections.AddRange(sections);

            SelectedSection = Sections.FirstOrDefault();
        }
示例#3
0
 public GroupSpec(string name, IEnumerable <SectionSpec> sections,
                  int repetitions)
 {
     Guard.Against.NullOrEmpty(name, nameof(name));
     Name = name;
     Guard.Against.NullOrEmpty(sections, nameof(sections));
     Sections.AddRange(sections);
     Guard.Against.OutOfRange(repetitions, nameof(repetitions), 1, int.MaxValue);
     Repetitions = repetitions;
 }
示例#4
0
        protected virtual void Assign(Line line)
        {
            Start            = line.Start;
            End              = line.End;
            AnchorPoint      = line.AnchorPoint;
            Position         = line.Position;
            VerticalTextType = line.VerticalTextType;

            Sections.Clear();
            Sections.AddRange(line.Sections.Select(s => (Section)s.Clone()));
        }
示例#5
0
    public async void populateSections()
    {
        if (await Sections.AnyAsync())
        {
            return;             // DB has been seeded
        }

        var sections = new List <Section>()
        {
            new Section {
                Name = "Gaming", Image = "gaming.png", description = "Talk about any game"
            },
            new Section {
                Name = "News", Image = "news.png", description = "Post news here and share your views on them!"
            },
            new Section {
                Name = "Software", Image = "wrench.png", description = "Discuess software here!"
            },
            new Section {
                Name = "Hardware", Image = "cogs.png", description = "Post about anything hardware"
            },
            new Section {
                Name = "Nature", Image = "nature.png", description = "Post beutriful pictures of nature and talk about locations you would like to visit"
            },
            new Section {
                Name = "Craftmanship", Image = "crafting.png", description = "How off your creations and build projects here, or ask for advice"
            },
            new Section {
                Name = "Art", Image = "art.png", description = "Drawings, textures or similar can be shared here and discuessed here!"
            },
            new Section {
                Name = "Music", Image = "music.png", description = "Talk about music, or share your own"
            },
            new Section {
                Name = "Books", Image = "books.png", description = "Share your thoughts about books you've read, or are writing"
            },
            new Section {
                Name = "Off-topic", Image = "offtopic.png", description = "Talk about anything random here"
            }
        };

        sections.Add(new Section {
            Name = "World of Warcraft", Image = "wow.png", description = "", parent = sections[0]
        });
        sections.Add(new Section {
            Name = "Diablo 3", Image = "diablo.png", description = "", parent = sections[0]
        });
        sections.Add(new Section {
            Name = "Overwatch", Image = "ow.png", description = "", parent = sections[0]
        });

        Sections.AddRange(sections);
        SaveChanges();
    }
 protected override async Task UpdateModels()
 {
     if (Sections == null)
     {
         Sections = new MvxObservableCollection <SectionDTO>(await _tutorialsProvider.GetTutorialSectionsAsync());
     }
     else
     {
         Sections.Clear();
         Sections.AddRange(await _tutorialsProvider.GetTutorialSectionsAsync());
     }
 }
示例#7
0
        protected virtual void Assign(Line line)
        {
            Start                      = line.Start;
            End                        = line.End;
            AnchorPoint                = line.AnchorPoint;
            Position                   = line.Position;
            VerticalTextType           = line.VerticalTextType;
            AndroidDarkTextHackAllowed = line.AndroidDarkTextHackAllowed;

            Sections.Clear();
            Sections.AddRange(line.Sections.Select(CreateSection));
        }
示例#8
0
        public override void CreateElements()
        {
            base.CreateElements();

            Sections.AddRange(_page.Sections.Select(ElementFactory.CreateSection));

            if (!Sections.Any())
            {
                Sections.Add(ElementFactory.CreateSection(_page.Title, _page.Options));
            }

            foreach (var section in Sections)
            {
                section.CreateElements();
            }
        }
        private void GetSections()
        {
            var listSections = RestApi.Request <ListSections>(ApiRequest.Sections).Result;

            this.Sections.AddRange(listSections.Sections);
            List <String> requestList = new List <string>();

            for (var i = 2; i <= listSections.PageCount; i++)
            {
                var url = $"?page={i}&per_page=30";
                requestList.Add(url);
            }

            var list = RestApi.MultiplyRequest <ListSections>(ApiRequest.Sections, requestList).Result;

            foreach (var item in list)
            {
                Sections.AddRange(item.Sections);
            }
        }
示例#10
0
 public Line(DateTime start, DateTime end, IEnumerable <Section> sections)
 {
     Start = start;
     End   = end;
     Sections.AddRange(sections);
 }
示例#11
0
 public PossiblePath(PossiblePath basePath, SectionEdge edge)
 {
     Sections.AddRange(basePath.Sections);
     Add(edge);
 }