--- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Mon Dec 14 17:02:03 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Wed Dec 16 17:14:38 2009 +0100
@@ -10,6 +10,7 @@
using Iri.Modernisation.BaseMVVM.Commands;
using Iri.Modernisation.Controls.ViewModel;
using Iri.Modernisation.Data.Models;
+using System.Globalization;
namespace Iri.Modernisation.Controls.View
{
public partial class HeaderProduction : UserControl
@@ -17,6 +18,7 @@
public HeaderProduction()
{
// Required to initialize variables
+
InitializeComponent();
ModernisationEditionController.Active();
@@ -71,12 +73,14 @@
OuvertureEditionController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureEditionController_HeaderProductionPartFinished);
OuvertureIndexController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(OuvertureIndexController_HeaderProductionPartFinished);
+
}
void OuvertureIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
{
if (SelectedPart != null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Ouverture");
SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Ouverture, true));
}
}
@@ -85,6 +89,7 @@
{
if (SelectedPart != null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Ouverture, false));
}
}
@@ -93,6 +98,7 @@
{
if (SelectedPart != null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Post-Modernité");
SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, true));
}
}
@@ -101,6 +107,7 @@
{
if (SelectedPart != null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, false));
}
}
@@ -109,6 +116,7 @@
{
if (SelectedPart != null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Modernité");
SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Modernite, true));
}
}
@@ -117,6 +125,8 @@
{
if (SelectedPart!=null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage;
+
SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernite,false));
}
}
@@ -125,7 +135,15 @@
{
if (SelectedPart!=null)
{
- SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernisation,true));
+ if (MessageBoxResult.OK == MessageBox.Show("Voulez Vous passer à l'indexation ?", "Question", MessageBoxButton.OKCancel))
+ {
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Modernisation");
+ SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Modernisation, true));
+ }
+ else
+ {
+ UnselectAll();
+ }
}
}
@@ -133,6 +151,7 @@
{
if (SelectedPart!=null)
{
+ InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionFirstMessage;
SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernisation,false));
}
}
@@ -206,12 +225,11 @@
FinishedPart(sender, new HeaderProductionEventArgs());
}
}
-
- void HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
+ private void UnselectAll()
{
ModernisationEditionController.UnSelect();
ModernisationIndexController.UnSelect();
-
+
ModerniteEditionController.UnSelect();
ModerniteIndexController.UnSelect();
@@ -220,6 +238,10 @@
OuvertureEditionController.UnSelect();
OuvertureIndexController.UnSelect();
+ }
+ private void HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e)
+ {
+ UnselectAll();
((HeaderProductionPartControler)sender).Select();
}