From bdefa06fac8b28b60c68dff5a2feec422cd75056 Mon Sep 17 00:00:00 2001 From: Philipp Albrecht Date: Tue, 2 Mar 2021 00:28:24 +0100 Subject: [PATCH] - Added MAC address table reset button - fixed user score calculation --- MacTable.cs | 4 ++-- MainWindow.xaml | 5 +++-- MainWindow.xaml.cs | 6 +++++- SwitchEngine.cs | 5 +++++ UserScore.cs | 4 ++-- VLANSimulator.csproj | 5 +++-- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/MacTable.cs b/MacTable.cs index 1f05bf5..ab12bc0 100644 --- a/MacTable.cs +++ b/MacTable.cs @@ -22,11 +22,11 @@ public SwitchPort this[string mac] public override string ToString() { - var output = " MAC | Port\n"; + var output = " MAC | Port\n"; output += "--------------\n"; foreach(var e in macAddressToSwichPort) { - output += String.Format("{0,-5} | {1,-5}\n", e.Key, e.Value.Num.ToString()); + output += String.Format(" {0,-5}| {1,-5}\n", e.Key, e.Value.Num.ToString()); } return output; } diff --git a/MainWindow.xaml b/MainWindow.xaml index 3a74da4..3a3c2ec 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -5,14 +5,15 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:VLANSimulator" mc:Ignorable="d" - Title="VLAN Switch Simulator by Philipp Albrecht <philipp@uisa.ch> https://github.com/muqiuq/vlansimulator" Height="600" Width="930"> + Title="VLAN Switch Simulator by Philipp Albrecht <philipp@uisa.ch> https://github.com/muqiuq/vlansimulator" Height="630" Width="930" ResizeMode="NoResize">