videourl = dt.Rows[0]["videourl"].ToString();
axWindowsMediaPlayer1.URL = videourl;
axWindowsMediaPlayer1.settings.rate = 1.0;
axWindowsMediaPlayer1.Ctlcontrols.play();
//axWindowsMediaPlayer1.settings.setMode("loop", true);
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
try
{
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
{
ShowImage(Files[selected], pictureBox);
timer2.Enabled = true;
pictureBox.Visible = true;
axWindowsMediaPlayer1.Visible = false;
axWindowsMediaPlayer1.Ctlcontrols.stop();
}
else if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsStopped)
{
}
}
catch (Exception ex)
{
Utils.LogHandler.HandleError(ex);
}
}
No comments:
Post a Comment