# HG changeset patch # User PAMPHILE Jonathan # Date 1253840217 -7200 # Node ID 32611257e99f741b2f76b953f38f78b7b2cc2f3d # Parent 8b83e6c8718e13bafda2fb30a21087f1b0038ce4 Link PLayer - SessionInput diff -r 8b83e6c8718e -r 32611257e99f src/FingersDance.Control.Player/UserControlPlayer.xaml.cs --- 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; } diff -r 8b83e6c8718e -r 32611257e99f src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs --- a/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Thu Sep 24 18:31:09 2009 +0200 +++ b/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Fri Sep 25 02:56:57 2009 +0200 @@ -20,10 +20,8 @@ // Insert code required on object creation below this point. } - public UserControlSyncSource(string path) + public void Load(string path) { - this.InitializeComponent(); - this.UserControlPlayer.initPlayer(path); } diff -r 8b83e6c8718e -r 32611257e99f src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs --- a/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs Thu Sep 24 18:31:09 2009 +0200 +++ b/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs Fri Sep 25 02:56:57 2009 +0200 @@ -23,7 +23,7 @@ { this.InitializeComponent(); - this.UserControlSyncSource = new FingersDance.Control.SyncSource.UserControlSyncSource(path); + this.UserControlSyncSource.Load(path); // Insert code required on object creation below this point. } }