# HG changeset patch
# User riley
# Date 1253799031 -7200
# Node ID 9a17e1de0cce849f4ab592f34d4e028004532bfa
# Parent 6046961636641bf34cf6dc912324979ff85f1908# Parent 1a428e733fea726852690c44533739bcac42defa
Merge
diff -r 604696163664 -r 9a17e1de0cce src/FingersDance.Control.Screen/FingersDance.Control.Screen.csproj
--- a/src/FingersDance.Control.Screen/FingersDance.Control.Screen.csproj Thu Sep 24 15:28:28 2009 +0200
+++ b/src/FingersDance.Control.Screen/FingersDance.Control.Screen.csproj Thu Sep 24 15:30:31 2009 +0200
@@ -119,10 +119,18 @@
+
+ {072436EC-FCD5-4A55-96AA-0047BF25BD37}
+ FingersDance.Control.ListVideo
+
{0EC4C48C-132C-4926-9A09-A4135C58688C}
FingersDance.Control.Pivot
+
+ {4C5C068F-7D41-4563-9109-7B57485F4BED}
+ FingersDance.Control.SessionInput
+
{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}
FingersDance.Control.UserPanel
diff -r 604696163664 -r 9a17e1de0cce src/FingersDance.Control.Screen/UserControlScreen.xaml.cs
--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Thu Sep 24 15:28:28 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Thu Sep 24 15:30:31 2009 +0200
@@ -7,6 +7,8 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
+using FingersDance.Control.ListVideo;
+using FingersDance.Control.SessionInput;
namespace FingersDance.Control.Screen
{
@@ -14,12 +16,21 @@
{
public String contexteGrid;
public string Path = "";
+ public event EventHandler UC_Screen_NewSession;
public UserControlScreen()
{
this.InitializeComponent();
+
+ //1-Creation de la ListVideo
+ UserControlListVideo ListVideo = new UserControlListVideo();
+ ListVideo.Name = "ListVideo1";
- // Insert code required on object creation below this point.
+ //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);
}
//Rajout un UIElement vers la grid du screen.
@@ -32,6 +43,53 @@
}
}
-
+ private void ListVideo_EH_ItemVideo_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.
+
+ LayoutRoot.Children.Add(SessionInput);
+
+ //2.5 rensegner la video choisie au screen
+ this.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
+ LayoutRoot.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) { }
+ }
+
+ private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e)
+ {
+ try
+ {
+ //2-Suppression UCSession Input
+ LayoutRoot.Children.Remove((UserControlSessionInput)sender);
+ //3-Suppression du UC Screen
+ if(UC_Screen_NewSession!=null)
+ UC_Screen_NewSession(this, new EventArgs());
+ }
+ catch (Exception ex) { }
+ }
}
}
\ No newline at end of file
diff -r 604696163664 -r 9a17e1de0cce src/FingersDance/FingersDance.csproj
--- a/src/FingersDance/FingersDance.csproj Thu Sep 24 15:28:28 2009 +0200
+++ b/src/FingersDance/FingersDance.csproj Thu Sep 24 15:30:31 2009 +0200
@@ -144,10 +144,6 @@
{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}
FingersDance.ActionFactory
-
- {072436EC-FCD5-4A55-96AA-0047BF25BD37}
- FingersDance.Control.ListVideo
-
{0EC4C48C-132C-4926-9A09-A4135C58688C}
FingersDance.Control.Pivot
@@ -156,10 +152,6 @@
{67E2CB60-529E-4AFF-8E0F-A8087EE638B1}
FingersDance.Control.Screen
-
- {4C5C068F-7D41-4563-9109-7B57485F4BED}
- FingersDance.Control.SessionInput
-
{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}
FingersDance.Control.UserPanel
diff -r 604696163664 -r 9a17e1de0cce src/FingersDance/MainSurfaceWindow.xaml.cs
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 24 15:28:28 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 24 15:30:31 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";