diff -r 43bb1b8ed555 -r b6df6fce6e5d client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs --- a/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Mon Jan 25 09:30:22 2010 +0100 +++ b/client/src/Iri.Modernisation.Controls/View/HeaderProduction/HeaderProduction.xaml.cs Wed Jan 27 10:37:39 2010 +0100 @@ -20,256 +20,21 @@ // Required to initialize variables InitializeComponent(); - /* ModernisationEditionController.Active(); - - ModernisationEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel; - ModernisationIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel; - - ModerniteEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel; - ModerniteIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel; - - - PostModerniteEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel; - PostModerniteIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel; - - - OuvertureEditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel; - OuvertureIndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel;*/ - - /////////////////////////-- - /*ModernisationEditionController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - ModernisationIndexController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - - ModerniteEditionController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - ModerniteIndexController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - - PostModerniteEditionController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - PostModerniteIndexController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - - OuvertureEditionController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - OuvertureIndexController.HeaderProductionPartSelected += new EventHandler(HeaderProductionPartSelected); - ////////////////////// - ModernisationEditionController.HeaderProductionPartSelected += new EventHandler(ModernisationEditionController_HeaderProductionPartSelected); - ModernisationIndexController.HeaderProductionPartSelected += new EventHandler(ModernisationIndexController_HeaderProductionPartSelected); - - ModerniteEditionController.HeaderProductionPartSelected += new EventHandler(ModerniteEditionController_HeaderProductionPartSelected); - ModerniteIndexController.HeaderProductionPartSelected += new EventHandler(ModerniteIndexController_HeaderProductionPartSelected); - - PostModerniteEditionController.HeaderProductionPartSelected += new EventHandler(PostModerniteEditionController_HeaderProductionPartSelected); - PostModerniteIndexController.HeaderProductionPartSelected += new EventHandler(PostModerniteIndexController_HeaderProductionPartSelected); - - OuvertureEditionController.HeaderProductionPartSelected += new EventHandler(OuvertureEditionController_HeaderProductionPartSelected); - OuvertureIndexController.HeaderProductionPartSelected += new EventHandler(OuvertureIndexController_HeaderProductionPartSelected); - ////////////////////// - ModernisationEditionController.HeaderProductionPartFinished += new EventHandler(ModernisationEditionControler_HeaderProductionPartFinished); - ModernisationIndexController.HeaderProductionPartFinished += new EventHandler(ModernisationIndexControl_HeaderProductionPartFinished); - - ModerniteEditionController.HeaderProductionPartFinished += new EventHandler(ModerniteEditionControler_HeaderProductionPartFinished); - ModerniteIndexController.HeaderProductionPartFinished += new EventHandler(ModerniteIndexController_HeaderProductionPartFinished); - - PostModerniteEditionController.HeaderProductionPartFinished += new EventHandler(PostModerniteEditionController_HeaderProductionPartFinished); - PostModerniteIndexController.HeaderProductionPartFinished += new EventHandler(PostModerniteIndexController_HeaderProductionPartFinished); - - OuvertureEditionController.HeaderProductionPartFinished += new EventHandler(OuvertureEditionController_HeaderProductionPartFinished); - OuvertureIndexController.HeaderProductionPartFinished += new EventHandler(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)); - } - } - - void OuvertureEditionController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart != null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage; - SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Ouverture, false)); - } - } - - void PostModerniteIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart != null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Post-Modernité"); - SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, true)); - } - } - - void PostModerniteEditionController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart != null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage; - SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Postmodernite, false)); - } - } - - void ModerniteIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart != null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.IndexationMessage.Replace("{0}", "Modernité"); - SelectedPart(sender, new HeaderProductionEventArgs(VideoChapterType.Modernite, true)); - } - } - - void ModerniteEditionController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart!=null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionSecondMessage; - - SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernite,false)); - } } - void ModernisationIndexController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart!=null) - { - 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(); - } - } - } - - void ModernisationEditionController_HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - if (SelectedPart!=null) - { - InstructionText.Text = Iri.Modernisation.Lang.LangResource.EditionFirstMessage; - SelectedPart(sender,new HeaderProductionEventArgs(VideoChapterType.Modernisation,false)); - } - } - - void OuvertureIndexController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap04IndexingOkClick.Execute(); - if (FinishedPart != null) - { - FinishedPart(sender,new HeaderProductionEventArgs()); - } - - } - - void PostModerniteIndexController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap03IndexingOkClick.Execute(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - - void ModerniteIndexController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap02IndexingOkClick.Execute(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - - void OuvertureEditionController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap04EditingOkClick.Execute(); - OuvertureIndexController.Active(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - - void PostModerniteEditionController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap03EditingOkClick.Execute(); - PostModerniteIndexController.Active(); - OuvertureEditionController.Active(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - - void ModerniteEditionControler_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - - Commands.HeaderProduction.Chap02EditingOkClick.Execute(); - ModerniteIndexController.Active(); - PostModerniteEditionController.Active(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - - void ModernisationIndexControl_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap01IndexingOkClick.Execute(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - } - private void UnselectAll() - { - ModernisationEditionController.UnSelect(); - ModernisationIndexController.UnSelect(); - - ModerniteEditionController.UnSelect(); - ModerniteIndexController.UnSelect(); - - PostModerniteEditionController.UnSelect(); - PostModerniteIndexController.UnSelect(); - - OuvertureEditionController.UnSelect(); - OuvertureIndexController.UnSelect(); - } - private void HeaderProductionPartSelected(object sender, HeaderProductionPartControlerEventArgs e) - { - UnselectAll(); - ((HeaderProductionPartControler)sender).Select(); - } - - void ModernisationEditionControler_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) - { - Commands.HeaderProduction.Chap01EditingOkClick.Execute(); - ModernisationIndexController.Active(); - ModerniteEditionController.Active(); - if (FinishedPart != null) - { - FinishedPart(sender, new HeaderProductionEventArgs()); - } - - } - public event EventHandler SelectedPart; - public event EventHandler FinishedPart; -*/ + } public class HeaderProductionEventArgs : EventArgs { - public VideoChapterType ChapterType; + public bool IsIndexPart; public HeaderProductionEventArgs() { } - public HeaderProductionEventArgs(VideoChapterType chapterType,bool isIndexpPrt) + public HeaderProductionEventArgs(bool isIndexpPrt) { - ChapterType = chapterType; + IsIndexPart = isIndexpPrt; }