private void addAllChildNodesAsContent(KonfigurationOneNote onenoteConf) { foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "one:Table": contents.Add(new ContentTable(childNode, page, onenoteConf)); break; case "one:T": contents.Add(new ContentText(childNode, page)); break; case "one:List": contents.Add(new ContentList(childNode, page)); break; case "one:Image": // Check, if thumbnail tag is set if (tags.Contains(onenoteConf.onenoteTags.thumbnailTag)) { Debug.WriteLine("thumbnailTag"); // Set image as thumbnail to page and set paragraph to home ContentImage img = new ContentImage(childNode, page); page.setThumbnail(img); this.isHome = true; } else { // check for locale tag if (checkLocationTag(onenoteConf)) { ContentImage img = new ContentImage(childNode, page); contents.Add(img); page.addImage(img); } } break; default: Debug.WriteLine("ERROR: Unknown type for paragraph: " + childNode.Name); // ignore type break; } } }
public void setThumbnail(ContentImage img) { this.thumbnail = img; }
public void addImage(ContentImage image) { this.images.Add(image); }