77 lines
4.8 KiB
XML
77 lines
4.8 KiB
XML
<Window x:Class="ProjetTheAlone.FicEncodePlat"
|
|
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:ProjetTheAlone"
|
|
xmlns:convert="clr-namespace:ProjetTheAlone.Converter"
|
|
mc:Ignorable="d"
|
|
Title="Plats" Height="482.167" Width="955.5" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
|
<Window.Resources>
|
|
<convert:BinaryImageConverter x:Key="imgConverter" />
|
|
</Window.Resources>
|
|
<Grid Margin="0,-3,2,2">
|
|
<Grid.RowDefinitions>
|
|
|
|
</Grid.RowDefinitions>
|
|
<Label Content="Plats" HorizontalAlignment="Left" Margin="31,20,0,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
|
<Grid x:Name="UneFiche" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Margin="515,82,139,243" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock x:Name="tNom" Text="Nom" Grid.Row="2" VerticalAlignment="Center" />
|
|
<TextBox x:Name="tbNom" Grid.Row="2" Grid.Column="1" Margin="3"
|
|
Text="{Binding UnPlat.Nom, Mode=TwoWay}" />
|
|
<TextBlock x:Name="tImg" Text="Photo" Grid.Row="4" VerticalAlignment="Center" Margin="0,56,0,10" />
|
|
<DockPanel Margin="10,10,10,10" Grid.Row="4" Grid.Column="1">
|
|
<WrapPanel HorizontalAlignment="Right" DockPanel.Dock="Top" >
|
|
<Image x:Name="ImageFile" Source="{Binding UnPlat.Img, Mode=TwoWay, Converter={StaticResource imgConverter}}" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Width="90"/>
|
|
<Button x:Name="btnOpenFile" HorizontalAlignment="Right" Click="btnOpenFile_Click" Content="Open file"/>
|
|
</WrapPanel>
|
|
<TextBox x:Name="txtEditor" />
|
|
|
|
</DockPanel>
|
|
<DockPanel Grid.Row="5" Grid.ColumnSpan="2">
|
|
<ComboBox x:Name="TypePlat" SelectionChanged="TypePlat_SelectionChanged">
|
|
<ComboBoxItem>Soupe</ComboBoxItem>
|
|
<ComboBoxItem IsSelected="True">Plat</ComboBoxItem>
|
|
<ComboBoxItem>Dessert</ComboBoxItem>
|
|
</ComboBox>
|
|
</DockPanel>
|
|
</Grid>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="678,237,78,140" Width="190">
|
|
<Button x:Name="bConfirmer" Content="Confirmer" Margin="3" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
|
Command="{Binding cConfirmer}" />
|
|
<Button x:Name="bAnnuler" Content="Annuler" Margin="3,16,3,17" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
|
Command="{Binding cAnnuler}" />
|
|
</StackPanel>
|
|
<DataGrid ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
|
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
|
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Margin="88,86,576,140" >
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
|
<DataGridTextColumn Header="Nom du plat" Binding="{Binding P_nom}" Width="150" />
|
|
<DataGridTextColumn Header="Type plat" Binding="{Binding ID_typePlat}" Width="*" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="88,331,576,46" Width="282">
|
|
<Button x:Name="bAjouter" Content="Ajouter" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
|
Command="{Binding cAjouter}" />
|
|
<Button x:Name="bModifier" Content="Modifier" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
|
Command="{Binding cModifier}" />
|
|
<Button x:Name="bSupprimer" Content="Supprimer" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
|
Command="{Binding cSupprimer}" />
|
|
</StackPanel>
|
|
<Button x:Name="BtnQuitter" Content="Quitter" HorizontalAlignment="Left" Margin="810,403,0,0" VerticalAlignment="Top" Width="92" Click="BtnQuitter_Click" Height="26"/>
|
|
|
|
</Grid>
|
|
</Window> |