diff --git a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
index 3615522..5d4b456 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml
@@ -1,5 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ FontFamily="{DynamicResource MaterialDesignFont}"
+
+ 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:Magazyn.Windows"
+ mc:Ignorable="d"
+ Title="Magazyn" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
index 041a8a0..9c58f14 100644
--- a/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/Windows/AmountWindow.xaml.cs
@@ -57,7 +57,7 @@ namespace Magazyn.Windows
}
- private void saveButton_Click(object sender, RoutedEventArgs e)
+ private void SendNewQuantity()
{
int amount = int.Parse(amountToChange.Text);
try
@@ -81,9 +81,19 @@ namespace Magazyn.Windows
this.Close();
}
+ private void saveButton_Click(object sender, RoutedEventArgs e)
+ {
+ SendNewQuantity();
+ }
+
private void cancelButton_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
+
+ private void Window_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.Key == Key.Return) SendNewQuantity();
+ }
}
}