コード例 #1
0
        private void btn_Click(object sender, EventArgs e)
        {
            PulsacionEventArgs pulsacionesArgs = new PulsacionEventArgs();

            cont++;
            if (cont % 2 == 0)
            {
                btn.Image            = imgPlay;
                pulsacionesArgs.play = false;
            }
            else
            {
                btn.Image            = imgPause;
                pulsacionesArgs.play = true;
            }

            Pulsacion?.Invoke(this, pulsacionesArgs);
            Refresh();
        }
コード例 #2
0
 private void controlMultimedia_Pulsacion(object sender, PulsacionEventArgs e)
 {
     try
     {
         directoryName = tbxDir.Text;
         if (directoryName != "")
         {
             if (e.play)
             {
                 directoryInfo = new DirectoryInfo(directoryName);
                 obtenerArchivosImagenes();
                 timer.Start();
             }
             else
             {
                 timer.Stop();
             }
         }
     }
     catch (ArgumentException ex) { mensajeError(ex.Message); }
     catch (System.Security.SecurityException ex) { mensajeError(ex.Message); }
     catch (PathTooLongException ex) { mensajeError(ex.Message); }
     catch (DirectoryNotFoundException ex) { mensajeError(ex.Message); }
 }