diff --git a/Code/IHM/App.xaml b/Code/IHM/App.xaml index 373f0ad..cc26ef2 100644 --- a/Code/IHM/App.xaml +++ b/Code/IHM/App.xaml @@ -4,6 +4,15 @@ xmlns:local="clr-namespace:IHM" StartupUri="MainWindow.xaml"> + + + diff --git a/Code/IHM/App.xaml.cs b/Code/IHM/App.xaml.cs index aff7815..16ddde8 100644 --- a/Code/IHM/App.xaml.cs +++ b/Code/IHM/App.xaml.cs @@ -13,5 +13,6 @@ namespace IHM /// public partial class App : Application { + public Navigator Navigator { get; private set; } = new Navigator(); } } diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index 9ea40a2..caea0bd 100644 --- a/Code/IHM/MainWindow.xaml.cs +++ b/Code/IHM/MainWindow.xaml.cs @@ -20,9 +20,11 @@ namespace IHM /// public partial class MainWindow : Window { + public Navigator Nav => (App.Current as App).Navigator; public MainWindow() { InitializeComponent(); + DataContext = this; } } } diff --git a/Code/IHM/Navigator.cs b/Code/IHM/Navigator.cs index fa741ef..7f11aeb 100644 --- a/Code/IHM/Navigator.cs +++ b/Code/IHM/Navigator.cs @@ -18,6 +18,8 @@ namespace IHM public const string PART_PLANNIFICATION = "Plannification"; public const string PART_STATISTIQUE = "Statistique"; + public const string PART_CONNEXION = "Connexion"; + public ReadOnlyDictionary> WindowPart { get; private set; } Dictionary> windowPart { get; set; } = new Dictionary> @@ -29,11 +31,19 @@ namespace IHM // [PART_STATISTIQUE] = () => new UCStatistique(), }; + public ReadOnlyDictionary> WindowMain { get; private set; } + + Dictionary> windowMain { get; set; } = new Dictionary> + { + [PART_CONNEXION] = () => new UCConnexion(), + }; + public Navigator() { WindowPart = new ReadOnlyDictionary>(windowPart); + WindowMain = new ReadOnlyDictionary>(windowMain); - SelectedUserControlCreator = windowPart.First(); + SelectedUserControlCreator = windowMain.First(); } public KeyValuePair> SelectedUserControlCreator diff --git a/Code/IHM/UCConnexion.xaml b/Code/IHM/UCConnexion.xaml new file mode 100644 index 0000000..ce01666 --- /dev/null +++ b/Code/IHM/UCConnexion.xaml @@ -0,0 +1,15 @@ + + + + White + + + + diff --git a/Code/IHM/UCConnexion.xaml.cs b/Code/IHM/UCConnexion.xaml.cs new file mode 100644 index 0000000..f671cc7 --- /dev/null +++ b/Code/IHM/UCConnexion.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 UCConnexion.xaml + /// + public partial class UCConnexion : UserControl + { + public UCConnexion() + { + InitializeComponent(); + } + } +}