diff --git a/CRSim.ScreenSimulator/Assets/Hailaer/PrimaryScreen.png b/CRSim.ScreenSimulator/Assets/Hailaer/PrimaryScreen.png new file mode 100644 index 0000000..f9d39a5 Binary files /dev/null and b/CRSim.ScreenSimulator/Assets/Hailaer/PrimaryScreen.png differ diff --git a/CRSim.ScreenSimulator/Assets/Yakeshi/PlatformScreen.png b/CRSim.ScreenSimulator/Assets/Yakeshi/PlatformScreen.png new file mode 100644 index 0000000..df19e50 Binary files /dev/null and b/CRSim.ScreenSimulator/Assets/Yakeshi/PlatformScreen.png differ diff --git a/CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj b/CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj index 1605071..4e21295 100644 --- a/CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj +++ b/CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj @@ -134,6 +134,7 @@ + @@ -152,6 +153,7 @@ + diff --git a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs index 2fa491b..5f429c7 100644 --- a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs @@ -24,6 +24,8 @@ namespace CRSim.ScreenSimulator.Converters if (values[0] is int Length && values[1] is int Location) { if(DisplayMode == "least" && values[2] is string Direction){ + string AddString = ""; + if(values.Length >= 5 && values[4] is string TMP) AddString = TMP; if(Direction == "left") { string Arrow = DisplayArrow == "True"? "←" : ""; @@ -31,7 +33,7 @@ namespace CRSim.ScreenSimulator.Converters if(IsClosedInterval == "closed"){ if(Location < Length) { - return $"{Arrow}1{HyphenText}{Location-1}"; + return $"{Arrow}{AddString}1{HyphenText}{Location-1}"; } else if(Length == 1) { @@ -39,21 +41,21 @@ namespace CRSim.ScreenSimulator.Converters } else { - return $"{Arrow}1{HyphenText}{Length-1}"; + return $"{Arrow}{AddString}1{HyphenText}{Length-1}"; } } } if(Location <= Length) { - return $"{Arrow}1{HyphenText}{Location}"; + return $"{Arrow}{AddString}1{HyphenText}{Location}"; } else if(Length == 1) { - return $"{Arrow}1"; + return $"{Arrow}{AddString}1"; } else { - return $"{Arrow}1{HyphenText}{Length}"; + return $"{Arrow}{AddString}1{HyphenText}{Length}"; } } if(Direction == "right") @@ -64,10 +66,10 @@ namespace CRSim.ScreenSimulator.Converters } else if(Location+1 == Length) { - return $"{Length}{Arrow}"; + return $"{Length}{AddString}{Arrow}"; } else{ - return $"{Location+1}{HyphenText}{Length}{Arrow}"; + return $"{Location+1}{HyphenText}{Length}{AddString}{Arrow}"; } } return string.Empty; diff --git a/CRSim.ScreenSimulator/Models/StylesInfoData.json b/CRSim.ScreenSimulator/Models/StylesInfoData.json index ec97074..0784ac6 100644 --- a/CRSim.ScreenSimulator/Models/StylesInfoData.json +++ b/CRSim.ScreenSimulator/Models/StylesInfoData.json @@ -432,5 +432,28 @@ "Station", "TicketCheck" ] + }, + { + "UniqueId": "Yakeshi.PlatformScreen", + "Title": "牙克石站站台看板", + "Region": "牙克石", + "Author": "wxl0430", + "Type": "站台屏", + "Parameters": [ + "Station", + "Platform", + "Location" + ] + }, + { + "UniqueId": "Hailaer.PrimaryScreen", + "Title": "海拉尔站主要看板", + "Region": "海拉尔", + "Author": "wxl0430", + "Type": "车站大屏", + "Parameters": [ + "Station", + "Text" + ] } ] \ No newline at end of file diff --git a/CRSim.ScreenSimulator/ViewModels/Hailaer/PrimaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Hailaer/PrimaryScreenViewModel.cs new file mode 100644 index 0000000..5d1cd47 --- /dev/null +++ b/CRSim.ScreenSimulator/ViewModels/Hailaer/PrimaryScreenViewModel.cs @@ -0,0 +1,16 @@ +using CRSim.Core.Models; +using CRSim.Core.Services; +namespace CRSim.ScreenSimulator.ViewModels.Hailaer +{ + public class PrimaryScreenViewModel : ScreenViewModel + { + public PrimaryScreenViewModel(ITimeService timeService, ISettingsService settingsService) + : base(timeService, settingsService) + { + ItemsPerPage = 6; + ScreenCount = 2; + Text = $" 开车前{settingsService.GetSettings().StopCheckInAdvanceDuration.TotalMinutes}分钟停止检票";; + StationType = StationType.Departure; + } + } +} diff --git a/CRSim.ScreenSimulator/ViewModels/Yakeshi/PlatformScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Yakeshi/PlatformScreenViewModel.cs new file mode 100644 index 0000000..515b7c7 --- /dev/null +++ b/CRSim.ScreenSimulator/ViewModels/Yakeshi/PlatformScreenViewModel.cs @@ -0,0 +1,13 @@ +using CRSim.Core.Services; +namespace CRSim.ScreenSimulator.ViewModels.Yakeshi +{ + public class PlatformScreenViewModel : ScreenViewModel + { + public PlatformScreenViewModel(ITimeService timeService, ISettingsService settingsService) + : base(timeService, settingsService) + { + Text = $"上下车不要拥挤,小心列车与站台之间的缝隙,看管好老人和同行的儿童"; + ItemsPerPage = 1; + } + } +} diff --git a/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml b/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml new file mode 100644 index 0000000..8bbac73 --- /dev/null +++ b/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml.cs new file mode 100644 index 0000000..1ae1d2e --- /dev/null +++ b/CRSim.ScreenSimulator/Views/Hailaer/PrimaryScreenView.xaml.cs @@ -0,0 +1,14 @@ +using CRSim.ScreenSimulator.ViewModels.Hailaer; +namespace CRSim.ScreenSimulator.Views.Hailaer +{ + public partial class PrimaryScreenView : BaseScreenView + { + public PrimaryScreenViewModel ViewModel { get; } + public PrimaryScreenView(PrimaryScreenViewModel viewModel) + { + InitializeComponent(); + ViewModel = viewModel; + DataContext = viewModel; + } + } +} diff --git a/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml b/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml new file mode 100644 index 0000000..5f6896e --- /dev/null +++ b/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml.cs new file mode 100644 index 0000000..9978143 --- /dev/null +++ b/CRSim.ScreenSimulator/Views/Yakeshi/PlatformScreenView.xaml.cs @@ -0,0 +1,16 @@ +using CRSim.ScreenSimulator.ViewModels.Yakeshi; + +namespace CRSim.ScreenSimulator.Views.Yakeshi +{ + public partial class PlatformScreenView : BaseScreenView + { + public PlatformScreenViewModel ViewModel { get; } + public PlatformScreenView(PlatformScreenViewModel viewModel) + { + + InitializeComponent(); + ViewModel = viewModel; + DataContext = viewModel; + } + } +}