From c18edb0ca7f530cbadffdc62707a6b4f448c2d1f Mon Sep 17 00:00:00 2001 From: denglihong2007 <2639367181@qq.com> Date: Fri, 11 Apr 2025 00:44:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AB=99=E5=8F=B0=E8=BD=A6=E5=8E=A2?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Converters/LocationToStringConverter.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs index e174223..b666a0d 100644 --- a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs @@ -30,15 +30,23 @@ namespace CRSim.ScreenSimulator.Converters { if (Location > Length) { - return $"当前无车,1-{Length}车向后。"; + return $"当前无车,1-{Length}车向前。"; } if (Location == Length) { - return $"当前{Length}车,1-{Length-1}车向后。"; + return $"当前{Location}车,1-{Length-1}车向前。"; } if (Location == 1) { - return $"当前1车,2-{Length}车向前。"; + return $"当前1车,2-{Length}车向后。"; + } + if (Location == Length-1) + { + return $"当前{Location}车,1-{Location - 1}车向前,{Length}车向后。"; + } + if (Location == 2) + { + return $"当前2车,1车向前,3-{Length}车向后。"; } return $"当前{Location}车,1-{Location - 1}车向前,{Location + 1}-{Length}车向后。"; }