# HG changeset patch # User sarias # Date 1253184802 -7200 # Node ID bda95242e600d4e38ac24aa091f7615020031faa # Parent f1ca0958c992cd2f096e45879e61f769cd17ede0 Travail sur Enchainement New Session --> UserPanel. + ControlSessionInput diff -r f1ca0958c992 -r bda95242e600 src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml --- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml Thu Sep 17 08:31:15 2009 +0200 +++ b/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml Thu Sep 17 12:53:22 2009 +0200 @@ -14,7 +14,7 @@ - + diff -r f1ca0958c992 -r bda95242e600 src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs --- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs Thu Sep 17 08:31:15 2009 +0200 +++ b/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs Thu Sep 17 12:53:22 2009 +0200 @@ -12,6 +12,8 @@ { public partial class UserControlSessionInput { + public event EventHandler EH_SurfaceButtonSubmit_ContactDown; + public UserControlSessionInput() { this.InitializeComponent(); @@ -19,9 +21,17 @@ // Insert code required on object creation below this point. } - private void SurfaceButton_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) + private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) { - + if (EH_SurfaceButtonSubmit_ContactDown != null) + EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); } + + private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) + { + if (EH_SurfaceButtonSubmit_ContactDown != null) + EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); + } + } } \ No newline at end of file diff -r f1ca0958c992 -r bda95242e600 src/FingersDance/MainSurfaceWindow.xaml.cs --- a/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 17 08:31:15 2009 +0200 +++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Thu Sep 17 12:53:22 2009 +0200 @@ -223,35 +223,41 @@ private void ListVideo1_EH_ItemVideo1_ContactDown(object sender, EventArgs e) { //Creation d'une nouvelle seance. - if (!isCreatedP1) - { - // - UserControlUserPanel UserPanel1 = new UserControlUserPanel(); - UserPanel1.Name = "UserPanel1"; - UserControlSessionInput SessionInput = new UserControlSessionInput(); - SessionInput.Name = "SessionInput"; - try{ - Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent); - actualGrid.Children.Add(UserPanel1); - actualGrid.Children.Add(SessionInput); - actualGrid.Children.Remove((UserControlListVideo)sender); - } - catch (Exception ex) { } + + UserControlSessionInput SessionInput = new UserControlSessionInput(); + SessionInput.Name = "SessionInput"; - //ActualGrid.Children.Add(UserPanel1); - isCreatedP1 = true; + try{ + Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent); + actualGrid.Children.Add(SessionInput); + + SessionInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); + actualGrid.Children.Remove((UserControlListVideo)sender); } + catch (Exception ex) { } + isCreatedP1 = true; } private void ListVideo1_EH_ItemVideo2_ContactDown(object sender, EventArgs e) { - //Creation d'une nouvelle seance. - UserControlSessionInput SessionInput = new UserControlSessionInput(); + //ToDo + } - UserControlUserPanel UserPanel1 = new UserControlUserPanel(); - UserPanel1.Name = "UserPanel1"; - //ActualGrid.Children.Add(UserPanel1); - isCreatedP1 = true; + //Button Submit du control SessionInput + private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e) + { + try + { + Grid actualGrid = (Grid)(((UserControlSessionInput)sender).Parent); + actualGrid.Children.Remove((UserControlSessionInput)sender); + //Creation du User Panel + UserControlUserPanel UserPanel1 = new UserControlUserPanel(); + UserPanel1.Name = "UserPanel1"; + actualGrid.Children.Add(UserPanel1); + + } + catch (Exception ex) { } } + } } \ No newline at end of file