Esempio n. 1
0
 public PostsDialog(mode dialogMode, PostsPage page, int fieldID = -1) : this()
 {
     CurMode = dialogMode;
     ID      = fieldID;
     CurPage = page;
     FillFields();
 }
Esempio n. 2
0
		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
						};
					}
				}
			};
		}
Esempio n. 3
0
 public ApplicationPage()
 {
     InitializeComponent();
     postView     = new PostPage();
     postsView    = new PostsPage();
     submitPage   = new SubmitPostPage();
     memesPage    = new MemesPage();
     settingsPage = new SettingsPage();
     PageNavigationManager.SubpageContentControl = contentArea;
     PageNavigationManager.SwitchToSubpage(postsView);
 }