# HG changeset patch
# User totetm <>
# Date 1265905763 -3600
# Node ID 594fdedecf7f3e2982a746eb151c3e36dce227a2
# Parent b51a10574e7ffb0f0712f7825da2da5bc7d42c16
Fixed| bouton close sur BookTimeLine
Fixed| loading blocker sur les éléments du corpus vidéolivre (book a charger)
Fixed| afficher l'état sur on load et loader sur les éléments du corpus vidéolivre ("book a charger")
Fixed| bug du title sur book timline
Fixed| Actualisation de l'affichage des annotations sur seek de la timline sans play
Fixed| Seek possible quand play
Fixed| Bug sur le placement tetris ?
Fixed| texte par default sur les champs d'annotations
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs
--- a/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Thu Feb 11 17:29:23 2010 +0100
@@ -552,20 +552,22 @@
static BookTimeLine()
{
- SaveAnnotations = new Command("SaveAnnotations");
+
LeftClickOnElement = new Command("LeftClickOnElement");
+ CloseBookTimeLine = new Command("CloseBookTimeLine");
}
+ public static Command CloseBookTimeLine
+ {
+ get;
+ private set;
+ }
public static Command LeftClickOnElement
{
get;
private set;
}
- public static Command SaveAnnotations
- {
- get;
- private set;
- }
+
public static void Initialize()
{
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj
--- a/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Thu Feb 11 17:29:23 2010 +0100
@@ -115,6 +115,7 @@
+
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Thu Feb 11 17:29:23 2010 +0100
@@ -22,7 +22,8 @@
-
+
+
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Thu Feb 11 17:29:23 2010 +0100
@@ -21,13 +21,18 @@
public BookTimeLine()
{
InitializeComponent();
-
+
+
TimeStripsPanel.SizeChanged += new SizeChangedEventHandler(TimeStripsPanel_SizeChanged);
- BookTimeLineSlider.ThumbDragStarted += new EventHandler(TimeSlider_ThumbDragCompleted);
- BookTimeLineSlider.ThumbDragCompleted += new EventHandler(TimeSlider_ThumbDragCompleted);
+
BookTimeLineSlider.MouseLeftButtonUp += new MouseButtonEventHandler(BookTimeLineSlider_MouseLeftButtonUp);
//saveAnnotationsButton.Click += new RoutedEventHandler(saveAnnotationsButton_Click);
+
Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler(NewAnnotationFinished_Executed);
+ BookTimeLineSlider.ThumbDragStarted += new EventHandler(TimeSlider_ThumbDragStarted);
+ BookTimeLineSlider.ThumbDragCompleted += new EventHandler(TimeSlider_ThumbDragCompleted);
+
+
}
void saveAnnotationsButton_Click(object sender, RoutedEventArgs e)
@@ -49,7 +54,10 @@
{
if (_saveVideoViewerState)
{
+
((BookTimeLineVM)DataContext).ViewModelVideoViewer.Play();
+
+
}
}
@@ -67,6 +75,8 @@
private void BookTimeLineSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Commands.TimeChange.Execute(BookTimeLineSlider.Value,DataContext);
+
+
}
private void TimeStripsPanel_SizeChanged(object sender, SizeChangedEventArgs e)
@@ -96,8 +106,10 @@
}
}
int basi = 0;
+
foreach (List LAnnotation in VM.Annotations)
{
+ LAnnotation.Sort((a, b) => TimeSpan.Compare( b.Duration,a.Duration));
foreach (Annotation Annotation in LAnnotation)
{
PolemicElementControl pol = new PolemicElementControl();
@@ -118,7 +130,7 @@
int actualTop = (int)Canvas.GetTop(lockedControl);
if (basi <= actualTop)
{
- basi += 10;
+ basi += 12;
}
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml
--- a/client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml Thu Feb 11 17:29:23 2010 +0100
@@ -41,14 +41,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -149,7 +149,17 @@
public String Title
{
get
- { return _title; }
+ {
+ if (_title != String.Empty)
+ {
+ return _title;
+ }
+ else
+ {
+ return "+Ajouter un titre";
+
+ }
+ }
set
{
_title = value;
@@ -167,7 +177,14 @@
{
get
{
- return _description;
+ if(_description != String.Empty)
+ {
+ return _description;
+ }
+ else
+ {
+ return "+Ajouter Description";
+ }
}
set
{
@@ -189,14 +206,17 @@
{
get
{
- try
+ if(_tags.Count !=0 || _tags!=null)
{
return String.Join(",", _tags.ToArray());
}
- catch
+ else
{
- return String.Empty;
+ return "+Ajouter Tag";
}
+
+
+
}
set
{
@@ -404,23 +424,24 @@
helper.ResponseComplete += new HttpResponseCompleteEventHandler(helper_ResponseComplete);
helper.Execute();
-
- /* HttpSendHelper hsh = new HttpSendHelper("POST", FactoryVideoLivre.UpdateBookService,
- new Dictionary {
- { "ldtIs", "world" },
- {"AnnotationLdtFile",newfile.ToString()}
- });
- hsh.Execute();*/
+
- /** Local Mode **/
+
Commands.AnnotationMaker.NewAnnotationFinished.Execute(_newAnnotation,_refElement);
/********/
_refElement = null;
+ Title = String.Empty;
+ Description = String.Empty;
+ Tags = String.Empty;
+ BasicRelation = null;
+ PolemicRelation = null;
+
OnPropertyChanged("IsControlEnable");
+
}
@@ -469,6 +490,8 @@
InitializeCommands();
Begin = RefElement.TimerIn.TotalMilliseconds;
End = RefElement.TimerOut.TotalMilliseconds;
+
+
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/BookTimeLine/BookTimeLineVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -192,14 +192,11 @@
_annotations = new List[bookParam.Chapters.Length];
LoadElements();
Commands.TimeChange.Executed += new EventHandler(TimeChange_Executed);
- Commands.BookTimeLine.SaveAnnotations.Executed += new EventHandler(SaveAnnotations_Executed);
+
}
- void SaveAnnotations_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
-
- }
+
private double _scaleValue;
public double ScaleValue
{
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -54,25 +54,41 @@
}
set
{
- _selectedIndex = value;
- _selectedIndexTitle = ((SegmentIndex)value).Title;
- _selectedIndexDescription = ((SegmentIndex)value).Description;
- _selectedIndexTags = ((SegmentIndex)value).Tags;
- _selectedBook = _selectedIndex.Chapter.Book;
- _title = _selectedIndex.Chapter.Book.Title;
- _author = _selectedIndex.Chapter.Book.Author;
- _chapters = _selectedIndex.Chapter.Book.Chapters;
- _selectedIndexAnnotation.Clear();
- List _temp = new List();
- foreach (Annotation An in ((SegmentIndex)value).Chapter.Annotations)
+ if (value != null)
{
- if (An.TimerIn <= ((SegmentIndex)value).TimerOut && An.TimerOut >= ((SegmentIndex)value).TimerIn)
+ _selectedIndex = value;
+ _selectedIndexTitle = ((SegmentIndex)value).Title;
+ _selectedIndexDescription = ((SegmentIndex)value).Description;
+ _selectedIndexTags = ((SegmentIndex)value).Tags;
+ _selectedBook = _selectedIndex.Chapter.Book;
+ _title = _selectedIndex.Chapter.Book.Title;
+ _author = _selectedIndex.Chapter.Book.Author;
+ _chapters = _selectedIndex.Chapter.Book.Chapters;
+ _selectedIndexAnnotation.Clear();
+ List _temp = new List();
+ foreach (Annotation An in ((SegmentIndex)value).Chapter.Annotations)
{
- _temp.Add(new AnnotationViewerVM (An));
+ if (An.TimerIn <= ((SegmentIndex)value).TimerOut && An.TimerOut >= ((SegmentIndex)value).TimerIn)
+ {
+ _temp.Add(new AnnotationViewerVM(An));
+ }
}
+ SelectedIndexAnnotation = _temp;
}
- SelectedIndexAnnotation = _temp;
-
+ else
+ {
+ _selectedIndex = null;
+ _selectedIndexTitle = String.Empty;
+ _selectedIndexDescription = String.Empty;
+ _selectedIndexTags = new List();
+ _selectedBook = null;
+ _title = null;
+ _author = null;
+ _chapters = null;
+ _selectedIndexAnnotation.Clear();
+
+ SelectedIndexAnnotation = new List();
+ }
OnPropertyChanged(null);
@@ -169,7 +185,7 @@
private set
{
_title = value;
- _selectedBook.Title = value;
+
OnPropertyChanged("Title");
}
}
@@ -187,7 +203,7 @@
private set
{
_author = value;
- _selectedBook.Author = value;
+
OnPropertyChanged("Author");
}
@@ -206,7 +222,7 @@
private set
{
_chapters = value;
- _selectedBook.Chapters = value;
+
OnPropertyChanged("Chapters");
}
}
@@ -257,21 +273,35 @@
}
set
{
- _selectedBookVM = value;
-
- _selectedBook = value.SelectedBook;
- _title = value.SelectedBook.Title;
- _author = value.SelectedBook.Author;
- _chapters = value.SelectedBook.Chapters;
- ActualVideoSourceVM.Source = value.SelectedBook.MediaPath;
+ if (value != null)
+ {
+ _selectedBookVM = value;
+
+ _selectedBook = value.SelectedBook;
+ _title = value.SelectedBook.Title;
+ _author = value.SelectedBook.Author;
+ _chapters = value.SelectedBook.Chapters;
+ ActualVideoSourceVM.Source = value.SelectedBook.MediaPath;
ActualVideoSourceVM.Position = TimeSpan.FromMilliseconds(value.Position);
-
-
-
- SelectedIndex = value.SelectedBook.Chapters[0].Index[0];
-
- OnPropertyChanged(null);
- Commands.GoToTime.Execute(value.Position);
+
+
+
+ SelectedIndex = value.SelectedBook.Chapters[0].Index[0];
+ Commands.GoToTime.Execute(value.Position);
+ }
+ else
+ {
+ _selectedBookVM = null;
+ _selectedBook = null;
+ _title = null;
+ _author = null;
+ _chapters = null;
+ ActualVideoSourceVM.Source = null;
+ ActualVideoSourceVM.Position = TimeSpan.Zero;
+ SelectedIndex = null;
+ }
+ OnPropertyChanged(String.Empty);
+
}
}
private VideoViewerVM _actualVideoSourceVM;
@@ -313,19 +343,55 @@
SelectedIndex = param.SelectedBook.Chapters[0].Index[0];
InitializeCommands();
+
+
+ }
+ void ActualVideoSourceVM_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+
+ if (e.PropertyName == "Position")
+ {
+ if (SelectedBook != null)
+ {
+ TimeSpan Pos = TimeSpan.FromMilliseconds(SelectedBookVM.Position);
+ SelectedBookVM.Position = Pos.TotalMilliseconds;
+ if (SelectedIndex.TimerOut < Pos || SelectedIndex.TimerIn > Pos)
+ {
+ foreach (SegmentIndex Index in SelectedIndex.Chapter.Index)
+ {
+ if (Index.TimerIn <= Pos && Index.TimerOut >= Pos)
+ {
+ SelectedIndex = Index;
+ }
+
+ }
+ }
+ }
+ }
}
private void InitializeCommands()
{
ActualVideoSourceVM.Tick += new EventHandler(ActualVideoSourceVM_Tick);
- }
+ Commands.TimeChange.Executed += new EventHandler(TimeChange_Executed);
+ }
- private void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e)
+ void TimeChange_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- if(SelectedBook!=null)
+ BookTimeLineVM BookTimeLineVM = (BookTimeLineVM)e.Source;
+
+ if (BookTimeLineVM == this.SelectedBookVM)
{
- TimeSpan Pos = e.Position;
+ UpdateAnnotation();
+ }
+ }
+
+ private void UpdateAnnotation()
+ {
+ if (SelectedBook != null)
+ {
+ TimeSpan Pos = TimeSpan.FromMilliseconds(SelectedBookVM.Position);
SelectedBookVM.Position = Pos.TotalMilliseconds;
if (SelectedIndex.TimerOut < Pos || SelectedIndex.TimerIn > Pos)
{
@@ -340,6 +406,12 @@
}
}
}
+
+ private void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e)
+ {
+ SelectedBookVM.Position = e.Position.TotalMilliseconds;
+ UpdateAnnotation();
+ }
}
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -71,7 +71,14 @@
{
_selectedVideoBookIndex= value;
OnPropertyChanged("SelectedVideoBookIndex");
- ConsultationBookViewContextMenu.SelectedBookVM = (_selectedVideoBooks[value]);
+ if (_selectedVideoBooks.Count > value && value >= 0)
+ {
+ ConsultationBookViewContextMenu.SelectedBookVM = (_selectedVideoBooks[value]);
+ }
+ else
+ {
+ ConsultationBookViewContextMenu.SelectedBookVM = null;
+ }
}
}
@@ -121,6 +128,13 @@
Commands.PolemicElement.SelectPolemicElement.Executed += new EventHandler(SelectPolemicElement_Executed);
Commands.AnnotationMaker.NewAnnotationFinished.Executed += new EventHandler(NewAnnotationFinished_Executed);
Commands.BookTimeLine.LeftClickOnElement.Executed += new EventHandler(LeftClickOnElement_Executed);
+ Commands.BookTimeLine.CloseBookTimeLine.Executed += new EventHandler(CloseBookTimeLine_Executed);
+ }
+
+ void CloseBookTimeLine_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ SelectedVideoBooks.Remove((BookTimeLineVM)e.Parameter);
+ BookDeleted(this,new ConsultationVieVMSelectBookArg(((BookTimeLineVM)e.Parameter).SelectedBook));
}
void LeftClickOnElement_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
@@ -142,7 +156,9 @@
}
-
+
+ List InDownloadFile { get; set; }
+
///
/// Evenement lors d'un click sur un livre de la liste
///
@@ -152,23 +168,25 @@
{
bool CanAdd = true;
+ VideoBook clickedVideoBook = ((VideoBook)e.Parameter);
//On regarde si le VideoLivre qu'on à choisis n'est pas déjà dans la liste des VideoLivres sélectionné
foreach (BookTimeLineVM BookTLVM in SelectedVideoBooks)
{
- if (BookTLVM.SelectedBook.LdtPath == ((VideoBook)e.Parameter).LdtPath)
+ if (BookTLVM.SelectedBook.LdtPath == clickedVideoBook.LdtPath)
{
CanAdd = false;
}
}
- if (CanAdd)
+ if (CanAdd && !InDownloadFile.Contains(clickedVideoBook.LdtPath))
{
//Préparation du loader
/* _loaderVideoBook = new Loader(LDTFileReader.ConvertToVideoBook);
_loaderVideoBook.LoaderFinished += new EventHandler(LoaderVideoBook_LoaderFinished);
_loaderVideoBook.Load(((VideoBook)e.Parameter).LdtPath);*/
+ InDownloadFile.Add(clickedVideoBook .LdtPath);
_loaderVideoBook = new VideoBookLoader();
_loaderVideoBook.LoaderFinished += new EventHandler>(_loaderVideoBook_LoaderFinished);
- _loaderVideoBook.Load(((VideoBook)e.Parameter).LdtPath);
+ _loaderVideoBook.Load(clickedVideoBook.LdtPath);
}
@@ -179,25 +197,15 @@
VideoBook addedVideoBook = ((LoaderEventArgs)e).CreatedObject;
BookTimeLineVM temp = new BookTimeLineVM(addedVideoBook);
temp.ViewModelVideoViewer = ConsultationBookViewContextMenu.ActualVideoSourceVM;
- SelectedVideoBooks.Add(temp); ;
+ SelectedVideoBooks.Add(temp);
+ InDownloadFile.Remove(addedVideoBook.LdtPath);
+
+ if(BookDownloaded!=null)
+ BookDownloaded(this,new ConsultationVieVMSelectBookArg(addedVideoBook));
}
- ///
- /// Fonction une fois que le fichier .ldt à été chargé
- ///
- ///
- ///
- /* private void LoaderVideoBook_LoaderFinished(object sender, EventArgs e)
- {
- VideoBook addedVideoBook = ((LoaderEventArgs)e).CreatedObject;
- ///------- ///
- addedVideoBook.LdtPath = _loaderVideoBook.Path;
- ///-----------------///
- BookTimeLineVM temp = new BookTimeLineVM(addedVideoBook);
- temp.ViewModelVideoViewer = ConsultationBookViewContextMenu.ActualVideoSourceVM;
- SelectedVideoBooks.Add(temp);
-
- }*/
+ public event EventHandler BookDownloaded;
+ public event EventHandler BookDeleted;
private void CreateNewTextualAnnotation_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
@@ -208,6 +216,7 @@
public ConsultationViewVM()
{
InitializeCommands();
+ InDownloadFile = new List();
_consultationBookViewContextMenu = new ConsultationBookViewVM();
ViewModelAnnotationMaker = new AnnotationMakerVM();
SelectedVideoBooks = new SLExtensions.Collections.ObjectModel.ObservableCollection();
@@ -225,4 +234,12 @@
}
}
}
+ public class ConsultationVieVMSelectBookArg : EventArgs
+ {
+ public VideoBook Book {get;private set;}
+ public ConsultationVieVMSelectBookArg (VideoBook book)
+ {
+ Book=book;
+ }
+ }
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -91,7 +91,7 @@
public MainVM()
{
- InitializeCommands();
+
List SelectedVideoBooks = new List();
SelectedVideoBooks = SettingsProject.ListVideoBook;
@@ -101,12 +101,39 @@
ViewModelConsultationView = new ConsultationViewVM();
ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
ViewModelHeaderControl = new HeaderControlVM();
+ InitializeCommands();
}
private void InitializeCommands()
{
Commands.Initialize();
+ ViewModelConsultationView.BookDownloaded += new EventHandler(ViewModelConsultationView_BookDownloaded);
+ ViewModelConsultationView.BookDeleted += new EventHandler(ViewModelConsultationView_BookDeleted);
+ }
+
+ private void ViewModelConsultationView_BookDeleted(object sender, ConsultationVieVMSelectBookArg e)
+ {
+ foreach (ConsultVideoBookVM Cvbm in ViewModelNavigationBar.ConsultMenuViewModel.VideoBooks)
+ {
+ if (Cvbm.VideoBook.LdtPath == e.Book.LdtPath)
+ {
+ Cvbm.DownloadState = Lang.LangResource.NotDownloadedLabel;
+ break;
+ }
+ }
+ }
+
+ private void ViewModelConsultationView_BookDownloaded(object sender, ConsultationVieVMSelectBookArg e)
+ {
+ foreach (ConsultVideoBookVM Cvbm in ViewModelNavigationBar.ConsultMenuViewModel.VideoBooks)
+ {
+ if(Cvbm.VideoBook.LdtPath == e.Book.LdtPath)
+ {
+ Cvbm.DownloadState = Lang.LangResource.DownloadedLabel;
+ break;
+ }
+ }
}
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultMenuVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultMenuVM.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultMenuVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -18,16 +18,17 @@
{
public class ConsultMenuVM : BaseMVVM.ViewModel.ViewModel
{
- private List _videoBooks = new List();
- private List list = new List();
+ private List _videoBooks = new List();
+ private List list = new List();
///
/// VideoBooks Disponible
///
- public List VideoBooks
+ public List VideoBooks
{
get
{
- _videoBooks.Sort(new VideoBookComparer());
+
+ //_videoBooks.Sort(new VideoBookComparer());
if (SearchWord != String.Empty)
{
return list;
@@ -123,7 +124,11 @@
}
public ConsultMenuVM(List argList)
{
- _videoBooks = argList;
+ //_videoBooks = argList;
+ foreach(VideoBook vb in argList)
+ {
+ _videoBooks.Add(new ConsultVideoBookVM(vb));
+ }
SearchAuthor = true;
InitializeCommands();
}
@@ -133,7 +138,7 @@
void GetBook_Executed(object sender, ExecutedEventArgs e)
{
- if (SearchAuthor)
+ /* if (SearchAuthor)
{
var query = from c in _videoBooks
where c.Author.UserName.Contains(_searchWord)
@@ -182,7 +187,7 @@
}
}
VideoBooks = temp;
- }
+ }*/
}
}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultVideoBookVM.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ConsultVideoBookVM.cs Thu Feb 11 17:29:23 2010 +0100
@@ -0,0 +1,55 @@
+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 Iri.Modernisation.Data.Models;
+using Iri.Modernisation.BaseMVVM.Commands;
+namespace Iri.Modernisation.Controls.ViewModel
+{
+ public class ConsultVideoBookVM : BaseMVVM.ViewModel.ViewModel
+ {
+ private VideoBook _videoBook
+ {
+ get
+ {
+ return _videoBook;
+ }
+ set
+ {
+ _videoBook = value;
+ OnPropertyChanged("VideoBook");
+ }
+ }
+ public VideoBook VideoBook { get; private set; }
+
+ private String _downloadState { get; set; }
+
+ public String DownloadState
+ {
+ get
+ {
+ return _downloadState;
+ }
+ set
+ {
+ _downloadState = value;
+ OnPropertyChanged("DownloadState");
+ }
+ }
+ public ConsultVideoBookVM (VideoBook videoBook)
+ {
+ VideoBook = videoBook;
+ DownloadState = Lang.LangResource.NotDownloadedLabel;
+ InitializeCommands();
+ }
+ private void InitializeCommands()
+ {
+ }
+ }
+}
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Data/Models/VideoBook.cs
--- a/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Thu Feb 11 17:29:23 2010 +0100
@@ -83,7 +83,8 @@
LDTFile ldt = new LDTFile();
ldt.Project = new LDTProject()
{
- Title = this.Title
+ Title = this.Title,
+ User = this.Author.UserName
};
ldt.Medias = new List()
{
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Lang/LangResource.Designer.cs
--- a/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Thu Feb 11 17:29:23 2010 +0100
@@ -124,6 +124,24 @@
}
///
+ /// Looks up a localized string similar to DownloadedLabel.
+ ///
+ public static string DownloadedLabel {
+ get {
+ return ResourceManager.GetString("DownloadedLabel", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DownloadingLabel.
+ ///
+ public static string DownloadingLabel {
+ get {
+ return ResourceManager.GetString("DownloadingLabel", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to EditingLabel.
///
public static string EditingLabel {
@@ -259,6 +277,15 @@
}
///
+ /// Looks up a localized string similar to NotDownloadedLabel.
+ ///
+ public static string NotDownloadedLabel {
+ get {
+ return ResourceManager.GetString("NotDownloadedLabel", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to OkLabel.
///
public static string OkLabel {
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Lang/LangResource.en-US.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Thu Feb 11 17:29:23 2010 +0100
@@ -138,6 +138,12 @@
Display
+
+ DownloadedLabel
+
+
+ DownloadingLabel
+
Editing
@@ -183,6 +189,9 @@
You can't edit the {0} chapter. You have to finish the editing of the previous chapter.
+
+ NotDownloadedLabel
+
Ok
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Thu Feb 11 17:29:23 2010 +0100
@@ -138,6 +138,12 @@
Afficher
+
+ Chargé !
+
+
+ Chargement...
+
Edition
@@ -189,6 +195,9 @@
Vous ne pouvez pas éditer le chapitre {0}. Veuillez terminer d'abort l'édition du chapitre précédent.
+
+ Non Chargé
+
Ok
diff -r b51a10574e7f -r 594fdedecf7f client/src/Iri.Modernisation.Lang/LangResource.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.resx Wed Feb 10 14:56:46 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.resx Thu Feb 11 17:29:23 2010 +0100
@@ -138,6 +138,12 @@
DisplayLabel
+
+ DownloadedLabel
+
+
+ DownloadingLabel
+
EditingLabel
@@ -183,6 +189,9 @@
NotActivedChapter
+
+ NotDownloadedLabel
+
OkLabel
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI28.ldt
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI28.ldt Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI28.ldt Thu Feb 11 17:29:23 2010 +0100
@@ -1,5 +1,5 @@
-
+
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/FranceInterENMI29.ldt Thu Feb 11 17:29:23 2010 +0100
@@ -1,15 +1,15 @@
-
+
-
-
+
+
Emission France Culture
-
+
A
A
@@ -20,11 +20,26 @@
-
+
Emission France Culture
-
+
+ aa
+ aa
+
+
+
+ aa
+
+
+
+
+
+ Emission France Culture
+
+
+
B
B
@@ -35,11 +50,118 @@
-
+
+ Emission France Culture
+
+
+
+ Alors là
+ C'est vraiment nul !
+
+
+
+ nul
+ pas bien
+ mauvais
+
+
+
+
+
+ Emission France Culture
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Emission France Culture
+
+
+
+ Hello
+ Hello
+
+
+
+
+
+
+
+
+
Emission France Culture
-
+
+ d
+ d
+
+
+
+
+
+
+
+
+
+ Emission France Culture
+
+
+
+ o
+ o
+
+
+
+
+
+
+
+
+
+ Emission France Culture
+
+
+
+ Papabowo
+ Django
+
+
+
+
+
+
+
+
+
+ Emission France Culture
+
+
+
+ aa
+ aaa
+
+
+
+ aaa
+
+
+
+
+
+ Emission France Culture
+
+
+
aa
aaa
@@ -50,32 +172,20 @@
-
+
Emission France Culture
-
-
-
+
+ Oui Mais ?
+ Encore !
-
-
-
-
-
-
- Emission France Culture
-
-
-
- aa
- aaa
-
-
-
- aaa
+ a
+ b
+ c
+ d
@@ -90,6 +200,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi28nov2009/iri_matinalefi28nov2009.iri
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi28nov2009/iri_matinalefi28nov2009.iri Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi28nov2009/iri_matinalefi28nov2009.iri Thu Feb 11 17:29:23 2010 +0100
@@ -832,7 +832,7 @@
-
+
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi29nov2009/iri_matinalefi29nov2009.iri
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi29nov2009/iri_matinalefi29nov2009.iri Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/Content/iri_matinalefi29nov2009/iri_matinalefi29nov2009.iri Thu Feb 11 17:29:23 2010 +0100
@@ -541,7 +541,7 @@
-
+
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/FranceCulture.Web.csproj
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/FranceCulture.Web.csproj Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/FranceCulture.Web.csproj Thu Feb 11 17:29:23 2010 +0100
@@ -87,7 +87,7 @@
False
True
- 6848
+ 7375
/
diff -r b51a10574e7f -r 594fdedecf7f client/test/FranceCulture/FranceCulture/FranceCulture.Web/ProjectConfig.xml
--- a/client/test/FranceCulture/FranceCulture/FranceCulture.Web/ProjectConfig.xml Wed Feb 10 14:56:46 2010 +0100
+++ b/client/test/FranceCulture/FranceCulture/FranceCulture.Web/ProjectConfig.xml Thu Feb 11 17:29:23 2010 +0100
@@ -1,7 +1,7 @@