Placé le projet

This commit is contained in:
MarcEricMartel 2023-04-21 07:18:09 -04:00
parent 0c293f957d
commit 3c12e2123e
86 changed files with 1359 additions and 0 deletions

View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33110.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JeuHoy_WPF_Natif", "JeuHoy_WPF_Natif\JeuHoy_WPF_Natif.csproj", "{4B7D33C6-5D38-49F9-B860-D133255627DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B7D33C6-5D38-49F9-B860-D133255627DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B7D33C6-5D38-49F9-B860-D133255627DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B7D33C6-5D38-49F9-B860-D133255627DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B7D33C6-5D38-49F9-B860-D133255627DA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {562166D8-0D33-48EA-8F94-FC47997F170C}
EndGlobalSection
EndGlobal

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@ -0,0 +1,9 @@
<Application x:Class="JeuHoy_WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:JeuHoy_WPF"
StartupUri="wEntree.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace JeuHoy_WPF
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View File

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@ -0,0 +1,45 @@

using System.Drawing;
namespace JeuHoy_WPF
{
/// <summary>
/// Classe de constantes de l'application.
/// </summary>
public static class CstApplication
{
//Nombre de figure de danse dans l'application.
public const int NBFIGURE = 10;
//Constante pour la Kinect
public const int SKELETONCOUNT = 6;
public const int KINECT_DISPLAY_WIDTH = 320;
public const int KINECT_DISPLAY_HEIGHT = 240;
public const int IMAGE_DPI = 96;
// Size of the RGB pixel in the bitmap
public const int NB_BYTES_PAR_PIXEL = 4;
public const int BODY_ELLIPSE_SIZE = 10;
//Constante d'apprentissage pour le perceptron
public const double CONSTANTEAPPRENTISSAGE = 0.01;
//Critère de convergence pour le perceptron.
public const int MAXITERATION = 200;
public const int POURCENTCONVERGENCE = 99;
//Valeur vrai ou fausse pour le perceptron
public const int VRAI = 1;
public const int FAUX = -1;
//Code d'erreur (pas nécessaire).
public const int ERREUR = -1;
public const int OK = 0;
//Nombre maximale de permutation pour répartir les échantillons(pas nécessaire).
public const int MAXPERMUTATION = 6000;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

View File

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4B7D33C6-5D38-49F9-B860-D133255627DA}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>JeuHoy_WPF_Natif</RootNamespace>
<AssemblyName>JeuHoy_WPF_Natif</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Kinect, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Kinect.2.0.1410.19000\lib\net45\Microsoft.Kinect.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="CstApplication.cs" />
<Compile Include="JouerMp3.cs" />
<Compile Include="JouerSon.cs" />
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="wAide.xaml.cs">
<DependentUpon>wAide.xaml</DependentUpon>
</Compile>
<Compile Include="wEntrainement.xaml.cs">
<DependentUpon>wEntrainement.xaml</DependentUpon>
</Compile>
<Compile Include="wEntree.xaml.cs">
<DependentUpon>wEntree.xaml</DependentUpon>
</Compile>
<Compile Include="wJeu.xaml.cs">
<DependentUpon>wJeu.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="JouerHoy.png" />
<Resource Include="téléchargement.jpg" />
<Resource Include="Resources\fondjeu.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\etoiles.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig10.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig6.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig7.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig8.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fig9.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fighoy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\Game.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="edit_undo.png" />
<Resource Include="FondEntree.png" />
<Resource Include="Entrainement.png" />
<Resource Include="Aide.png" />
<Resource Include="AideTuto.png" />
<Resource Include="fond.png" />
<Resource Include="fondjeu.png" />
<Content Include="HoyContent\hooy.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="HoyContent\hoy.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Resource Include="HoyContent\Intro.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Content Include="HoyContent\Intro.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Resource Include="HoyContent\titrehoy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\tuto.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="HoyContent\téléchargement.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Content Include="HoyContent\zik.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Resource Include="Resources\Actions-application-exit-icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Aide.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\AideDessus.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\AideDessus1234.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\AideTuto.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\edit_undo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Entrainement.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\EntrainementDessus.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\etoiles.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig10.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig6.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig7.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig8.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fig9.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fighoy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\fond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\FondEntree.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Intro.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\JouerDessus.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\JouerHoy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Kim.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\titrehoy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\tuto.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\téléchargement.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<Page Include="wAide.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="wEntrainement.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="wEntree.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="wJeu.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Folder Include="Vue\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

View File

@ -0,0 +1,57 @@
using System;
using System.Text;
using System.Runtime.InteropServices;
namespace JeuHoy_WPF
{
/// <summary>
/// Auteur: Hugo St-Louis
/// Description: Permet de faire jouer un mp3
/// Date: 26/04/2014
/// </summary>
public class JouerMp3
{
private string _command;
private bool isOpen = false;
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);
/// <summary>
/// Ferme et stop un mp3 qui joue
/// </summary>
public void Close()
{
_command = "close MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = false;
}
/// <summary>
/// Ouvre un mp3
/// </summary>
/// <param name="sFileName"></param>
public void Open(string sFileName)
{
_command = "open \"" + sFileName + "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}
/// <summary>
/// Fait jouer un mp3
/// </summary>
/// <param name="loop">Détermine si le mp3 doit jouer en boucle.</param>
public void Play(bool loop)
{
if (isOpen)
{
_command = "play MediaFile";
if (loop)
_command += " REPEAT";
mciSendString(_command, null, 0, IntPtr.Zero);
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.ComponentModel;
using System.Media;
namespace JeuHoy_WPF
{
/// <summary>
/// Auteur: Hugo St-Louis
/// Description: Permet de faire jouer un son asynchrone.
/// Date: 26/04/2014
/// </summary>
public class JouerSon
{
/// <summary>
/// Permet de faire charger un son et de le faire jouer de manière asynchrone.
/// </summary>
/// <param name="FichierSon"></param>
public void JouerSonAsync(string FichierSon)
{
SoundPlayer wavPlayer = new SoundPlayer();
wavPlayer.SoundLocation = FichierSon;
wavPlayer.LoadCompleted += new AsyncCompletedEventHandler(wavPlayer_LoadCompleted);
wavPlayer.LoadAsync();
}
/// <summary>
/// Fait jouer le son.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void wavPlayer_LoadCompleted(object sender, AsyncCompletedEventArgs e)
{
((System.Media.SoundPlayer)sender).Play();
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("JeuHoy")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JeuHoy")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(false)]
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("fd638559-d89e-431b-87a5-27149fbf3f95")]
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
namespace JeuHoy_WPF_Natif.Properties {
using System;
/// <summary>
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
/// </summary>
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
// avec l'option /str ou régénérez votre projet VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JeuHoy_WPF_Natif.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
namespace JeuHoy.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Kinect" version="2.0.1410.19000" targetFramework="net472" />
</packages>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,30 @@
<Window x:Class="JeuHoy_WPF.wAide"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:JeuHoy_WPF"
mc:Ignorable="d"
Title="Jeu Hoy" Height="450" Width="800" WindowState="Maximized" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="/téléchargement.jpg">
<Grid>
<Grid.Background>
<ImageBrush ImageSource="/AideTuto.png"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image x:Name="image" Grid.Column="0" Grid.Row="4" Margin="30,0,0,0" Source="/edit_undo.png" MouseEnter="picRetour_MouseHover" MouseLeave="picRetour_MouseLeave" MouseLeftButtonDown="picRetour_Click"/>
</Grid>
</Window>

View File

@ -0,0 +1,63 @@
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.Shapes;
namespace JeuHoy_WPF
{
/// <summary>
/// Auteur: Hugo St-Louis
/// Description: Montre les règles du jeu.
/// Date: 2023-04-13
/// </summary>
public partial class wAide : Window
{
/// <summary>
/// ctor
/// </summary>
public wAide()
{
InitializeComponent();
}
/// <summary>
/// Change le curseur lorsque le curseur est sur l'image
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_MouseHover(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
}
/// <summary>
/// Change le curseur lorsque le curseur nest plus sur l'image
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_MouseLeave(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Arrow;
}
/// <summary>
/// Ferme la fenêtre lorsqu'on appuie sur le bouton retour.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_Click(object sender, MouseButtonEventArgs e)
{
this.Close();
}
}
}

View File

@ -0,0 +1,53 @@
<Window x:Class="JeuHoy_WPF.wEntrainement"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:JeuHoy_WPF"
mc:Ignorable="d"
Title="Jeu Hoy" Height="1024" Width="1368" WindowState="Maximized" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="/téléchargement.jpg">
<Grid>
<Grid.Background>
<ImageBrush ImageSource="/fond.png"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="300"/>
<RowDefinition Height="300"/>
<RowDefinition Height="300"/>
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Canvas x:Name="pDessinSquelette" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" Height="300px" Margin="0,0,0,0" VerticalAlignment="Top" Width="300px" Background="Black"/>
<Image x:Name="picKinect" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" Height="300px" Margin="0,0,0,0" VerticalAlignment="Top" Width="300px" Grid.RowSpan="2" Source="/téléchargement.jpg" />
<TextBox x:Name="txtConsole" HorizontalAlignment="Center" Margin="0,0,0,0" Grid.Row="2" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="300" Height="300" Grid.RowSpan="2"/>
<Image x:Name="picPositionAFaire" Grid.Column="1" HorizontalAlignment="Left" Height="822" VerticalAlignment="Top" Width="828" Grid.RowSpan="3"/>
<Grid Grid.Column="0" Grid.Row="3" >
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="87"/>
<ColumnDefinition Width="87"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnSuivant" Grid.Column="0" Grid.Row="0" Content="Suivant" HorizontalAlignment="Left" VerticalAlignment="Top" Height="38" Width="85" Click="btnClickChangerFigure_Click"/>
<Button x:Name="btnPrecedent" Grid.Column="1" Grid.Row="0" Content="Précédent" HorizontalAlignment="Center" Width="85" Click="btnClickChangerFigure_Click" Margin="0,0,0,7"/>
<Button x:Name="btnApprendre" Grid.Column="2" Grid.Row="0" Content="Apprendre" HorizontalAlignment="Left" VerticalAlignment="Top" Height="38" Width="85" Click="btnApprendre_Click"/>
<Image x:Name="imgRetour" Grid.Column="0" Grid.Row="1" Source="/edit_undo.png" MouseEnter="picRetour_MouseHover" MouseLeave="picRetour_MouseLeave" MouseLeftButtonDown="picRetour_Click"/>
<Label x:Name="lblFigureEnCours" Grid.Column="1" Grid.Row="1" Content="1" HorizontalAlignment="Right" VerticalAlignment="Top" FontFamily="Matura MT Script Capitals" FontSize="50" />
<Label x:Name="lblNbPositions" Grid.Column="2" Grid.Row="1" Content=" / 10" HorizontalAlignment="Right" VerticalAlignment="Top" FontFamily="Matura MT Script Capitals" FontSize="50" />
</Grid>
</Grid>
</Window>

View File

@ -0,0 +1,207 @@
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace JeuHoy_WPF
{
/// <summary>
/// Auteur: Hugo St-Louis
/// Description: Permet de faire l'entrainement des différentes figures de danse.
/// Date: 2023-04-17
/// </summary>
public partial class wEntrainement : Window
{
private Dictionary<string, BitmapImage> _dicImgFigure = new Dictionary<string, BitmapImage>();
private JouerSon _son = new JouerSon();
private int _positionEnCours = 1;
/// <summary>
/// Constructeur
/// </summary>
public wEntrainement()
{
InitializeComponent();
for (int i = 1; i <= CstApplication.NBFIGURE; i++)
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"./HoyContent/fig" + i + ".png", UriKind.Absolute);
_dicImgFigure.Add("fig" + i, new BitmapImage(uriSource));
}
lblNbPositions.Content = "/ " + CstApplication.NBFIGURE.ToString();
ChargerFigure();
_son.JouerSonAsync(@"./HoyContent/hoy.wav");
}
/// <summary>
/// Dessine un ellipse pour chacune des jointure du squelette détecté.
/// </summary>
/// <param name="joueur">Le joueur détecté</param>
/// <param name="sensor">Le sensor Kinect</param>
private void DessinerSquelette(Body body, KinectSensor sensor)
{
try
{
if (body != null)
{
Joint[] joints = body.Joints.Values.ToArray();
for (int i = 0; i < joints.Count(); i++)
DrawJoint(sensor, joints[i], CstApplication.BODY_ELLIPSE_SIZE, pDessinSquelette);
}
}
catch (Exception ex)
{
txtConsole.Text = ex.Message;
}
}
/// <summary>
/// Dessine le joint d'un squellete d'un senseur Kinect sur le canvas passé en paramètre
/// </summary>
/// <param name="sensor"></param>
/// <param name="joint"></param>
/// <param name="size"></param>
/// <param name="canvas"></param>
private void DrawJoint(KinectSensor sensor, Joint joint, int size, Canvas canvas)
{
if (joint.Position.X != 0 && joint.Position.Y != 0 && joint.Position.Z != 0)
{
// Convertir la position du joint en coordonnées d'écran
System.Windows.Point point = GetPoint(sensor, joint.Position, canvas.Height, canvas.Width);
// Créer un cercle à la position du joint
Ellipse ellipse = new Ellipse();
ellipse.Fill = new SolidColorBrush(Colors.Green);
ellipse.Width = size;
ellipse.Height = size;
// Positionner le cercle sur l'élément de dessin Canvas
Canvas.SetLeft(ellipse, point.X - size / 2);
Canvas.SetTop(ellipse, point.Y - size / 2);
// Ajouter le cercle à l'élément de dessin Canvas
canvas.Children.Add(ellipse);
}
}
/// <summary>
/// Retourne le point x,y d'un joint par rapport à la taille d'un canvas.
/// J'ai permis de dépasser le canvas car je trouvais ça drole :-)
/// </summary>
/// <param name="sensor"></param>
/// <param name="position"></param>
/// <param name="iCanvasHeight"></param>
/// <param name="iCanvasWidth"></param>
/// <returns></returns>
public System.Windows.Point GetPoint(KinectSensor sensor, CameraSpacePoint position, double iCanvasHeight, double iCanvasWidth)
{
System.Windows.Point point = new System.Windows.Point();
DepthSpacePoint depthPoint = sensor.CoordinateMapper.MapCameraPointToDepthSpace(position);
point.X = float.IsInfinity(depthPoint.X) ? 0.0 : depthPoint.X;
point.Y = float.IsInfinity(depthPoint.Y) ? 0.0 : depthPoint.Y;
// La Kinect pour Xbox One utilise également le SDK 2 de Microsoft, et sa résolution de profondeur est de 512x424 pixels.
//// Ainsi, la résolution de la carte de profondeur pour la Kinect pour Xbox One est également de 512x424 pixels.
point.X = point.X / 512 * iCanvasHeight;
point.Y = point.Y / 424 * iCanvasWidth;
return point;
}
/// <summary>
/// Charger la figure de danse en cours.
/// </summary>
private void ChargerFigure()
{
BitmapImage imgValue;
bool bResultat;
if (_positionEnCours > CstApplication.NBFIGURE)
_positionEnCours = 1;
if (_positionEnCours < 1)
_positionEnCours = CstApplication.NBFIGURE;
lblFigureEnCours.Content = _positionEnCours.ToString();
bResultat = _dicImgFigure.TryGetValue("fig" + _positionEnCours, out imgValue);
if (bResultat == true)
picPositionAFaire.Source = imgValue;
}
/// <summary>
/// Fermeture de la fenêtre.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_Click(object sender, EventArgs e)
{
this.Close();
}
/// <summary>
/// Change le curseur lorsque le curseur est sur l'image
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_MouseHover(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
}
/// <summary>
/// Change le curseur lorsque le curseur est sur l'image
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picRetour_MouseLeave(object sender, EventArgs e)
{
this.Cursor = Cursors.Arrow;
}
/// <summary>
/// Lorsqu'on appuie sur le bouton suivant ou précédent, modifier la figure en conséquence.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnClickChangerFigure_Click(object sender, RoutedEventArgs e)
{
Control bouton = (Control)sender;
if (bouton.Name == "btnSuivant")
_positionEnCours++;
else if (bouton.Name == "btnPrecedent")
_positionEnCours--;
ChargerFigure();
}
/// <summary>
/// Apprentissage avec la position obtenu à partir de la Kinect versus l'image affichée.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnApprendre_Click(object sender, RoutedEventArgs e)
{
//Ajouter du code ICI
}
}
}

View File

@ -0,0 +1,31 @@
<Window x:Class="JeuHoy_WPF.wEntree"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:JeuHoy_WPF"
mc:Ignorable="d"
Title="Jeu Hoy" Height="450" Width="800" WindowState="Maximized" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Closing="Window_Closing" Icon="/téléchargement.jpg">
<Grid>
<Grid.Background>
<ImageBrush ImageSource="/FondEntree.png"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image x:Name="picJouer" Grid.Column="1" Grid.Row="4" Margin="5" Source="/JouerHoy.png" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" MouseLeftButtonDown="picJouer_MouseLeftButtonDown" MouseEnter="pic_MouseHover" MouseLeave="pic_MouseLeave"/>
<Image x:Name="picEntrainement" Grid.Column="2" Grid.Row="4" Margin="5" Source="/Entrainement.png" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" MouseLeftButtonDown="picEntrainement_MouseLeftButtonDown" MouseEnter="pic_MouseHover" MouseLeave="pic_MouseLeave"/>
<Image x:Name="picAide" Grid.Column="3" Margin="5" Grid.Row="4" Source="/Aide.png" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" MouseEnter="pic_MouseHover" MouseLeftButtonDown="picAide_MouseLeftButtonDown" MouseLeave="pic_MouseLeave"/>
</Grid>
</Window>

View File

@ -0,0 +1,167 @@
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 JeuHoy_WPF
{
/// <summary>
/// Auteur: Hugo St-Louis
/// Description: Fenêtre princiaple de l'application. Montre les choix à l'utilisateur
/// Date: 2023-04-13
/// </summary>
public partial class wEntree : Window
{
private JouerMp3 _wmpIntro = new JouerMp3();
/// <summary>
/// Constructeur
/// </summary>
public wEntree()
{
InitializeComponent();
_wmpIntro.Open(@"./HoyContent/intro.mp3");
_wmpIntro.Play(true);
}
/// <summary>
/// Ouverture de la fenêtre de jeu.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picJouer_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
_wmpIntro.Close();
wJeu f = new wJeu();
this.Hide();
f.ShowDialog();
f.Close();
this.Show();
_wmpIntro.Open(@"./HoyContent/intro.mp3");
_wmpIntro.Play(true);
}
/// <summary>
/// Ouverture de la fenêtre d'entrainement
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picEntrainement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
_wmpIntro.Close();
wEntrainement f = new wEntrainement();
this.Hide();
f.ShowDialog();
f.Close();
this.Show();
_wmpIntro.Open(@"./HoyContent/intro.mp3");
_wmpIntro.Play(true);
}
/// <summary>
/// Fermeture de la form.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picQuitter_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.Close();
_wmpIntro.Close();
}
/// <summary>
/// Ouverture de la fenêtre d'aide.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picAide_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
wAide f = new wAide();
this.Hide();
f.ShowDialog();
f.Close();
this.Show();
}
/// <summary>
/// Comportement lorsque curseur est au dessus d'une image(modifier le curseur)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pic_MouseHover(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
Image p = (Image)sender;
if (p.Name == "picJouer")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"Resources/JouerDessus.png", UriKind.Absolute);
picJouer.Source = new BitmapImage(uriSource);
}
else if (p.Name == "picEntrainement")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"\Resources\EntrainementDessus.png", UriKind.Absolute);
picEntrainement.Source = new BitmapImage(uriSource);
}
else if (p.Name == "picAide")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"./Resources/AideDessus.png", UriKind.Absolute);
picAide.Source = new BitmapImage(uriSource);
}
}
/// <summary>
/// Comportement lorsque curseur quitte l'image(modifier le curseur)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pic_MouseLeave(object sender, MouseEventArgs e)
{
this.Cursor = Cursors.Arrow;
Image p = (Image)sender;
if (p.Name == "picJouer")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"Resources/JouerHoy.png", UriKind.Absolute);
picJouer.Source = new BitmapImage(uriSource);
}
else if (p.Name == "picEntrainement")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"\Resources\Entrainement.png", UriKind.Absolute);
picEntrainement.Source = new BitmapImage(uriSource);
}
else if (p.Name == "picAide")
{
Uri uriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"./Resources/Aide.png", UriKind.Absolute);
picAide.Source = new BitmapImage(uriSource);
}
}
/// <summary>
/// Fermeture de la form
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
_wmpIntro.Close();
}
}
}

View File

@ -0,0 +1,23 @@
<Window x:Class="JeuHoy_WPF.wJeu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:JeuHoy_WPF"
mc:Ignorable="d"
Title="Jeu Hoy" Height="450" Width="800" WindowState="Maximized" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="/téléchargement.jpg">
<Grid>
<Grid.Background>
<ImageBrush ImageSource="/fondjeu.png"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
</Grid>
</Window>

View File

@ -0,0 +1,27 @@
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.Shapes;
namespace JeuHoy_WPF
{
/// <summary>
/// Logique d'interaction pour wJeu.xaml
/// </summary>
public partial class wJeu : Window
{
public wJeu()
{
InitializeComponent();
}
}
}

BIN
tp42023.docx Normal file

Binary file not shown.