diff --git a/Code/ConsEco.sln b/Code/ConsEco.sln index 78d70d3..4d578dd 100644 --- a/Code/ConsEco.sln +++ b/Code/ConsEco.sln @@ -14,6 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsUnitaires", "TestsUnit {ACFA83F8-98C8-43AE-9328-B3F751098FFA} = {ACFA83F8-98C8-43AE-9328-B3F751098FFA} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqToPgSQL", "LinqToPgSQL\LinqToPgSQL.csproj", "{4A9DB718-B874-4565-87B0-57C73B9BE240}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -36,6 +38,10 @@ Global {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {B1AE713C-B5DE-4E81-A33F-818AAD0548A7}.Release|Any CPU.Build.0 = Release|Any CPU + {4A9DB718-B874-4565-87B0-57C73B9BE240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A9DB718-B874-4565-87B0-57C73B9BE240}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A9DB718-B874-4565-87B0-57C73B9BE240}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A9DB718-B874-4565-87B0-57C73B9BE240}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Code/IHM/App.xaml.cs b/Code/IHM/App.xaml.cs index aff7815..87723ac 100644 --- a/Code/IHM/App.xaml.cs +++ b/Code/IHM/App.xaml.cs @@ -5,6 +5,8 @@ using System.Data; using System.Linq; using System.Threading.Tasks; using System.Windows; +using Model; +using LinqToPgSQL; namespace IHM { @@ -13,5 +15,8 @@ namespace IHM /// public partial class App : Application { + public Manager Manager { get; private set; } = new Manager(new LinqToPgSQL.PersLinqToPgSQL()); + //public Manager AllInscrits { get; private set; } = new Manager(new Stub()); + } } diff --git a/Code/IHM/Converters/Func2WindowPartConverter.cs b/Code/IHM/Converters/Func2WindowPartConverter.cs new file mode 100644 index 0000000..d825da7 --- /dev/null +++ b/Code/IHM/Converters/Func2WindowPartConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Controls; +using System.Windows.Data; + +namespace IHM.Converters +{ + public class Func2WindowPartConverter : IValueConverter + { + public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + Func? windowPartCreator = value as Func; + if (windowPartCreator == null) + { + return null; + } + return windowPartCreator(); + } + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Code/IHM/IHM.csproj b/Code/IHM/IHM.csproj index 7dc11f9..b8191b8 100644 --- a/Code/IHM/IHM.csproj +++ b/Code/IHM/IHM.csproj @@ -7,4 +7,9 @@ true + + + + + diff --git a/Code/IHM/MainWindow.xaml b/Code/IHM/MainWindow.xaml index d796ffe..ecdd3d5 100644 --- a/Code/IHM/MainWindow.xaml +++ b/Code/IHM/MainWindow.xaml @@ -7,6 +7,13 @@ mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> + + + + + +