mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-09 02:56:00 +08:00
feat: #139 添加天津地铁站台看板
This commit is contained in:
BIN
CRSim.ScreenSimulator/Assets/Advertisement-3.mp4
Normal file
BIN
CRSim.ScreenSimulator/Assets/Advertisement-3.mp4
Normal file
Binary file not shown.
BIN
CRSim.ScreenSimulator/Assets/TianjinMetro/PlatformScreen.png
Normal file
BIN
CRSim.ScreenSimulator/Assets/TianjinMetro/PlatformScreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 476 KiB |
BIN
CRSim.ScreenSimulator/Assets/TianjinMetro/TianjinMetro-Icon.png
Normal file
BIN
CRSim.ScreenSimulator/Assets/TianjinMetro/TianjinMetro-Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
@@ -8,10 +8,13 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\Advertisement-3.mp4" />
|
||||
<None Remove="Assets\ChengduDong\cdcz.png" />
|
||||
<None Remove="Assets\ChengduDong\PillarTicketCheckScreen.png" />
|
||||
<None Remove="Assets\ChengduDong\TicketCheck.png" />
|
||||
<None Remove="Assets\Niuzhou\PrimaryScreen.png" />
|
||||
<None Remove="Assets\TianjinMetro\PlatformScreen.png" />
|
||||
<None Remove="Assets\TianjinMetro\TianjinMetro-Icon.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -21,6 +24,9 @@
|
||||
<Content Include="Assets\Advertisement-2.mp4">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Advertisement-3.mp4">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -57,6 +63,9 @@
|
||||
<Compile Update="Views\Niuzhou\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\TianjinMetro\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\XuzhouMetro\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -120,6 +129,8 @@
|
||||
<Resource Include="Assets\Mianyang\PlatformScreen.png" />
|
||||
<Resource Include="Assets\Niuzhou\PrimaryScreen.png" />
|
||||
<Resource Include="Assets\Shanghai\OutsideScreen.png" />
|
||||
<Resource Include="Assets\TianjinMetro\PlatformScreen.png" />
|
||||
<Resource Include="Assets\TianjinMetro\TianjinMetro-Icon.png" />
|
||||
<Resource Include="Assets\Tianjin\image.png" />
|
||||
<Resource Include="Assets\Tianjin\PlatformScreen.png" />
|
||||
<Resource Include="Assets\XuzhouMetro\Background.jpg" />
|
||||
|
||||
@@ -104,6 +104,19 @@
|
||||
"Platform"
|
||||
]
|
||||
},
|
||||
{
|
||||
"UniqueId": "TianjinMetro.PlatformScreen",
|
||||
"Title": "天津地铁站台看板",
|
||||
"Station": "天津地铁",
|
||||
"Author": "电排骨",
|
||||
"Type": "站台屏",
|
||||
"Parameters": [
|
||||
"Station",
|
||||
"Text",
|
||||
"Video",
|
||||
"Platform"
|
||||
]
|
||||
},
|
||||
{
|
||||
"UniqueId": "Guangyuan.PrimaryScreen",
|
||||
"Title": "广元站主要看板",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using CRSim.Core.Services;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.TianjinMetro
|
||||
{
|
||||
public class PlatformScreenViewModel : MetroPlatformScreenViewModel
|
||||
{
|
||||
public PlatformScreenViewModel(ITimeService timeService, ISettingsService settingsService)
|
||||
: base(timeService, settingsService)
|
||||
{
|
||||
Text = "海河明珠闪耀津门,古今交融绘就华章。五大道镌刻百年风华,滨海新区涌动创新浪潮。狗不理飘香,相声茶馆笑声扬。意式风情街浪漫流淌,古文化街非遗绽放。生态宜居城,开放包容乡。天津卫,邀您共谱新时代乐章!";
|
||||
Video = new("Assets\\Advertisement-3.mp4", UriKind.Relative);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<views:BaseScreenView x:Class="CRSim.ScreenSimulator.Views.TianjinMetro.PlatformScreenView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.TianjinMetro"
|
||||
xmlns:pp="https://www.cnblogs.com/pumbaa"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
xmlns:views="clr-namespace:CRSim.ScreenSimulator.Views" FontFamily="DengXian" FontWeight="SemiBold"
|
||||
ResizeMode="NoResize">
|
||||
<Window.Resources>
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToDateConverter" Format="yyyy / MM / dd dddd"/>
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToTimeConverter" Format="HH:mm" />
|
||||
<converters:MetroDateTimeToVisibilityConverter x:Key="MetroDateTimeToVisibilityConverter"/>
|
||||
<converters:MetroDateTimeToStringConverter x:Key="MetroDateTimeToStringConverter" ComingText="即将进站" ArrivedText="已进站"/>
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Horizontal" Height="470" Background="#527BB1">
|
||||
<Grid Width="200" Margin="10,10,6,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Background="#499CD0" CornerRadius="12" BorderBrush="LightGray" BorderThickness="2">
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="天津地铁1号线" Foreground="White"
|
||||
TextAlignment="Center" FontSize="20" Margin="0,10,0,0"/>
|
||||
<Rectangle Grid.Row="1" Fill="White" Width="130" Height="2"/>
|
||||
<TextBlock Grid.Row="2" Text="本次列车" Foreground="White"
|
||||
TextAlignment="Center" FontSize="20" Margin="0,15,0,0"/>
|
||||
<TextBlock Grid.Row="3" Text="{Binding FirstTrain,Converter={StaticResource MetroDateTimeToStringConverter},ConverterParameter=TextBlock}"
|
||||
FontSize="38" Foreground="Yellow" TextAlignment="Center" FontWeight="Bold" VerticalAlignment="Center"
|
||||
Visibility="{Binding FirstTrain,Converter={StaticResource MetroDateTimeToVisibilityConverter},ConverterParameter=TextBlock}"/>
|
||||
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Visibility="{Binding FirstTrain,Converter={StaticResource MetroDateTimeToVisibilityConverter},ConverterParameter=StackPanel}">
|
||||
<TextBlock Text="{Binding FirstTrain,Converter={StaticResource MetroDateTimeToStringConverter},ConverterParameter=StackPanel}"
|
||||
FontSize="60" Foreground="Yellow"/>
|
||||
<TextBlock Text="分钟" FontSize="24" Foreground="White" VerticalAlignment="Bottom" Margin="8,0,0,6"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="4" Text="{Binding FirstTrain.Terminal,StringFormat=开往: {0}}" FontSize="20" Foreground="White" TextAlignment="Center" Margin="0,0,0,10"/>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Background="#499CD0" CornerRadius="12" BorderBrush="LightGray" BorderThickness="2" Margin="0,6,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.Row="0" Margin="10,20,10,0" Source="pack://application:,,,/CRSim.ScreenSimulator;component/Assets/TianjinMetro/TianjinMetro-Icon.png"/>
|
||||
<TextBlock Grid.Row="1" Text="{Binding CurrentTime, Converter={StaticResource DateTimeToTimeConverter}}"
|
||||
Foreground="White" TextAlignment="Center" FontSize="66"/>
|
||||
<TextBlock Grid.Row="2" Text="{Binding CurrentTime, Converter={StaticResource DateTimeToDateConverter}}"
|
||||
Foreground="White" TextAlignment="Center" FontSize="20" Margin="4,6,4,8" FontWeight="Normal"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
<Grid Width="580" Margin="0,10,10,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Background="Black">
|
||||
<MediaElement Name="player" HorizontalAlignment="Center" VerticalAlignment="Stretch"
|
||||
LoadedBehavior="Manual" UnloadedBehavior="Stop" Volume="0" MediaEnded="MediaElement_MediaEnded" Source="{Binding Video}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Background="#499CD0" CornerRadius="6" BorderBrush="LightGray" BorderThickness="2" Margin="0,6,0,0">
|
||||
<pp:RunningText x:Name="rt" Foreground="White" FontSize="28" Speed="75"
|
||||
FontFamily="楷体" Text="{Binding Text,Mode=OneWay}">
|
||||
</pp:RunningText>
|
||||
</Border>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</views:BaseScreenView>
|
||||
@@ -0,0 +1,24 @@
|
||||
using CRSim.ScreenSimulator.ViewModels.TianjinMetro;
|
||||
using System.Windows;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Views.TianjinMetro
|
||||
{
|
||||
public partial class PlatformScreenView : BaseScreenView
|
||||
{
|
||||
public PlatformScreenViewModel ViewModel { get; }
|
||||
public PlatformScreenView(PlatformScreenViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = viewModel;
|
||||
DataContext = viewModel;
|
||||
player.Play();
|
||||
}
|
||||
|
||||
private void MediaElement_MediaEnded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
player.Position = TimeSpan.Zero;
|
||||
player.Play();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
<LangVersion>13.0</LangVersion>
|
||||
<StartupObject>CRSim.App</StartupObject>
|
||||
<ApplicationIcon>Assets\CRSimIcon.ico</ApplicationIcon>
|
||||
<Version>2.2.0.0</Version>
|
||||
<Version>2.2.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user