--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Fri Dec 18 16:45:30 2009 +0100
@@ -15,15 +15,13 @@
<TextBlock x:Name="textBlock" Text="{Binding Info}" TextWrapping="Wrap"/>
<!-- Source="{Binding Source,Mode=TwoWay}" -->
- <MediaElement x:Name="VideoScreen" Position="{Binding Position,Mode=TwoWay}" Source="{Binding USource,Mode=TwoWay}" Margin="8,0" MediaFailed="VideoScreen_MediaFailed" CurrentStateChanged="VideoScreen_CurrentStateChanged" MarkerReached="VideoScreen_MarkerReached" AutoPlay="False">
-
- </MediaElement>
+ <MediaElement AutoPlay="{Binding AutoPlay}" x:Name="VideoScreen" Position="{Binding Position,Mode=TwoWay}" Source="{Binding USource,Mode=TwoWay}" Margin="8,0" MediaFailed="VideoScreen_MediaFailed" MarkerReached="VideoScreen_MarkerReached" />
<StackPanel x:Name="VideoViewerControlPanel" Orientation="Horizontal" Margin="8,0" VerticalAlignment="Bottom" HorizontalAlignment="Center">
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PreviousVideo" x:Name="VideoControlPreviousChapter" Content="<<"/>
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="RecordVideo" x:Name="VideoControlRecord" Width="43" Content="O" />
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="LoadVideo" x:Name="VideoControlLoad" Width="30" Content="_" />
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PlayVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPlay" Content="|>"/>
- <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PauseVideo" x:Name="VideoControlPause" Content="||"/>
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PauseVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPause" Content="||"/>
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="NextVideo" x:Name="VideoControlNextChapter" Content=">>"/>
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="CloseVideo" x:Name="VideoControlClose" Width="25" Content="X"/>
</StackPanel>
--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs Fri Dec 18 16:45:30 2009 +0100
@@ -41,6 +41,8 @@
{
// Required to initialize variables
InitializeComponent(); /// <summary>
+ VideoScreen.MediaEnded += new RoutedEventHandler(VideoScreen_MediaEnded);
+ VideoScreen.MediaOpened += new RoutedEventHandler(VideoScreen_MediaOpened);
VideoPositionTimer.Interval = new System.TimeSpan(0, 0, 0, 0, 1000);
VideoPositionTimer.Tick += new EventHandler(VideoPositionTimer_Tick);
Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed);
@@ -48,12 +50,27 @@
Commands.VideoViewer.Play.Executed +=new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Play_Executed);
}
- void GoToTime_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ void VideoScreen_MediaOpened(object sender, RoutedEventArgs e)
+ {
+ VideoScreen.Play();
+ VideoPositionTimer.Start();
+
+ }
+
+ void VideoScreen_MediaEnded(object sender, RoutedEventArgs e)
+ {
+ VideoPositionTimer.Stop();
+ }
+
+ private void GoToTime_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
if (e.Source == DataContext && e.Source != null)
{
- VideoScreen.Pause();
+
+ VideoPositionTimer.Start();
+
VideoScreen.Position = new TimeSpan(((TimeSpan)e.Parameter).Ticks);
+
}
}
@@ -77,12 +94,15 @@
}
void Pause_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- VideoScreen.Pause();
- _isPlayed = false;
- VideoPositionTimer.Stop();
- if (VideoPositionTimer.IsEnabled)
+ if(e.Source == DataContext || e.Parameter == DataContext)
{
- MessageBox.Show("Click Time IS NOT STOPPED");
+ VideoScreen.Pause();
+ _isPlayed = false;
+ VideoPositionTimer.Stop();
+ if (VideoPositionTimer.IsEnabled)
+ {
+ MessageBox.Show("Click Time IS NOT STOPPED");
+ }
}
}
@@ -101,10 +121,7 @@
MessageBox.Show(e.ErrorException.ToString());
}
- private void VideoScreen_CurrentStateChanged(object sender, System.Windows.RoutedEventArgs e)
- {
-
- }
+
private void VideoScreen_MarkerReached(object sender, System.Windows.Media.TimelineMarkerRoutedEventArgs e)
{
--- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -23,10 +23,11 @@
/// </summary>
public class AnnotationMakerVM : BaseMVVM.ViewModel.ViewModel
{
+
+ private PolemicElement _refElement;
/// <summary>
/// Element référent
/// </summary>
- private PolemicElement _refElement;
public PolemicElement RefElement
{
get
@@ -55,6 +56,9 @@
/// Savoir si le module de liens est activé
/// </summary>
public bool IsBinderActive { get; set; }
+ /// <summary>
+ /// Liste des Tags Référants
+ /// </summary>
public List<String> RefTags
{
get
@@ -75,10 +79,11 @@
/// </summary>
private Annotation _newAnnotation;
+
+ private TimeSpan _begin;
/// <summary>
/// Temps de début de l'annotation
/// </summary>
- private TimeSpan _begin;
public double Begin
{
get
@@ -93,10 +98,11 @@
}
}
+
+ private TimeSpan _end;
/// <summary>
/// Temps de fin de l'annotation
/// </summary>
- private TimeSpan _end;
public double End
{
get
@@ -111,10 +117,11 @@
}
}
+
+ private PolemicElementType _type;
/// <summary>
/// Type de l'annotation
/// </summary>
- private PolemicElementType _type;
public PolemicElementType Type
{
get
@@ -129,10 +136,11 @@
}
}
+
+ private Rectangle _selectedType;
/// <summary>
/// Convertion Rectange
/// </summary>
- private Rectangle _selectedType;
public Rectangle SelectedType
{
get
@@ -147,10 +155,10 @@
}
}
+ private String _title;
/// <summary>
/// Titre de l'annotation
/// </summary>
- private String _title;
public String Title
{
get
@@ -163,10 +171,11 @@
}
}
+ private String _description;
+
/// <summary>
/// Description de l'annotation
/// </summary>
- private String _description;
public String Description
{
get
@@ -186,6 +195,9 @@
/// Tags de l'annotation
/// </summary>
public List<String> _tags =new List<String>();
+ /// <summary>
+ /// Tags de l'annotation
+ /// </summary>
public String Tags
{
get
@@ -210,10 +222,11 @@
}
}
+
+ private PolemicLink _basicRelation;
/// <summary>
/// Relation basique
/// </summary>
- private PolemicLink _basicRelation;
public PolemicLink BasicRelation
{
get
@@ -229,10 +242,11 @@
}
+
+ private PolemicLink _polemicRelation;
/// <summary>
/// Relation polémique
/// </summary>
- private PolemicLink _polemicRelation;
public PolemicLink PolemicRelation
{
get
@@ -272,19 +286,19 @@
Commands.AnnotationMaker.OkClick.Executed += new EventHandler<ExecutedEventArgs>(OkClickAnnotationMaker_Executed);
}
- void DesactiveBind_Executed(object sender, ExecutedEventArgs e)
+ private void DesactiveBind_Executed(object sender, ExecutedEventArgs e)
{
IsBinderActive = false;
}
- void ActiveBind_Executed(object sender, ExecutedEventArgs e)
+ private void ActiveBind_Executed(object sender, ExecutedEventArgs e)
{
IsBinderActive = true;
}
- void SelectBind_Executed(object sender, ExecutedEventArgs e)
+ private void SelectBind_Executed(object sender, ExecutedEventArgs e)
{
if (IsControlEnable && IsBinderActive )
{
@@ -294,7 +308,7 @@
}
- void BeginBind_Executed(object sender, ExecutedEventArgs e)
+ private void BeginBind_Executed(object sender, ExecutedEventArgs e)
{
if (IsControlEnable)
{
@@ -308,7 +322,7 @@
- void OkClickAnnotationMaker_Executed(object sender, ExecutedEventArgs e)
+ private void OkClickAnnotationMaker_Executed(object sender, ExecutedEventArgs e)
{
String message = "Ok clicked "+Type+" \n";
message += _begin + "-->" + _end;
--- a/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -19,10 +19,11 @@
/// </summary>
public class BookTimeLineVM : BaseMVVM.ViewModel.ViewModel
{
+
+ private VideoBook _selectedBook;
/// <summary>
/// Livre sélectionné
/// </summary>
- private VideoBook _selectedBook;
public VideoBook SelectedBook
{
get
@@ -32,20 +33,21 @@
}
/// <summary>
- ///
+ /// Nom de l'auteur
/// </summary>
public String AuthorFullname
{
get
{
- return Author.FirstName + " " + Author.Name;
+ return Author.UserName;
}
}
+
+ private String _title;
/// <summary>
/// Titre du Livre
/// </summary>
- private String _title;
public String Title
{
get
@@ -60,10 +62,11 @@
}
}
+
+ private User _author;
/// <summary>
/// Auteur du Livre
/// </summary>
- private User _author;
public User Author
{
get
@@ -79,10 +82,10 @@
}
+ private VideoChapter[] _chapters;
/// <summary>
/// Chapitre du Livre
/// </summary>
- private VideoChapter[] _chapters;
public VideoChapter[] Chapters
{
get
@@ -97,10 +100,11 @@
}
}
+
+ private List<SegmentIndex>[] _segmentIndex=new List<SegmentIndex>[4];
/// <summary>
/// Liste des Index des Chapitres
/// </summary>
- private List<SegmentIndex>[] _segmentIndex=new List<SegmentIndex>[4];
public List<SegmentIndex>[] SegmentIndex
{
get
@@ -114,10 +118,11 @@
}
}
+
+ private List<Annotation>[] _annotations=new List<Annotation>[4];
/// <summary>
/// Liste des Annotations
/// </summary>
- private List<Annotation>[] _annotations=new List<Annotation>[4];
public List<Annotation>[] Annotations
{
get
@@ -131,10 +136,11 @@
}
}
+
+ private TimeSpan _totalDuration;
/// <summary>
/// Durée totale du Livre
/// </summary>
- private TimeSpan _totalDuration;
public double TotalDuration
{
get
@@ -149,55 +155,11 @@
}
}
- private List<int> _polemicSpectrumData = new List<int>();
- public List<int> PolemicSpectrumData
- {
- get
- {
- return _polemicSpectrumData;
- }
- }
-
- private List<int> _adhesionSpectrumData = new List<int>();
- public List<int> AdhesionSpectrumData
- {
- get
- {
- return _adhesionSpectrumData;
- }
- }
-
- private List<int> _referenceSpectrumData = new List<int>();
- public List<int> ReferenceSpectrumData
- {
- get
- {
- return _referenceSpectrumData;
- }
- }
-
- private List<int> _questionSpectrumData = new List<int>();
- public List<int> QuestionSpectrumData
- {
- get
- {
- return _questionSpectrumData;
- }
- }
-
- private List<int> _generalSpectrumData = new List<int>();
- public List<int> GeneralSpectrumData
- {
- get
- {
- return _generalSpectrumData;
- }
- }
-
+
+ private double _position;
/// <summary>
/// Position du curseur de lecture
/// </summary>
- private double _position;
public double Position
{
get
@@ -211,53 +173,7 @@
}
}
- /// <summary>
- /// Chargement des données et annalyse
- /// </summary>
- private void LoadData()
- {
- if (_selectedBook.Duration != TimeSpan.Zero)
- {
-
- for (double i = 0; i <= _selectedBook.Duration.TotalMilliseconds; i = (i + _selectedBook.Duration.TotalMilliseconds / 150))
- {
- int[] Tem = new int[4]{0,0,0,0};
- foreach (VideoChapter Ch in _selectedBook.Chapters)
- {
- foreach (Annotation An in Ch.Annotations)
- {
- if (An.TimerIn.TotalMilliseconds <= i && An.TimerOut.TotalMilliseconds >= i)
- {
- switch (An.Type)
- {
- case PolemicElementType.Polemic:
- Tem[0]++;
- break;
- case PolemicElementType.Adhesion:
- Tem[1]++;
- break;
- case PolemicElementType.Reference:
- Tem[2]++;
- break;
- case PolemicElementType.Question:
- Tem[3]++;
- break;
- default:
- break;
- }
- }
- }
- }
- _polemicSpectrumData.Add(Tem[0]);
- _adhesionSpectrumData.Add(Tem[1]);
- _referenceSpectrumData.Add(Tem[2]);
- _questionSpectrumData.Add(Tem[3]);
- _generalSpectrumData.Add((Tem[0]+Tem[1]+Tem[2]+Tem[3]));
- }
- }
-
-
- }
+
/// <summary>
/// Constructeur
@@ -270,12 +186,15 @@
_author = bookParam.Author;
_chapters = bookParam.Chapters;
_totalDuration = bookParam.Duration;
- LoadData();
LoadElements();
Commands.TimeChange.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(TimeChange_Executed);
}
+
private VideoViewerVM _videoViewerVM;
+ /// <summary>
+ /// ViewModel de VideoViewer
+ /// </summary>
public VideoViewerVM ViewModelVideoViewer
{
get
@@ -288,17 +207,12 @@
OnPropertyChanged("ViewModelVideoViewer");
}
}
- void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- // Position = ((Slider)e.Parameter).Value;
- // Commands.VideoViewer.Pause.Execute();
if(e.Source == this)
{
ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(((double)e.Parameter)));
}
- //Commands.GoToTime.Execute(((Slider)e.Parameter).Value);
-
- // Commands.VideoViewer.Play.Execute();
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ClickMenu/ClickMenuVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ClickMenu/ClickMenuVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -18,10 +18,11 @@
/// </summary>
public class ClickMenuVM : BaseMVVM.ViewModel.ViewModel
{
+
+ private PolemicElement _selectedElement;
/// <summary>
- ///
+ /// PolémicElement sélectionné
/// </summary>
- private PolemicElement _selectedElement;
public PolemicElement SelectedElement
{
get
@@ -34,10 +35,7 @@
OnPropertyChanged("SelectedElement");
}
}
- public void test()
- {
- MessageBox.Show(SelectedElement.Title);
- }
+
public ClickMenuVM()
{
InitializeCommands();
@@ -47,7 +45,7 @@
Commands.ClickMenu.AddToRefChutier.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(AddToRefChutier_Executed);
}
- void AddToRefChutier_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void AddToRefChutier_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
Commands.ReferencesChutier.RefChutierAdd.Execute(SelectedElement);
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -16,10 +16,16 @@
using Iri.Modernisation.BaseMVVM.ViewModel;
namespace Iri.Modernisation.Controls.ViewModel
{
+ /// <summary>
+ /// ViewModel de ConsultationBook
+ /// </summary>
public class ConsultationBookViewVM : BaseMVVM.ViewModel.ViewModel
{
private VideoBook _selectedBook;
+ /// <summary>
+ /// Livre Sélectionné
+ /// </summary>
public VideoBook SelectedBook
{
get
@@ -33,9 +39,12 @@
}
}
- private int _selectedIndexNumber = 0;
+
private SegmentIndex _selectedIndex;
+ /// <summary>
+ /// Index Sélectionné
+ /// </summary>
public SegmentIndex SelectedIndex
{
get
@@ -71,6 +80,9 @@
}
private String _selectedIndexTitle;
+ /// <summary>
+ /// Titre de l'Index
+ /// </summary>
public String SelectedIndexTitle
{
get
@@ -85,6 +97,9 @@
}
private String _selectedIndexDescription;
+ /// <summary>
+ /// Description de L'index
+ /// </summary>
public String SelectedIndexDescription
{
get
@@ -99,6 +114,9 @@
}
private List<String> _selectedIndexTags = new List<string>();
+ /// <summary>
+ /// Tags de l'Index
+ /// </summary>
public String SelectedIndexTags
{
get
@@ -121,6 +139,9 @@
}
private List<AnnotationViewerVM> _selectedIndexAnnotation = new List<AnnotationViewerVM>();
+ /// <summary>
+ /// Liste des annotations de l'index
+ /// </summary>
public List<AnnotationViewerVM> SelectedIndexAnnotation
{
get
@@ -136,6 +157,9 @@
private String _title;
+ /// <summary>
+ /// Titre du VideoLivre
+ /// </summary>
public String Title
{
get
@@ -151,6 +175,9 @@
}
private User _author;
+ /// <summary>
+ /// Auteur du Videolivre
+ /// </summary>
public User Author
{
get
@@ -167,6 +194,9 @@
}
private VideoChapter[] _chapters;
+ /// <summary>
+ /// Chapitres du VideoLivre
+ /// </summary>
public VideoChapter[] Chapters
{
get
@@ -182,6 +212,9 @@
}
private List<SegmentIndex>[] _segmentIndex = new List<SegmentIndex>[4];
+ /// <summary>
+ ///
+ /// </summary>
public List<SegmentIndex>[] SegmentIndex
{
get
@@ -196,6 +229,9 @@
}
private List<Annotation>[] _annotations = new List<Annotation>[4];
+ /// <summary>
+ /// Annotations
+ /// </summary>
public List<Annotation>[] Annotations
{
get
@@ -210,6 +246,9 @@
}
private BookTimeLineVM _selectedBookVM;
+ /// <summary>
+ /// ViewModel de BookTimeLine
+ /// </summary>
public BookTimeLineVM SelectedBookVM
{
get
@@ -236,6 +275,9 @@
}
}
private VideoViewerVM _actualVideoSourceVM;
+ /// <summary>
+ /// Video Actuellement en visionnage
+ /// </summary>
public VideoViewerVM ActualVideoSourceVM
{
get
@@ -250,15 +292,7 @@
}
public ConsultationBookViewVM()
{
- /* _selectedBookVM = param;
- _selectedBook = param.SelectedBook;
- _title = param.SelectedBook.Title;
- _author = param.SelectedBook.Author;
- _chapters = param.SelectedBook.Chapters;
- //
- if (param.SelectedBook.Chapters[0].VideoSequences.Count != 0)
- { _actualVideoSource = param.SelectedBook.Chapters[0].VideoSequences[0].Path; }
- SelectedIndex = param.SelectedBook.Chapters[0].Index[0];*/
+
ActualVideoSourceVM = new VideoViewerVM(true,false);
InitializeCommands();
@@ -287,7 +321,7 @@
ActualVideoSourceVM.Tick += new EventHandler<VideoViewerVMEventArgs>(ActualVideoSourceVM_Tick);
}
- void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e)
+ private void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e)
{
TimeSpan Pos = e.Position;
SelectedBookVM.Position = Pos.TotalMilliseconds;
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -13,11 +13,18 @@
using Iri.Modernisation.Data.LDTClass;
using Iri.Modernisation.BaseMVVM.Commands;
using Iri.Modernisation.BaseMVVM.ViewModel;
+using System.Collections.ObjectModel;
namespace Iri.Modernisation.Controls.ViewModel
{
+ /// <summary>
+ /// ViewModel de ConsultationView
+ /// </summary>
public class ConsultationViewVM : BaseMVVM.ViewModel.ViewModel
{
private PolemicElement _selectedElement;
+ /// <summary>
+ /// PolemicElement sélectionné
+ /// </summary>
public PolemicElement SelectedElement
{
get
@@ -33,8 +40,11 @@
- private SLExtensions.Collections.ObjectModel.ObservableCollection<BookTimeLineVM> _selectedVideoBooks;
- public SLExtensions.Collections.ObjectModel.ObservableCollection<BookTimeLineVM> SelectedVideoBooks
+ private ObservableCollection<BookTimeLineVM> _selectedVideoBooks;
+ /// <summary>
+ /// Liste des Livres Sélectionnés
+ /// </summary>
+ public ObservableCollection<BookTimeLineVM> SelectedVideoBooks
{
get
{
@@ -49,6 +59,9 @@
}
private int _selectedVideoBookIndex=-1;
+ /// <summary>
+ /// Index du livre sélectionné
+ /// </summary>
public int SelectedVideoBookIndex
{
get
@@ -65,6 +78,9 @@
}
private ConsultationBookViewVM _consultationBookViewContextMenu;
+ /// <summary>
+ /// ViewModel de ConsultationBook
+ /// </summary>
public ConsultationBookViewVM ConsultationBookViewContextMenu
{
get
@@ -86,7 +102,7 @@
Commands.ClickMenu.CreateNewTextualAnnotation.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(CreateNewTextualAnnotation_Executed);
}
- void ClickBook_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void ClickBook_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
BookTimeLineVM temp = new BookTimeLineVM((VideoBook)e.Parameter);
temp.ViewModelVideoViewer = ConsultationBookViewContextMenu.ActualVideoSourceVM;
@@ -107,6 +123,9 @@
private AnnotationMakerVM _annotationMakerVM;
+ /// <summary>
+ /// ViewModel de AnnotationMaker
+ /// </summary>
public AnnotationMakerVM ViewModelAnnotationMaker
{
get
@@ -114,7 +133,7 @@
return _annotationMakerVM;
}
}
- void CreateNewTextualAnnotation_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void CreateNewTextualAnnotation_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
ViewModelAnnotationMaker.RefElement = SelectedElement;
}
@@ -126,7 +145,7 @@
SelectedVideoBooks = new SLExtensions.Collections.ObjectModel.ObservableCollection<BookTimeLineVM>();
}
- void SelectPolemicElement_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void SelectPolemicElement_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
SelectedElement= (PolemicElement)e.Parameter;
try
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderControl/HeaderControlVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderControl/HeaderControlVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -15,6 +15,9 @@
public class HeaderControlVM : BaseMVVM.ViewModel.ViewModel
{
private String _connectedName = String.Empty;
+ /// <summary>
+ /// Nom de la personne connecté
+ /// </summary>
public String ConnectedName
{
get
@@ -48,7 +51,7 @@
Commands.HeaderControl.ButtonClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ButtonClick_Executed);
}
- void ButtonClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void ButtonClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
MessageBox.Show(e.Parameter.ToString());
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -15,7 +15,7 @@
{
public class HeaderProductionVM : BaseMVVM.ViewModel.ViewModel
{
- private String _instruction;
+
#region Avancement
@@ -215,23 +215,10 @@
&& _isChap04EditingComplete && _isChap04IndexingComplete;
}
}
- /******************************************************************/
- /**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**/
- /******************************************************************/
- private bool _istest;
- public bool IsTest
- {
- get
- {
- return _istest;
- }
- set
- {
- _istest = value;
- OnPropertyChanged("IsTest");
- }
- }
-
+ private String _instruction;
+ /// <summary>
+ /// Instruction
+ /// </summary>
public String Instruction
{
get
@@ -246,12 +233,11 @@
}
public HeaderProductionVM()
{
- IsTest = false;
- Commands.Action.CanExecute += (sender, e) => e.CanExecute = this.IsTest;
+
_instruction = Iri.Modernisation.Controls.Resources.HeaderProduction.InstructionTextRessource.Introduction;
InitializeCommands();
- }
+ }
private void InitializeCommands()
{
Commands.HeaderProduction.Chap01EditingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap01EditingOkClick_Executed);
@@ -264,45 +250,49 @@
Commands.HeaderProduction.Chap03IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap03IndexingOkClick_Executed);
Commands.HeaderProduction.Chap04IndexingOkClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Chap04IndexingOkClick_Executed);
}
-
- void Chap04IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ #region OkClick
+ #region Index
+ private void Chap04IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap04IndexingComplete = true;
}
- void Chap03IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap03IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap03IndexingComplete = true;
}
- void Chap02IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap02IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap02IndexingComplete = true;
}
- void Chap01IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap01IndexingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap01IndexingComplete = true;
}
-
- void Chap04EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ #endregion
+ #region Edit
+ private void Chap04EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap04EditingComplete = true;
}
- void Chap03EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap03EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap03EditingComplete = true;
}
- void Chap02EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap02EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
IsChap02EditingComplete = true;
}
- void Chap01EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void Chap01EditingOkClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
this.IsChap01EditingComplete = true;
GeneralRefresh();
}
+ #endregion
+ #endregion
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -14,9 +14,15 @@
using Iri.Modernisation.BaseMVVM.ViewModel;
namespace Iri.Modernisation.Controls.ViewModel
{
+ /// <summary>
+ /// ViewModel de Main
+ /// </summary>
public class MainVM : BaseMVVM.ViewModel.ViewModel
{
private ConsultationViewVM _consultationViewVM;
+ /// <summary>
+ /// ViewModel de ConsultationView
+ /// </summary>
public ConsultationViewVM ViewModelConsultationView
{
get
@@ -31,6 +37,9 @@
}
private NavigationBarVM _navigationBarVM;
+ /// <summary>
+ /// ViewModel de NavigationBar
+ /// </summary>
public NavigationBarVM ViewModelNavigationBar
{
get
@@ -45,6 +54,9 @@
}
private HeaderControlVM _headerControlVM;
+ /// <summary>
+ /// ViewsModel de HeaderControl
+ /// </summary>
public HeaderControlVM ViewModelHeaderControl
{
get
@@ -59,6 +71,9 @@
}
private ProductionViewVM _productionViewVM;
+ /// <summary>
+ /// ViewModel de ProductionView
+ /// </summary>
public ProductionViewVM ViewModelProductionView
{
get
@@ -72,20 +87,6 @@
}
}
- /*private HeaderProductionVM _headerProductionVM;
- public HeaderProductionVM ViewModelHeaderProduction
- {
- get
- {
- return _headerProductionVM;
- }
- set
- {
- _headerProductionVM = value;
- OnPropertyChanged("ViewModelHeaderProduction");
- }
- }*/
-
public MainVM(List<VideoBook> videoBooks)
{
@@ -98,8 +99,7 @@
ViewModelConsultationView = new ConsultationViewVM();
ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
ViewModelHeaderControl = new HeaderControlVM();
- // ViewModelHeaderProduction = new HeaderProductionVM();
- //------------------------------------------------------//
+
}
private void InitializeCommands()
--- a/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultMenuVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultMenuVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -20,6 +20,9 @@
{
private List<VideoBook> _videoBooks = new List<VideoBook>();
private List<VideoBook> list = new List<VideoBook>();
+ /// <summary>
+ /// VideoBooks Disponible
+ /// </summary>
public List<VideoBook> VideoBooks
{
get
@@ -41,10 +44,57 @@
OnPropertyChanged("VideoBooks");
}
}
+ private bool _searchAuthor;
+ /// <summary>
+ /// Recherche par Auteur activée
+ /// </summary>
+ public bool SearchAuthor
+ {
+ get
+ {
+ return _searchAuthor;
+ }
+ set
+ {
+ _searchAuthor = value;
+ OnPropertyChanged("SearchAuthor");
+ }
- public bool SearchAuthor { get; set; }
- public bool SearchContributer { get; set; }
- public bool SearchTag { get; set; }
+ }
+
+ private bool _searchContributer;
+ /// <summary>
+ /// Recherche par Contributeur activée
+ /// </summary>
+ public bool SearchContributer
+ {
+ get
+ {
+ return _searchContributer;
+ }
+ set
+ {
+ _searchContributer = value;
+ OnPropertyChanged("SearchContributer");
+ }
+ }
+
+ private bool _searchTag;
+ /// <summary>
+ /// Recherche par Tag
+ /// </summary>
+ public bool SearchTag
+ {
+ get
+ {
+ return _searchTag;
+ }
+ set
+ {
+ _searchTag = value;
+ OnPropertyChanged("SearchTag");
+ }
+ }
private String _searchWord= "";
public String SearchWord
--- a/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/NavigationBarVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/NavigationBarVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -22,6 +22,9 @@
_referencesChutierViewModel = new ReferencesChutierVM(new SLExtensions.Collections.ObjectModel.ObservableCollection<PolemicElement>());
}
private ConsultMenuVM _consultMenuViewModel;
+ /// <summary>
+ /// ViewModel de ConsultMenuViewModel
+ /// </summary>
public ConsultMenuVM ConsultMenuViewModel
{
get
@@ -37,6 +40,9 @@
}
private PersonnalChutierVM _personnalChutierViewModel;
+ /// <summary>
+ /// ViewModel de PersonnalChutier
+ /// </summary>
public PersonnalChutierVM PersonnalChutierViewModel
{
get
@@ -51,6 +57,9 @@
}
private ReferencesChutierVM _referencesChutierViewModel;
+ /// <summary>
+ /// ViewModel de ReferencesChutier
+ /// </summary>
public ReferencesChutierVM ReferencesChutierViewModel
{
get
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionEditor/ProductionEditorVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionEditor/ProductionEditorVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -126,6 +126,7 @@
{
Source = Vs.Path
};
+ ViewModelVideoViewer.AutoPlay = false;
InitializeCommands();
}
private void InitializeCommands()
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionTimeLine/ProductionTimeLineVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -17,11 +17,17 @@
namespace Iri.Modernisation.Controls.ViewModel
{
+ /// <summary>
+ /// ViewModel de la ProductionTimeLine
+ /// </summary>
public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel
{
-
private bool _isIndexing;
+
+ /// <summary>
+ /// Mode Indexation
+ /// </summary>
public bool IsIndexing
{
get
@@ -37,6 +43,10 @@
private VideoBook _newBook;
private ObservableCollection<VideoSequence>[] _listVideoSequences = new ObservableCollection<VideoSequence>[4];
+
+ /// <summary>
+ /// Ensembles des VideoSequences par Chapitre
+ /// </summary>
public ObservableCollection<VideoSequence>[] ListVideoSequences
{
get
@@ -50,6 +60,9 @@
}
}
+ /// <summary>
+ /// VideoSequences du Chapitre en cours
+ /// </summary>
public ObservableCollection<VideoSequence> SelectedVideoSequences
{
get
@@ -64,6 +77,10 @@
OnPropertyChanged("SelectedVideoSequences");
}
}
+
+ /// <summary>
+ /// Durée Total du livre
+ /// </summary>
public TimeSpan TotalBookDuration
{
get
@@ -79,6 +96,10 @@
return temp;
}
}
+
+ /// <summary>
+ /// Chapitres
+ /// </summary>
public VideoChapter[] Chapters
{
get
@@ -88,6 +109,10 @@
}
+
+ /// <summary>
+ /// Chapites Courant
+ /// </summary>
public VideoChapter SelectedBookChapter
{
get
@@ -98,6 +123,9 @@
private VideoSequence _actualVideoSequence;
+ /// <summary>
+ /// VideoSequence en lecture sur le Master
+ /// </summary>
public VideoSequence ActualVideoSequence
{
get
@@ -111,7 +139,9 @@
}
}
-
+ /// <summary>
+ /// Ensemble des VideoSequences
+ /// </summary>
public List<VideoSequence> TimeLine
{
get
@@ -146,7 +176,11 @@
OnPropertyChanged("SelectedChapter");
}
}
+
private VideoViewerVM _videoViewerVM;
+ /// <summary>
+ /// ViewModel du Master
+ /// </summary>
public VideoViewerVM ViewModelVideoViewer
{
get
@@ -161,6 +195,9 @@
}
private double _position;
+ /// <summary>
+ /// Position Actuelle de lecture
+ /// </summary>
public double Position
{
get
@@ -176,6 +213,9 @@
}
private ObservableCollection<SegmentIndex>[] _listSegmentIndex;
+ /// <summary>
+ /// Ensemble des Index par Chapitre
+ /// </summary>
public ObservableCollection<SegmentIndex>[] ListIndex
{
get
@@ -183,6 +223,9 @@
return _listSegmentIndex;
}
}
+ /// <summary>
+ /// Index du Chapitre en cours
+ /// </summary>
public ObservableCollection<SegmentIndex> SelectedIndex
{
get
@@ -198,6 +241,10 @@
}
private VideoChapterType _selectedChapterType;
+
+ /// <summary>
+ /// Chapitre en cours
+ /// </summary>
public VideoChapterType SelectedChapterType
{
get
@@ -210,8 +257,31 @@
OnPropertyChanged("SelectedChapterType");
}
}
-
-
+
+ private void InitializeCommands()
+ {
+ #region Commands
+ Commands.ProductionView.DelVideoSequence.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(DelVideoSequence_Executed);
+ Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
+ Commands.ProductionTimeLine.EditorPartFinished.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartFinished_Executed);
+ Commands.ProductionView.ClickAddIndex.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddIndex_Executed);
+ 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);
+ #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);
+ #endregion
+ }
public ProductionTimeLineVM()
{
_newBook = new VideoBook();
@@ -222,18 +292,6 @@
new ObservableCollection<VideoSequence>(),
new ObservableCollection<VideoSequence>()
};
- // PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ProductionTimeLineVM_PropertyChanged);
- // SelectedVideoSequences = new ObservableCollection<VideoSequence>();
- Commands.ProductionView.DelVideoSequence.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(DelVideoSequence_Executed);
- Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
- Commands.ProductionTimeLine.EditorPartFinished.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartFinished_Executed);
- Commands.ProductionView.ClickAddIndex.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddIndex_Executed);
- Commands.TimeChange.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(TimeChange_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);
-
_listSegmentIndex = new ObservableCollection<SegmentIndex>[4]
{
new ObservableCollection<SegmentIndex>(),
@@ -241,13 +299,13 @@
new ObservableCollection<SegmentIndex>(),
new ObservableCollection<SegmentIndex>()
};
- _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);
+ // PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ProductionTimeLineVM_PropertyChanged);
+ // SelectedVideoSequences = new ObservableCollection<VideoSequence>();
+ InitializeCommands();
}
- void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+
+ private void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
double newValue = ((double)e.Parameter);
if(e.Source == this)
@@ -259,6 +317,7 @@
if (Vs.TimerIn.TotalMilliseconds <= newValue && Vs.TimerOut.TotalMilliseconds > newValue)
{
ActualVideoSequence = Vs;
+ ViewModelVideoViewer.Source = ActualVideoSequence.Path;
ViewModelVideoViewer.GoTo(TimeSpan.FromMilliseconds(newValue) - Vs.TimerIn +Vs.BeginTrim);
}
}
@@ -272,7 +331,7 @@
}
}
- void ClickAddIndex_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void ClickAddIndex_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
if(IsIndexing)
{
@@ -297,30 +356,25 @@
}
- void DelVideoSequence_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void DelVideoSequence_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
SelectedVideoSequences.Remove(((CustomableVideoElementVM)e.Parameter).VideoSequence);
OnPropertyChanged("TotalBookDuration");
}
- void SelectedVideoSequences_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ private void SelectedVideoSequences_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged("TotalBookDuration");
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)
+ private void EditorPartFinished_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
SelectedChapter = -1;
}
- void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
SelectedChapter = (int)((HeaderProductionEventArgs)e.Source).ChapterType;
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -16,10 +16,16 @@
using System.Collections.Generic;
namespace Iri.Modernisation.Controls.ViewModel
{
+ /// <summary>
+ /// ViewModel de ProductionView
+ /// </summary>
public class ProductionViewVM : BaseMVVM.ViewModel.ViewModel
{
private VideoSequence _selectedVideoSequence;
+ /// <summary>
+ /// VideoSequence Sélectionnée dans la liste
+ /// </summary>
public VideoSequence SelectedVideoSequence
{
get
@@ -36,6 +42,9 @@
}
private ObservableCollection<VideoSequence> _recordedVideoSequences;
+ /// <summary>
+ /// Liste des VideoSéquences Enregistrées
+ /// </summary>
public ObservableCollection<VideoSequence> RecordedVideoSequences
{
get
@@ -51,6 +60,9 @@
private HeaderProductionVM _headerProductionVM;
+ /// <summary>
+ /// ViewModel de HeaderProduction
+ /// </summary>
public HeaderProductionVM ViewModelHeaderProduction
{
get
@@ -63,7 +75,11 @@
OnPropertyChanged("ViewModelHeaderProduction");
}
}
+
private ProductionTimeLineVM _productionTimeLineVM;
+ /// <summary>
+ /// ViewModel de ProductionTimeLine
+ /// </summary>
public ProductionTimeLineVM ViewModelProductionTimeLine
{
get
@@ -78,6 +94,9 @@
}
private ProductionEditorVM _productionEditorVM;
+ /// <summary>
+ /// ViewModel du ProductionEditor
+ /// </summary>
public ProductionEditorVM ViewModelProductionEditor
{
get
@@ -92,6 +111,9 @@
}
private VideoViewerVM _masterVideoViewerVM;
+ /// <summary>
+ /// ViewModel du Master
+ /// </summary>
public VideoViewerVM ViewModelMasterVideoViewer
{
get
@@ -105,7 +127,13 @@
}
}
- //SelectedChapter
+ private void InitializeCommands()
+ {
+ Commands.ProductionView.ClickAddSelectedRecord.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddSelectedRecord_Executed);
+ ViewModelProductionTimeLine.SwitchVideo += new EventHandler<ProductionTimeLineVMEventArgs>(ViewModelProductionTimeLine_SwitchVideo);
+ ViewModelMasterVideoViewer.Tick += new EventHandler<VideoViewerVMEventArgs>(ViewModelMasterVideoViewer_Tick);
+
+ }
public ProductionViewVM()
{
RecordedVideoSequences = new ObservableCollection<VideoSequence>();
@@ -113,11 +141,16 @@
ViewModelProductionTimeLine = new ProductionTimeLineVM();
ViewModelProductionEditor = new ProductionEditorVM();
ViewModelMasterVideoViewer = new VideoViewerVM(true, false);
- // ViewModelMasterVideoViewer.Source = Application.Current.Host.Source.Host.ToString() + "/video.mp4";
ViewModelProductionTimeLine.ViewModelVideoViewer = ViewModelMasterVideoViewer;
- Commands.ProductionView.ClickAddSelectedRecord.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ClickAddSelectedRecord_Executed);
Random rndNumbers = new Random();
+ _recordedVideoSequences.Add(new VideoSequence()
+ {
+ Path = Application.Current.Host.Source.Host.ToString() + "/test.wmv",
+ RunTime = new TimeSpan(0, rndNumbers.Next(10, 60), 0),
+ BeginTrim = new TimeSpan(0, 0, 0),
+ EndTrim = new TimeSpan(0, 0, 0),
+ });
for (int i = 0; i < 10; i++)
{
@@ -129,30 +162,28 @@
EndTrim = new TimeSpan(0, 0, 0),
});
}
- ViewModelProductionTimeLine.SwitchVideo += new EventHandler<ProductionTimeLineVMEventArgs>(ViewModelProductionTimeLine_SwitchVideo);
- ViewModelMasterVideoViewer.Tick += new EventHandler<VideoViewerVMEventArgs>(ViewModelMasterVideoViewer_Tick);
-
+ InitializeCommands();
}
- void ViewModelProductionTimeLine_SwitchVideo(object sender, ProductionTimeLineVMEventArgs e)
+ private void ViewModelProductionTimeLine_SwitchVideo(object sender, ProductionTimeLineVMEventArgs e)
{
ViewModelMasterVideoViewer.Source = (e.VideoSequence.Path);
ViewModelMasterVideoViewer.GoTo(e.BeginAt);
}
- void ViewModelMasterVideoViewer_Tick(object sender, VideoViewerVMEventArgs e)
+ private void ViewModelMasterVideoViewer_Tick(object sender, VideoViewerVMEventArgs e)
{
double newPos = ViewModelProductionTimeLine.ActualVideoSequence.TimerIn.TotalMilliseconds+e.Position.TotalMilliseconds;
if (ViewModelProductionTimeLine.ActualVideoSequence.TimerOut.TotalMilliseconds <= newPos)
{
ViewModelProductionTimeLine.ActualVideoSequence = ViewModelProductionTimeLine.TimeLine[ViewModelProductionTimeLine.TimeLine.IndexOf(ViewModelProductionTimeLine.ActualVideoSequence) + 1];
ViewModelMasterVideoViewer.Source = ViewModelProductionTimeLine.ActualVideoSequence.Path;
- ViewModelMasterVideoViewer.GoTo(TimeSpan.Zero);
+ ViewModelMasterVideoViewer.GoTo(ViewModelProductionTimeLine.ActualVideoSequence.BeginTrim);
}
ViewModelProductionTimeLine.Position = newPos;
}
- void ClickAddSelectedRecord_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ private void ClickAddSelectedRecord_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
if (ViewModelProductionTimeLine.SelectedChapter != -1)
{
--- a/client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs Wed Dec 16 17:14:38 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/VideoViewer/VideoViewerVM.cs Fri Dec 18 16:45:30 2009 +0100
@@ -97,11 +97,30 @@
OnPropertyChanged("RecordControl");
}
}
+
+ private bool _autoPlay;
+ public bool AutoPlay
+ {
+ get
+ {
+ return _autoPlay;
+ }
+ set
+ {
+ _autoPlay = value;
+ OnPropertyChanged("AutoPlay");
+ }
+
+ }
+
public VideoViewerVM(bool playControl,bool recordControl )
{
_playControl = playControl;
_recordControl = recordControl;
+
InitializeCommands();
+ AutoPlay = false;
+
}
public event EventHandler<VideoViewerVMEventArgs> Tick;
@@ -114,6 +133,10 @@
Position = pos;
Commands.GoToTime.Execute(Position,this);
}
+ public void Pause()
+ {
+ Commands.VideoViewer.Pause.Execute(null, this);
+ }
public void LaunchTick(TimeSpan Pos)
{
if(Tick!=null)