diff -r 44a2dc869e28 -r f292db96b050 client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs --- 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; }