public Media(Blog blog, string filename, string localfilename, Stream stream, bool preserveBandwidth) { _alignThumbnailToCenter = blog.AlignThumbnailToCenter; _createLinkToFullImage = blog.CreateLinkToFullImage; _fileName = filename; _localPath = localfilename; SaveImageStream(stream, preserveBandwidth); TranslateMimeType(); }
public Media(Blog blog, string fileName, string fileLocationInMediaLibrary, DateTime date) { _alignThumbnailToCenter = blog.AlignThumbnailToCenter; _createLinkToFullImage = blog.CreateLinkToFullImage; _fileName = fileName; _localPath = fileLocationInMediaLibrary; _datetime = date; TranslateMimeType(); }
/// <summary> /// Searches for a secondary ShellTile for a blog. /// </summary> /// <param name="blog">Blog to find a tile for. If null, searches for the currently active blog.</param> public ShellTile FindBlogTile(Blog blog=null) { Uri blogUri = App.MasterViewModel.BuildBlogTileUrl(blog ?? CurrentBlog); return ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri == blogUri); }
public Uri BuildBlogTileUrl(Blog blog) { return new Uri("/BlogPanoramaPage.xaml?Blog=" + blog.Xmlrpc, UriKind.Relative); }
public EditPostRPC(Blog blog, Post post) : base(blog.Xmlrpc, "metaWeblog.editPost", blog.Username, blog.Password) { _content = XMLRPCTable.metaWeblog_editPost; Post = post; }
public GetCategoriesRPC(Blog blog) : base(blog.Xmlrpc, METHODNAME_VALUE, blog.Username, blog.Password) { _content = XMLRPCTable.wp_getCategories; BlogId = blog.BlogId; }
public GetRecentPostsRPC(Blog blog) : base(blog.Xmlrpc, METHODNAME_VALUE, blog.Username, blog.Password) { _content = XMLRPCTable.mt_getRecentPostTitles; BlogId = blog.BlogId; }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (this.NavigationContext.QueryString.TryGetValue("blog_id", out blog_id) && this.NavigationContext.QueryString.TryGetValue("comment_id", out comment_id)) { List<Blog> blogs = DataService.Current.Blogs.ToList(); foreach (Blog currentBlog in blogs) { if (currentBlog.isWPcom() || currentBlog.hasJetpack()) { string currentBlogID = currentBlog.isWPcom() ? Convert.ToString(currentBlog.BlogId) : currentBlog.getJetpackClientID(); if (currentBlogID == blog_id) { BlogName.Text = currentBlog.BlogName; _currentBlog = currentBlog; } } } } if (_currentBlog == null) { if (NavigationService.CanGoBack) { NavigationService.GoBack(); } return; } GetAllCommentsRPC rpc = new GetAllCommentsRPC(_currentBlog); rpc.Number = 20; rpc.Offset = 0; rpc.Completed += OnFetchCurrentBlogCommentsCompleted; rpc.ExecuteAsync(); UIThread.Invoke(() => { ApplicationBar.IsVisible = false; App.WaitIndicationService.ShowIndicator(_localizedStrings.Messages.Loading); }); }