The last portion of code in my previous post actually doesn't give the desired behaviour I don't think. If anyone stumbles across this solution in the future the code for repeating a single file is simpler since we don't need to use the wmppsPlaying event, we can just use wmppsStopped (which is not always the case when playing from a playlist.) The amended code for repeating a single file is attached.
Also as an additional note if you want the media player to loop through an entire playlist (not just repeat one song, which the code above achieves) then you can use;
player.settings.setMode("loop", true);
Also as an additional note if you want the media player to loop through an entire playlist (not just repeat one song, which the code above achieves) then you can use;
player.settings.setMode("l
// If you are playing a single file private void player_StatusChange(object sender, EventArgs e) { if (player.playState == WMPLib.WMPPlayState.wmppsStopped) { // simply use the play command to start the track again player.Ctlcontrols.play(); } }
참조 : http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CSharp/Q_23967223.html
'예전것 > .NET Compact Framework' 카테고리의 다른 글
C#에서의 using (0) | 2009.11.06 |
---|---|
C# 전역변수 사용법 (폼 간에) (0) | 2009.11.04 |
About Thread (C#) - .net compact framework (0) | 2009.11.02 |