From bf90543ad83362efaf3aca7a2fb92bf29ba50943 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sat, 20 Jan 2024 02:09:03 +0100 Subject: [PATCH] ChartWindow: Change gebunden color to yellow --- Elwig/Windows/ChartWindow.xaml.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Elwig/Windows/ChartWindow.xaml.cs b/Elwig/Windows/ChartWindow.xaml.cs index 3945d89..467e4b8 100644 --- a/Elwig/Windows/ChartWindow.xaml.cs +++ b/Elwig/Windows/ChartWindow.xaml.cs @@ -19,6 +19,9 @@ using ScottPlot.Plottable; namespace Elwig.Windows { public partial class ChartWindow : ContextWindow { + public static readonly Color ColorUngebunden = Color.Blue; + public static readonly Color ColorGebunden = Color.Gold; + public readonly int Year; public readonly int AvNr; private readonly PaymentVar PaymentVar; @@ -132,14 +135,14 @@ namespace Elwig.Windows { private void InitPlot() { if (SelectedGraphEntry?.GebundenGraph != null) { GebundenPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry.GebundenGraph.DataX, SelectedGraphEntry.GebundenGraph.DataY); - GebundenPlot.LineColor = Color.Green; - GebundenPlot.MarkerColor = Color.Green; + GebundenPlot.LineColor = ColorGebunden; + GebundenPlot.MarkerColor = ColorGebunden; GebundenPlot.MarkerSize = 9; } DataPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry!.DataGraph.DataX, SelectedGraphEntry!.DataGraph.DataY); - DataPlot.LineColor = Color.Blue; - DataPlot.MarkerColor = Color.Blue; + DataPlot.LineColor = ColorUngebunden; + DataPlot.MarkerColor = ColorUngebunden; DataPlot.MarkerSize = 9; if (SelectedGraphEntry?.GebundenGraph == null) { @@ -327,7 +330,7 @@ namespace Elwig.Windows { private void PriceInput_TextChanged(object sender, TextChangedEventArgs evt) { if (PrimaryMarkedPoint != -1 && ActiveGraph != null) { - bool success = Double.TryParse(PriceInput.Text, out double price); + bool success = double.TryParse(PriceInput.Text, out double price); if (success) { ActiveGraph.SetPriceAt(PrimaryMarkedPoint, price);