Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            reproducir reprotemp = new reproducir();

            reprotemp.Url    = openFileDialog1.FileName;
            reprotemp.Nombre = openFileDialog1.SafeFileName.ToString();
            listareproduci.Add(reprotemp);
            cargar();
            xml();
        }
Ejemplo n.º 2
0
        public void leerxml()
        {
            XDocument documento = XDocument.Load(@"miXML.xml");
            var       listar    = from lis in documento.Descendants("Lista_Favoritos") select lis;

            foreach (XElement u in listar.Elements("Cancion"))
            {
                reproducir tmp = new reproducir();
                tmp.Nombre = u.Element("Titulo").Value;
                tmp.Url    = u.Element("Url").Value;
                listareproduci.Add(tmp);
            }
        }