diff --git a/Code/IHM/App.xaml.cs b/Code/IHM/App.xaml.cs index d606932..c799256 100644 --- a/Code/IHM/App.xaml.cs +++ b/Code/IHM/App.xaml.cs @@ -16,5 +16,7 @@ namespace IHM public partial class App : Application { public Manager AllInscrits { 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/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index a6ea73f..e6e57b6 100644 --- a/Code/IHM/MainWindow.xaml.cs +++ b/Code/IHM/MainWindow.xaml.cs @@ -64,5 +64,6 @@ namespace IHM testSelect(); /* testSuppression();*/ } + } } diff --git a/Code/Model/Stub.cs b/Code/Model/Stub.cs index 1a671fb..42b3df6 100644 --- a/Code/Model/Stub.cs +++ b/Code/Model/Stub.cs @@ -12,6 +12,8 @@ namespace Model public List Inscrits = new(); public List Comptes = new(); + + // ajouter load all pour tout les inscrits public List LoadInscrit()