--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Thu Sep 24 15:16:38 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Thu Sep 24 15:20:59 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