Wyśrodkowanie nazwy owocu pod obrazkiem w okienku dodanie/odjęcie od ilości.

This commit is contained in:
Krystian Kabat 2019-01-27 13:18:38 +01:00
parent 8eb4e0d538
commit d145e46a4a
2 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,7 @@
Title="" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
<Grid>
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,82,0,0" TextWrapping="Wrap" Text="fruitName" Width="64" Height="16" VerticalAlignment="Top"/>
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,82,0,0" TextWrapping="Wrap" Text="fruitName" Width="64" Height="16" VerticalAlignment="Top" TextAlignment="Center"/>
<TextBlock x:Name="messageBox" HorizontalAlignment="Left" Margin="80,10,0,0" TextWrapping="Wrap" Text="messageBox" VerticalAlignment="Top" Width="125" Height="64"/>
<TextBox x:Name="amountToChange" Margin="0,71,9,0" TextWrapping="Wrap" Text="" RenderTransformOrigin="1.456,0.316" Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Width="64"/>
<Button x:Name="saveButton" Content="Zastosuj" Margin="0,0,9,10" VerticalAlignment="Bottom" Click="saveButton_Click" Width="90" HorizontalAlignment="Right"/>

View File

@ -46,6 +46,11 @@ namespace Magazyn.Windows
fruitName.Text = fruit.Name;
if(fruit.Name.Length > 9)
{
fruitName.FontSize = 11;
}
messageBox.Text = String.Format("Jaką ilość produktu chcesz {0} do magazynu?", (type > 0) ? "dodać" : "odjąć");
try