src/FingersDance.Control.Screen/UserControlScreen.xaml.cs
changeset 191 8a25a85f2656
parent 190 619ca3ae13c7
child 192 11083c390ce4
--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs	Mon Nov 09 12:11:42 2009 +0100
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs	Tue Nov 10 13:47:58 2009 +0100
@@ -41,7 +41,7 @@
                     //2-Ajout de la ListVideo au ControlScreen
                     this.AddToGrid(ListVideo);
                     //3-Creation des Events pour chaque item de la video
-                    ListVideo.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo_EH_ItemVideo_ContactDown);
+                    ListVideo.EH_ItemVideo1_ContactDown += new System.EventHandler(ListVideo_EH_ItemVideo_ContactDown);
                 }
                 else
                     OpenProject();
@@ -105,7 +105,13 @@
             // Does nothing because for the moment we do not load sessions when we know the video path, we just create a new session
             try
             {
-                return new List<Project>();
+                List<Project> lp = new List<Project>();
+                foreach (String filename in Directory.GetFiles("./"))
+                {
+                    if (filename.Substring(filename.Length-4).ToLower()==".ldt")
+                        lp.Add(new Project(filename.Substring(2,filename.Length - 6), "", ""));
+                }
+                return lp;
             }
             catch (Exception) 
             {
@@ -153,7 +159,7 @@
                 //MainViewModel.Project.Alias = ((UserControlNewProjectForm)sender).Alias;
                 //MainViewModel.Project.Email = ((UserControlNewProjectForm)sender).Email;
                 _mainViewModel.Project.Description = ((UserControlNewProjectForm)sender).Description;
-                _mainViewModel.Project.Name = ((UserControlNewProjectForm)sender).SessionName;
+                _mainViewModel.Project.Name = ((UserControlNewProjectForm)sender).SessionName.Trim();
                 
                 
                 //2-Suppression UCSession Input