src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs
changeset 224 874de6d84a2e
parent 216 45d2dff788f2
child 225 b60e13ed75c8
--- a/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs	Mon Nov 23 18:36:27 2009 +0100
+++ b/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs	Tue Nov 24 07:50:17 2009 +0100
@@ -132,7 +132,9 @@
         {
             if (!UCTimeLine.IsDragging)
             {
-                UCTimeLine.Slider.Value = UserControlPlayer.Player.Position.TotalMilliseconds;
+                
+                    UCTimeLine.Slider.Value = UserControlPlayer.Player.Position.TotalMilliseconds;
+            
             }
             int SliderValue = (int)UCTimeLine.Slider.Value;
             if (UCTimeLine.FinishedDragging)
@@ -161,6 +163,14 @@
             UserControlPlayer.playerPause();
         }
 
+        public void SyncSourceClose()
+        {
+            //TimeLine and Player To Null
+            UCTimeLine.TimerTick -= UserControlTimeLine_TimerTick;
+            UCTimeLine = null;
+            UserControlPlayer.playerStop();
+            UserControlPlayer = null;
+        }
 
         public void UserControlPlayer_NewGestureRegognized(object sender, EventArgs e)
         {