You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
184 lines
9.3 KiB
184 lines
9.3 KiB
<UserControl x:Class="vues.DescriptionLangageUC"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:vues"
|
|
xmlns:conv="clr-namespace:vues.converters"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<UserControl.Resources>
|
|
<conv:MonConverter x:Key="MonConverter"/>
|
|
<conv:StringToImageConverter x:Key="StringToImageConverter"/>
|
|
</UserControl.Resources>
|
|
<!--
|
|
Cette grille contient les 3 sections d'un langage.
|
|
C'est la grille qui à été retenu car elle elle s'addapte
|
|
à son conteneur.
|
|
-->
|
|
<DockPanel DataContext="{Binding ItemsLangages.ItemCourant}">
|
|
<!--cible=dockpanel / propriété de la cible=datacontext
|
|
/ propriété de la source=LangageCourant / source=GestionaireDeLangage-->
|
|
|
|
<!--
|
|
dockpanel pour mettre le nom du langage et
|
|
le bouton favoris en haut de la page, avant la grid
|
|
-->
|
|
<!--wrappanel pour regrouper les deux elements-->
|
|
<WrapPanel DockPanel.Dock="Top" Height="30" Margin="9,0,0,0">
|
|
<TextBlock Text="{Binding Path=Nom}" VerticalAlignment="Center"
|
|
FontWeight="Bold" FontSize="20"/>
|
|
<!--ce bouton sert à ajouter la langage en favoris-->
|
|
<Button Background="Transparent" BorderBrush="Transparent" Margin="5" Click="Favoris_Click">
|
|
<Image x:Name="fav" Source="{Binding Path=DansLesFavoris, Converter={StaticResource MonConverter}}"/>
|
|
</Button>
|
|
</WrapPanel>
|
|
|
|
<!--
|
|
Chaque information (Date, auteur, logo etc.) est bindé au langage courrant
|
|
-->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--
|
|
C'est ici que la section histoire commence.
|
|
-->
|
|
<Border Style="{StaticResource sectionBorder}" Background="orange">
|
|
<!--
|
|
Cette section est commposé de 3 élements, à savoir, la date de création
|
|
du langage, ses auteurs ainsi que le logo du langage
|
|
-->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Date du langage -->
|
|
<Border Style="{StaticResource elementBorder}" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Date de création" Style="{StaticResource titreElementText}"/>
|
|
<TextBlock Grid.Row="1" x:Name="dateDeCreationDuLangage" Text="{Binding DateDuLangage}"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Auteurs du langage -->
|
|
<Border Style="{StaticResource elementBorder}" Grid.Column="1" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Auteur(s)" Style="{StaticResource titreElementText}" />
|
|
<ListView Grid.Row="1" x:Name="AuteursDuLangage" ItemsSource="{Binding LesAuteurs}"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Logo du langage -->
|
|
<Border Style="{StaticResource elementBorder}" Grid.Column="2" CornerRadius="10" Background="White">
|
|
<Image Source="{Binding CheminDuLogo, Converter={StaticResource StringToImageConverter}}" x:Name="LogoDuLangage"/>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
<!-- C'est ici que commence la section spécificité du langage -->
|
|
<Border Grid.Row="1" Style="{StaticResource sectionBorder}" Background="Orange">
|
|
<!--
|
|
Cette section est composée de 3 élement, à savoir, les paradigmes accéptés par le langage,
|
|
la doucumentation du langage, ainsi que un 'Hello World' .
|
|
-->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Paradigmes accéptés par le langage -->
|
|
<Border Style="{StaticResource elementBorder}" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Paradigme" Style="{StaticResource titreElementText}"/>
|
|
<ListView Grid.Row="1" x:Name="ParadigmesDuLangage" ItemsSource="{Binding LesParadigmes}"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Documentation du langage -->
|
|
<Border Style="{StaticResource elementBorder}" Grid.Column="1" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Documentation" Style="{StaticResource titreElementText}"/>
|
|
<TextBlock Grid.Row="1" x:Name="LiensVersLaDocumentation" Text="{Binding Documentation}"/>
|
|
<!--Hyperlink x:Name="LiensVersLaDocumentation" NavigateUri="{Binding Documentation}"/-->
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Exemple de code -->
|
|
<Border Grid.Column="2" Style="{StaticResource elementBorder}" Background="White">
|
|
<ScrollViewer>
|
|
<TextBlock x:Name="ExempleHelloWorld" Text="{Binding ExempleDeCode}"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
<!-- C'est ici que commence la section utilité du langage -->
|
|
<Border Grid.Row="2" Style="{StaticResource sectionBorder}" Background="Orange">
|
|
<!--
|
|
Cette section est composée de 2 élement, à savoir, quelques logiciel qui utilise ce
|
|
langage, ainsi que l'utilité du langage.
|
|
-->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Logiciels counnus -->
|
|
<Border Style="{StaticResource elementBorder}" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Logiciels connus" Style="{StaticResource titreElementText}"/>
|
|
<ListView Grid.Row="1" x:Name="LogicielsConnusDuLangage" ItemsSource="{Binding LogicielsConus}"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Utilité du langage-->
|
|
<Border Style="{StaticResource elementBorder}" Grid.Column="1" Background="White">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Utilité du langage" Style="{StaticResource titreElementText}"/>
|
|
<ScrollViewer Grid.Row="1">
|
|
<TextBlock x:Name="UtiliteDuLangage" Text="{Binding UtilitéDuLangage}"/>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</DockPanel>
|
|
</UserControl>
|