Esempio n. 1
0
 private void editarButton_Click(object sender, EventArgs e)
 {
     if (CDaVisualizar is null)
     {
         editarAlbum editor = new editarAlbum(ref albumAVisualizar);
         editor.Show();
     }
     else
     {
         CrearCD editor = new CrearCD(ref CDaVisualizar, numDisco, true);
         editor.ShowDialog();
     }
     Close();
 }
Esempio n. 2
0
        private void crearCDToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string seleccion = vistaAlbumes.SelectedItems[0].SubItems[0].Text + "_" + vistaAlbumes.SelectedItems[0].SubItems[1].Text;
            Album  a         = Programa.miColeccion.devolverAlbum(seleccion);

            if (a.duracion.TotalMinutes < 80)
            {
                CrearCD formCD = new CrearCD(ref a);
                formCD.Show();
            }
            else
            {
                short   numDiscos = (short)Math.Ceiling((a.duracion.TotalMinutes / 80));
                CrearCD fCD       = new CrearCD(ref a, numDiscos);
                fCD.ShowDialog();
                for (short i = 2; i <= numDiscos; i++)
                {
                    DiscoCompacto temp   = Programa.miColeccion.cds.Last();
                    CrearCD       formCD = new CrearCD(ref temp, i);
                    formCD.ShowDialog();
                }
            }
        }