public string simpleFieldTypeToString(KmlSimpleFieldTypes value) { switch (value) { case KmlSimpleFieldTypes.tBool: return("bool"); case KmlSimpleFieldTypes.tDouble: return("double"); case KmlSimpleFieldTypes.tFloat: return("float"); case KmlSimpleFieldTypes.tUshort: return("ushort"); case KmlSimpleFieldTypes.tShort: return("short"); case KmlSimpleFieldTypes.tUint: return("uint"); case KmlSimpleFieldTypes.tInt: return("int"); default: return("string"); } ; }
public KmlSimpleField(XmlNode parent, Logger log) : this() { Log += log; if (null != parent.Attributes["name"]) { _name = parent.Attributes["name"].Value; } if (null != parent.Attributes["type"]) { _type = simpleFieldTypeFromString(parent.Attributes["type"].Value); } foreach (XmlNode node in parent.ChildNodes) { string key = node.Name.ToLower(); switch (key) { case "displayname": _displayName = node.InnerText; break; } ; } } // constructor
public void setType(KmlSimpleFieldTypes type) { _type = type; }