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 @@ - + + + + - +