--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml Wed Sep 23 16:47:42 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml Wed Sep 23 16:56:08 2009 +0200
@@ -8,7 +8,7 @@
xmlns:FingersDance_Control_UserPanel="clr-namespace:FingersDance.Control.UserPanel;assembly=FingersDance.Control.UserPanel"
x:Class="FingersDance.Control.Screen.UserControlScreen"
x:Name="UserControl"
- d:DesignWidth="640" d:DesignHeight="480" Width="1024" Height="768" xmlns:Custom="http://schemas.microsoft.com/surface/2008">
+ d:DesignWidth="640" d:DesignHeight="480" Width="Auto" Height="Auto" xmlns:Custom="http://schemas.microsoft.com/surface/2008" Background="#FF54FF00">
<Grid x:Name="LayoutRoot">
<Custom:ScatterView HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="{x:Null}" x:Name="ScatterViewScreen"/>
--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Wed Sep 23 16:47:42 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Wed Sep 23 16:56:08 2009 +0200
@@ -12,6 +12,7 @@
{
public partial class UserControlScreen
{
+ public String contexteGrid;
public UserControlScreen()
{
this.InitializeComponent();
@@ -19,6 +20,16 @@
// Insert code required on object creation below this point.
}
+ //Rajout un UIElement vers la grid du screen.
+ public void AddToGrid(UIElement uie)
+ {
+ if (uie != null)
+ {
+ try { LayoutRoot.Children.Add(uie); }
+ catch(Exception){}
+ }
+ }
+
}
}
\ No newline at end of file
--- a/src/FingersDance/FingersDance.csproj Wed Sep 23 16:47:42 2009 +0200
+++ b/src/FingersDance/FingersDance.csproj Wed Sep 23 16:56:08 2009 +0200
@@ -152,6 +152,10 @@
<Project>{0EC4C48C-132C-4926-9A09-A4135C58688C}</Project>
<Name>FingersDance.Control.Pivot</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.Control.Screen\FingersDance.Control.Screen.csproj">
+ <Project>{67E2CB60-529E-4AFF-8E0F-A8087EE638B1}</Project>
+ <Name>FingersDance.Control.Screen</Name>
+ </ProjectReference>
<ProjectReference Include="..\FingersDance.Control.SessionInput\FingersDance.Control.SessionInput.csproj">
<Project>{4C5C068F-7D41-4563-9109-7B57485F4BED}</Project>
<Name>FingersDance.Control.SessionInput</Name>
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Sep 23 16:47:42 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Sep 23 16:56:08 2009 +0200
@@ -18,6 +18,8 @@
using FingersDance.Control.UserPanel;
using FingersDance.Control.ListVideo;
using FingersDance.Control.SessionInput;
+using FingersDance.Control.Screen;
+
namespace FingersDance
{
@@ -194,19 +196,24 @@
if (!isCreatedP1)
{
+ //1-Creation du control Screen
+ UserControlScreen Screen1 = new UserControlScreen();
+ Screen1.Name = "Screen1";
+ Screen1.contexteGrid = Grid1.Name.ToString();
+ //2-Rajout du screen dans la grid correspondante
+ Grid1.Children.Add(Screen1);
+
+ //3-Creation de la ListVideo
UserControlListVideo ListVideo1 = new UserControlListVideo();
ListVideo1.Name = "ListVideo1";
- Grid1.Children.Add(ListVideo1);
+ //4-Ajout de la ListVideo au ControlScreen
+ Screen1.AddToGrid(ListVideo1);
- //Creation des Events pour chaque item de la video
+ //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);
- /*
- UserControlUserPanel UserPanel1 = new UserControlUserPanel();
- UserPanel1.Name = "UserPanel1";
- Grid1.Children.Add(UserPanel1);
- isCreatedP1 = true;*/
+
}
}
@@ -251,18 +258,21 @@
//scatterViewItemSessionInput.Name = "ScatterViewItemSessionInput";
- //Creation d'une nouvelle seance.
-
+ //1-Creation d'une nouvelle seance.
UserControlSessionInput SessionInput = new UserControlSessionInput();
SessionInput.Name = "SessionInput";
try{
+ //2-Recuperer la Grid qui contient le UCListVideo et l'ajouter.
Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent);
actualGrid.Children.Add(SessionInput);
+ //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;
@@ -285,12 +295,18 @@
{
try
{
+ //1-Recuperation de actualGrid (LayoutRoot du UC Screen)
Grid actualGrid = (Grid)(((UserControlSessionInput)sender).Parent);
+ //2-Suppression UCSession Input
actualGrid.Children.Remove((UserControlSessionInput)sender);
- //Creation du User Panel
+ //3-Suppression du UC Screen
+ Grid root = (Grid) ((UserControlScreen)actualGrid.Parent).Parent;
+ root.Children.Remove((UserControlScreen)actualGrid.Parent);
+ //4-Creation du User Panel
UserControlUserPanel UserPanel1 = new UserControlUserPanel();
UserPanel1.Name = "UserPanel1";
- actualGrid.Children.Add(UserPanel1);
+ //5-Rajout sur la Grid Root
+ root.Children.Add(UserPanel1);
}
catch (Exception ex) { }