diff --git a/Magazyn_Client/Magazyn/MainWindow.xaml b/Magazyn_Client/Magazyn/MainWindow.xaml
index 54960ed..f112e31 100644
--- a/Magazyn_Client/Magazyn/MainWindow.xaml
+++ b/Magazyn_Client/Magazyn/MainWindow.xaml
@@ -1,4 +1,4 @@
-
-
-
+
+
-
-
-
-
+
+
+
-
+
diff --git a/Magazyn_Client/Magazyn/MainWindow.xaml.cs b/Magazyn_Client/Magazyn/MainWindow.xaml.cs
index a275d9e..fe2bb65 100644
--- a/Magazyn_Client/Magazyn/MainWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/MainWindow.xaml.cs
@@ -89,8 +89,7 @@ namespace Magazyn
private void Button_Click_1(object sender, RoutedEventArgs e)
{
- payment.Text = GetWarehousePrice().Price.ToString();
- //MessageBox.Show("Value of warehouse: " + GetWarehousePrice().Price.ToString() );
+ MessageBox.Show("Wartość magazynu to: " + GetWarehousePrice().Price.ToString() + "zł", "Wartość magazynu" );
}
diff --git a/Magazyn_Client/Magazyn/Views/FruitView.xaml.cs b/Magazyn_Client/Magazyn/Views/FruitView.xaml.cs
index 6edc8fa..51ee28c 100644
--- a/Magazyn_Client/Magazyn/Views/FruitView.xaml.cs
+++ b/Magazyn_Client/Magazyn/Views/FruitView.xaml.cs
@@ -54,14 +54,14 @@ namespace Magazyn.Views
{
AmountWindow window = new AmountWindow(fruit, -1);
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
- window.Show();
+ window.ShowDialog();
}
private void addButton_Click(object sender, RoutedEventArgs e)
{
AmountWindow window = new AmountWindow(fruit, 1);
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
- window.Show();
+ window.ShowDialog();
}
private void WindowSaveChangingAmountOfFruits(int amountChanged)
diff --git a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
index 4170037..dcaf9a6 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
@@ -5,11 +5,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Magazyn.Windows"
mc:Ignorable="d"
- Title="Change Quantity" Height="100" Width="280">
-
-
-
-
+ Title="Change Quantity" Height="205" Width="220"
+ ResizeMode="NoResize">
+
+
+
+
+
+
+
-
+
diff --git a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
index b0e68e1..e53c03f 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
@@ -33,6 +33,17 @@ namespace Magazyn.Windows
this.type = type;
fruitName.Text = fruit.Name;
+
+ messageBox.Text = String.Format("Jaką ilość produktu chcesz {0} do magazynu?", (type > 0) ? "dodać":"odjąć");
+
+ try
+ {
+ fruitImage.Source = new BitmapImage(new Uri(fruit.ImageLink));
+ }
+ catch (Exception ex)
+ {
+
+ }
}
private void saveButton_Click(object sender, RoutedEventArgs e)
@@ -49,5 +60,10 @@ namespace Magazyn.Windows
SaveChangingAmountOfFruits.Invoke((type>0)?amount:-amount);
this.Close();
}
+
+ private void cancelButton_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
}
}