From 00a1eebb31aae0e57e63da28808532d6a8c5e29b Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Mon, 17 Oct 2022 08:14:03 +0200 Subject: [PATCH] correction de bug de page --- Code/IHM/Navigator.cs | 29 +++-------------------------- Code/IHM/UCModifSolde.xaml | 2 +- Code/IHM/UCModifSolde.xaml.cs | 4 ++-- 3 files changed, 6 insertions(+), 29 deletions(-) diff --git a/Code/IHM/Navigator.cs b/Code/IHM/Navigator.cs index f9ce3a9..363e7ac 100644 --- a/Code/IHM/Navigator.cs +++ b/Code/IHM/Navigator.cs @@ -26,35 +26,22 @@ namespace IHM Dictionary> windowPart { get; set; } = new Dictionary> { + [PART_MAIN] = () => new UCBienvenue(), + [PART_CONNEXION] = () => new UCConnexion(), [PART_COMPTE] = () => new UCCompte(), [PART_OPERATION] = () => new UCOperation(), [PART_ECHEANCIER] = () => new UCEcheancier(), [PART_PLANNIFICATION] = () => new UCPlannification(), - }; - - public ReadOnlyDictionary> WindowPartMain { get; private set; } - - Dictionary> windowPartMain { get; set; } = new Dictionary> - { - [PART_CONNEXION] = () => new UCConnexion(), [PART_INSCRIPTION] = () => new UCInscription(), [PART_MODIFSOLDE] = () => new UCModifSolde(), }; - public ReadOnlyDictionary> WindowMain { get; private set; } - - Dictionary> windowMain { get; set; } = new Dictionary> - { - [PART_MAIN] = () => new UCBienvenue(), - }; public Navigator() { WindowPart = new ReadOnlyDictionary>(windowPart); - WindowMain = new ReadOnlyDictionary>(windowMain); - WindowPartMain = new ReadOnlyDictionary>(windowPartMain); - SelectedUserControlCreator = windowMain.First(); + SelectedUserControlCreator = windowPart.First(); } public KeyValuePair> SelectedUserControlCreator @@ -80,16 +67,6 @@ namespace IHM { SelectedUserControlCreator = WindowPart.Single(kvp => kvp.Key == windowPartName); } - - if (WindowPartMain.ContainsKey(windowPartName)) - { - SelectedUserControlCreator = WindowPartMain.Single(kvp => kvp.Key == windowPartName); - } - - if (WindowMain.ContainsKey(windowPartName)) - { - SelectedUserControlCreator = WindowMain.Single(kvp => kvp.Key == windowPartName); - } } } } diff --git a/Code/IHM/UCModifSolde.xaml b/Code/IHM/UCModifSolde.xaml index ea6d449..0c5ad64 100644 --- a/Code/IHM/UCModifSolde.xaml +++ b/Code/IHM/UCModifSolde.xaml @@ -1,4 +1,4 @@ - /// Logique d'interaction pour Page1.xaml /// - public partial class ModifSolde : UserControl + public partial class UCModifSolde : UserControl { public Navigator Nav => (App.Current as App).Navigator; - public ModifSolde() + public UCModifSolde() { InitializeComponent(); }