Check temp/acid in DeliveryAdminWindow
This commit is contained in:
@ -311,13 +311,15 @@
|
||||
|
||||
<Label Content="Temperatur:" Margin="10,70,0,10"/>
|
||||
<Grid Grid.Column="1" Height="25" Margin="0,70,10,10" VerticalAlignment="Top">
|
||||
<TextBox x:Name="TemperatureInput" TextAlignment="Right" Padding="2,2,16,2"/>
|
||||
<TextBox x:Name="TemperatureInput" TextAlignment="Right" Padding="2,2,16,2"
|
||||
TextChanged="TemperatureAcidInput_TextChanged" LostFocus="TemperatureAcidInput_LostFocus"/>
|
||||
<Label Content="°C" Margin="0,4,3,0" HorizontalAlignment="Right" FontSize="10"/>
|
||||
</Grid>
|
||||
|
||||
<Label Content="Säure:" Margin="10,100,0,10"/>
|
||||
<Grid Grid.Column="1" Height="25" Margin="0,100,10,10" VerticalAlignment="Top">
|
||||
<TextBox x:Name="AcidInput" TextAlignment="Right" Padding="2,2,19,2"/>
|
||||
<TextBox x:Name="AcidInput" TextAlignment="Right" Padding="2,2,19,2"
|
||||
TextChanged="TemperatureAcidInput_TextChanged" LostFocus="TemperatureAcidInput_LostFocus"/>
|
||||
<Label Content="g/l" Margin="0,4,3,0" HorizontalAlignment="Right" FontSize="10"/>
|
||||
</Grid>
|
||||
|
||||
|
@ -775,9 +775,9 @@ namespace Elwig.Windows {
|
||||
EnableWeighingButtons();
|
||||
DeliveryList.SelectedItem = null;
|
||||
HideNewEditDeleteButtons();
|
||||
ShowFinishNewPartDeliveryCancelButtons();
|
||||
UnlockInputs();
|
||||
InitInputs();
|
||||
ShowFinishNewPartDeliveryCancelButtons();
|
||||
LockSearchInputs();
|
||||
}
|
||||
|
||||
@ -1162,5 +1162,18 @@ namespace Elwig.Windows {
|
||||
private void WeightInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
InputTextChanged((TextBox)sender);
|
||||
}
|
||||
|
||||
private void TemperatureAcidInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
InputTextChanged((TextBox)sender, Validator.CheckDecimal((TextBox)sender, false, 2, 1));
|
||||
}
|
||||
|
||||
private void TemperatureAcidInput_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
if (sender is not TextBox tb) return;
|
||||
if (tb.Text.Length > 0) {
|
||||
if (!tb.Text.Contains(',')) tb.Text += ",0";
|
||||
if (tb.Text.EndsWith(",")) tb.Text += "0";
|
||||
}
|
||||
InputLostFocus(tb, Validator.CheckDecimal(tb, false, 2, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user