Color Factory et application des couleurs au pivot
authorPAMPHILE Jonathan <pamphile@efrei.fr>
Fri, 16 Oct 2009 03:37:48 +0200
changeset 156 e16c8c913c65
parent 155 c68128feca0d
child 157 0fd2b41ab402
child 158 6731e300ec85
Color Factory et application des couleurs au pivot
src/FingersDance.ActionFactory/ActionFactory.cs
src/FingersDance.ActionFactory/ActionGenerator.cs
src/FingersDance.ActionFactory/ColorFactory.cs
src/FingersDance.ActionFactory/FingersDance.ActionFactory.csproj
src/FingersDance.ActionFactory/FingersDance.Factory.csproj
src/FingersDance.Control.Menu/FingersDance.Control.Menu.csproj
src/FingersDance.Control.Menu/UserControlMenu.xaml.cs
src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.Ressource.xaml
src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.csproj
src/FingersDance.Control.Pivot/UserControlPivot.xaml
src/FingersDance.Control.Pivot/UserControlPivot.xaml.cs
src/FingersDance.Control.Player/FingersDance.Control.Player.csproj
src/FingersDance.Control.Player/UserControlPlayer.xaml.cs
src/FingersDance.Control.Screen/UserControlScreen.xaml.cs
src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs
src/FingersDance.sln
src/FingersDance/FingersDance.csproj
src/FingersDance/MainSurfaceWindow.xaml.cs
--- a/src/FingersDance.ActionFactory/ActionFactory.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.ActionFactory/ActionFactory.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -3,7 +3,7 @@
 using System.Linq;
 using System.Text;
 
