--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Sun Oct 18 17:42:21 2009 +0200
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Sun Oct 25 12:38:45 2009 +0100
@@ -30,6 +30,7 @@
public event EventHandler PlayerOpened;
public event EventHandler PlayerStopOrPause;
+
public UserControlPlayer()
{
this.InitializeComponent();
@@ -74,17 +75,19 @@
{
MediaElementVideo.Pause();
if (PlayerStopOrPause != null)
- PlayerStopOrPause(this, new EventArgs());
+ PlayerStopOrPause(false, new EventArgs());
}
public void playerPlay()
{
MediaElementVideo.Play();
+ if (PlayerStopOrPause != null)
+ PlayerStopOrPause(true, new EventArgs());
}
public void playerStop()
{
MediaElementVideo.Stop();
if (PlayerStopOrPause != null)
- PlayerStopOrPause(this, new EventArgs());
+ PlayerStopOrPause(false, new EventArgs());
}
#endregion
@@ -99,6 +102,8 @@
try
{
MediaElementVideo.Play();
+ if (PlayerStopOrPause != null)
+ PlayerStopOrPause(true, new EventArgs());
}
catch (Exception ex) { }
}
@@ -108,6 +113,8 @@
try
{
MediaElementVideo.Pause();
+ if (PlayerStopOrPause != null)
+ PlayerStopOrPause(false, new EventArgs());
}
catch (Exception exx) { }
}
@@ -122,6 +129,8 @@
try
{
MediaElementVideo.Play();
+ if (PlayerStopOrPause != null)
+ PlayerStopOrPause(true, new EventArgs());
}
catch (Exception ex) { }
@@ -132,6 +141,8 @@
try
{
MediaElementVideo.Pause();
+ if (PlayerStopOrPause != null)
+ PlayerStopOrPause(false, new EventArgs());
}
catch (Exception exx) { }
//ButtonPlayPause.Background = FindResource("[Skin_1]_Play_button_xaml") as Brush;