Esempio n. 1
0
        public static string GetXml(YwrFile ywr)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (ywr?.Waypoints != null)
            {
                WaypointRecordList.WriteXmlNode(ywr.Waypoints, sb, 0);
            }

            return(sb.ToString());
        }
Esempio n. 2
0
        public static YwrFile GetYwr(XmlDocument doc, string inputFolder = "")
        {
            YwrFile r = new YwrFile();

            var node = doc.DocumentElement;

            if (node != null)
            {
                r.Waypoints = WaypointRecordList.ReadXmlNode(node);
            }

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }