diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/JeuHoy_WPF_Natif.csproj b/JeuHoyEtudiants/JeuHoy_WPF_Natif/JeuHoy_WPF_Natif.csproj
index 2494385..ca5d1a6 100644
--- a/JeuHoyEtudiants/JeuHoy_WPF_Natif/JeuHoy_WPF_Natif.csproj
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/JeuHoy_WPF_Natif.csproj
@@ -60,15 +60,20 @@
+
+
+
App.xaml
Code
+
+
wAide.xaml
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs
new file mode 100644
index 0000000..76b747c
--- /dev/null
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs
@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+
+namespace JeuHoy_WPF_Natif.Model
+{
+ public class GestionFichiersSorties : IGestionFichiers
+ {
+ public GestionFichiersSorties()
+ {
+ }
+
+ public List ChargerCoordonnees(string fichier)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public int SauvegarderCoordonnees(string fichier, List lstData)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionPerceptrons.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionPerceptrons.cs
index 1e8440e..aceaa0e 100644
--- a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionPerceptrons.cs
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionPerceptrons.cs
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace JeuHoy_WPF_Natif.Model {
public class GestionPerceptrons {
private Dictionary _lstPerceptrons = new Dictionary();
- private IGestionFichiers _gestionSortie = new GestionFichiersSorties();
+ private Model.IGestionFichiers _gestionSortie = new GestionFichiersSorties();
private List _lstData = new List();
///
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionWEntrainement.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionWEntrainement.cs
new file mode 100644
index 0000000..fe6f853
--- /dev/null
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionWEntrainement.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JeuHoy_WPF_Natif.Model
+{
+ ///
+ /// Description: Logique pour la vue Entrainement
+ ///
+ public class GestionWEntrainement
+ {
+ }
+}
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/IGestionFichiers.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/IGestionFichiers.cs
new file mode 100644
index 0000000..aeada99
--- /dev/null
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/IGestionFichiers.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace JeuHoy_WPF_Natif.Model
+{
+ public interface IGestionFichiers
+ {
+ List ChargerCoordonnees(string fichier);
+ int SauvegarderCoordonnees(string fichier, List lstData);
+ }
+}
\ No newline at end of file
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Presenter/PresentateurWEntrainement.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Presenter/PresentateurWEntrainement.cs
new file mode 100644
index 0000000..c4e19eb
--- /dev/null
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Presenter/PresentateurWEntrainement.cs
@@ -0,0 +1,34 @@
+using JeuHoy_WPF_Natif.Model;
+using JeuHoy_WPF_Natif.View;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JeuHoy_WPF_Natif.Presenter
+{
+ ///
+ /// Description: Permet de gérer les événements de la vue Entrainement et de les aiguiller
+ ///
+ public class PresentateurWEntrainement
+ {
+ private IwEntrainement _vue;
+ private GestionWEntrainement _gestionnaire;
+
+ public PresentateurWEntrainement(IwEntrainement vue)
+ {
+ _vue = vue;
+ _gestionnaire = new GestionWEntrainement();
+ _vue.EntrainementEvt += _vue_EntrainementEvt;
+ }
+
+
+
+ private void _vue_EntrainementEvt(object sender, EventArgs e)
+ {
+ // Perceptron!!!
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/IwEntrainement.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/IwEntrainement.cs
new file mode 100644
index 0000000..62619b8
--- /dev/null
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/IwEntrainement.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+
+namespace JeuHoy_WPF_Natif.View
+{
+ ///
+ /// Description: Interface pour la fenêtre d'entrainement
+ ///
+ public interface IwEntrainement
+ {
+ Image Image { get; set; }
+ string Console { get; set; }
+ Canvas Canvas { get; set; }
+ event EventHandler EntrainementEvt;
+ }
+}
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml
index 53fb40a..43b0eec 100644
--- a/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml
@@ -26,7 +26,7 @@
-
+
@@ -44,9 +44,6 @@
-
-
-
diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml.cs
index ba871e4..ae65c66 100644
--- a/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml.cs
+++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/View/wEntrainement.xaml.cs
@@ -1,4 +1,6 @@
-using Microsoft.Kinect;
+using JeuHoy_WPF_Natif.Presenter;
+using JeuHoy_WPF_Natif.View;
+using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -17,13 +19,19 @@ namespace JeuHoy_WPF.View
/// Description: Permet de faire l'entrainement des différentes figures de danse.
/// Date: 2023-04-17
///
- public partial class wEntrainement : Window
+ public partial class wEntrainement : Window, IwEntrainement
{
private Dictionary _dicImgFigure = new Dictionary();
private JouerSon _son = new JouerSon();
private int _positionEnCours = 1;
+ private PresentateurWEntrainement _presentateur;
+ public event EventHandler EntrainementEvt;
+
+ public Image Image { get => picKinect; set => picKinect = value; }
+ public string Console { get => txtConsole.Text; set => txtConsole.Text = value; }
+ public Canvas Canvas { get => pDessinSquelette; set => pDessinSquelette = value; }
private KinectSensor _sensor;
private MultiSourceFrameReader _multiSourceFrameReader;
@@ -41,7 +49,9 @@ namespace JeuHoy_WPF.View
///
public wEntrainement()
{
- InitializeComponent();
+ _presentateur = new PresentateurWEntrainement(this);
+
+ InitializeComponent();
_sensor = KinectSensor.GetDefault();
@@ -285,7 +295,7 @@ namespace JeuHoy_WPF.View
private void btnApprendre_Click(object sender, RoutedEventArgs e)
{
//Ajouter du code ICI
-
+ EntrainementEvt(this, e);
}