-namespace FingersDance.ActionFactory
+namespace FingersDance.Factory
 {
     public class ActionFactory
     {
--- a/src/FingersDance.ActionFactory/ActionGenerator.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.ActionFactory/ActionGenerator.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -4,7 +4,7 @@
 using System.Text;
 using FingersDance.Actions;
 
-namespace FingersDance.ActionFactory
+namespace FingersDance.Factory
 {
     public class ActionGenerator
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ActionFactory/ColorFactory.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FingersDance.Factory
+{
+    public class ColorFactory
+    {
+        static Dictionary<string, string> _Colors;
+
+        public Dictionary<string, string> Colors
+        {
+            get { return _Colors; }
+        }
+
+        public ColorFactory()
+        {
+            if (_Colors == null)
+            {
+                
+                _Colors = new Dictionary<string, string>();
+                _Colors.Add("Default", "DefaultColor_xaml");
+                _Colors.Add("Color_1", "Color_1_#FFFF00_xaml");
+                _Colors.Add("Color_2", "Color_2_#FFC800_xaml");
+                _Colors.Add("Color_3", "Color_3_#FF7D00__xaml");
+                _Colors.Add("Color_4", "Color_4_#FF0000_xaml");
+                _Colors.Add("Color_5", "Color_5_#FF0064_xaml");
+                _Colors.Add("Color_6", "Color_6_#C80FA0_xaml");
+                _Colors.Add("Color_7", "Color_7_#5A0FC8_xaml");
+                _Colors.Add("Color_8", "Color_8_#230FD2_xaml");
+                _Colors.Add("Color_9", "Color_9_#0096FF__xaml");
+                _Colors.Add("Color_10", "Color_10_#009664_xaml");
+                _Colors.Add("Color_11", "Color_11_#006432_xaml");
+                _Colors.Add("Color_12", "Color_12_#00C800_xaml");
+            }
+        }
+    }
+}
--- a/src/FingersDance.ActionFactory/FingersDance.ActionFactory.csproj	Fri Oct 16 02:35:11 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>FingersDance.ActionFactory</RootNamespace>
-    <AssemblyName>FingersDance.ActionFactory</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x86\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>bin\x86\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Xml.Linq">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data.DataSetExtensions">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="ActionFactory.cs" />
-    <Compile Include="ActionGenerator.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\FingersDance.Actions\FingersDance.Actions.csproj">
-      <Project>{1E80D5A1-C45C-443B-8992-4A4D78D280FC}</Project>
-      <Name>FingersDance.Actions</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ActionFactory/FingersDance.Factory.csproj	Fri Oct 16 03:37:48 2009 +0200
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>FingersDance.Factory</RootNamespace>
+    <AssemblyName>FingersDance.Factory</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ActionFactory.cs" />
+    <Compile Include="ActionGenerator.cs" />
+    <Compile Include="ColorFactory.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\FingersDance.Actions\FingersDance.Actions.csproj">
+      <Project>{1E80D5A1-C45C-443B-8992-4A4D78D280FC}</Project>
+      <Name>FingersDance.Actions</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
--- a/src/FingersDance.Control.Menu/FingersDance.Control.Menu.csproj	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Menu/FingersDance.Control.Menu.csproj	Fri Oct 16 03:37:48 2009 +0200
@@ -134,9 +134,9 @@
     </Page>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.ActionFactory.csproj">
+    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.Factory.csproj">
       <Project>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</Project>
-      <Name>FingersDance.ActionFactory</Name>
+      <Name>FingersDance.Factory</Name>
     </ProjectReference>
     <ProjectReference Include="..\FingersDance.Actions\FingersDance.Actions.csproj">
       <Project>{1E80D5A1-C45C-443B-8992-4A4D78D280FC}</Project>
--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -12,7 +12,7 @@
 using System.Xml.Serialization;
 using System.Reflection;
 
-using FingersDance.ActionFactory;
+using FingersDance.Factory;
 using FingersDance.Actions;
 using FingersDance.Control.SyncSource;
 using FingersDance.Control.TimeLine;
--- a/src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.Ressource.xaml	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.Ressource.xaml	Fri Oct 16 03:37:48 2009 +0200
@@ -91,16 +91,25 @@
       </DrawingGroup>
     </DrawingBrush.Drawing>
   </DrawingBrush>
-  <DrawingBrush x:Key="Color_1_#FFFF00_xaml" Stretch="Uniform">
-    <DrawingBrush.Drawing>
-      <DrawingGroup ClipGeometry="F1 M 0,0L 70.1742,0L 70.1742,69.84L 0,69.84L 0,0">
-        <DrawingGroup.Children>
-          <GeometryDrawing Brush="#FFFFFF00" Geometry="F1 M 69.8406,0.000564575C 31.269,0.000564575 0.000549316,31.2691 0.000549316,69.8407L 70.1748,69.8407" />
-        </DrawingGroup.Children>
-      </DrawingGroup>
-    </DrawingBrush.Drawing>
-  </DrawingBrush>
-  <DrawingBrush x:Key="Color_2_#FFC800_xaml" Stretch="Uniform">
+    <DrawingBrush x:Key="DefaultColor_xaml" Stretch="Uniform">
+        <DrawingBrush.Drawing>
+            <DrawingGroup ClipGeometry="F1 M 0,0L 70.1742,0L 70.1742,69.84L 0,69.84L 0,0">
+                <DrawingGroup.Children>
+                    <GeometryDrawing Brush="#7E7F7F" Geometry="F1 M 69.8406,0.000564575C 31.269,0.000564575 0.000549316,31.2691 0.000549316,69.8407L 70.1748,69.8407" />
+                </DrawingGroup.Children>
+            </DrawingGroup>
+        </DrawingBrush.Drawing>
+    </DrawingBrush>
+    <DrawingBrush x:Key="Color_1_#FFFF00_xaml" Stretch="Uniform">
+        <DrawingBrush.Drawing>
+            <DrawingGroup ClipGeometry="F1 M 0,0L 70.1742,0L 70.1742,69.84L 0,69.84L 0,0">
+                <DrawingGroup.Children>
+                    <GeometryDrawing Brush="#FFFFFF00" Geometry="F1 M 69.8406,0.000564575C 31.269,0.000564575 0.000549316,31.2691 0.000549316,69.8407L 70.1748,69.8407" />
+                </DrawingGroup.Children>
+            </DrawingGroup>
+        </DrawingBrush.Drawing>
+    </DrawingBrush>
+    <DrawingBrush x:Key="Color_2_#FFC800_xaml" Stretch="Uniform">
     <DrawingBrush.Drawing>
       <DrawingGroup ClipGeometry="F1 M 0,0L 70.1742,0L 70.1742,69.84L 0,69.84L 0,0">
         <DrawingGroup.Children>
--- a/src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.csproj	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Pivot/FingersDance.Control.Pivot.csproj	Fri Oct 16 03:37:48 2009 +0200
@@ -124,6 +124,10 @@
     <Resource Include="Resources\WindowBackground.jpg" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.Factory.csproj">
+      <Project>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</Project>
+      <Name>FingersDance.Factory</Name>
+    </ProjectReference>
     <ProjectReference Include="..\FingersDance.Control.Menu\FingersDance.Control.Menu.csproj">
       <Project>{6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}</Project>
       <Name>FingersDance.Control.Menu</Name>
--- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml	Fri Oct 16 03:37:48 2009 +0200
@@ -138,8 +138,8 @@
 			<ColumnDefinition Width="0.494*"/>
 		</Grid.ColumnDefinitions>
 		<Ellipse Stroke="#FFFFFFFF" Grid.ColumnSpan="2" Grid.RowSpan="2" StrokeThickness="0.5" Fill="#FF615E5E" Margin="0.462,0,-0.462,0"/>
-		<Custom:SurfaceButton BorderThickness="0,0,0,0" x:Name="SurfaceButtonPlayer1" Content="" Background="{DynamicResource Color_7_#5A0FC8_xaml}" ContactDown="SurfaceButtonPlayer1_ContactDown" Click="SurfaceButtonPlayer1_Click" Margin="0.47,-5.377,-0.681,-5.83" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}"/>
-		<Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer2" Grid.Column="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_6_#C80FA0_xaml}" ContactDown="SurfaceButtonPlayer2_ContactDown" Click="SurfaceButtonPlayer2_Click" Margin="-0.875,-4.844,-0.416,-5.441" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}">
+		<Custom:SurfaceButton BorderThickness="0,0,0,0" x:Name="SurfaceButtonPlayer1" Content="" Background="{DynamicResource DefaultColor_xaml}" ContactDown="SurfaceButtonPlayer1_ContactDown" Click="SurfaceButtonPlayer1_Click" Margin="0.47,-5.377,-0.681,-5.83" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}"/>
+		<Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer2" Grid.Column="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource DefaultColor_xaml}" ContactDown="SurfaceButtonPlayer2_ContactDown" Click="SurfaceButtonPlayer2_Click" Margin="-0.875,-4.844,-0.416,-5.441" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}">
 			<Custom:SurfaceButton.RenderTransform>
 				<TransformGroup>
 					<ScaleTransform ScaleX="-1" ScaleY="1"/>
