ChartWindow: Round PriceInput.Text
All checks were successful
Test / Run tests (push) Successful in 1m44s

This commit is contained in:
2024-06-10 16:30:21 +02:00
parent 6927d44b82
commit f2c2d3270b
2 changed files with 3 additions and 3 deletions

View File

@ -139,12 +139,12 @@
<Label Content="Oechsle:" Margin="10,10,0,0" Grid.Column="0"/>
<ctrl:UnitTextBox x:Name="OechsleInput" Unit="°Oe" TextChanged="OechsleInput_TextChanged" IsEnabled="False" LostFocus="OechsleInput_LostFocus"
Grid.Column="1" Width="90" Margin="0,10,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
Grid.Column="1" Width="90" Margin="0,10,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Label Content="Preis:" Margin="10,40,0,0" Grid.Column="0"/>
<ctrl:UnitTextBox x:Name="PriceInput" Unit="€/kg" TextChanged="PriceInput_TextChanged" IsEnabled="False" LostFocus="PriceInput_LostFocus"
Grid.Column="1" Width="90" Margin="0,40,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
Grid.Column="1" Width="90" Margin="0,40,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Grid>
</GroupBox>

View File

@ -509,7 +509,7 @@ namespace Elwig.Windows {
ChangeMarker(PrimaryMarkedPointPlot, true, ActiveGraph!.GetOechsleAt(PrimaryMarkedPoint), ActiveGraph.GetPriceAt(PrimaryMarkedPoint));
OechsleInput.Text = Highlighted.Graph!.GetOechsleAt(Highlighted.Index).ToString();
PriceInput.Text = Highlighted.Graph.GetPriceAt(Highlighted.Index).ToString();
PriceInput.Text = Math.Round(Highlighted.Graph.GetPriceAt(Highlighted.Index), Season.Precision).ToString();
EnableActionButtons();
} else {