src/FingersDance.Control.Player/UserControlPlayer.xaml.cs
changeset 121 32611257e99f
parent 119 7a370bfb4d77
child 122 b489c2756a13
--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Thu Sep 24 18:31:09 2009 +0200
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Fri Sep 25 02:56:57 2009 +0200
@@ -24,13 +24,8 @@
         public UserControlPlayer()
         {
             this.InitializeComponent();
-            initPlayer();
-        }
-
-        public UserControlPlayer(string path)
-        {
-            this.InitializeComponent();
-            initPlayer(path);
+            MediaElementVideo.LoadedBehavior = MediaState.Manual;
+            MediaElementVideo.UnloadedBehavior = MediaState.Manual;
         }
 
         #region Properties
@@ -58,7 +53,7 @@
 
         #region Methodes
         void initPlayer()
-        {
+        {/*
             //init player
             isPlaying = false;
             //Pour se diriger vers le Dossier ressources du projet et non le bin/ressources
@@ -68,18 +63,14 @@
             MediaElementVideo.Source = new Uri(@"" + info.FullName.ToString() + "\\Resources\\Lake.wmv", UriKind.Relative);
             MediaElementVideo.LoadedBehavior = MediaState.Manual;
             MediaElementVideo.UnloadedBehavior = MediaState.Manual;
-            MediaElementVideo.ScrubbingEnabled= true;
+            MediaElementVideo.ScrubbingEnabled= true;*/
         }
 
         public void initPlayer(string path)
         {
             //init player
             isPlaying = false;
-            //Pour se diriger vers le Dossier ressources du projet et non le bin/ressources
-            //DirectoryInfo info = Directory.GetParent(@".");
-            MediaElementVideo.Source = new Uri(path, UriKind.Relative);
-            MediaElementVideo.LoadedBehavior = MediaState.Manual;
-            MediaElementVideo.UnloadedBehavior = MediaState.Manual;
+            MediaElementVideo.Source = new Uri(path);
             MediaElementVideo.ScrubbingEnabled = true;
         }