--- 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;
}
--- 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);
}
--- 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.
}
}