예제 #1
0
        public static void LoadRecent()
        {
            XmlDocument doc      = new System.Xml.XmlDocument();
            String      fileName = GetRecentFileName();

            if (File.Exists(fileName))
            {
                if (recent == null)
                {
                    recent = new List <GPLocationProvider>();
                }
                else
                {
                    recent.Clear();
                }
                doc.Load(fileName);
                foreach (XmlElement elem in doc.ChildNodes)
                {
                    if (elem.Name.Equals("recent"))
                    {
                        foreach (XmlElement child in elem.ChildNodes)
                        {
                            GPLocationProvider lp = new GPLocationProvider();
                            if (lp.readXmlNode(child))
                            {
                                recent.Add(lp);
                            }
                        }
                    }
                }
            }
        }