forked from s434786/DINO_SCRUM
Added Enter( return key ) handler to AmountWindow
This commit is contained in:
parent
3fbea7ec0d
commit
d1f4178bc1
@ -15,7 +15,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Magazyn.Windows"
|
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Magazyn" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize">
|
Title="Magazyn" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
|
||||||
|
|
||||||
<Grid>
|
<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"/>
|
||||||
|
@ -57,7 +57,7 @@ namespace Magazyn.Windows
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButton_Click(object sender, RoutedEventArgs e)
|
private void SendNewQuantity()
|
||||||
{
|
{
|
||||||
int amount = int.Parse(amountToChange.Text);
|
int amount = int.Parse(amountToChange.Text);
|
||||||
try
|
try
|
||||||
@ -81,9 +81,19 @@ namespace Magazyn.Windows
|
|||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void saveButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SendNewQuantity();
|
||||||
|
}
|
||||||
|
|
||||||
private void cancelButton_Click(object sender, RoutedEventArgs e)
|
private void cancelButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key == Key.Return) SendNewQuantity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user