<!--
/*
* This file is part of the TraKERS\Middleware package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
-->

<!--
Projet : TraKERS
Module : MIDDLEWARE
Sous-Module : Debug
Classe : DebugWindow

Auteur : alexandre.bastien@iri.centrepompidou.fr

Fonctionnalités : Affiche le rendu visuel du Middleware : Le squelette, afficher la détection des mains,
des gestures et la distance de l'utilisateur.
-->
    
<Window x:Class="Trakers.Debug.DebugWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TraKERS - DebugWindow" Height="480" Width="640" Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="85" />
        </Grid.ColumnDefinitions>

        <!-- Ceci est le rendu visuel qui se met à jour lorsque la Kinect est allumée. -->
        
        <Image Name="Gestures" Opacity="1" Grid.Row="0" Grid.Column="0" Stretch="Fill" />
        <Canvas Name="DebugCanvas" Background="Transparent">
            <Image Name="DebugImage" Opacity="1" Grid.Row="0" Grid.Column="0"/>
        </Canvas>

        <Grid Grid.Row="0" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="20" />
                <RowDefinition Height="40" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" Background="LightGray">
                <!-- Menu de la fenêtre de debug. -->
                <Menu Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Height="20" Background="LightGray" Foreground="White">
                    <!-- Readme et doc. -->
                    <MenuItem Name="FileMenu" Header="" Background="Black">
                        <MenuItem Name="ReadmeMiddlewareMenu" Header="" Background="White" Foreground="Black" Click="MiddlewareReadmeMenu_Click" />
                        <MenuItem Name="ReadmeFrontProcessingMenu" Header="" Background="White" Foreground="Black" Click="FrontProcessingReadmeMenu_Click" />
                        <MenuItem Name="DocumentationFrontProcessingMenu" Header="" Background="White" Foreground="Black" Click="FrontProcessingDocumentationMenu_Click" />
                        <MenuItem Name="ReadmeFrontJSMenu" Header="" Background="White" Foreground="Black" Click="FrontJSReadmeMenu_Click" />
                        <MenuItem Name="DocumentationFrontJSMenu" Header="" Background="White" Foreground="Black" Click="FrontJSDocumentationMenu_Click" />
                        <MenuItem Name="QuitMenu" Header="" Background="White" Foreground="Black" Click="QuitMenu_Click" />
                    </MenuItem>
                    <!-- Paramètres. -->
                    <MenuItem Name="ConfigMenu" Header="" Background="Black">
                        <MenuItem Name="ParamMenu" Header="" Background="White" Foreground="Black" Click="ParamMenu_Click" />
                        <MenuItem Name="ParamMenuReboot" Header="" IsEnabled="False" />
                    </MenuItem>
                    <MenuItem Name="ExamplesMenu" Header="" Background="Black">
                        <!-- Exemples processing. -->
                        <MenuItem Name="ProcessingMenu" Header="" Background="White" Foreground="Black">
                            <MenuItem Name="ProcessingMenuFM" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="ProcessingMenuFMPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuFMPS_Click" />
                                <MenuItem Name="ProcessingMenuFMExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuFMExe_Click" />
                            </MenuItem>
                            <MenuItem Name="ProcessingMenuSM" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="ProcessingMenuSMPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuSMPS_Click" />
                                <MenuItem Name="ProcessingMenuSMExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuSMExe_Click" />
                            </MenuItem>
                            <MenuItem Name="ProcessingMenuTG" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="ProcessingMenuTGPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuTGPS_Click" />
                                <MenuItem Name="ProcessingMenuTGExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuTGExe_Click" />
                            </MenuItem>
                            <MenuItem Name="ProcessingMenuT" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="ProcessingMenuTPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuTPS_Click" />
                                <MenuItem Name="ProcessingMenuTExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuTExe_Click" />
                            </MenuItem>
                            <MenuItem Name="ProcessingMenuIE" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="ProcessingMenuIEHandPress" Header="" Background="White" Foreground="Black">
                                    <MenuItem Name="ProcessingMenuIEHandPressPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHandPressPS_Click" />
                                    <MenuItem Name="ProcessingMenuIEHandPressExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHandPressExe_Click" />
                                </MenuItem>
                                <MenuItem Name="ProcessingMenuIEHandSignal" Header="" Background="White" Foreground="Black">
                                    <MenuItem Name="ProcessingMenuIEHandSignalPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHandSignalPS_Click" />
                                    <MenuItem Name="ProcessingMenuIEHandSignalExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHandSignalExe_Click" />
                                </MenuItem>
                                <MenuItem Name="ProcessingMenuIEHand1D" Header="" Background="White" Foreground="Black">
                                    <MenuItem Name="ProcessingMenuIEHand1DPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHand1DPS_Click" />
                                    <MenuItem Name="ProcessingMenuIEHand1DExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHand1DExe_Click" />
                                </MenuItem>
                                <MenuItem Name="ProcessingMenuIEHand2D" Header="" Background="White" Foreground="Black">
                                    <MenuItem Name="ProcessingMenuIEHand2DPS" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHand2DPS_Click" />
                                    <MenuItem Name="ProcessingMenuIEHand2DExe" Header="" Background="White" Foreground="Black" Click="ProcessingMenuIEHand2DExe_Click" />
                                </MenuItem>
                            </MenuItem>
                        </MenuItem>
                        <!-- Exemples web. -->
                        <MenuItem Name="WebMenu" Header="" Background="White" Foreground="Black">
                            <MenuItem Name="WebMenuPointers" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="WebMenuPointersPS" Header="" Background="White" Foreground="Black" Click="WebMenuPointersPS_Click" />
                                <MenuItem Name="WebMenuPointersExe" Header="" Background="White" Foreground="Black" Click="WebMenuPointersExe_Click" />
                            </MenuItem>
                            <MenuItem Name="WebMenuGestures" Header="" Background="White" Foreground="Black">
                                <MenuItem Name="WebMenuGesturesPS" Header="" Background="White" Foreground="Black" Click="WebMenuGesturesPS_Click" />
                                <MenuItem Name="WebMenuGesturesExe" Header="" Background="White" Foreground="Black" Click="WebMenuGesturesExe_Click" />
                            </MenuItem>
                        </MenuItem>
                    </MenuItem>
                </Menu>
            </Grid>
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <!-- Cette partie permet d'afficher les mains se trouvant dans le champ de recherche. -->
                <Label Name="LeftHand" Grid.Column="0" Background="DarkGray" FontSize="14" FontWeight="Bold" />
                <Label Name="RightHand" Grid.Column="1" Background="DarkGray" FontSize="14" FontWeight="Bold" />
            </Grid>
            <!-- Cette partie permet d'afficher les erreurs survenant dans le programme. -->
            <Label Name="ExceptionLbl" Height="30" VerticalAlignment="Bottom" Grid.Row="2" Content="" HorizontalContentAlignment="Center" />
        </Grid>

        <!-- Ce bouton permet d'allumer/éteindre la Kinect. -->
        <Button Name="Switch" Content="OFF"  Grid.Row="1" Grid.Column="0" Width="30" Click="Switch_Click" />

        <!-- Ce panneau affiche la distance actuelle de l'utilisateur à la Kinect et indique une couleur pour chaque mètre. -->
        <!-- 0-1 m : Rouge. 1-2 : Orange. 2-3 : Jaune. 3-4 : Blanc. -->
        <StackPanel Grid.Row="0" Grid.Column="1" Name="List">
            <Label Name="DistanceLbl" Content="Distance :" />
            <Rectangle Name="R0" Height="35" Fill="DarkGray" />
            <Rectangle Name="R1" Height="35" Fill="DarkGray" />
            <Rectangle Name="R2" Height="35" Fill="DarkGray" />
            <Rectangle Name="R3" Height="35" Fill="DarkGray" />
            <Rectangle Name="R4" Height="35" Fill="DarkGray" />
            <Rectangle Name="R5" Height="35" Fill="DarkGray" />
            <Rectangle Name="R6" Height="35" Fill="DarkGray" />
            <Rectangle Name="R7" Height="35" Fill="DarkGray" />
            <Rectangle Name="R8" Height="35" Fill="DarkGray" />
            <Rectangle Name="R9" Height="35" Fill="DarkGray" />
            <Rectangle Name="R10" Height="35" Fill="DarkGray" />
        </StackPanel>
    </Grid>
</Window>

