feat: 为更多样式提供自定义文字

This commit is contained in:
denglihong2007
2025-03-08 01:01:25 +08:00
parent 972078010c
commit 3836d213bc
4 changed files with 7 additions and 4 deletions

View File

@@ -83,7 +83,8 @@
"ImagePath": "Assets/StyleImages/Hanzhong/PlatformScreen.png",
"Parameters": [
"Station",
"Platform"
"Platform",
"Text"
]
},
{
@@ -123,7 +124,8 @@
"StyleName": "SecondaryScreenView",
"ImagePath": "Assets/StyleImages/GuangdongIntercity/SecondaryScreen.png",
"Parameters": [
"Station"
"Station",
"Text"
]
}
]

View File

@@ -9,12 +9,12 @@
ItemsPerPage = 8;
PageCount = 1;
timeService.RefreshSecondsElapsed += RefreshDisplay;
Text = $"列 车 到 发 信 息";
Initialize();
}
private async void Initialize()
{
await WaitForDataLoadAsync();
Text = $"列 车 到 发 信 息";
RefreshDisplay(null,null);
}
private void RefreshDisplay(object? sender, EventArgs e)

View File

@@ -9,6 +9,7 @@
{
_timeService = timeService;
timeService.RefreshSecondsElapsed += RefreshDisplay;
Text = "请注意列车与站台之间的间隙,请勿携带危险品上车";
Initialize();
}
private async void Initialize()

View File

@@ -71,7 +71,7 @@
</Grid>
<TextBlock Grid.Column="2" TextAlignment="Center" Text="{Binding Screen[0].Terminal}" FontSize="36" Foreground="#09F2F6" FontWeight="Bold"/>
</Grid>
<TextBlock Grid.Row="2" TextAlignment="Center" Foreground="White" Text="请注意列车与站台之间的间隙,请勿携带危险品上车" Margin="0,5"/>
<TextBlock Grid.Row="2" TextAlignment="Center" Foreground="White" Text="{Binding Text}" Margin="0,5"/>
</Grid>
</Border>
<TextBlock Foreground="#FDB441" FontFamily="微软雅黑" Text="站台边缘危险,请在安全线内行走,请看管好您的随身物品。" TextAlignment="Center"