From 0877185fca9f4a5b6a551b68b1d9b566e2f67fc5 Mon Sep 17 00:00:00 2001 From: Vincent ASTOLFI Date: Mon, 17 Oct 2022 09:21:42 +0200 Subject: [PATCH] Ajoyt de nombreux UC est lien les uns les autres avec le navigator --- Code/IHM/Navigator.cs | 19 +++++++++++--- Code/IHM/UCAjouterBanque.xaml | 16 +++++++++++ Code/IHM/UCAjouterBanque.xaml.cs | 34 ++++++++++++++++++++++++ Code/IHM/UCAjouterCompte.xaml | 16 +++++++++++ Code/IHM/UCAjouterCompte.xaml.cs | 35 +++++++++++++++++++++++++ Code/IHM/UCAjouterEcheance.xaml | 16 +++++++++++ Code/IHM/UCAjouterEcheance.xaml.cs | 35 +++++++++++++++++++++++++ Code/IHM/UCAjouterPlanification.xaml | 16 +++++++++++ Code/IHM/UCAjouterPlanification.xaml.cs | 28 ++++++++++++++++++++ Code/IHM/UCCompte.xaml | 8 +++--- Code/IHM/UCCompte.xaml.cs | 20 ++++++++++++++ Code/IHM/UCEcheancier.xaml | 4 +-- Code/IHM/UCEcheancier.xaml.cs | 12 +++++++++ Code/IHM/UCSupprimerBanque.xaml | 16 +++++++++++ Code/IHM/UCSupprimerBanque.xaml.cs | 34 ++++++++++++++++++++++++ Code/IHM/UCSupprimerCompte.xaml | 17 ++++++++++++ Code/IHM/UCSupprimerCompte.xaml.cs | 35 +++++++++++++++++++++++++ Code/IHM/UCSupprimerEcheance.xaml | 16 +++++++++++ Code/IHM/UCSupprimerEcheance.xaml.cs | 35 +++++++++++++++++++++++++ 19 files changed, 403 insertions(+), 9 deletions(-) create mode 100644 Code/IHM/UCAjouterBanque.xaml create mode 100644 Code/IHM/UCAjouterBanque.xaml.cs create mode 100644 Code/IHM/UCAjouterCompte.xaml create mode 100644 Code/IHM/UCAjouterCompte.xaml.cs create mode 100644 Code/IHM/UCAjouterEcheance.xaml create mode 100644 Code/IHM/UCAjouterEcheance.xaml.cs create mode 100644 Code/IHM/UCAjouterPlanification.xaml create mode 100644 Code/IHM/UCAjouterPlanification.xaml.cs create mode 100644 Code/IHM/UCSupprimerBanque.xaml create mode 100644 Code/IHM/UCSupprimerBanque.xaml.cs create mode 100644 Code/IHM/UCSupprimerCompte.xaml create mode 100644 Code/IHM/UCSupprimerCompte.xaml.cs create mode 100644 Code/IHM/UCSupprimerEcheance.xaml create mode 100644 Code/IHM/UCSupprimerEcheance.xaml.cs diff --git a/Code/IHM/Navigator.cs b/Code/IHM/Navigator.cs index 363e7ac..fe7f4b6 100644 --- a/Code/IHM/Navigator.cs +++ b/Code/IHM/Navigator.cs @@ -12,16 +12,23 @@ namespace IHM { public class Navigator : INotifyPropertyChanged { - public const string PART_COMPTE = "Compte"; public const string PART_OPERATION = "Opération"; - public const string PART_ECHEANCIER = "Echéancier"; public const string PART_PLANNIFICATION = "Plannification"; - public const string PART_MAIN = "Main"; public const string PART_CONNEXION = "Connexion"; public const string PART_INSCRIPTION = "Inscription"; public const string PART_MODIFSOLDE = "ModifSolde"; + public const string PART_COMPTE = "Compte"; + public const string PART_AJOUTER_BANQUE = "Ajouter une banque"; + public const string PART_SUPPRIMER_BANQUE = "Supprimer une banque"; + public const string PART_AJOUTER_COMPTE = "Ajouter une compte"; + public const string PART_SUPPRIMER_COMPTE = "Supprimer un compte"; + + public const string PART_ECHEANCIER = "Echéancier"; + public const string PART_AJOUTER_ECHEANCE = "Enregistrer une échéance"; + public const string PART_SUPPRIMER_ECHEANCE = "Supprimer une échéance"; + public ReadOnlyDictionary> WindowPart { get; private set; } Dictionary> windowPart { get; set; } = new Dictionary> @@ -34,6 +41,12 @@ namespace IHM [PART_PLANNIFICATION] = () => new UCPlannification(), [PART_INSCRIPTION] = () => new UCInscription(), [PART_MODIFSOLDE] = () => new UCModifSolde(), + [PART_AJOUTER_BANQUE] = () => new UCAjouterBanque(), + [PART_SUPPRIMER_BANQUE] = () => new UCSupprimerBanque(), + [PART_AJOUTER_COMPTE] = () => new UCAjouterCompte(), + [PART_SUPPRIMER_COMPTE] = () => new UCSupprimerCompte(), + [PART_AJOUTER_ECHEANCE] = () => new UCAjouterEcheance(), + [PART_SUPPRIMER_ECHEANCE] = () => new UCSupprimerEcheance(), }; diff --git a/Code/IHM/UCAjouterBanque.xaml b/Code/IHM/UCAjouterBanque.xaml new file mode 100644 index 0000000..4e47493 --- /dev/null +++ b/Code/IHM/UCAjouterBanque.xaml @@ -0,0 +1,16 @@ + + + + + + diff --git a/Code/IHM/UCAjouterBanque.xaml.cs b/Code/IHM/UCAjouterBanque.xaml.cs new file mode 100644 index 0000000..ac52266 --- /dev/null +++ b/Code/IHM/UCAjouterBanque.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCAjouterBanque.xaml + /// + public partial class UCAjouterBanque : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + public UCAjouterBanque() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_COMPTE); + } + } +} diff --git a/Code/IHM/UCAjouterCompte.xaml b/Code/IHM/UCAjouterCompte.xaml new file mode 100644 index 0000000..4460ea8 --- /dev/null +++ b/Code/IHM/UCAjouterCompte.xaml @@ -0,0 +1,16 @@ + + + + + + diff --git a/Code/IHM/UCAjouterCompte.xaml.cs b/Code/IHM/UCAjouterCompte.xaml.cs new file mode 100644 index 0000000..e8ed547 --- /dev/null +++ b/Code/IHM/UCAjouterCompte.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCAjouterCompte.xaml + /// + public partial class UCAjouterCompte : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + + public UCAjouterCompte() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_COMPTE); + } + } +} diff --git a/Code/IHM/UCAjouterEcheance.xaml b/Code/IHM/UCAjouterEcheance.xaml new file mode 100644 index 0000000..5a61dc1 --- /dev/null +++ b/Code/IHM/UCAjouterEcheance.xaml @@ -0,0 +1,16 @@ + + + + + + diff --git a/Code/IHM/UCAjouterEcheance.xaml.cs b/Code/IHM/UCAjouterEcheance.xaml.cs new file mode 100644 index 0000000..449d1a6 --- /dev/null +++ b/Code/IHM/UCAjouterEcheance.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCAjouterEcheance.xaml + /// + public partial class UCAjouterEcheance : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + + public UCAjouterEcheance() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_ECHEANCIER); + } + } +} diff --git a/Code/IHM/UCAjouterPlanification.xaml b/Code/IHM/UCAjouterPlanification.xaml new file mode 100644 index 0000000..67d51db --- /dev/null +++ b/Code/IHM/UCAjouterPlanification.xaml @@ -0,0 +1,16 @@ + + + + + + diff --git a/Code/IHM/UCAjouterPlanification.xaml.cs b/Code/IHM/UCAjouterPlanification.xaml.cs new file mode 100644 index 0000000..b0a7769 --- /dev/null +++ b/Code/IHM/UCAjouterPlanification.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCAjouterPlanification.xaml + /// + public partial class UCAjouterPlanification : UserControl + { + public UCAjouterPlanification() + { + InitializeComponent(); + } + } +} diff --git a/Code/IHM/UCCompte.xaml b/Code/IHM/UCCompte.xaml index 6879b17..d670437 100644 --- a/Code/IHM/UCCompte.xaml +++ b/Code/IHM/UCCompte.xaml @@ -14,16 +14,16 @@ Compte - - - - diff --git a/Code/IHM/UCCompte.xaml.cs b/Code/IHM/UCCompte.xaml.cs index 6b36bb0..7364dfb 100644 --- a/Code/IHM/UCCompte.xaml.cs +++ b/Code/IHM/UCCompte.xaml.cs @@ -27,6 +27,26 @@ namespace IHM { Nav.NavigateTo(Navigator.PART_MODIFSOLDE); } + + private void Button_Click_Ajouter_Banque(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_AJOUTER_BANQUE); + } + + private void Button_Click_Supprimer_Banque(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_SUPPRIMER_BANQUE); + } + + private void Button_Click_Ajouter_Compte(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_AJOUTER_COMPTE); + } + + private void Button_Click_Supprimer_Compte(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_SUPPRIMER_COMPTE); + } } } diff --git a/Code/IHM/UCEcheancier.xaml b/Code/IHM/UCEcheancier.xaml index daa70fd..32734e4 100644 --- a/Code/IHM/UCEcheancier.xaml +++ b/Code/IHM/UCEcheancier.xaml @@ -8,7 +8,7 @@ d:DesignHeight="450" d:DesignWidth="800" Style="{StaticResource ImageFondRessource}"> - + + diff --git a/Code/IHM/UCSupprimerBanque.xaml.cs b/Code/IHM/UCSupprimerBanque.xaml.cs new file mode 100644 index 0000000..763c752 --- /dev/null +++ b/Code/IHM/UCSupprimerBanque.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCSupprimerBanque.xaml + /// + public partial class UCSupprimerBanque : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + public UCSupprimerBanque() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_COMPTE); + } + } +} diff --git a/Code/IHM/UCSupprimerCompte.xaml b/Code/IHM/UCSupprimerCompte.xaml new file mode 100644 index 0000000..38ec1d4 --- /dev/null +++ b/Code/IHM/UCSupprimerCompte.xaml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/Code/IHM/UCSupprimerCompte.xaml.cs b/Code/IHM/UCSupprimerCompte.xaml.cs new file mode 100644 index 0000000..9402e27 --- /dev/null +++ b/Code/IHM/UCSupprimerCompte.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCSupprimerCompte.xaml + /// + public partial class UCSupprimerCompte : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + + public UCSupprimerCompte() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_COMPTE); + } + } +} diff --git a/Code/IHM/UCSupprimerEcheance.xaml b/Code/IHM/UCSupprimerEcheance.xaml new file mode 100644 index 0000000..a5f5e43 --- /dev/null +++ b/Code/IHM/UCSupprimerEcheance.xaml @@ -0,0 +1,16 @@ + + + + + + diff --git a/Code/IHM/UCSupprimerEcheance.xaml.cs b/Code/IHM/UCSupprimerEcheance.xaml.cs new file mode 100644 index 0000000..cbdcfea --- /dev/null +++ b/Code/IHM/UCSupprimerEcheance.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace IHM +{ + /// + /// Logique d'interaction pour UCSupprimerEcheance.xaml + /// + public partial class UCSupprimerEcheance : UserControl + { + public Navigator Nav => (App.Current as App).Navigator; + + public UCSupprimerEcheance() + { + InitializeComponent(); + } + + private void Button_Click_Retour(object sender, RoutedEventArgs e) + { + Nav.NavigateTo(Navigator.PART_ECHEANCIER); + } + } +}