# HG changeset patch
# User Matthieu Totet
# Date 1260268767 -3600
# Node ID 7d044e7562ea458d99797b34f6277e5567f076fa
# Parent 66911d0f0eb6552a1601682b760df2965cd37219
Update ProductionView
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs
--- a/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Tue Dec 08 11:39:27 2009 +0100
@@ -487,7 +487,28 @@
private set;
}
-
+ public static class ProductionView
+ {
+
+ static ProductionView()
+ {
+ ClickAddSelectedRecord = new Command("ClickAddSelectedRecord");
+ VideoRecordUpdated = new Command("VideoRecordUpdated");
+ }
+ public static Command ClickAddSelectedRecord
+ {
+ get;
+ private set;
+ }
+ public static Command VideoRecordUpdated
+ {
+ get;
+ private set;
+ }
+ public static void Initialize()
+ {
+ }
+ }
///
/// Ensure static fields are initialized
///
@@ -503,7 +524,8 @@
HeaderProduction.Initialize();
ProductionTimeLine.Initialize();
VideoViewer.Initialize();
- ProductionTimeLine.Initialize();
+ ProductionView.Initialize();
+
}
}
}
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml
--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml Tue Dec 08 11:39:27 2009 +0100
@@ -24,7 +24,7 @@
-
+
@@ -39,7 +39,7 @@
-
+
-
+
-
+
+
+
+
+
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Tue Dec 08 11:39:27 2009 +0100
@@ -10,6 +10,7 @@
using Iri.Modernisation.BaseMVVM.Commands;
using Iri.Modernisation.Data.Models;
using Iri.Modernisation.Controls.ViewModel;
+using SLExtensions.Collections.ObjectModel;
namespace Iri.Modernisation.Controls.View
{
@@ -26,16 +27,50 @@
{
// Required to initialize variables
InitializeComponent();
-
- Commands.Action.Executed += new EventHandler(Action_Executed);
+ Commands.ProductionView.VideoRecordUpdated.Executed += new EventHandler(VideoRecordUpdated_Executed);
+ Commands.Action.Executed += new EventHandler(Action_Executed);
}
+ void VideoRecordUpdated_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ UpdateElements();
+ }
+
+
void Action_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
AddSequenceButton.Content = ((MouseEventArgs)e.Parameter).GetPosition(this).X;
}
+ public void UpdateElements()
+ {
+ if (DataContext != null)
+ {
+ VideoTimeStrip.Children.Clear();
+ int intChapter = 0;
+ foreach(ObservableCollection Ocvs in ((ProductionTimeLineVM)this.DataContext).ListVideoSequences)
+ {
+ foreach (VideoSequence Vs in Ocvs)
+ {
+ CustomableVideoElement _temp = new CustomableVideoElement()
+ {
+ DataContext = new CustomableVideoElementVM(Vs)
+ {
+ Chapter = (VideoChapterType)intChapter
+ },
+ };
+ _temp.MouseMove += new MouseEventHandler(CustomableVideoElement_MouseMove);
+ _temp.MouseLeftButtonDown += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonDown);
+ _temp.MouseLeftButtonUp += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonUp);
+ VideoTimeStrip.Children.Add(_temp);// TODO: Add event handler implementation here.
+
+ }
+ intChapter++;
+ }
+
+ }
+ }
private void AddSequenceButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
Random rndNumbers = new Random();
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Tue Dec 08 11:39:27 2009 +0100
@@ -2,16 +2,32 @@
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"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Iri.Modernisation.Controls.View.ProductionView" mc:Ignorable="d" Height="688">
-
+ xmlns:Lang="clr-namespace:Iri.Modernisation.Lang;assembly=Iri.Modernisation.Lang"
+ xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
+
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Iri.Modernisation.Controls.View.ProductionView" mc:Ignorable="d" Height="688">
+
+
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml.cs Tue Dec 08 11:39:27 2009 +0100
@@ -20,6 +20,7 @@
InitializeComponent();
HeaderProductionElement.SelectedPart += Commands.ProductionTimeLine.EditorPartSelected.Execute;
HeaderProductionElement.FinishedPart += Commands.ProductionTimeLine.EditorPartFinished.Execute;
+
//HeaderProductionElement.SelectedPart += new EventHandler(HeaderProductionElement_SelectedPart);
}
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Tue Dec 08 11:39:27 2009 +0100
@@ -13,6 +13,7 @@
using Iri.Modernisation.BaseMVVM.ViewModel;
using Iri.Modernisation.Controls.View;
using System.Collections.Generic;
+using SLExtensions.Collections.ObjectModel;
namespace Iri.Modernisation.Controls.ViewModel
{
public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel
@@ -34,17 +35,31 @@
}
private VideoBook _newBook;
- private List[] _listVideoSequences = new List[4];
- public List SelectedVideoSequences
+ private ObservableCollection[] _listVideoSequences = new ObservableCollection[4];
+ public ObservableCollection[] ListVideoSequences
{
get
{
+ return _listVideoSequences;
+ }
+ set
+ {
+ _listVideoSequences = value;
+ OnPropertyChanged("ListVideoSequences");
+ }
+ }
+
+ public ObservableCollection SelectedVideoSequences
+ {
+ get
+ {
+
return _listVideoSequences[SelectedChapter];
}
set
{
_listVideoSequences[SelectedChapter] = value;
- _newBook.Chapters[SelectedChapter].VideoSequences = value;
+ //_newBook.Chapters[SelectedChapter].VideoSequences = value;
OnPropertyChanged("SelectedVideoSequences");
}
}
@@ -115,16 +130,37 @@
public ProductionTimeLineVM()
{
_newBook = new VideoBook();
-
-
+ _listVideoSequences = new ObservableCollection[4]
+ {
+ new ObservableCollection(),
+ new ObservableCollection(),
+ new ObservableCollection(),
+ new ObservableCollection()
+ };
+ // PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ProductionTimeLineVM_PropertyChanged);
+ // SelectedVideoSequences = new ObservableCollection();
Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler(EditorPartSelected_Executed);
Commands.ProductionTimeLine.EditorPartFinished.Executed += new EventHandler(EditorPartFinished_Executed);
- }
+ _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);
+
+ }
+
+ void SelectedVideoSequences_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ Commands.ProductionView.VideoRecordUpdated.Execute();
+ }
+
+ void ProductionTimeLineVM_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ Commands.ProductionView.VideoRecordUpdated.Execute();
+ }
void EditorPartFinished_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
SelectedChapter = -1;
-
}
void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Tue Dec 08 11:39:27 2009 +0100
@@ -11,10 +11,44 @@
using Iri.Modernisation.BaseMVVM.Commands;
using Iri.Modernisation.BaseMVVM.ViewModel;
using Iri.Modernisation.Controls.View;
+using Iri.Modernisation.Data.Models;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
namespace Iri.Modernisation.Controls.ViewModel
{
public class ProductionViewVM : BaseMVVM.ViewModel.ViewModel
{
+
+ private VideoSequence _selectedVideoSequence;
+ public VideoSequence SelectedVideoSequence
+ {
+ get
+ {
+ return _selectedVideoSequence;
+ }
+ set
+ {
+ _selectedVideoSequence = value;
+ OnPropertyChanged("SelectedVideoSequence");
+
+ }
+ }
+
+ private ObservableCollection _recordedVideoSequences;
+ public ObservableCollection RecordedVideoSequences
+ {
+ get
+ {
+ return _recordedVideoSequences;
+ }
+ set
+ {
+ _recordedVideoSequences = value;
+ OnPropertyChanged("RecordedVideoSequences");
+ }
+ }
+
+
private HeaderProductionVM _headerProductionVM;
public HeaderProductionVM ViewModelHeaderProduction
{
@@ -44,11 +78,32 @@
//SelectedChapter
public ProductionViewVM()
{
+ RecordedVideoSequences = new ObservableCollection();
ViewModelHeaderProduction = new HeaderProductionVM();
ViewModelProductionTimeLine = new ProductionTimeLineVM();
+ Commands.ProductionView.ClickAddSelectedRecord.Executed += new EventHandler(ClickAddSelectedRecord_Executed);
+ Random rndNumbers = new Random();
+ for (int i = 0; i < 10; i++)
+ {
+
+ _recordedVideoSequences.Add(new VideoSequence()
+ {
+ Path="/Pouet/Record_"+rndNumbers.Next(10, 60),
+ RunTime = new TimeSpan(0, rndNumbers.Next(10, 60), 0),
+ BeginTrim = new TimeSpan(0, 0, 0),
+ EndTrim = new TimeSpan(0, 0, 0),
+
+ });
+ }
}
+ void ClickAddSelectedRecord_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ ViewModelProductionTimeLine.SelectedVideoSequences.Add(SelectedVideoSequence);
+
+ }
+
}
}
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Lang/LangResource.Designer.cs
--- a/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Tue Dec 08 11:39:27 2009 +0100
@@ -124,6 +124,33 @@
}
///
+ /// Looks up a localized string similar to EditingLabel.
+ ///
+ public static string EditingLabel {
+ get {
+ return ResourceManager.GetString("EditingLabel", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to EnrichementLabel.
+ ///
+ public static string EnrichmentLabel {
+ get {
+ return ResourceManager.GetString("EnrichmentLabel", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IndexingLabel.
+ ///
+ public static string IndexingLabel {
+ get {
+ return ResourceManager.GetString("IndexingLabel", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to MenuDisplayAnnotation.
///
public static string MenuDisplayAnnotations {
@@ -241,6 +268,15 @@
}
///
+ /// Looks up a localized string similar to RecordsLabel.
+ ///
+ public static string RecordsLabel {
+ get {
+ return ResourceManager.GetString("RecordsLabel", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to ReferencesChutierTitle.
///
public static string ReferencesChutierTitle {
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Lang/LangResource.en-US.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Tue Dec 08 11:39:27 2009 +0100
@@ -138,6 +138,15 @@
Display
+
+ Editing
+
+
+ Enrichment
+
+
+ Indexing
+
Display Annotations
@@ -177,6 +186,9 @@
Update
+
+ Records
+
My References
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Tue Dec 08 11:39:27 2009 +0100
@@ -138,6 +138,15 @@
Afficher
+
+ Edition
+
+
+ Enrichissement
+
+
+ Indexation
+
Afficher Annotations
@@ -177,6 +186,9 @@
Modifier
+
+ Enregistrements
+
Mes Références
diff -r 66911d0f0eb6 -r 7d044e7562ea client/src/Iri.Modernisation.Lang/LangResource.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.resx Mon Dec 07 10:36:55 2009 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.resx Tue Dec 08 11:39:27 2009 +0100
@@ -138,6 +138,15 @@
DisplayLabel
+
+ EditingLabel
+
+
+ EnrichementLabel
+
+
+ IndexingLabel
+
MenuDisplayAnnotation
@@ -177,6 +186,9 @@
ProductionMenuUpdateLabel
+
+ RecordsLabel
+
ReferencesChutierTitle