--- a/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Mon Jan 04 10:29:39 2010 +0100
@@ -459,11 +459,17 @@
TimeChange = new Command("TimeChange");
FlipView = new Command("FlipView");
GoToTime = new Command("GoToTime");
+ ActivePart = new Command("ActivePart");
// VideoPositionTimer.Tick += new EventHandler(Each_Tick);
}
+ public static Command ActivePart
+ {
+ get;
+ private set;
+ }
public static Command Action
{
get;
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
- x:Class="Iri.Modernisation.Controls.View.ClickMenuItem" MouseEnter="MouseEnter" MouseLeftButtonUp="UserControl_MouseLeftButtonUp" Background="Transparent" RenderTransformOrigin="0.5,0.5">
+ x:Class="Iri.Modernisation.Controls.View.ClickMenuItem" MouseEnter="OnMouseEnter" MouseLeftButtonUp="UserControl_MouseLeftButtonUp" Background="Transparent" RenderTransformOrigin="0.5,0.5">
<Grid>
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -46,7 +46,7 @@
InitializeComponent();
}
- private void MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
+ private void OnMouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
{
OnEnter();
--- a/client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -17,9 +17,10 @@
{
public ButtonHeaderControl()
{
+ _isMouseInside = false;
InitializeComponent();
}
- private bool _isMouseInside = false;
+ private bool _isMouseInside;
Point tempPoint = new Point();
private void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -10,7 +10,15 @@
mc:Ignorable="d"
x:Class="Iri.Modernisation.Controls.View.HeaderProduction" d:DesignHeight="216" Width="952">
<UserControl.Resources>
- <Lang:LangResource x:Name="LangLabels" x:Key="LangLabels"></Lang:LangResource>
+<ResourceDictionary>
+<ResourceDictionary.MergedDictionaries>
+<ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_AnnotationMaker.xaml"/>
+ <ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_CommonTemplate.xaml"/>
+
+ </ResourceDictionary.MergedDictionaries>
+ <Lang:LangResource x:Name="LangLabels" x:Key="LangLabels"></Lang:LangResource>
+ </ResourceDictionary>
+
</UserControl.Resources>
<Grid x:Name="HeaderProductionPanel">
@@ -20,73 +28,13 @@
<Button x:Name="HeaderProductionPublishButton" Input:CommandService.Command="PublishClick" IsEnabled="{Binding IsVideoBookComplete}" Width="75" Content="Publier"/>
</StackPanel>
<StackPanel x:Name="ChapterStatementPanel" Orientation="Horizontal" Height="111" VerticalAlignment="Top" HorizontalAlignment="Right" Width="708">
- <StackPanel x:Name="ChapterPanel_Modernisation" Width="176" RenderTransformOrigin="0.5,0.5">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel" Text="Modernisation" TextWrapping="Wrap"/>
- <StackPanel x:Name="Chapter01Panel" Height="82" Margin="8,0,19,0">
- <Grid x:Name="C01EPanel" Height="27" HorizontalAlignment="Left" Width="149">
- <View:HeaderProductionPartControler x:Name="ModernisationEditionController" Text="{Binding EditingLabel, Source={StaticResource LangLabels}}" d:LayoutOverrides="VerticalMargin"/>
- </Grid>
- <Grid x:Name="C01IPanel" Height="27" HorizontalAlignment="Left" Width="149">
-
- <View:HeaderProductionPartControler IsActive="{Binding IsChap01IndexingEnable}" x:Name="ModernisationIndexController" Text="Indexation"/>
- </Grid>
- <Grid x:Name="C01EnPanel" Height="28" HorizontalAlignment="Left" Width="149" RenderTransformOrigin="0.5,0.5">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C01EnLabel" Text="Enrichissement" TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment"/>
- </Grid>
- </StackPanel>
- </StackPanel>
- <StackPanel x:Name="ChapterPanel_Modernité" Width="182" RenderTransformOrigin="0.5,0.5">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel1" TextWrapping="Wrap"><Run Text="Moderni"/><Run Text="té"/></TextBlock>
- <StackPanel x:Name="Chapter02Panel" Height="82" Margin="8,0">
- <Grid x:Name="C02EPanel" Height="27" HorizontalAlignment="Left" Width="166">
- <View:HeaderProductionPartControler Text="{Binding EditingLabel, Source={StaticResource LangLabels}}" x:Name="ModerniteEditionController" ></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C02IPanel" Height="27" HorizontalAlignment="Left" Width="166">
- <!--<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C02ILabel" Text="Indexation" TextWrapping="Wrap" Margin="0,0,82,0"/>
- <Button Input:CommandService.Command="Chap02IndexingOkClick" x:Name="C02IButton" BorderThickness="1" Width="45" Content="Ok" HorizontalAlignment="Right" Margin="0,0,30,0" IsEnabled="{Binding IsChap02IndexingEnable}"/>-->
- <View:HeaderProductionPartControler x:Name="ModerniteIndexController" ></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C02EnPanel" Height="28" HorizontalAlignment="Left" Width="166">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C02EnLabel" Text="Enrichissement" TextWrapping="Wrap"/>
- </Grid>
- </StackPanel>
- </StackPanel>
- <StackPanel x:Name="ChapterPanel_PostModernité" RenderTransformOrigin="0.5,0.5" Width="189">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel2" Text="Post-Modernité" TextWrapping="Wrap"/>
- <StackPanel x:Name="Chapter03Panel" Height="82" Margin="8,0">
- <Grid x:Name="C03EPanel" Height="27" HorizontalAlignment="Left" Width="173">
- <!--<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C03ELabel" Text="Edition" TextWrapping="Wrap" Margin="0,0,89,0"/>
- <Button x:Name="C03EButton" BorderThickness="1" Width="43" Input:CommandService.Command="Chap03EditingOkClick" Content="Ok" HorizontalAlignment="Right" Margin="0,0,39,0" IsEnabled="{Binding IsChap03EditingEnable}"/>-->
- <View:HeaderProductionPartControler Text="{Binding EditingLabel, Source={StaticResource LangLabels}}" x:Name="PostModerniteEditionController"></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C03IPanel" Height="27" HorizontalAlignment="Left" Width="173">
- <!--<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C03ILabel" Text="Indexation" TextWrapping="Wrap" Margin="0,0,89,0"/>
- <Button Input:CommandService.Command="Chap03IndexingOkClick" x:Name="C03IButton" BorderThickness="1" Width="43" Content="Ok" HorizontalAlignment="Right" Margin="0,0,39,0" IsEnabled="{Binding IsChap03IndexingEnable}"/>-->
- <View:HeaderProductionPartControler x:Name="PostModerniteIndexController"></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C03EnPanel" Height="28" HorizontalAlignment="Left" Width="173">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C03EnLabel" Text="Enrichissement" TextWrapping="Wrap" Margin="0,0,89,0"/>
- </Grid>
- </StackPanel>
- </StackPanel>
- <StackPanel x:Name="ChapterPanel_Ouverture" Width="181" RenderTransformOrigin="0.5,0.5">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel3" Text="Ouverture" TextWrapping="Wrap"/>
- <StackPanel x:Name="Chapter04Panel" Height="82" Margin="8,0">
- <Grid x:Name="C04EPanel" Height="27" HorizontalAlignment="Left" Width="165">
- <!--<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C04ELabel" Text="Edition" TextWrapping="Wrap" Margin="0,0,81,0"/>
- <Button x:Name="C04EButton" BorderThickness="1" Input:CommandService.Command="Chap04EditingOkClick" Width="43" Content="Ok" HorizontalAlignment="Right" Margin="0,0,31,0" IsEnabled="{Binding IsChap04EditingEnable}"/>-->
- <View:HeaderProductionPartControler Text="{Binding EditingLabel, Source={StaticResource LangLabels}}" x:Name="OuvertureEditionController"></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C04IPanel" Height="27" HorizontalAlignment="Left" Width="165">
- <!--<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C04ILabel" Text="Indexation" TextWrapping="Wrap" Margin="0,0,81,0"/>
- <Button Input:CommandService.Command="Chap04IndexingOkClick" x:Name="C04IButton" BorderThickness="1" Width="43" Content="Ok" HorizontalAlignment="Right" Margin="0,0,31,0" IsEnabled="{Binding IsChap04IndexingEnable}"/>-->
- <View:HeaderProductionPartControler x:Name="OuvertureIndexController"></View:HeaderProductionPartControler>
- </Grid>
- <Grid x:Name="C04EnPanel" Height="28" HorizontalAlignment="Left" Width="165">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="C04EnLabel" Text="Enrichissement" TextWrapping="Wrap" Margin="0,0,81,0"/>
- </Grid>
- </StackPanel>
- </StackPanel>
+ <ListBox x:Name="listBox" Width="708" Style="{StaticResource HorizontalListBox}" ItemsSource="{Binding ProductionChapters}" SelectedItem="{Binding SelectedChapter,Mode=TwoWay}">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <View:HeaderProductionChapter />
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
</StackPanel>
<TextBlock x:Name="InstructionText" Text="{Binding Instruction, Mode=OneWay}" TextWrapping="Wrap" FontSize="9.333" HorizontalAlignment="Left" Margin="0,40,0,0" Width="240" Foreground="White"/>
</Grid>
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -20,7 +20,7 @@
// Required to initialize variables
InitializeComponent();
- ModernisationEditionController.Active();
+ /* ModernisationEditionController.Active();
ModernisationEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel;
ModernisationIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel;
@@ -35,10 +35,10 @@
OuvertureEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel;
- OuvertureIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel;
+ OuvertureIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel;*/
/////////////////////////--
- ModernisationEditionController.HeaderProductionPartSelected += new EventHandler<HeaderProductionPartControlerEventArgs>(HeaderProductionPartSelected);
+ /*ModernisationEditionController.HeaderProductionPartSelected += new EventHandler<HeaderProductionPartControlerEventArgs>(HeaderProductionPartSelected);
ModernisationIndexController.HeaderProductionPartSelected += new EventHandler<HeaderProductionPartControlerEventArgs>(HeaderProductionPartSelected);
ModerniteEditionController.HeaderProductionPartSelected += new EventHandler<HeaderProductionPartControlerEventArgs>(HeaderProductionPartSelected);
@@ -73,10 +73,10 @@
OuvertureEditionController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureEditionController_HeaderProductionPartFinished);
OuvertureIndexController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureIndexController_HeaderProductionPartFinished);
-
+ */
}
- void OuvertureIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
+ /* void OuvertureIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
{
if (SelectedPart != null)
{
@@ -258,7 +258,7 @@
}
public event EventHandler<HeaderProductionEventArgs> SelectedPart;
public event EventHandler<HeaderProductionEventArgs> FinishedPart;
-
+*/
}
public class HeaderProductionEventArgs : EventArgs
{
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionChapter.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionChapter.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -4,21 +4,27 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
+
xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
xmlns:View="clr-namespace:Iri.Modernisation.Controls.View"
xmlns:Lang="clr-namespace:Iri.Modernisation.Lang;assembly=Iri.Modernisation.Lang"
-
- x:Class="Iri.Modernisation.Controls.HeaderProductionChapter" d:DesignHeight="104">
-
- <StackPanel x:Name="ChapterPanel_Modernisation" Width="176" RenderTransformOrigin="0.5,0.5">
- <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel" Text="Modernisation" TextWrapping="Wrap"/>
+xmlns:Converter="clr-namespace:Iri.Modernisation.Controls.Converter"
+ x:Class="Iri.Modernisation.Controls.View.HeaderProductionChapter"
+
+ d:DesignHeight="104"
+ >
+ <UserControl.Resources>
+ <Converter:BoolToVisibility x:Key="BoolToVisibility"></Converter:BoolToVisibility>
+ </UserControl.Resources>
+ <StackPanel x:Name="ChapterPanel_Modernisation" Width="176" RenderTransformOrigin="0.5,0.5">
+ <TextBlock Style="{StaticResource CommonTextBlock}" x:Name="ChapterTitleLabel" Text="{Binding Title}" TextWrapping="Wrap"/>
<StackPanel x:Name="ChapterPanel" Height="82" Margin="8,0,19,0">
<Grid x:Name="EPanel" Height="27" HorizontalAlignment="Left" Width="149">
- <View:HeaderProductionPartControler x:Name="EditionController" Text="{Binding EditingLabel, Source={StaticResource LangLabels}}" d:LayoutOverrides="VerticalMargin"/>
+ <View:HeaderProductionPartControler HighLighted="{Binding HighLight}" x:Name="EditionController" Active="{Binding IsActive}" d:LayoutOverrides="VerticalMargin"/>
</Grid>
<Grid x:Name="IPanel" Height="27" HorizontalAlignment="Left" Width="149">
- <View:HeaderProductionPartControler IsActive="{Binding IsChap01IndexingEnable}" x:Name="IndexController" Text="Indexation"/>
+ <View:HeaderProductionPartControler HighLighted="{Binding HighLight}" Active="{Binding Editing}" x:Name="IndexController" Text="Indexation"/>
</Grid>
<Grid x:Name="EnPanel" Height="28" HorizontalAlignment="Left" Width="149" RenderTransformOrigin="0.5,0.5">
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="EnLabel" Text="Enrichissement" TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment"/>
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionChapter.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionChapter.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -7,15 +7,59 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
-
-namespace Iri.Modernisation.Controls
+using Iri.Modernisation.Controls.ViewModel;
+using Iri.Modernisation.BaseMVVM.Commands;
+namespace Iri.Modernisation.Controls.View
{
public partial class HeaderProductionChapter : UserControl
{
+
+
+
+
+
+ public bool Selected
+ {
+ get { return (bool)GetValue(SelectedProperty); }
+ set
+ {
+ SetValue(SelectedProperty, value);
+
+ }
+
+ }
+
+ // Using a DependencyProperty as the backing store for Selected. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty SelectedProperty =
+ DependencyProperty.Register("Selected", typeof(bool), typeof(HeaderProductionChapter), new PropertyMetadata(false));
+
+
+
public HeaderProductionChapter()
{
// Required to initialize variables
InitializeComponent();
- }
+ EditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel;
+ IndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel;
+ // Commands.ActivePart.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ActivePart_Executed);
+ EditionController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(EditionController_HeaderProductionPartFinished);
+ IndexController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(IndexController_HeaderProductionPartFinished);
+ }
+
+ void IndexController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e)
+ {
+ ((HeaderProductionChapterVM)DataContext).Indexing = true;
+ }
+
+ void EditionController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e)
+ {
+ ((HeaderProductionChapterVM)DataContext).Editing = true;
+ }
+
+ void ActivePart_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+
+ //IndexController.IsActive = true;
+ }
}
}
\ No newline at end of file
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionPartControler.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProductionPartControler.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -13,28 +13,61 @@
public partial class HeaderProductionPartControler : UserControl
{
-
+ public bool HighLighted
+ {
+ get { return (bool)GetValue(HighLightProperty); }
+ set {
+
+ SetValue(HighLightProperty, value);
+ }
+ }
- public bool IsActive
+ // Using a DependencyProperty as the backing store for HighLight. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty HighLightProperty =
+ DependencyProperty.Register("HighLighted", typeof(bool), typeof(HeaderProductionPartControler), new PropertyMetadata(new PropertyChangedCallback(HighLightChange)));
+ private static void HighLightChange(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
- get { return (bool)GetValue(IsActiveProperty); }
+
+ if((bool)e.NewValue)
+ {
+ ((HeaderProductionPartControler)sender).Select();
+ }
+ else
+ {
+ ((HeaderProductionPartControler)sender).UnSelect();
+ }
+ }
+ public bool Active
+ {
+ get { return (bool)GetValue(ActiveProperty); }
set
{
+
+ SetValue(ActiveProperty, value);
if (value)
{
- Active();
+ Activate();
+ if (HighLighted)
+ {
+ Select();
+ }
}
else
{
}
- SetValue(IsActiveProperty, value);
}
}
// Using a DependencyProperty as the backing store for IsActive. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty IsActiveProperty =
- DependencyProperty.Register("IsActive", typeof(bool), typeof(HeaderProductionPartControler), new PropertyMetadata(false));
+ public static readonly DependencyProperty ActiveProperty =
+ DependencyProperty.Register("Active", typeof(bool), typeof(HeaderProductionPartControler), new PropertyMetadata(new PropertyChangedCallback(ItemsSourceChanged)));
+ private static void ItemsSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+ {
+
+ ((HeaderProductionPartControler)sender).Active =(bool)e.NewValue;
+ }
+
@@ -57,7 +90,7 @@
{
// Required to initialize variables
InitializeComponent();
- IsActive = false;
+
_activated = false;
_finished= false;
@@ -69,7 +102,7 @@
private bool _activated;
private bool _finished;
- public void Active()
+ public void Activate()
{
if(!_activated && !_finished)
{
@@ -81,8 +114,10 @@
public void UnSelect()
{
- if(_activated && !_finished)
- VisualStateManager.GoToState(this,"Available",true);
+ if (_activated && !_finished)
+ {
+ VisualStateManager.GoToState(this, "Available", true);
+ }
}
private void Button_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
@@ -119,7 +154,6 @@
HeaderProductionPartSelected(this, new HeaderProductionPartControlerEventArgs(this));
}
}
- public event EventHandler<HeaderProductionPartControlerEventArgs> HeaderProductionPartUnSelected;
public event EventHandler<HeaderProductionPartControlerEventArgs> HeaderProductionPartFinished;
public event EventHandler<HeaderProductionPartControlerEventArgs> HeaderProductionPartSelected;
}
--- a/client/src/Iri.Modernisation.Controls/View/PolemicElement.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/PolemicElement.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -11,7 +11,7 @@
<UserControl.Resources>
<Converter:PolemicTypeColorConverter x:Key="PolemicTypeColorConverter"/>
</UserControl.Resources>
- <Grid x:Name="LayoutRoot" Background="{Binding Type, Converter={StaticResource PolemicTypeColorConverter}, Mode=TwoWay}" Height="24">
+ <Grid x:Name="LayoutRoot" Background="{Binding Type}" Height="24">
<ToolTipService.ToolTip>
<TextBlock Text="{Binding Title}"/>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableIndexElement.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableIndexElement.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -22,7 +22,7 @@
</StackPanel>
</ToolTipService.ToolTip>
- <Rectangle Fill="{Binding Chapter, Converter={StaticResource PolemicTypeColorConverter}, Mode=TwoWay}" Stroke="Black" StrokeThickness="0"/>
+ <Rectangle Fill="{Binding ChapterSolidColorBrush}" Stroke="Black" StrokeThickness="0"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" HorizontalAlignment="Left" Width="2" Cursor="SizeWE" d:LayoutOverrides="HorizontalAlignment"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" HorizontalAlignment="Right" Width="2" Cursor="SizeWE" d:LayoutOverrides="HorizontalAlignment"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" Height="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="8"/>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -18,7 +18,7 @@
</StackPanel>
</ToolTipService.ToolTip>
- <Rectangle Fill="{Binding Chapter, Converter={StaticResource PolemicTypeColorConverter}, Mode=TwoWay}" Stroke="Black" StrokeThickness="0"/>
+ <Rectangle Fill="{Binding ChapterSolidColorBrush}" Stroke="Black" StrokeThickness="0"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" HorizontalAlignment="Left" Width="2" Cursor="SizeWE" d:LayoutOverrides="HorizontalAlignment"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" HorizontalAlignment="Right" Width="2" Cursor="SizeWE" d:LayoutOverrides="HorizontalAlignment"/>
<Rectangle Fill="Black" Stroke="Black" StrokeThickness="0" Height="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="8"/>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -84,8 +84,9 @@
{
DataContext = new CustomableVideoElementVM(Vs)
{
- Chapter = (VideoChapterType)intChapter
- },
+ ChapterColor = FactoryVideoLivre.VideoChapterDescriptions[intChapter].Color
+ }
+
};
_temp.MouseLeftButtonDown += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonDown);
if ((VideoChapterType)intChapter == ((ProductionTimeLineVM)this.DataContext).SelectedBookChapter.Type)
@@ -103,17 +104,20 @@
else
{
AnnotationTimeStrip.Children.Clear();
-
+ int intChapter = 0;
foreach (ObservableCollection<SegmentIndex> Ocsi in ((ProductionTimeLineVM)this.DataContext).ListIndex)
{
foreach (SegmentIndex Si in Ocsi)
{
// PolemicElementControl an = new PolemicElementControl() { IsEnabled = false };
- CustomableIndexElement an = new CustomableIndexElement()
+ CustomableIndexElement an = new CustomableIndexElement()
+ {
+ DataContext = new CustomableIndexElementVM(Si)
{
- DataContext = new CustomableIndexElementVM(Si)
- };
+ ChapterColor = FactoryVideoLivre.VideoChapterDescriptions[intChapter].Color
+ }
+ };
//an.DataContext = new PolemicElementVM(Si);
@@ -125,6 +129,7 @@
}
+ intChapter++;
}
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -18,8 +18,8 @@
{
Commands.Initialize();
InitializeComponent();
- HeaderProductionElement.SelectedPart += Commands.ProductionTimeLine.EditorPartSelected.Execute;
- HeaderProductionElement.FinishedPart += Commands.ProductionTimeLine.EditorPartFinished.Execute;
+ //HeaderProductionElement.SelectedPart += Commands.ProductionTimeLine.EditorPartSelected.Execute;
+ //HeaderProductionElement.FinishedPart += Commands.ProductionTimeLine.EditorPartFinished.Execute;
//HeaderProductionElement.SelectedPart += new EventHandler<HeaderProductionEventArgs>(HeaderProductionElement_SelectedPart);
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -8,26 +8,42 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
-
+using Iri.Modernisation.BaseMVVM.Commands;
+using Iri.Modernisation.Data.Models;
namespace Iri.Modernisation.Controls.ViewModel
{
public class HeaderProductionChapterVM : BaseMVVM.ViewModel.ViewModel
{
- private bool _isEnable;
- public bool IsEnable
+ private VideoChapterDescription _chapterDescription;
+ public VideoChapterDescription ChapterDescription
{
get
{
- return _isEnable;
+ return _chapterDescription;
+ }
+ private set
+ {
+ _chapterDescription = value;
+ OnPropertyChanged("ChapterDescription");
+ }
+ }
+
+
+ private bool _isActive;
+ public bool IsActive
+ {
+ get
+ {
+ return _isActive;
}
set
{
- _isEnable = value;
- OnPropertyChanged("IsEnable");
+ _isActive = value;
+ OnPropertyChanged("IsActive");
}
}
- private bool _editing;
+ private bool _editing=false;
public bool Editing
{
get
@@ -37,15 +53,15 @@
set
{
_editing = value;
- if (_next != null)
- {
- _next.Enable();
- }
+
+ if(EditEnded!=null)
+ EditEnded();
+
OnPropertyChanged("Editing");
}
}
- private bool _indexing;
+ private bool _indexing=false;
public bool Indexing
{
get
@@ -56,19 +72,76 @@
{
_indexing = value;
OnPropertyChanged("Indexing");
+ if (Ended!=null)
+ {
+ Ended();
+ }
+ }
+ }
+
+ private bool _highLight;
+ public bool HighLight
+ {
+ get
+ {
+ return _highLight;
+ }
+ set
+ {
+ _highLight = value;
+ OnPropertyChanged(String.Empty);
}
}
- private HeaderProductionChapterVM _next;
+ private HeaderProductionChapterVM _next=null;
+ public HeaderProductionChapterVM Next
+ {
+ get
+ {
+ return _next;
+ }
+ set
+ {
+ _next = value;
+ OnPropertyChanged("Next");
+ }
+ }
+
+ private String _title;
+ public String Title
+ {
+ get
+ {
+ return _title;
+ }
+ set
+ {
+ _title = value;
+ OnPropertyChanged("Title");
+ }
+ }
public void Enable()
{
- IsEnable = true;
+ IsActive = true;
+ // Commands.ActivePart.Execute(null,this);
}
- public HeaderProductionChapterVM()
+
+
+ public HeaderProductionChapterVM(VideoChapterDescription Vcd)
{
+ _chapterDescription = Vcd;
+ _title = Vcd.Title;
+ HighLight = false;
+
}
+
+ public delegate void EditEndedDelegate();
+ public event EditEndedDelegate EditEnded;
+
+ public delegate void EndedDelegate();
+ public event EndedDelegate Ended;
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -17,205 +17,56 @@
public class HeaderProductionVM : BaseMVVM.ViewModel.ViewModel
{
- private List<HeaderProductionChapter> _productionChapters;
-
- #region Avancement
-
-
- private bool _isChap01EditingComplete = false;
- public bool IsChap01EditingComplete
- {
- get
- {
- return _isChap01EditingComplete;
- }
- set
- {
- _isChap01EditingComplete = value;
- OnPropertyChanged("IsChap01EditingComplete");
-
- GeneralRefresh();
-
- }
- }
-
- private bool _isChap01IndexingComplete = false;
- public bool IsChap01IndexingComplete
- {
- get
- {
- return _isChap01IndexingComplete;
- }
- set
- {
- _isChap01IndexingComplete = value;
- OnPropertyChanged("IsChap01IndexingComplete");
- GeneralRefresh();
- }
- }
-
- private bool _isChap02EditingComplete = false;
- public bool IsChap02EditingComplete
+ private List<HeaderProductionChapterVM> _productionChapters;
+ public List<HeaderProductionChapterVM> ProductionChapters
{
get
{
- return _isChap02EditingComplete;
- }
- set
- {
- _isChap02EditingComplete = value;
- OnPropertyChanged("IsChap02EditingComplete");
- GeneralRefresh();
- }
- }
-
- private bool _isChap02IndexingComplete = false;
- public bool IsChap02IndexingComplete
- {
- get
- {
- return _isChap02IndexingComplete;
- }
- set
- {
- _isChap02IndexingComplete = value;
- OnPropertyChanged("IsChap02IndexingComplete");
- GeneralRefresh();
- }
- }
-
- private bool _isChap03EditingComplete= false;
- public bool IsChap03EditingComplete
- {
- get
- {
- return _isChap03EditingComplete;
- }
- set
- {
- _isChap03EditingComplete = value;
- OnPropertyChanged("IsChap03EditingComplete");
- GeneralRefresh();
- }
- }
-
- private bool _isChap03IndexingComplete= false;
- public bool IsChap03IndexingComplete
- {
- get
- {
- return _isChap03IndexingComplete;
+ return _productionChapters;
}
set
{
- _isChap03IndexingComplete = value;
- OnPropertyChanged("IsChap03IndexingComplete");
- GeneralRefresh();
- }
- }
-
- private bool _isChap04EditingComplete= false;
- public bool IsChap04EditingComplete
- {
- get
- {
- return _isChap04EditingComplete;
- }
- set
- {
- _isChap04EditingComplete = value;
- OnPropertyChanged("IsChap04EditingComplete");
- GeneralRefresh();
+ _productionChapters = value;
+ OnPropertyChanged("ProductionChapters");
}
}
- private bool _isChap04IndexingComplete= false;
- public bool IsChap04IndexingComplete
- {
- get
- {
- return _isChap04IndexingComplete;
- }
- set
- {
- _isChap04IndexingComplete = value;
- OnPropertyChanged("IsChap04IndexingComplete");
- GeneralRefresh();
- }
- }
- #endregion
-
- #region Etat des Boutton
- private void GeneralRefresh()
- {
- OnPropertyChanged(String.Empty);
-
- }
- public bool IsChap01EditingEnable
+ private HeaderProductionChapterVM _selectedChapter;
+ public HeaderProductionChapterVM SelectedChapter
{
get
{
- return !IsChap01EditingComplete;
- }
- }
- public bool IsChap01IndexingEnable
- {
- get
- {
- return IsChap01EditingComplete^IsChap01IndexingComplete;
+ return _selectedChapter;
}
- }
- public bool IsChap02EditingEnable
- {
- get
- {
- return IsChap01EditingComplete ^ IsChap02EditingComplete;
+ set
+ {
+ if (_selectedChapter != null)
+ {
+ _selectedChapter.HighLight = false;
+ }
+
+ _selectedChapter = value;
+
+ value.HighLight = true;
+ if (Change != null)
+ Change(this, new HeaderProductionVMArgs(SelectedChapter));
+
+
+ OnPropertyChanged("SelectedChapter");
}
- }
- public bool IsChap02IndexingEnable
- {
- get
- {
- return IsChap02EditingComplete ^ IsChap02IndexingComplete;
- }
+
}
- public bool IsChap03EditingEnable
- {
- get
- {
- return IsChap02EditingComplete ^ IsChap03EditingComplete;
- }
- }
- public bool IsChap03IndexingEnable
- {
- get
- {
- return IsChap03EditingComplete ^ IsChap03IndexingComplete;
- }
- }
- public bool IsChap04EditingEnable
- {
- get
- {
- return IsChap03EditingComplete ^ IsChap04EditingComplete;
- }
- }
- public bool IsChap04IndexingEnable
- {
- get
- {
- return IsChap04EditingComplete^IsChap04IndexingComplete;
- }
- }
- #endregion
+
public bool IsVideoBookComplete
{
get
{
- return _isChap01EditingComplete && _isChap01IndexingComplete
- && _isChap02EditingComplete && _isChap02IndexingComplete
- && _isChap03EditingComplete && _isChap03IndexingComplete
- && _isChap04EditingComplete && _isChap04IndexingComplete;
+ bool test = true;
+ foreach(HeaderProductionChapterVM Hpcvm in ProductionChapters )
+ {
+ test = Hpcvm.Indexing && test;
+ }
+ return test;
}
}
private String _instruction;
@@ -236,66 +87,63 @@
}
public HeaderProductionVM()
{
-
+ _productionChapters = new List<HeaderProductionChapterVM>();
+ HeaderProductionChapterVM temp = null;
+ foreach (VideoChapterDescription Vcd in FactoryVideoLivre.VideoChapterDescriptions)
+ {
+ temp = new HeaderProductionChapterVM(Vcd);
+ temp.Ended +=new HeaderProductionChapterVM.EndedDelegate(temp_Ended);
+ temp.EditEnded += new HeaderProductionChapterVM.EditEndedDelegate(temp_EditEnded);
+ temp.HighLight = false;
+ _productionChapters.Add(temp);
+ if(_productionChapters.Count > 1)
+ {
+ _productionChapters[_productionChapters.Count - 2].EditEnded+=new HeaderProductionChapterVM.EditEndedDelegate(temp.Enable);
+
+ }
+
+
+ }
_instruction = Iri.Modernisation.Controls.Resources.HeaderProduction.InstructionTextRessource.Introduction;
+
+ InitializeCommands();
+ ProductionChapters[0].Enable();
+
+
+ }
- InitializeCommands();
+ void temp_EditEnded()
+ {
+ if(Change!=null)
+ Change(this,new HeaderProductionVMArgs(SelectedChapter));
+ }
+
+
+
+ void temp_Ended()
+ {
+ OnPropertyChanged("IsVideoBookComplete");
+ if (Change != null)
+ Change(this, new HeaderProductionVMArgs(SelectedChapter));
}
private void InitializeCommands()
{
- Commands.HeaderProduction.Chap01EditingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap01EditingOkClick_Executed);
- Commands.HeaderProduction.Chap02EditingOkClick.Executed+=new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap02EditingOkClick_Executed);
- Commands.HeaderProduction.Chap03EditingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap03EditingOkClick_Executed);
- Commands.HeaderProduction.Chap04EditingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap04EditingOkClick_Executed);
-
- Commands.HeaderProduction.Chap01IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap01IndexingOkClick_Executed);
- Commands.HeaderProduction.Chap02IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap02IndexingOkClick_Executed);
- Commands.HeaderProduction.Chap03IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap03IndexingOkClick_Executed);
- Commands.HeaderProduction.Chap04IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap04IndexingOkClick_Executed);
}
- #region OkClick
- #region Index
- private void Chap04IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap04IndexingComplete = true;
- }
-
- private void Chap03IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap03IndexingComplete = true;
- }
-
- private void Chap02IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap02IndexingComplete = true;
- }
+ public event EventHandler<HeaderProductionVMArgs> Change;
+
+
+ }
+ public class HeaderProductionVMArgs : EventArgs
+ {
+
+ public HeaderProductionChapterVM ChapterHeader { get; private set; }
- private void Chap01IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap01IndexingComplete = true;
- }
- #endregion
- #region Edit
- private void Chap04EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap04EditingComplete = true;
- }
-
- private void Chap03EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ public HeaderProductionVMArgs( HeaderProductionChapterVM chapterHeader)
{
- IsChap03EditingComplete = true;
- }
+ ChapterHeader = chapterHeader;
+
- private void Chap02EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- IsChap02EditingComplete = true;
+
}
- private void Chap01EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- this.IsChap01EditingComplete = true;
- GeneralRefresh();
- }
- #endregion
- #endregion
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -188,22 +188,11 @@
/// <summary>
/// PolemicType de l'élément
/// </summary>
- public object Type
+ public SolidColorBrush Type
{
get
{
- if (_element is Annotation)
- {
- return ((Annotation)_element).Type;
- }
- else if(_element is SegmentIndex)
- {
- return ((SegmentIndex)_element).Chapter.Type;
- }
- else
- {
- return PolemicElementType.Basic;
- }
+ return new SolidColorBrush(Chapter.Color);
}
}
private PolemicElement _element { get; set; }
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/CustomableIndexElementVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/CustomableIndexElementVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -77,17 +77,24 @@
}
- private VideoChapterType _chapter;
- public VideoChapterType Chapter
+ private Color _chapterColor;
+ public Color ChapterColor
{
get
{
- return _segmentIndex.Chapter.Type;
+ return _chapterColor;
}
set
{
- _chapter = value;
- OnPropertyChanged("Chapter");
+ _chapterColor = value;
+ OnPropertyChanged("ChapterColor");
+ }
+ }
+ public SolidColorBrush ChapterSolidColorBrush
+ {
+ get
+ {
+ return new SolidColorBrush(this.ChapterColor);
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/CustomableVideoElementVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/CustomableVideoElementVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -82,8 +82,8 @@
}
}
- private double _duration;
- public new double Duration
+
+ public double Duration
{
get
{
@@ -106,7 +106,27 @@
}
}
- public new TimeSpan DurationTimeSpan
+ private Color _chapterColor;
+ public Color ChapterColor
+ {
+ get
+ {
+ return _chapterColor;
+ }
+ set
+ {
+ _chapterColor = value;
+ OnPropertyChanged("ChapterColor");
+ }
+ }
+ public SolidColorBrush ChapterSolidColorBrush
+ {
+ get
+ {
+ return new SolidColorBrush(this.ChapterColor);
+ }
+ }
+ public TimeSpan DurationTimeSpan
{
get
{
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -42,7 +42,7 @@
}
private VideoBook _newBook;
- private ObservableCollection<VideoSequence>[] _listVideoSequences = new ObservableCollection<VideoSequence>[4];
+ private ObservableCollection<VideoSequence>[] _listVideoSequences;
/// <summary>
/// Ensembles des VideoSequences par Chapitre
@@ -268,37 +268,35 @@
Commands.TimeChange.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(TimeChange_Executed);
#endregion
+
#region VideoSequences CollectionChanged
- _listVideoSequences[0].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listVideoSequences[1].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listVideoSequences[2].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listVideoSequences[3].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
+ foreach (ObservableCollection<VideoSequence> Ocvs in _listVideoSequences)
+ {
+ Ocvs.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
+ }
#endregion
#region SegmentIndex CollectionChanged
- _listSegmentIndex[0].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listSegmentIndex[1].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listSegmentIndex[2].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
- _listSegmentIndex[3].CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
+ foreach (ObservableCollection<SegmentIndex> Ocsi in _listSegmentIndex)
+ {
+ Ocsi.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedVideoSequences_CollectionChanged);
+ }
#endregion
}
public ProductionTimeLineVM()
{
_newBook = new VideoBook();
- _listVideoSequences = new ObservableCollection<VideoSequence>[4]
+
+ _listVideoSequences = new ObservableCollection<VideoSequence>[FactoryVideoLivre.NumberOfChapters];
+ _listSegmentIndex = new ObservableCollection<SegmentIndex>[FactoryVideoLivre.NumberOfChapters];
+
+ for (int i = 0; i<FactoryVideoLivre.NumberOfChapters;i++ )
{
- new ObservableCollection<VideoSequence>(),
- new ObservableCollection<VideoSequence>(),
- new ObservableCollection<VideoSequence>(),
- new ObservableCollection<VideoSequence>()
- };
- _listSegmentIndex = new ObservableCollection<SegmentIndex>[4]
- {
- new ObservableCollection<SegmentIndex>(),
- new ObservableCollection<SegmentIndex>(),
- new ObservableCollection<SegmentIndex>(),
- new ObservableCollection<SegmentIndex>()
- };
+ _listVideoSequences[i] = new ObservableCollection<VideoSequence>();
+ _listSegmentIndex[i] = new ObservableCollection<SegmentIndex>();
+ }
+
+
// PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ProductionTimeLineVM_PropertyChanged);
// SelectedVideoSequences = new ObservableCollection<VideoSequence>();
InitializeCommands();
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Mon Jan 04 10:29:39 2010 +0100
@@ -162,10 +162,18 @@
EndTrim = new TimeSpan(0, 0, 0),
});
}
+ ViewModelHeaderProduction.Change += new EventHandler<HeaderProductionVMArgs>(ViewModelHeaderProduction_Change);
InitializeCommands();
+ OnPropertyChanged(String.Empty);
}
+ void ViewModelHeaderProduction_Change(object sender, HeaderProductionVMArgs e)
+ {
+ ViewModelProductionTimeLine.IsIndexing = e.ChapterHeader.Editing;
+ ViewModelProductionTimeLine.SelectedChapter = e.ChapterHeader.ChapterDescription.Id ;
+ }
+
private void ViewModelProductionTimeLine_SwitchVideo(object sender, ProductionTimeLineVMEventArgs e)
{
ViewModelMasterVideoViewer.Source = (e.VideoSequence.Path);
--- a/client/src/Iri.Modernisation.Data/ClassDiagram1.cd Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Data/ClassDiagram1.cd Mon Jan 04 10:29:39 2010 +0100
@@ -37,7 +37,7 @@
<Class Name="Iri.Modernisation.Data.Models.PolemicLink">
<Position X="10.25" Y="2" Width="1.5" />
<TypeIdentifier>
- <HashCode>AAAAEAAAAAAAAAAAAAAAIAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
+ <HashCode>AAAAEAAAAAAAAEAAAAAAIAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Models\PolemicLink.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
@@ -71,8 +71,8 @@
<AssociationLine Name="Chapters" Type="Iri.Modernisation.Data.Models.VideoChapter" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="3.25" Y="7.25" />
- <Point X="3.25" Y="5.651" />
- <Point X="2.25" Y="5.651" />
+ <Point X="3.25" Y="5.953" />
+ <Point X="2.25" Y="5.953" />
</Path>
</AssociationLine>
<TypeIdentifier>
@@ -89,7 +89,7 @@
<Class Name="Iri.Modernisation.Data.Models.VideoChapter">
<Position X="0.75" Y="4.25" Width="1.5" />
<TypeIdentifier>
- <HashCode>AAAAAAAAAEAAAEBAAAAAAAAAQAAAAAAAAQEAAAAAAAA=</HashCode>
+ <HashCode>AAAAAAAAAEAAAEBAAAAAEAAAQAAAAAAAAQEAgAAAAAA=</HashCode>
<FileName>Models\VideoChapter.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
--- a/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Mon Jan 04 10:29:39 2010 +0100
@@ -61,6 +61,7 @@
<Compile Include="Ldt\Readers.cs" />
<Compile Include="Models\Annotation.cs" />
<Compile Include="Models\AnnotationSession.cs" />
+ <Compile Include="Models\FactoryVideoLivre.cs" />
<Compile Include="Models\PolemicElement.cs" />
<Compile Include="Models\PolemicLink.cs" />
<Compile Include="Models\SegmentElement.cs" />
@@ -68,6 +69,7 @@
<Compile Include="Models\User.cs" />
<Compile Include="Models\VideoBook.cs" />
<Compile Include="Models\VideoChapter.cs" />
+ <Compile Include="Models\VideoChapterDescription.cs" />
<Compile Include="Models\VideoSequence.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs Mon Jan 04 10:29:39 2010 +0100
@@ -0,0 +1,88 @@
+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.Xml.Linq;
+using System.Collections.Generic;
+namespace Iri.Modernisation.Data.Models
+{
+ public static class FactoryVideoLivre
+ {
+ public static WebClient xmlClient = new WebClient();
+ private static XDocument _configDoc;
+ public static VideoChapterDescription[] VideoChapterDescriptions {get;private set;}
+ public static int NumberOfChapters
+ {
+ get
+ {
+ return VideoChapterDescriptions.Length;
+ }
+ }
+ static FactoryVideoLivre()
+ {
+
+
+ }
+ static public void Initialize()
+ {
+ LoadXMLFile();
+ }
+ static private void LoadXMLFile()
+ {
+
+
+
+ xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded);
+ xmlClient.DownloadStringAsync(new Uri("ProjectConfig.xml",UriKind.Relative));
+
+
+ }
+
+ static void XMLFileLoaded(object sender, DownloadStringCompletedEventArgs e)
+ {
+
+ if (e.Error == null)
+ {
+
+ _configDoc = XDocument.Parse(e.Result);
+ List<VideoChapterDescription> temp = new List<VideoChapterDescription>();
+ int nb = 0;
+ foreach (XElement XChapter in _configDoc.Root.Element("VideoBook").Elements())
+ {
+ temp.Add(new VideoChapterDescription(nb, XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
+ nb++;
+ }
+ MessageBox.Show(nb.ToString());
+ VideoChapterDescriptions = temp.ToArray();
+ }
+ else
+ {
+ //MessageBox.Show(e.Error.Message);
+ }
+
+ }
+ static public void Load(string path)
+ {
+ _configDoc = XDocument.Load(path);
+ List<VideoChapterDescription> temp = new List<VideoChapterDescription>();
+ int nb = 0;
+ foreach (XElement XChapter in _configDoc.Root.Element("VideoBook").Elements())
+ {
+ temp.Add(new VideoChapterDescription(nb,XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
+ nb++;
+ }
+ VideoChapterDescriptions = temp.ToArray();
+ }
+
+
+
+
+
+ }
+}
--- a/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Mon Jan 04 10:29:39 2010 +0100
@@ -46,11 +46,15 @@
/// </summary>
public VideoBook()
{
- Chapters = new VideoChapter[4];
- Chapters[0] = new VideoChapter(this, "Modernisation", VideoChapterType.Modernisation);
- Chapters[1] = new VideoChapter(this, "Modernité", VideoChapterType.Modernite);
- Chapters[2] = new VideoChapter(this, "Post-Modernité",VideoChapterType.Postmodernite);
- Chapters[3] = new VideoChapter(this, "Ouverture",VideoChapterType.Ouverture);
+ Chapters = new VideoChapter[FactoryVideoLivre.VideoChapterDescriptions.Length];
+ for (int nbChapitre = 0; nbChapitre < FactoryVideoLivre.VideoChapterDescriptions.Length; nbChapitre++)
+ {
+ Chapters[nbChapitre] = new VideoChapter(this,
+ FactoryVideoLivre.VideoChapterDescriptions[nbChapitre].Id,
+ FactoryVideoLivre.VideoChapterDescriptions[nbChapitre].Title,
+ FactoryVideoLivre.VideoChapterDescriptions[nbChapitre].Color);
+
+ }
}
--- a/client/src/Iri.Modernisation.Data/Models/VideoChapter.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoChapter.cs Mon Jan 04 10:29:39 2010 +0100
@@ -54,19 +54,23 @@
/// </summary>
public List<VideoSequence> VideoSequences { get; set; }
+ public Color Color { get; set; }
+ public int IdChap { get; set; }
+
/// <summary>
/// Constructeur
/// </summary>
/// <param name="name">Nom du chaptire</param>
- public VideoChapter(VideoBook fromBook,String name,VideoChapterType type)
+ public VideoChapter(VideoBook fromBook, int idChap, String name, Color color)
{
Book = fromBook;
- Type = type;
+ Color = color;
+ IdChap = idChap;
Title = name;
Index = new List<SegmentIndex>();
Annotations = new List<Annotation>();
VideoSequences = new List<VideoSequence>();
-
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/VideoChapterDescription.cs Mon Jan 04 10:29:39 2010 +0100
@@ -0,0 +1,32 @@
+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.Globalization;
+
+namespace Iri.Modernisation.Data.Models
+{
+ public class VideoChapterDescription
+ {
+ public String Title { get; set; }
+ public Color Color {get;set;}
+ public int Id { get; set; }
+ public VideoChapterDescription(int id,String title,String color)
+ {
+ Id = id;
+ Title = title;
+ Color = Color.FromArgb(
+ byte.Parse(color.Substring(1,2),NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(3, 2), NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(5, 2), NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(7, 2), NumberStyles.AllowHexSpecifier));
+
+ }
+ }
+}
--- a/client/src/Iri.Modernisation/App.xaml Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation/App.xaml Mon Jan 04 10:29:39 2010 +0100
@@ -8,6 +8,8 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_CommonTemplate.xaml"/>
<ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_AnnotationMaker.xaml"/>
+ <ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_ConsultMenu.xaml"/>
+ <ResourceDictionary Source="/Iri.Modernisation.Styles;Component/Templates_Binder.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
--- a/client/src/Iri.Modernisation/Iri.Modernisation.csproj Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation/Iri.Modernisation.csproj Mon Jan 04 10:29:39 2010 +0100
@@ -112,6 +112,9 @@
<Name>Iri.Modernisation.Styles</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <Content Include="ProjectConfig.xml" />
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.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.
--- a/client/src/Iri.Modernisation/MainPage.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/src/Iri.Modernisation/MainPage.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -25,10 +25,24 @@
public MainPage()
{
Commands.Initialize();
+ FactoryVideoLivre.Initialize();
+ // FactoryVideoLivre.xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+ FactoryVideoLivre.Load("ProjectConfig.xml");
InitializeComponent();
-
- MainElement.DataContext = new MainVM(new List<VideoBook>());
-
+
+ MainElement.DataContext = new MainVM(new List<VideoBook>());
+ }
+
+ void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+ if (e.Error == null)
+ {
+
+ }
+ else
+ {
+ MessageBox.Show(e.Error.InnerException.Message);
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation/ProjectConfig.xml Mon Jan 04 10:29:39 2010 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ProjectConfig>
+ <VideoBook>
+ <VideoChapter name="Modernisation" color="#FFD6A382"/>
+ <VideoChapter name="Modernité" color="#FFBFA84E"/>
+ <VideoChapter name="Post-Modernité" color="#FFB5CB29"/>
+ <VideoChapter name="Ouverture" color="#FF5BCC5B"/>
+ </VideoBook>
+ <Annotations>
+
+ </Annotations>
+</ProjectConfig>
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/Iri.Modernisation.Test.MainInterface.csproj Tue Dec 22 16:22:22 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/Iri.Modernisation.Test.MainInterface.csproj Mon Jan 04 10:29:39 2010 +0100
@@ -116,6 +116,7 @@
<Content Include="Content\ENMI08-XIII_francoisbourdoncle-jauffret.ldt" />
<Content Include="Content\ENMI08-XIV_alainmille-jauffret-v01.ldt" />
<Content Include="Content\ENMI08-XXI-scottlash-jauffret-v04.ldt" />
+ <Content Include="ProjectConfig.xml" />
<None Include="Properties\OutOfBrowserSettings.xml" />
<None Include="Properties\AppManifest.xml" />
</ItemGroup>
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Tue Dec 22 16:22:22 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Mon Jan 04 10:29:39 2010 +0100
@@ -20,35 +20,36 @@
public partial class MainPage : UserControl
{
public MainPage()
- {
- Commands.Initialize();
- InitializeComponent();
- List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
+ { Commands.Initialize();
+ FactoryVideoLivre.Initialize();
+ //FactoryVideoLivre.xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+ FactoryVideoLivre.Load("ProjectConfig.xml");
+ List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
/*************** Content Demo ***************/
- /* Pour pouvoir tester avec des vidéos :
- * - Placer les video dans le dossier Bin
- * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier
- */
- LDTFile file = new LDTFile();
+ /* Pour pouvoir tester avec des vidéos :
+ * - Placer les video dans le dossier Bin
+ * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier
+ */
+ LDTFile file = new LDTFile();
// file.Load(new Uri("Modernisation.FileConvertor;component/ENMI08-I-bernard_stiegler-jauffret.ldt", UriKind.Relative).ToString());
file.Load("Content/ENMI08-I-bernard_stiegler-jauffret.ldt");
-
+
LDTFileReader _LDTFR = new LDTFileReader("Content/ENMI08-I-bernard_stiegler-jauffret.ldt");
VideoBook temp = _LDTFR.VideoBook;
temp.Chapters[0].VideoSequences = new List<VideoSequence>();
temp.Chapters[0].VideoSequences.Add(new VideoSequence());
- temp.MediaPath = Application.Current.Host.Source.Host+@"/test.wmv";
+ temp.MediaPath = Application.Current.Host.Source.Host + @"/test.wmv";
SelectedVideoBooks.Add(temp);
temp = new LDTFileReader("Content/ENMI08-II-antoine_masson-jauffret.ldt").VideoBook;
-
- temp.MediaPath = Application.Current.Host.Source.Host+@"/video.mp4";
+
+ temp.MediaPath = Application.Current.Host.Source.Host + @"/video.mp4";
SelectedVideoBooks.Add(temp);
SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-III_elizabethrosse-psychologie_et_reseaux_sociaux-jauffret.ldt").VideoBook);
- // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook);
+ // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook);
/********************************************/
/*************** Initialisation des commandes ***************/
-
+ InitializeComponent();
// Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
/********************************************/
MainElement.DataContext = new MainVM(SelectedVideoBooks);
@@ -61,8 +62,27 @@
ProductionViewElement.DataContext = new HeaderProductionVM();
/********************************************/
+
+ //èMainElement.DataContext = new MainVM(new List<VideoBook>());
+
}
+ void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+ if (e.Error == null)
+ {
+
+
+ }
+ else
+ {
+ MessageBox.Show(e.Error.InnerException.Message);
+ }
+ }
+
+
+
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/ProjectConfig.xml Mon Jan 04 10:29:39 2010 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ProjectConfig>
+ <VideoBook>
+ <VideoChapter name="Modernisation" color="#FFD6A382"/>
+ <VideoChapter name="Modernité" color="#FFBFA84E"/>
+ <VideoChapter name="Post-Modernité" color="#FFB5CB29"/>
+ <VideoChapter name="Ouverture" color="#FF5BCC5B"/>
+ </VideoBook>
+ <Annotations>
+
+ </Annotations>
+</ProjectConfig>