Esempio n. 1
0
File: KmlIO.cs Progetto: hnjm/libKml
        public static List <T> findElementsOfType <T>(KmlFile file, Type t)
        {
            List <object> tempList = new List <object>();

            file.findElementsOfType <T>(tempList);
            List <T> result = tempList.ConvertAll(delegate(object x) { return((T)x); });

            return(result);
        }
Esempio n. 2
0
File: KmlIO.cs Progetto: hnjm/libKml
        public static KmlFile fromFile(string filename, Logger log)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(filename);
            KmlFile result = new KmlFile(doc, log);

            return(result);
        }
Esempio n. 3
0
File: KmlIO.cs Progetto: hnjm/libKml
 public static bool toFile(KmlFile doc, string filename)
 {
     try {
         XmlDocument result = doc.ToXml();
         if (null != result)
         {
             result.Save(filename);
             return(true);
         }
         return(false);
     } catch (Exception ex) {
         Console.WriteLine(ex.Message);
         return(false);
     }
 }