Пример #1
0
        public MainDataModel() : base(false, false)
        {
            this.Title = "Main Menu";
            this.UniqueID = "root";

            this.articles = new ArticleDataGroup();
            this.articles.Title = "Front Page";
            this.articles.Subtitle = "Your awful news feed.";
            this.articles.Group = this;
            this.articles.DataType = DATATYPE_MENU;
            this.Items.Add(articles);

            this.bookmarks = new BookmarkDataGroup(new BookmarksFeed());
            this.bookmarks.Title = "Bookmarks";
            this.bookmarks.Subtitle = "Threads you've bookmarked go here.";
            this.bookmarks.DataType = DATATYPE_MENU;
            this.bookmarks.Group = this;
            this.Items.Add(bookmarks);

            this.forums = new ForumsIndexGroup(new ForumsIndexFeed(StorageModelFactory.GetStorageModel()), pinned);
            this.forums.Title = "Forums Index";
            this.forums.Subtitle = "The Something Awful Forums.";
            this.forums.DataType = DATATYPE_MENU;
            this.forums.Group = this;
            
            this.pinned = this.forums.Pinned;
            this.pinned.Title = "Favorites";
            this.pinned.Subtitle = "Quick access to your favorite forums.";
            this.pinned.DataType = DATATYPE_MENU;
            this.pinned.Group = this;
            
            this.Items.Add(pinned);
            this.Items.Add(forums);
            this.ItemsSource = this.Items;
        }
Пример #2
0
 public ForumsIndexGroup() : base(true, false)
 {   
     this.UniqueID = "forums";
     this.pinned = new PinnedForumsGroup(this);
     
     this.categories = new Dictionary<ForumCategory, ICommonDataGroup>();
     this.categories.Add(ForumCategory.MAIN, CreateCategory(ForumCategory.MAIN));
     this.categories.Add(ForumCategory.DISCUSSION, CreateCategory(ForumCategory.DISCUSSION));
     this.categories.Add(ForumCategory.ARTS, CreateCategory(ForumCategory.ARTS));
     this.categories.Add(ForumCategory.COMMUNITY, CreateCategory(ForumCategory.COMMUNITY));
     this.categories.Add(ForumCategory.ARCHIVES, CreateCategory(ForumCategory.ARCHIVES));
     this.categories.Add(ForumCategory.OTHER, CreateCategory(ForumCategory.OTHER));
 }
Пример #3
0
 public ForumsIndexGroup(PinnedForumsGroup pinned, Func<ForumsIndexFeed> feedDelegate) : this()
 {
     this.createFeed = feedDelegate;
 }
Пример #4
0
 public ForumsIndexGroup(ForumsIndexFeed feed, PinnedForumsGroup pinned) : this() {
     this.createFeed = () => feed;
 }