Ejemplo n.º 1
0
 private void OpenVideo()
 {
     try
     {
         if (_video == null)
         {
             InitVideo();
         }
         else
         {
             _video.Open(_filePath);
         }
         if (_audio != null)
         {
             _audio.Stop();
         }
         isVideo = true;
     }
     catch
     {
         if (_audio == null)
         {
             InitVideo();
         }
         else
         {
             _audio.Open(_filePath);
         }
         if (_video != null)
         {
             _video.Stop();
         }
         isVideo = false;
     }
 }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            DialogResult D = openFileDialog1.ShowDialog();

            if (D == DialogResult.OK)
            {
                video = new Microsoft.DirectX.AudioVideoPlayback.Video(openFileDialog1.FileName);
                video.Open(openFileDialog1.FileName);
                video.Owner = panel1;
            }
        }