correction de bug de page
continuous-integration/drone/push Build is passing Details

Navigator
Vincent ASTOLFI 2 years ago
parent 235267f3f4
commit 00a1eebb31

@ -26,35 +26,22 @@ namespace IHM
Dictionary<string, Func<UserControl>> windowPart { get; set; } = new Dictionary<string, Func<UserControl>> Dictionary<string, Func<UserControl>> windowPart { get; set; } = new Dictionary<string, Func<UserControl>>
{ {
[PART_MAIN] = () => new UCBienvenue(),
[PART_CONNEXION] = () => new UCConnexion(),
[PART_COMPTE] = () => new UCCompte(), [PART_COMPTE] = () => new UCCompte(),
[PART_OPERATION] = () => new UCOperation(), [PART_OPERATION] = () => new UCOperation(),
[PART_ECHEANCIER] = () => new UCEcheancier(), [PART_ECHEANCIER] = () => new UCEcheancier(),
[PART_PLANNIFICATION] = () => new UCPlannification(), [PART_PLANNIFICATION] = () => new UCPlannification(),
};
public ReadOnlyDictionary<string, Func<UserControl>> WindowPartMain { get; private set; }
Dictionary<string, Func<UserControl>> windowPartMain { get; set; } = new Dictionary<string, Func<UserControl>>
{
[PART_CONNEXION] = () => new UCConnexion(),
[PART_INSCRIPTION] = () => new UCInscription(), [PART_INSCRIPTION] = () => new UCInscription(),
[PART_MODIFSOLDE] = () => new UCModifSolde(), [PART_MODIFSOLDE] = () => new UCModifSolde(),
}; };
public ReadOnlyDictionary<string, Func<UserControl>> WindowMain { get; private set; }
Dictionary<string, Func<UserControl>> windowMain { get; set; } = new Dictionary<string, Func<UserControl>>
{
[PART_MAIN] = () => new UCBienvenue(),
};
public Navigator() public Navigator()
{ {
WindowPart = new ReadOnlyDictionary<string, Func<UserControl>>(windowPart); WindowPart = new ReadOnlyDictionary<string, Func<UserControl>>(windowPart);
WindowMain = new ReadOnlyDictionary<string, Func<UserControl>>(windowMain);
WindowPartMain = new ReadOnlyDictionary<string, Func<UserControl>>(windowPartMain);
SelectedUserControlCreator = windowMain.First(); SelectedUserControlCreator = windowPart.First();
} }
public KeyValuePair<string, Func<UserControl>> SelectedUserControlCreator public KeyValuePair<string, Func<UserControl>> SelectedUserControlCreator
@ -80,16 +67,6 @@ namespace IHM
{ {
SelectedUserControlCreator = WindowPart.Single(kvp => kvp.Key == windowPartName); 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);
}
} }
} }
} }

@ -1,4 +1,4 @@
<UserControl x:Class="IHM.ModifSolde" <UserControl x:Class="IHM.UCModifSolde"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

@ -18,11 +18,11 @@ namespace IHM
/// <summary> /// <summary>
/// Logique d'interaction pour Page1.xaml /// Logique d'interaction pour Page1.xaml
/// </summary> /// </summary>
public partial class ModifSolde : UserControl public partial class UCModifSolde : UserControl
{ {
public Navigator Nav => (App.Current as App).Navigator; public Navigator Nav => (App.Current as App).Navigator;
public ModifSolde() public UCModifSolde()
{ {
InitializeComponent(); InitializeComponent();
} }

Loading…
Cancel
Save