Merge branch 'master' of s434713/DINO_SCRUM into master
This commit is contained in:
commit
4ed58fb34a
@ -92,9 +92,10 @@ namespace Magazyn
|
||||
|
||||
private void RefreshListOfFruits()
|
||||
{
|
||||
|
||||
if (netConn)
|
||||
{
|
||||
pageBlock.Text = page.ToString();
|
||||
pageBlock.Text = (page+1).ToString();
|
||||
|
||||
Task<HttpResponseMessage> response = client.GetAsync("https://sysmag.herokuapp.com/api/get-all?page=" + page.ToString() + "&size=" + size.ToString());
|
||||
while (response.IsCompleted != true) ;
|
||||
|
@ -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"/>
|
||||
|
@ -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
|
||||
@ -68,7 +73,20 @@ namespace Magazyn.Windows
|
||||
|
||||
private void SendNewQuantity()
|
||||
{
|
||||
int amount = int.Parse(amountToChange.Text);
|
||||
int amount;
|
||||
try
|
||||
{
|
||||
amount = int.Parse(amountToChange.Text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
ErrorWindow window = new ErrorWindow("Podana wartość jest nieprawidłowa, proszę podać liczbę dodatnią.");
|
||||
window.Owner = Application.Current.MainWindow;
|
||||
window.ShowDialog();
|
||||
amountToChange.Text = "0";
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (amount < 0)
|
||||
|
@ -16,10 +16,10 @@
|
||||
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="Wartość magazynu" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/>
|
||||
<TextBlock FontSize="16" Margin="10,10,10,0" TextWrapping="Wrap" Text="Wartość magazynu to:" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="valueBlock" FontSize="16" HorizontalAlignment="Left" Margin="10,34,0,0" TextWrapping="Wrap" Text="NaN zł" VerticalAlignment="Top"/>
|
||||
<Grid>
|
||||
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/>
|
||||
<TextBlock Margin="10,28,10,0" TextWrapping="Wrap" Text="Wartość magazynu to:" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="0.495,1.734" />
|
||||
<TextBlock x:Name="valueBlock" Margin="67,49,69,0" TextWrapping="Wrap" Text="NaN zł" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="2.405,0.629"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
Loading…
Reference in New Issue
Block a user