--- a/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 24 15:16:38 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 24 15:20:59 2009 +0200
@@ -16,8 +16,6 @@
using Microsoft.Surface.Presentation.Controls;
using FingersDance.Control.UserPanel;
-using FingersDance.Control.ListVideo;
-using FingersDance.Control.SessionInput;
using FingersDance.Control.Screen;
@@ -257,17 +255,7 @@
//2-Rajout du screen dans la grid correspondante
Grid1.Children.Add(Screen1);
- //3-Creation de la ListVideo
- UserControlListVideo ListVideo1 = new UserControlListVideo();
- ListVideo1.Name = "ListVideo1";
-
- //4-Ajout de la ListVideo au ControlScreen
- Screen1.AddToGrid(ListVideo1);
-
- //5-Creation des Events pour chaque item de la video
- ListVideo1.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo1_ContactDown);
- ListVideo1.EH_ItemVideo2_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo2_ContactDown);
-
+ Screen1.UC_Screen_NewSession += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown);
}
}
@@ -275,29 +263,7 @@
{
if (!isCreatedP2)
{
- /* UserControlUserPanel UserPanel2 = new UserControlUserPanel();
- UserPanel2.Name = "UserPanel2";
- Grid2.Children.Add(UserPanel2);
- isCreatedP2 = true;*/
-
- //1-Creation du control Screen
- UserControlScreen Screen2 = new UserControlScreen();
- Screen2.Name = "Screen2";
- Screen2.contexteGrid = Grid2.Name.ToString();
- //2-Rajout du screen dans la grid correspondante
- Grid2.Children.Add(Screen2);
-
- //3-Creation de la ListVideo
- UserControlListVideo ListVideo2 = new UserControlListVideo();
- ListVideo2.Name = "ListVideo2";
-
- //4-Ajout de la ListVideo au ControlScreen
- Screen2.AddToGrid(ListVideo2);
-
- //5-Creation des Events pour chaque item de la video
- ListVideo2.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo1_ContactDown);
- ListVideo2.EH_ItemVideo2_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo2_ContactDown);
-
+
}
}
@@ -323,41 +289,7 @@
}
}
- private void ListVideo1_EH_ItemVideo1_ContactDown(object sender, EventArgs e)
- {
-
- //Creation d'un ScatterView Item
- //ScatterViewItem scatterViewItemSessionInput = new ScatterViewItem();
- //scatterViewItemSessionInput.Name = "ScatterViewItemSessionInput";
-
-
- //1-Creation d'une nouvelle seance.
- UserControlSessionInput SessionInput = new UserControlSessionInput();
- SessionInput.Name = "SessionInput";
-
- try{
- //2-Recuperer la Grid (Layout root du UC screen)qui contient le UCListVideo et l'ajouter.
- Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent);
- actualGrid.Children.Add(SessionInput);
-
- //2.5 rensegner la video choisie au screen
- ((UserControlScreen)actualGrid.Parent).Path = ((UserControlListVideo)sender).path;
- //3-Creation des Events
- SessionInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown);
- //4-Supression du UC List Video
- actualGrid.Children.Remove((UserControlListVideo)sender);
-
- //Init Scatter View Properties and Add it to the scatter view.
- /*scatterViewItemSessionInput.Content = SessionInput;
- scatterViewItemSessionInput.CanMove = true;
- scatterViewItemSessionInput.CanScale = false;
- scatterViewItemSessionInput.CanRotate = true;
- scatterViewItemSessionInput.Center = new Point((double)actualGrid.ActualWidth,(double)actualGrid.ActualHeight);
- scaterview.Items.Add(scatterViewItemSessionInput);*/
- }
- catch (Exception ex) { }
- isCreatedP1 = true;
- }
+
private void ListVideo1_EH_ItemVideo2_ContactDown(object sender, EventArgs e)
{
@@ -369,13 +301,9 @@
{
try
{
- //1-Recuperation de actualGrid (LayoutRoot du UC Screen)
- Grid actualGrid = (Grid)(((UserControlSessionInput)sender).Parent);
- //2-Suppression UCSession Input
- actualGrid.Children.Remove((UserControlSessionInput)sender);
//3-Suppression du UC Screen
- Grid root = (Grid) ((UserControlScreen)actualGrid.Parent).Parent;
- root.Children.Remove((UserControlScreen)actualGrid.Parent);
+ Grid root = (Grid)(((UserControlScreen)sender).Parent);
+ root.Children.Remove(((UserControlScreen)sender));
//4-Creation du User Panel
UserControlUserPanel UserPanel1 = new UserControlUserPanel();
UserPanel1.Name = "UserPanel1";