Exemplo n.º 1
0
 public void LoadDefault()
 {
     XDocument xDoc = XDocument.Parse(Resource.music);
     MusicList.Clear();
     foreach (var e in xDoc.Element("music").Elements("track"))
     {
         Music m = new Music();
         m.LoadFromElement(e);
         MusicList.Add(m);
     }
 }
Exemplo n.º 2
0
        public void LoadDefault()
        {
            XDocument xDoc = XDocument.Parse(Resource.music);

            MusicList.Clear();
            foreach (var e in xDoc.Element("music").Elements("track"))
            {
                Music m = new Music();
                m.LoadFromElement(e);
                MusicList.Add(m);
            }
        }
Exemplo n.º 3
0
        public bool LoadMusic(string filename)
        {
            if (!File.Exists(filename)) return false;

            XDocument xDoc = XDocument.Load(filename);
            MusicList.Clear();
            foreach (var e in xDoc.Element("music").Elements("track"))
            {
                Music m = new Music();
                m.LoadFromElement(e);
                MusicList.Add(m);
            }

            return true;
        }
Exemplo n.º 4
0
        public bool LoadMusic(string filename)
        {
            if (!File.Exists(filename))
            {
                return(false);
            }

            XDocument xDoc = XDocument.Load(filename);

            MusicList.Clear();
            foreach (var e in xDoc.Element("music").Elements("track"))
            {
                Music m = new Music();
                m.LoadFromElement(e);
                MusicList.Add(m);
            }

            return(true);
        }