diff --git a/Magazyn_Client/Magazyn/Magazyn.csproj b/Magazyn_Client/Magazyn/Magazyn.csproj
index ea2bb93..f088802 100644
--- a/Magazyn_Client/Magazyn/Magazyn.csproj
+++ b/Magazyn_Client/Magazyn/Magazyn.csproj
@@ -13,6 +13,8 @@
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
true
+
+
AnyCPU
diff --git a/Magazyn_Client/Magazyn/MainWindow.xaml b/Magazyn_Client/Magazyn/MainWindow.xaml
index e38e0ae..12004a5 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 fe4bb83..ff7ee50 100644
--- a/Magazyn_Client/Magazyn/MainWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/MainWindow.xaml.cs
@@ -90,7 +90,11 @@ namespace Magazyn
private void Button_Click_1(object sender, RoutedEventArgs e)
{
- MessageBox.Show("Wartość magazynu: " + 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 be4a8a9..932872d 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, fruit.Quantity);
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
- window.Show();
+ window.ShowDialog();
}
private void addButton_Click(object sender, RoutedEventArgs e)
{
AmountWindow window = new AmountWindow(fruit, 1, fruit.Quantity);
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 1806bb8..00e3710 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
@@ -6,10 +6,14 @@
xmlns:local="clr-namespace:Magazyn.Windows"
mc:Ignorable="d"
Title="Magazyn" Height="100" Width="280">
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
index 63333aa..c020dc1 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
@@ -34,12 +34,27 @@ namespace Magazyn.Windows
InitializeComponent();
this.fruit = fruit;
this.type = type;
+
this.quantity = quantity;
if (type == -1)
this.Title = "Zmniejsz ilość " + fruit.Name;
else
this.Title = "Zwiększ ilość " + fruit.Name;
fruitName.Text = fruit.Name;
+
+ 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)
@@ -74,5 +89,10 @@ namespace Magazyn.Windows
this.Close();
}
+
+ private void cancelButton_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
}
}