Example #1
0
        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");
            }
            ;
        }
Example #2
0
        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
Example #3
0
 public void setType(KmlSimpleFieldTypes type)
 {
     _type = type;
 }