From c98dcd4a0bab98779128b33e1c9b39d6ee7ef667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timon=20R=C3=B6mer?= <t.roemer@itc.rwth-aachen.de> Date: Thu, 17 Oct 2024 00:03:26 +0200 Subject: [PATCH] Adds colors --- GraphVisualizer.cs | 6 ++++++ MainWindow.xaml.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/GraphVisualizer.cs b/GraphVisualizer.cs index e248c8c..ab4098e 100644 --- a/GraphVisualizer.cs +++ b/GraphVisualizer.cs @@ -21,10 +21,16 @@ public static class GraphVisualizer if (edge.IsBackwards) { msaglEdge.LabelText = $"{0}/{edge.Residual}"; + msaglEdge.Attr.Color = Color.Gray; } else { msaglEdge.LabelText = $"{edge.MaxFlow-edge.Residual}/{edge.MaxFlow}"; + + if (edge.MaxFlow-edge.Residual > 0) + { + msaglEdge.Attr.Color = Color.Orange; + } } } diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index edbe167..dad6b51 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -130,6 +130,8 @@ namespace FlowForge double maxFlow = _fordFulkerson.Run("1", "4"); Console.WriteLine($"Maximaler Fluss von Quelle zu Senke: {maxFlow}"); + MessageBox.Show($"Maximaler Fluss von Quelle zu Senke: {maxFlow}"); + /* // Dictionary to store the flow along the augmenting path -- GitLab