DeliveryAdminWindow: Add auto focus for weighing buttons on enter
This commit is contained in:
@ -209,7 +209,7 @@
|
||||
|
||||
<Label Content="Sorte:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="SortIdInput" Width="36" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" HorizontalAlignment="Left"
|
||||
TextChanged="SortIdInput_TextChanged" LostFocus="SortIdInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
TextChanged="SortIdInput_TextChanged" LostFocus="SortIdInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
<ComboBox x:Name="WineVarietyInput" Grid.Row="1" Grid.Column="1" Margin="41,10,10,10"
|
||||
ItemTemplate="{StaticResource WineVarietyTemplate}" TextSearch.TextPath="Name"
|
||||
SelectionChanged="WineVarietyInput_SelectionChanged" KeyUp="Input_KeyUp"/>
|
||||
@ -230,20 +230,20 @@
|
||||
<Label Content="Gradation:" Margin="10,10,10,10"/>
|
||||
<Grid Grid.Column="1" Width="54" Height="25" Margin="0,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||
<TextBox x:Name="GradationOeInput" TextAlignment="Right" Padding="2,2,23,2"
|
||||
TextChanged="GradationOeInput_TextChanged" LostFocus="GradationOeInput_LostFocus"/>
|
||||
TextChanged="GradationOeInput_TextChanged" LostFocus="GradationOeInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
<Label Content="°Oe" Margin="0,4,3,0" HorizontalAlignment="Right" FontSize="10"/>
|
||||
</Grid>
|
||||
<Label Content="=" Margin="60,10,10,10" Grid.Column="1"/>
|
||||
<Grid Grid.Column="1" Width="68" Height="25" Margin="78,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||
<TextBox x:Name="GradationKmwInput" TextAlignment="Right" Padding="2,2,34,2" SnapsToDevicePixels="True"
|
||||
TextChanged="GradationKmwInput_TextChanged" LostFocus="GradationKmwInput_LostFocus"/>
|
||||
TextChanged="GradationKmwInput_TextChanged" LostFocus="GradationKmwInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
<Label Content="°KMW" Margin="0,4,3,0" HorizontalAlignment="Right" FontSize="10"/>
|
||||
</Grid>
|
||||
|
||||
<Label Content="Qualitätsstufe:" Margin="10,40,10,10"/>
|
||||
<ComboBox x:Name="WineQualityLevelInput" Width="146" Margin="0,40,10,10" Grid.Column="1" HorizontalAlignment="Left"
|
||||
ItemTemplate="{StaticResource WineQualityLevelTemplate}"
|
||||
SelectionChanged="WineQualityLevelInput_SelectionChanged"/>
|
||||
SelectionChanged="WineQualityLevelInput_SelectionChanged" KeyUp="Input_KeyUp"/>
|
||||
|
||||
<CheckBox x:Name="AbgewertetInput" Content="Abgewertet" IsEnabled="False"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,75,10,10" Grid.Column="0" Grid.ColumnSpan="2"/>
|
||||
|
@ -195,9 +195,14 @@ namespace Elwig.Windows {
|
||||
if (sender is not Control ctrl) return;
|
||||
if (evt.Key != Key.Enter) return;
|
||||
if (ctrl == MgNrInput || ctrl == MemberInput) {
|
||||
SortIdInput.Focus(); SortIdInput.SelectAll();
|
||||
SortIdInput.Focus();
|
||||
SortIdInput.SelectAll();
|
||||
} else if (ctrl == SortIdInput || ctrl == WineVarietyInput || ctrl == AttributesInput) {
|
||||
GradationOeInput.Focus(); GradationOeInput.SelectAll();
|
||||
GradationOeInput.Focus();
|
||||
GradationOeInput.SelectAll();
|
||||
} else if (ctrl == GradationKmwInput || ctrl == GradationOeInput || ctrl == WineQualityLevelInput) {
|
||||
if (WeighingAButton.IsVisible) WeighingAButton.Focus();
|
||||
else WeighingManualButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user