public PostsDialog(mode dialogMode, PostsPage page, int fieldID = -1) : this() { CurMode = dialogMode; ID = fieldID; CurPage = page; FillFields(); }
public Plugin() { Routes = new List<Route>() { new PathRoute() { Path = "r", Handler = async () => { var posts = client.Subreddit("AskReddit").Posts.New; var uw = new PostsPage() { Version = 0.1f, Title = "r/all", Data = new Pagination<List<Post>>() { Items = (List<Post>)posts.Select((post, index) => { return new Post() { Id = post.Id, Title = post.Title, Nsfw = post.NSFW, Likes = post.UpVotes, Authors = new List<User>() { new User() { Username = post.Author, } } }; }) } }; return new UniviewResponse() { Mime = "application/uniview+json", Data = uw }; } } }; }
public ApplicationPage() { InitializeComponent(); postView = new PostPage(); postsView = new PostsPage(); submitPage = new SubmitPostPage(); memesPage = new MemesPage(); settingsPage = new SettingsPage(); PageNavigationManager.SubpageContentControl = contentArea; PageNavigationManager.SwitchToSubpage(postsView); }