private void button4_Click(object sender, EventArgs e) { if (video.State != StateFlags.Running) { video.Play(); } }
private void audio_play_Click(object sender, EventArgs e) { if (vid != null) { audio_play.Enabled = false; audio_play.Visible = false; audio_stop.Enabled = true; audio_stop.Visible = true; audio_pause.Enabled = true; audio_pause.Visible = true; Video_Timer_Enable = true; Video_Play(); vid.Play(); } }
private void button1_Click(object sender, EventArgs e) { if (video.Playing) { button1.Text = "Играть"; video.Pause(); } else { button1.Text = "Пауза"; video.Play(); } }
public void Play() { if (checkFileName()) { InitVideo(); if (isVideo) { _video.Play(); } else { _audio.Play(); } FixSize(); } }
public void PlayVideo(String nombrevideo) { if (nombrevideo == SaquePlano || nombrevideo == SaqueConEfecto) { try { Microsoft.DirectX.AudioVideoPlayback.Video video = new Microsoft.DirectX.AudioVideoPlayback.Video(nombrevideo); //set the System.Windows.Forms.Control to play it in (e.g a panel) video.Owner = this; //Play the video (put this in a buttons click event) video.Audio.Volume = 0; video.Play(); } catch { //nothing } } }