DeliveryAdminWindow: Add auto focus for weighing buttons on enter

This commit is contained in:
2023-09-18 20:59:59 +02:00
parent 9701af9e36
commit a08df4c3ed
2 changed files with 11 additions and 6 deletions

View File

@ -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();
}
}