# HG changeset patch
# User totetm <>
# Date 1263551456 -3600
# Node ID 775d895e5d4d44fe6314cb5f46454db5bfe0aa1f
# Parent 644e3cd48034035c54597e2274a504191db90b9f
Production Instruction message
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionChapterVM.cs Fri Jan 15 11:30:56 2010 +0100
@@ -79,6 +79,8 @@
}
}
+
+
private bool _highLight;
public bool HighLight
{
@@ -134,6 +136,7 @@
_chapterDescription = Vcd;
_title = Vcd.Title;
HighLight = false;
+
}
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Fri Jan 15 11:30:56 2010 +0100
@@ -46,17 +46,46 @@
}
_selectedChapter = value;
+
value.HighLight = true;
if (Change != null)
Change(this, new HeaderProductionVMArgs(SelectedChapter));
-
-
+
+ UpdateInstructionMessage();
OnPropertyChanged("SelectedChapter");
}
}
-
+ private void UpdateInstructionMessage()
+ {
+ if (!_selectedChapter.Editing)
+ {
+ if (this.ProductionChapters.IndexOf(_selectedChapter) == 0)
+ {
+ Instruction = Lang.LangResource.EditionFirstMessage.Replace("{0}",SelectedChapter.Title);
+ }
+ else
+ {
+ if (!this.ProductionChapters[this.ProductionChapters.IndexOf(_selectedChapter) - 1].Editing)
+ {
+ Instruction = Lang.LangResource.NotActivedChapter.Replace("{0}", SelectedChapter.Title);
+ }
+ else
+ {
+ Instruction = Lang.LangResource.EditionSecondMessage.Replace("{0}", SelectedChapter.Title);
+ }
+ }
+ }
+ else if (!_selectedChapter.Indexing)
+ {
+ Instruction = Lang.LangResource.IndexationMessage.Replace("{0}", SelectedChapter.Title);
+ }
+ else
+ {
+ Instruction = Lang.LangResource.EnrichmentMessage.Replace("{0}", SelectedChapter.Title);
+ }
+ }
public bool IsVideoBookComplete
{
get
@@ -92,8 +121,8 @@
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.Ended +=new HeaderProductionChapterVM.EndedDelegate(Ended);
+ temp.EditEnded += new HeaderProductionChapterVM.EditEndedDelegate(EditEnded);
temp.HighLight = false;
_productionChapters.Add(temp);
if(_productionChapters.Count > 1)
@@ -101,10 +130,11 @@
_productionChapters[_productionChapters.Count - 2].EditEnded+=new HeaderProductionChapterVM.EditEndedDelegate(temp.Enable);
}
+
}
- _instruction = Iri.Modernisation.Controls.Resources.HeaderProduction.InstructionTextRessource.Introduction;
+ Instruction = Lang.LangResource.OpenProductionMessage;
InitializeCommands();
ProductionChapters[0].Enable();
@@ -112,19 +142,23 @@
}
- void temp_EditEnded()
+ private void EditEnded()
{
if(Change!=null)
Change(this,new HeaderProductionVMArgs(SelectedChapter));
+
+ UpdateInstructionMessage();
}
- void temp_Ended()
+ private void Ended()
{
OnPropertyChanged("IsVideoBookComplete");
if (Change != null)
Change(this, new HeaderProductionVMArgs(SelectedChapter));
+
+ UpdateInstructionMessage();
}
private void InitializeCommands()
{
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Lang/LangResource.Designer.cs
--- a/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.Designer.cs Fri Jan 15 11:30:56 2010 +0100
@@ -250,6 +250,15 @@
}
///
+ /// Looks up a localized string similar to NotActivedChapter.
+ ///
+ public static string NotActivedChapter {
+ get {
+ return ResourceManager.GetString("NotActivedChapter", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to OkLabel.
///
public static string OkLabel {
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Lang/LangResource.en-US.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.en-US.resx Fri Jan 15 11:30:56 2010 +0100
@@ -112,10 +112,10 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Add a contextual link
@@ -180,6 +180,9 @@
Preference
+
+ You can't edit the {0} chapter. You have to finish the editing of the previous chapter.
+
Ok
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Fri Jan 15 11:30:56 2010 +0100
@@ -112,10 +112,10 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Ajouter un lien Contextuel
@@ -186,6 +186,9 @@
Préférence
+
+ Vous ne pouvez pas éditer le chapitre {0}. Veuillez terminer d'abort l'édition du chapitre précédent.
+
Ok
diff -r 644e3cd48034 -r 775d895e5d4d client/src/Iri.Modernisation.Lang/LangResource.resx
--- a/client/src/Iri.Modernisation.Lang/LangResource.resx Thu Jan 14 16:39:50 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.resx Fri Jan 15 11:30:56 2010 +0100
@@ -112,10 +112,10 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
AnnotationMakerAddLinkLabel
@@ -180,6 +180,9 @@
MenuPreferenceLabel
+
+ NotActivedChapter
+
OkLabel