private void RenderPage(int n) { EditorUtils.RenderPicture(ref PagePicture, this.rootPath + @"\Pictures\" + this.pages[n].PicturePath, maxWidth, maxHeight); if (PagePicture.Source == null) { this.Close(); } RenderTitleAndDescription(n); }
public bool ReadInfo() { XDocument doc = XDocument.Load(xmlPath); imagePath = doc.Element("Tutorial").Element("Info").Element("Image").Value; EditorUtils.RenderPicture(ref containerPicture, this.rootPath + @"\Pictures\" + imagePath, 200, 180); if (containerPicture.Source == null) { return(false); } containerPicture.Width = 200; containerPicture.Height = 180; this.title = doc.Element("Tutorial").Element("Info").Element("Title").Value; TitleTextBlock.Text = this.title; AuthorTextBlock.Text = doc.Element("Tutorial").Element("Info").Element("Author").Value; DescriptionTextBlock.Text = doc.Element("Tutorial").Element("Info").Element("Description").Value; return(true); }