From 73a4f37e48f7ad6d3fe2bcc1c17cd7170e11cf2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=BF=97=E9=91=AB?= <160088900+niuzhix@users.noreply.github.com> Date: Fri, 1 Aug 2025 20:16:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=B3=95=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs index a03db14..ec07295 100644 --- a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs +++ b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs @@ -44,6 +44,7 @@ namespace CRSim.ScreenSimulator.Views private void Close(object sender, MouseButtonEventArgs e) { + Close(); } } } From 33779cb53025162de3fcf4e48de379f4128aa33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=BF=97=E9=91=AB?= <160088900+niuzhix@users.noreply.github.com> Date: Fri, 1 Aug 2025 21:58:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E9=99=90=E5=88=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=80=8D=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/SimulatorWindow.xaml.cs | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs index ec07295..7194b2c 100644 --- a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs +++ b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs @@ -33,13 +33,32 @@ namespace CRSim.ScreenSimulator.Views private void DecreaseSpeed(object sender, MouseButtonEventArgs e) { - _timeService.Speed /= 2 ; - SpeedText.Text = _timeService.Speed.ToString()+"x" ; + if (_timeService.Speed > 0.25 && _timeService.Speed <= 1024) + { + _timeService.Speed /= 2; + SpeedText.Text = _timeService.Speed.ToString() + "x"; + } + else + { + if (_timeService.Speed == 0.25) + { + _timeService.Speed = -1; + SpeedText.Text = _timeService.Speed.ToString() + "x"; + } + } } private void IncreaseSpeed(object sender, MouseButtonEventArgs e) { - _timeService.Speed *= 2; - SpeedText.Text = _timeService.Speed.ToString() + "x"; + if (_timeService.Speed >= 0.25 && _timeService.Speed < 1024) + { + _timeService.Speed *= 2; + SpeedText.Text = _timeService.Speed.ToString() + "x"; + } + if (_timeService.Speed == -1) + { + _timeService.Speed = 0.25; + SpeedText.Text = _timeService.Speed.ToString() + "x"; + } } private void Close(object sender, MouseButtonEventArgs e)