@@ -149,7 +149,7 @@
 				</TransformGroup>
 			</Custom:SurfaceButton.RenderTransform>
 		</Custom:SurfaceButton>
-		<Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer3" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_1_#FFFF00_xaml}" ContactDown="SurfaceButtonPlayer3_ContactDown" Click="SurfaceButtonPlayer3_Click" Margin="0.178,-4.737,-0.388,-4.103" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}" Foreground="{x:Null}" >
+		<Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer3" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource DefaultColor_xaml}" ContactDown="SurfaceButtonPlayer3_ContactDown" Click="SurfaceButtonPlayer3_Click" Margin="0.178,-4.737,-0.388,-4.103" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}" Foreground="{x:Null}" >
 			<Custom:SurfaceButton.RenderTransform>
 				<TransformGroup>
 					<ScaleTransform ScaleX="1" ScaleY="-1"/>
@@ -159,7 +159,7 @@
 				</TransformGroup>
 			</Custom:SurfaceButton.RenderTransform>
 		</Custom:SurfaceButton>
-		<Custom:SurfaceButton Content=""  Grid.Row="1" Grid.Column="1" x:Name="SurfaceButtonPlayer4" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_9_#0096FF__xaml}" ContactDown="SurfaceButtonPlayer4_ContactDown" Click="SurfaceButtonPlayer4_Click" Margin="-0.788,-5.521,-0.502,-4.569" Style="{DynamicResource FingersDance.Pivot.Button}" Width="45.75">
+		<Custom:SurfaceButton Content=""  Grid.Row="1" Grid.Column="1" x:Name="SurfaceButtonPlayer4" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource DefaultColor_xaml}" ContactDown="SurfaceButtonPlayer4_ContactDown" Click="SurfaceButtonPlayer4_Click" Margin="-0.788,-5.521,-0.502,-4.569" Style="{DynamicResource FingersDance.Pivot.Button}" Width="45.75">
 			<Custom:SurfaceButton.RenderTransform>
 				<TransformGroup>
 					<ScaleTransform ScaleX="-1" ScaleY="-1"/>
--- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -7,6 +7,7 @@
 using System.Windows.Media;
 using System.Windows.Media.Animation;
 using System.Windows.Navigation;
+using FingersDance.Factory;
 
 namespace FingersDance.Control.Pivot
 {
@@ -65,5 +66,28 @@
         {
             SurfaceButtonPlayer4_ContactDown(this, null);
         }
+
+        public void ApplyColor(int id, string color)
+        {
+            try
+            {
+                switch (id)
+                {
+                    case 1:
+                        SurfaceButtonPlayer1.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+                        break;
+                    case 2:
+                        SurfaceButtonPlayer2.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+                        break;
+                    case 3:
+                        SurfaceButtonPlayer3.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+                        break;
+                    case 4:
+                        SurfaceButtonPlayer4.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+                        break;
+                }
+            }
+            catch (Exception) { }
+        }
 	}
 }
\ No newline at end of file
--- a/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Player/FingersDance.Control.Player.csproj	Fri Oct 16 03:37:48 2009 +0200
@@ -142,9 +142,9 @@
     <Resource Include="Resources\WindowBackground.jpg" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.ActionFactory.csproj">
+    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.Factory.csproj">
       <Project>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</Project>
-      <Name>FingersDance.ActionFactory</Name>
+      <Name>FingersDance.Factory</Name>
     </ProjectReference>
     <ProjectReference Include="..\FingersDance.Actions\FingersDance.Actions.csproj">
       <Project>{1E80D5A1-C45C-443B-8992-4A4D78D280FC}</Project>
--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -14,7 +14,7 @@
 
 using Microsoft.Surface.Presentation;
 using Microsoft.Surface.Presentation.Controls;
-using FingersDance.ActionFactory;
+using FingersDance.Factory;
 using FingersDance.Actions;
 using FingersDance.Control.TimeLine;
 using FingersDance.Views;
--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -151,7 +151,7 @@
                 MainViewModel.Session.Alias = ((UserControlSessionInput)sender).Alias;
                 MainViewModel.Session.Email = ((UserControlSessionInput)sender).Email;
                 MainViewModel.Session.Description = ((UserControlSessionInput)sender).Description;
-                MainViewModel.Session.Name = ((UserControlSessionInput)sender).Name;
+                MainViewModel.Session.Name = ((UserControlSessionInput)sender).SessionName;
                 
                 //2-Suppression UCSession Input
                 LayoutRoot.Children.Remove((UserControlSessionInput)sender);
--- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -14,7 +14,7 @@
 	public partial class UserControlSessionInput
 	{
         public event EventHandler EH_SurfaceButtonSubmit_ContactDown;
-        public string Name = "";
+        public string SessionName = "";
         public string Email = "";
         public string Alias = "";
         public string Description = "";
@@ -29,9 +29,10 @@
 
         private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
         {
-            if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+            //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+            if (!ST_Name.Text.Equals(""))
             {
-                Name= ST_Name.Text;
+                SessionName = ST_Name.Text;
                 Email= ST_Email.Text;
                 Alias = ST_Alias.Text;
                 Description = ST_Desc.Text;
@@ -42,9 +43,10 @@
 
         private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e)
         {
-            if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+            //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+            if (!ST_Name.Text.Equals(""))
             {
-                Name = ST_Name.Text;
+                SessionName = ST_Name.Text;
                 Email = ST_Email.Text;
                 Alias = ST_Alias.Text;
                 Description = ST_Desc.Text;
--- a/src/FingersDance.sln	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.sln	Fri Oct 16 03:37:48 2009 +0200
@@ -23,7 +23,7 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Control.SyncSource", "FingersDance.Control.SyncSource\FingersDance.Control.SyncSource.csproj", "{BE5AD2E7-8BC2-414A-AB92-34E4D7357740}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.ActionFactory", "FingersDance.ActionFactory\FingersDance.ActionFactory.csproj", "{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Factory", "FingersDance.ActionFactory\FingersDance.Factory.csproj", "{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Debug", "FingersDance.Debug\FingersDance.Debug.csproj", "{148FE4AA-2C30-4D08-9291-BF22023F0AAA}"
 EndProject
--- a/src/FingersDance/FingersDance.csproj	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance/FingersDance.csproj	Fri Oct 16 03:37:48 2009 +0200
@@ -155,9 +155,9 @@
     </Page>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.ActionFactory.csproj">
+    <ProjectReference Include="..\FingersDance.ActionFactory\FingersDance.Factory.csproj">
       <Project>{C7B905EA-0678-4DA0-8EF8-7F9CBD22818E}</Project>
-      <Name>FingersDance.ActionFactory</Name>
+      <Name>FingersDance.Factory</Name>
     </ProjectReference>
     <ProjectReference Include="..\FingersDance.Control.Close\FingersDance.Control.Close.csproj">
       <Project>{D579FDB5-D412-4797-A0FF-C5873AE08BB8}</Project>
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs	Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs	Fri Oct 16 03:37:48 2009 +0200
@@ -20,7 +20,7 @@
 using FingersDance.Control.Close;
 using FingersDance.ViewModels;
 using FingersDance.Data;
-
+using FingersDance.Factory;
 
 namespace FingersDance
 {
@@ -39,7 +39,7 @@
         private UserControlUserPanel Panel2 = null;
         private UserControlUserPanel Panel3 = null;
         private UserControlUserPanel Panel4 = null;
-        ActionFactory.ActionGenerator _Factory = new FingersDance.ActionFactory.ActionFactory().GetGenerator();
+        ActionGenerator _Factory = (new ActionFactory()).GetGenerator();
         private MainViewModel _mainviewmodel = new MainViewModel();      
 
         #endregion
@@ -407,27 +407,33 @@
                     if ((Panel1 != null && Panel1.Project.Equals(newProject)) || (Panel2 != null && Panel2.Project.Equals(newProject)) || (Panel3 != null && Panel3.Project.Equals(newProject)) || (Panel4 != null && Panel4.Project.Equals(newProject)))
                         return;
 
+                    Random c = new Random();
+                    int color = c.Next(12);
                     switch (((UserControlScreen)sender).id)
                     {
                         case 1:
+                            UserControlPivot.ApplyColor(1, "Color_" + color);
                             Panel1 = new UserControlUserPanel(1, 0xFF5A0FC8, newProject, _mainviewmodel.Session.VideoPath);
                             Panel1.Name = "UserPanel1";
                             //3-Rajout sur la Grid Root
                             root.Children.Add(Panel1);
                             break;
                         case 2:
+                            UserControlPivot.ApplyColor(2, "Color_" + color);
                             Panel2 = new UserControlUserPanel(2, 0xFFC80FA0, newProject, _mainviewmodel.Session.VideoPath);
                             Panel2.Name = "UserPanel2";
                             //3-Rajout sur la Grid Root
                             root.Children.Add(Panel2);
                             break;
                         case 3:
+                            UserControlPivot.ApplyColor(3, "Color_" + color);
                             Panel3 = new UserControlUserPanel(3, 0xFFFFFF00, newProject, _mainviewmodel.Session.VideoPath);
                             Panel3.Name = "UserPanel3";
                             //3-Rajout sur la Grid Root
                             root.Children.Add(Panel3);
                             break;
                         case 4:
+                            UserControlPivot.ApplyColor(4, "Color_" + color);
                             Panel4 = new UserControlUserPanel(4, 0xFF0096FF, newProject, _mainviewmodel.Session.VideoPath);
                             Panel4.Name = "UserPanel4";
                             //3-Rajout sur la Grid Root
@@ -448,18 +454,22 @@
                 switch(e.PanelNumber)
                 {
                     case 1:
+                        UserControlPivot.ApplyColor(1, "Default");
                         root.Children.Remove(Panel1);
                         Panel1 = null;
                         break;
                     case 2:
+                        UserControlPivot.ApplyColor(2, "Default");
                         root.Children.Remove(Panel2);
                         Panel2 = null;
                         break;
                     case 3:
+                        UserControlPivot.ApplyColor(3, "Default");
                         root.Children.Remove(Panel3);
                         Panel3 = null;
                         break;
                     case 4:
+                        UserControlPivot.ApplyColor(4, "Default");
                         root.Children.Remove(Panel4);
                         Panel4 = null;
                         break;