From 2de567bee33fa8c5817dd7b9869e8c869fe73d16 Mon Sep 17 00:00:00 2001 From: niuzhix <35690637@qq.com> Date: Fri, 1 Aug 2025 20:01:06 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=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 + CRSim/ViewModels/StationManagementPageViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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(); } } } diff --git a/CRSim/ViewModels/StationManagementPageViewModel.cs b/CRSim/ViewModels/StationManagementPageViewModel.cs index e0f48da..d9a9517 100644 --- a/CRSim/ViewModels/StationManagementPageViewModel.cs +++ b/CRSim/ViewModels/StationManagementPageViewModel.cs @@ -69,7 +69,7 @@ public partial class StationManagementPageViewModel : ObservableObject }); } - #region Station +#region Station public void RefreshStations() { var stationsList = _databaseService.GetAllStations(); 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 2/5] =?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 ddc9fa3586d29171e366b8d3dfbd3eb0d6ea3765 Mon Sep 17 00:00:00 2001 From: niuzhix <35690637@qq.com> Date: Fri, 1 Aug 2025 21:55:51 +0800 Subject: [PATCH 3/5] =?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) 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 4/5] =?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) From 8d8a81ec691d3b1f7c8382c8459530067372ba41 Mon Sep 17 00:00:00 2001 From: niuzhix <35690637@qq.com> Date: Sat, 2 Aug 2025 07:59:17 +0800 Subject: [PATCH 5/5] =?UTF-8?q?revert:=20=E5=9B=9E=E6=BB=9A=20feat:=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: 增加时间限制(0.25-1024) --- CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs index 7194b2c..52e66d2 100644 --- a/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs +++ b/CRSim.ScreenSimulator/Views/SimulatorWindow.xaml.cs @@ -38,14 +38,6 @@ namespace CRSim.ScreenSimulator.Views _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) { @@ -54,11 +46,6 @@ namespace CRSim.ScreenSimulator.Views _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)