Beispiel #1
0
 public LinkView(Guid mapUid, CompendiumNode originNode, XmlDocument doc, XmlElement parent, LinkType linkType)
     : this(doc, parent, linkType)
 {
     AddAttributeByKeyValue("id", mapUid.ToLongString());
     AddAttributeByKeyValue("created", originNode.Created);
     AddAttributeByKeyValue("lastModified", originNode.LastModified);
 }
Beispiel #2
0
 public LinkView(Guid mapUid, IGlymaRelationship relationship, XmlDocument doc, XmlElement parent, LinkType linkType)
     : this(doc, parent, linkType)
 {
     AddAttributeByKeyValue("id", mapUid.ToLongString());
     AddAttributeByKeyValue("created", relationship.Created);
     AddAttributeByKeyValue("lastModified", relationship.LastModified);
     
 }
Beispiel #3
0
        public CompendiumXmlMap(Guid mapId)
        {
            var doctype = Doc.CreateDocumentType("model", null, "Compendium.dtd", null);
            Doc.AppendChild(doctype);

            var model = Doc.CreateElement(string.Empty, "model", string.Empty);
            var attr = Doc.CreateAttribute("rootview");
            attr.Value = mapId.ToLongString();
            model.Attributes.Append(attr);
            Doc.AppendChild(model);


            _xmlElementViews = Doc.CreateElement(string.Empty, "views", string.Empty);
            model.AppendChild(_xmlElementViews);

            _xmlElementNodes = Doc.CreateElement(string.Empty, "nodes", string.Empty);
            model.AppendChild(_xmlElementNodes);

            _xmlElementLinks = Doc.CreateElement(string.Empty, "links", string.Empty);
            model.AppendChild(_xmlElementLinks);

        }
Beispiel #4
0
 public View(Guid mapId, CompendiumNode node, XmlDocument doc, XmlElement parent)
     : base(doc, parent)
 {
     AddAttributeByKeyValue("viewref", mapId.ToLongString());
     AddAttributeByKeyValue("noderef", node.Id.ToLongString());
     AddAttributeByKeyValue("XPosition", ((int)node.XPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("YPosition", ((int)node.YPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("showTags", "true");
     AddAttributeByKeyValue("showText", "true");
     AddAttributeByKeyValue("showTrans", "true");
     AddAttributeByKeyValue("showWeight", "true");
     AddAttributeByKeyValue("smallIcon", "false");
     AddAttributeByKeyValue("hideIcon", "false");
     AddAttributeByKeyValue("labelWrapWidth", "25");
     AddAttributeByKeyValue("fontsize", "12");
     AddAttributeByKeyValue("fontface", "Dialog");
     AddAttributeByKeyValue("fontstyle", "0");
     AddAttributeByKeyValue("foreground", "-16777216");
     AddAttributeByKeyValue("background", "-1");
 }