From e9ecf20c0ea2e0150909fd96324ee918e5edc9cd Mon Sep 17 00:00:00 2001 From: denglihong2007 <98096191+denglihong2007@users.noreply.github.com> Date: Sat, 15 Nov 2025 22:36:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=A5=E5=BD=93=E5=89=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=90=AF=E5=8A=A8=E7=9C=8B=E6=9D=BF=E6=A8=A1=E6=8B=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CRSim/ViewModels/ScreenSimulatorPageViewModel.cs | 5 ++++- CRSim/Views/ScreenSimulatorPage.xaml | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CRSim/ViewModels/ScreenSimulatorPageViewModel.cs b/CRSim/ViewModels/ScreenSimulatorPageViewModel.cs index 63262e6..1e6999b 100644 --- a/CRSim/ViewModels/ScreenSimulatorPageViewModel.cs +++ b/CRSim/ViewModels/ScreenSimulatorPageViewModel.cs @@ -26,6 +26,9 @@ public partial class ScreenSimulatorPageViewModel(IEnumerable plugin [ObservableProperty] public partial bool VideoNeeded { get; set; } + [ObservableProperty] + public partial bool CustomizedTime { get; set; } = false; + [ObservableProperty] public partial bool LocationNeeded { get; set; } public List StationNames => [.. databaseService.GetAllStations().Select(x => x.Name)]; @@ -151,7 +154,7 @@ public partial class ScreenSimulatorPageViewModel(IEnumerable plugin { ID = Guid.NewGuid(), StyleName = SelectedStyle.Manifest.Name, - SimulateTime = SelectedDate.Add(SelectedTime).DateTime, + SimulateTime = CustomizedTime ? SelectedDate.Add(SelectedTime).DateTime : DateTime.Now, Text = (TextNeeded && !string.IsNullOrWhiteSpace(Text)) ? Text : null, Video = (VideoNeeded && !string.IsNullOrWhiteSpace(Video)) ? new Uri(Video) : null, Station = StationNeeded ? databaseService.GetStationByName(SelectedStationName) : null, diff --git a/CRSim/Views/ScreenSimulatorPage.xaml b/CRSim/Views/ScreenSimulatorPage.xaml index 9e8caf2..2dcef76 100644 --- a/CRSim/Views/ScreenSimulatorPage.xaml +++ b/CRSim/Views/ScreenSimulatorPage.xaml @@ -102,10 +102,13 @@ - + + + + - +