--- a/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Tue Nov 24 09:59:20 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Tue Nov 24 10:42:26 2009 +0100
@@ -42,6 +42,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\res\lib\Berico.Windows.Controls.dll</HintPath>
</Reference>
+ <Reference Include="HackingSilverlightLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\res\lib\HackingSilverlightLibrary.dll</HintPath>
+ </Reference>
<Reference Include="SLExtensions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\res\lib\SLExtensions.dll</HintPath>
@@ -73,6 +77,7 @@
<Compile Include="ViewModel\ConsultationView\ConsultationViewVM.cs" />
<Compile Include="ViewModel\ContextualBinderLayer\ContextualBinderLayerVM.cs" />
<Compile Include="ViewModel\HeaderProduction\HeaderProductionVM.cs" />
+ <Compile Include="ViewModel\Main\MainVM.cs" />
<Compile Include="ViewModel\NavigationBar\ChutierVM.cs" />
<Compile Include="ViewModel\NavigationBar\ConsultMenuVM.cs" />
<Compile Include="ViewModel\HeaderControl\HeaderControlVM.cs" />
@@ -125,6 +130,9 @@
<Compile Include="View\HeaderProduction\HeaderProduction.xaml.cs">
<DependentUpon>HeaderProduction.xaml</DependentUpon>
</Compile>
+ <Compile Include="View\Main\Main.xaml.cs">
+ <DependentUpon>Main.xaml</DependentUpon>
+ </Compile>
<Compile Include="View\NavigationBar\ConsultMenu.xaml.cs">
<DependentUpon>ConsultMenu.xaml</DependentUpon>
</Compile>
@@ -220,6 +228,10 @@
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="View\Main\Main.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:MarkupCompilePass1</Generator>
+ </Page>
<Page Include="View\NavigationBar\ConsultMenu.xaml">
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/View/Main/Main.xaml Tue Nov 24 10:42:26 2009 +0100
@@ -0,0 +1,32 @@
+<UserControl
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+
+ xmlns:View="clr-namespace:Iri.Modernisation.Controls.View;assembly=Iri.Modernisation.Controls"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d" x:Class="Iri.Modernisation.Controls.View.Main"
+ d:DesignHeight="480"
+ xmlns:hsl="clr-namespace:HackingSilverlightLibrary;assembly=HackingSilverlightLibrary"
+ >
+ <Grid x:Name="LayoutRoot" Background="Black" >
+
+ <View:NavigationBar x:Name="NavigationBarElement" DataContext="{Binding ViewModelNavigationBar}" HorizontalAlignment="Left" d:LayoutOverrides="Width, Height" VerticalAlignment="Top" Grid.RowSpan="2" Margin="5,5,0,0"/>
+ <View:HeaderControl x:Name="HeaderControlElement" DataContext="{Binding ViewModelHeaderControl}" Canvas.ZIndex="1" VerticalAlignment="Top" d:LayoutOverrides="Width, Height" HorizontalAlignment="Right"/>
+ <View:ContextualBinderLayer x:Name="ContextualBinderLayerElement" Canvas.ZIndex="5" Grid.RowSpan="2"/>
+ <View:ClickMenuLayer Canvas.ZIndex="10" Grid.RowSpan="2"/>
+ <hsl:FXFlip x:Name="FlipTest" Flip="True" AutoFlip="False" Margin="265,0,0,0">
+ <hsl:FXFlip.Front>
+ <Grid x:Name="frontgrid" >
+ <View:ConsultationView x:Name="ConsultationViewElement" DataContext="{Binding ViewModelConsultationView}" Margin="0,40,0,-56" d:LayoutOverrides="Height" HorizontalAlignment="Right"/>
+
+ </Grid>
+ </hsl:FXFlip.Front>
+ <hsl:FXFlip.Back>
+ <Grid x:Name="backgrid" >
+ <View:ProductionView x:Name="ProductionViewElement" DataContext="{Binding ViewModelHeaderProduction}"></View:ProductionView>
+ </Grid>
+ </hsl:FXFlip.Back>
+ </hsl:FXFlip>
+ </Grid>
+</UserControl>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/View/Main/Main.xaml.cs Tue Nov 24 10:42:26 2009 +0100
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Iri.Modernisation.BaseMVVM.Commands;
+namespace Iri.Modernisation.Controls.View
+{
+ public partial class Main : UserControl
+ {
+ public Main()
+ {
+ InitializeComponent();
+ Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
+
+ }
+ void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ Commands.VideoViewer.Pause.Execute();
+
+
+
+ FlipTest.ExecuteFlip();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs Tue Nov 24 10:42:26 2009 +0100
@@ -0,0 +1,95 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Collections.Generic;
+using Iri.Modernisation.Data.Models;
+using Iri.Modernisation.BaseMVVM.Commands;
+using Iri.Modernisation.BaseMVVM.ViewModel;
+namespace Iri.Modernisation.Controls.ViewModel
+{
+ public class MainVM : BaseMVVM.ViewModel.ViewModel
+ {
+ private ConsultationViewVM _consultationViewVM;
+ public ConsultationViewVM ViewModelConsultationView
+ {
+ get
+ {
+ return _consultationViewVM;
+ }
+ set
+ {
+ _consultationViewVM = value;
+ OnPropertyChanged("ViewModelConsultationView");
+ }
+ }
+
+ private NavigationBarVM _navigationBarVM;
+ public NavigationBarVM ViewModelNavigationBar
+ {
+ get
+ {
+ return _navigationBarVM;
+ }
+ set
+ {
+ _navigationBarVM = value;
+ OnPropertyChanged("ViewModelNavigationBar");
+ }
+ }
+
+ private HeaderControlVM _headerControlVM;
+ public HeaderControlVM ViewModelHeaderControl
+ {
+ get
+ {
+ return _headerControlVM;
+ }
+ set
+ {
+ _headerControlVM = value;
+ OnPropertyChanged("ViewModelHeaderControl");
+ }
+ }
+
+ private HeaderProductionVM _headerProductionVM;
+ public HeaderProductionVM ViewModelHeaderProduction
+ {
+ get
+ {
+ return _headerProductionVM;
+ }
+ set
+ {
+ _headerProductionVM = value;
+ OnPropertyChanged("ViewModelHeaderProduction");
+ }
+ }
+
+ public MainVM(List<VideoBook> videoBooks)
+ {
+ InitializeCommands();
+ List<VideoBook> SelectedVideoBooks = videoBooks;
+
+
+ // Initialisation des Components //
+ ViewModelConsultationView = new ConsultationViewVM();
+ ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
+ ViewModelHeaderControl = new HeaderControlVM();
+ ViewModelHeaderProduction = new HeaderProductionVM();
+ //------------------------------------------------------//
+ }
+
+ private void InitializeCommands()
+ {
+ Commands.Initialize();
+ }
+
+ }
+}
--- a/client/src/Iri.Modernisation/MainPage.xaml Tue Nov 24 09:59:20 2009 +0100
+++ b/client/src/Iri.Modernisation/MainPage.xaml Tue Nov 24 10:42:26 2009 +0100
@@ -9,7 +9,7 @@
xmlns:hsl="clr-namespace:HackingSilverlightLibrary;assembly=HackingSilverlightLibrary"
>
<Grid x:Name="LayoutRoot" Background="Black" >
-
+<!--
<View:NavigationBar x:Name="NavigationBarElement" HorizontalAlignment="Left" d:LayoutOverrides="Width, Height" VerticalAlignment="Top" Grid.RowSpan="2" Margin="5,5,0,0"/>
<View:HeaderControl x:Name="HeaderControlElement" Canvas.ZIndex="1" VerticalAlignment="Top" d:LayoutOverrides="Width, Height" HorizontalAlignment="Right"/>
<View:ContextualBinderLayer x:Name="ContextualBinderLayerElement" Canvas.ZIndex="5" Grid.RowSpan="2"/>
@@ -26,6 +26,7 @@
<View:ProductionView x:Name="ProductionViewElement"></View:ProductionView>
</Grid>
</hsl:FXFlip.Back>
- </hsl:FXFlip>
+ </hsl:FXFlip>-->
+ <View:Main x:Name="MainElement"></View:Main>
</Grid>
</UserControl>
--- a/client/src/Iri.Modernisation/MainPage.xaml.cs Tue Nov 24 09:59:20 2009 +0100
+++ b/client/src/Iri.Modernisation/MainPage.xaml.cs Tue Nov 24 10:42:26 2009 +0100
@@ -26,33 +26,11 @@
{
Commands.Initialize();
InitializeComponent();
- Start();
+
+ MainElement.DataContext = new MainVM(new List<VideoBook>());
}
- private void Start()
- {
- List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
- // Initialisation des commandes //
-
- Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
- //-----------------------------------------//
-
-
- // Initialisation des Components //
- ConsultationViewElement.DataContext = new ConsultationViewVM();
- NavigationBarElement.DataContext = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
- HeaderControlElement.DataContext = new HeaderControlVM();
- ProductionViewElement.DataContext = new HeaderProductionVM();
- //------------------------------------------------------//
-
- }
- void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- Commands.VideoViewer.Pause.Execute();
-
-
-
- FlipTest.ExecuteFlip();
- }
+
+
}
}
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml Tue Nov 24 09:59:20 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml Tue Nov 24 10:42:26 2009 +0100
@@ -10,7 +10,7 @@
>
<Grid x:Name="LayoutRoot" Background="Black" >
- <View:NavigationBar x:Name="NavigationBarElement" HorizontalAlignment="Left" d:LayoutOverrides="Width, Height" VerticalAlignment="Top" Grid.RowSpan="2" Margin="5,5,0,0"/>
+ <!-- <View:NavigationBar x:Name="NavigationBarElement" HorizontalAlignment="Left" d:LayoutOverrides="Width, Height" VerticalAlignment="Top" Grid.RowSpan="2" Margin="5,5,0,0"/>
<View:HeaderControl x:Name="HeaderControlElement" Canvas.ZIndex="1" VerticalAlignment="Top" d:LayoutOverrides="Width, Height" HorizontalAlignment="Right"/>
<View:ContextualBinderLayer x:Name="ContextualBinderLayerElement" Canvas.ZIndex="5" Grid.RowSpan="2"/>
<View:ClickMenuLayer Canvas.ZIndex="10" Grid.RowSpan="2"/>
@@ -26,6 +26,7 @@
<View:ProductionView x:Name="ProductionViewElement"></View:ProductionView>
</Grid>
</hsl:FXFlip.Back>
- </hsl:FXFlip>
+ </hsl:FXFlip>-->
+ <View:Main x:Name="MainElement"></View:Main>
</Grid>
</UserControl>
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Tue Nov 24 09:59:20 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Tue Nov 24 10:42:26 2009 +0100
@@ -21,7 +21,7 @@
{
public MainPage()
{
-
+ InitializeComponent();
List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
/*************** Content Demo ***************/
/* Pour pouvoir tester avec des vidéos :
@@ -48,10 +48,10 @@
/*************** Initialisation des commandes ***************/
Commands.Initialize();
- Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
+ // Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
/********************************************/
-
- /*************** Initialisation des Component ***************/
+ MainElement.DataContext = new MainVM(SelectedVideoBooks);
+ /*************** Initialisation des Component **************
InitializeComponent();
ConsultationViewElement.DataContext = new ConsultationViewVM();
NavigationBarVM navvm = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
@@ -62,11 +62,7 @@
}
- void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- Commands.VideoViewer.Pause.Execute();
- FlipTest.ExecuteFlip();
- }
+
}
}