public void recorrer() { //Nodos_C p; if (actual != null) { actual = addlistCirculares.primero.enlace; // siguiente nodo al de acceso // do while (actual == addlistCirculares.primero.enlace) { if (lis_canciones.SelectedIndex < lis_canciones.Items.Count - 1) { // MessageBox.Show("NO A LLEGADO A LA ULTIMA CANCION"); lis_canciones.SelectedIndex += 1; //recorrer(); actual = actual.enlace; } else { //MessageBox.Show("PASAR A LA PRIMER CANCION DE NUEVO"); axWindowsMediaPlayer1.URL = buscarCanciones.FileNames[0]; lis_canciones.SelectedIndex = 0; actual = actual.enlace; } //MessageBox.Show("\t" + p.dato); //MessageBox.Show("REDIRRECIONANDO NODOS"); actual = actual.enlace; }// while (p != addpath.primero.enlace); } else { MessageBox.Show("\t LISTA CIRCULAR VACIA"); } }
private void lis_canciones_SelectedIndexChanged(object sender, EventArgs e) { try { if (lis_canciones.SelectedIndex != -1) { axWindowsMediaPlayer1.URL = buscarCanciones.FileNames[lis_canciones.SelectedIndex]; int select = lis_canciones.SelectedIndex; actual = new Nodo_C(buscarCanciones.FileNames[select]); arch = buscarCanciones.FileNames[lis_canciones.SelectedIndex]; bunifuImagebtn_pause.Visible = true; btn_play.Visible = false; lbl_nom.Text = buscarCanciones.SafeFileNames[lis_canciones.SelectedIndex]; } } catch (IndexOutOfRangeException exi) { MessageBox.Show("ERROR" + exi); } }