Home > Software engineering >  C # WMP looping triggering time control
C # WMP looping triggering time control

Time:11-02

I use the WMP control broadcast video through the video time triggering time control I need this video loop for now but this time control will only be triggered played for the first time what should I do?
This is my time events

Private void timer1_Tick_1 (object sender, EventArgs e)
{//on the broadcast schedule open to turn off the lights
If (the Convert. ToInt32 (axWindowsMediaPlayer1. Ctlcontrols. CurrentPosition)==the Convert. ToInt32 (timervalue))
{
If (timervalue=https://bbs.csdn.net/topics/=Static_Value. Timer1)
{
Timer1. Enabled=false;
If (OpenOff==false)
{
OpenOff=true;
}
The else
{
OpenOff=false;
}
Cc. JianBian (5, OpenOff);
MessageBox. Show (" open ");
Timervalue=https://bbs.csdn.net/topics/Static_Value.Timer2;
Timer1. Enabled=true;
return;
}
If (timervalue=https://bbs.csdn.net/topics/=Static_Value. Timer2)
{
Timer1. Enabled=false;
If (OpenOff==true)
{
OpenOff=false;
}
The else
{
OpenOff=true;
}
Cc. JianBian (5, OpenOff);
MessageBox. Show (" lights off ");
Timervalue=https://bbs.csdn.net/topics/Static_Value.Timer3;
Timer1. Enabled=true;
return;
}
}
}
//video a looping
Private void axWindowsMediaPlayer1_PlayStateChange (object sender, AxWMPLib _WMPOCXEvents_PlayStateChangeEvent e)
{
If (axWindowsMediaPlayer1. PlayState==WMPLib. WMPPlayState. WmppsStopped)
{
Enclosing axWindowsMediaPlayer1. Ctlcontrols. Play ();
timer1.Start();

}
}
  • Related