fix: 修正名称与样式

This commit is contained in:
denglihong2007
2025-03-05 23:16:18 +08:00
parent fd0878a78a
commit 6f963aa9e5
8 changed files with 23 additions and 24 deletions

View File

@@ -57,8 +57,8 @@
services.AddTransient<Views.Zibo.SecondaryScreenView>();
services.AddTransient<ViewModels.Jinanxi.SmallScreenViewModel>();
services.AddTransient<Views.Jinanxi.SmallScreenView>();
services.AddTransient<ViewModels.Dongchengnan.SecondaryScreenViewModel>();
services.AddTransient<Views.Dongchengnan.SecondaryScreenView>();
services.AddTransient<ViewModels.GuangdongIntercity.SecondaryScreenViewModel>();
services.AddTransient<Views.GuangdongIntercity.SecondaryScreenView>();
}).Build();
[STAThread]

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -14,7 +14,6 @@
<ItemGroup>
<ApplicationDefinition Remove="App.xaml" />
<None Remove="Assets\StyleImages\Jinanxi\SmallScreen.png" />
<Content Include="Assets\Advertisement.mp4">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -36,6 +35,7 @@
<Resource Include="Assets\StyleImages\ChengduDong\SecondaryScreen.png" />
<Resource Include="Assets\StyleImages\ChengduMetro\ChengduMetro-Icon.png" />
<Resource Include="Assets\StyleImages\ChengduMetro\PlatformScreen.png" />
<Resource Include="Assets\StyleImages\GuangdongIntercity\SecondaryScreen.png" />
<Resource Include="Assets\StyleImages\Guangyuan\PrimaryScreen.png" />
<Resource Include="Assets\StyleImages\Hanzhong\Image.png" />
<Resource Include="Assets\StyleImages\Hanzhong\PlatformScreen.png" />
@@ -44,7 +44,6 @@
<Resource Include="Assets\StyleImages\Shanghai\OutsideScreen.png" />
<Resource Include="Assets\StyleImages\Zibo\PrimaryScreen.png" />
<Resource Include="Assets\StyleImages\Zibo\SecondaryScreen.png" />
<Resource Include="Assets\StyleImages\Dongchengnan\SecondaryScreen.png" />
<Resource Include="Assets\win11-dashboard.dark.png" />
<Resource Include="Assets\win11-dashboard.light.png" />
<EmbeddedResource Include="Models\StylesInfoData.json" />
@@ -97,7 +96,7 @@
<Compile Update="Views\Windows\Stations\Jinanxi\SmallScreenView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\Windows\Stations\Dongchengnan\SecondaryScreenView.xaml.cs">
<Compile Update="Views\Windows\Stations\GuangdongIntercity\SecondaryScreenView.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>

View File

@@ -117,11 +117,11 @@
]
},
{
"UniqueId": "Dongchengnan SecondaryScreen",
"Title": "东城南站次要看板",
"Station": "Dongchengnan",
"UniqueId": "GuangdongIntercity SecondaryScreen",
"Title": "广东城次要看板",
"Station": "GuangdongIntercity",
"StyleName": "SecondaryScreenView",
"ImagePath": "Assets/StyleImages/Dongchengnan/SecondaryScreen.png",
"ImagePath": "Assets/StyleImages/GuangdongIntercity/SecondaryScreen.png",
"Parameters": [
"Station"
]

View File

@@ -16,8 +16,6 @@ namespace CRSim.ViewModels
[ObservableProperty]
private string _currentSecond;
[ObservableProperty]
private string _currentTime_Dongchengnan;
[ObservableProperty]
private string _text = "";
[ObservableProperty]
private Station _thisStation;
@@ -25,7 +23,6 @@ namespace CRSim.ViewModels
public List<TrainInfo> TrainInfo { get; set; } = [];
CultureInfo culture = new CultureInfo("zh-CN");
protected ScreenViewModel(ITimeService timeService, ISettingsService settingsService)
{
@@ -57,9 +54,6 @@ namespace CRSim.ViewModels
CurrentTime = _timeService.GetDateTimeNow().ToString("yyyy-MM-dd HH:mm:ss");
CurrentDate = _timeService.GetDateTimeNow().ToString("yyyy-MM-dd");
CurrentSecond = _timeService.GetDateTimeNow().ToString("HH:mm:ss");
CurrentTime_Dongchengnan = _timeService.GetDateTimeNow().ToString("H:m") + "\n" +
culture.DateTimeFormat.GetDayName(_timeService.GetDateTimeNow().DayOfWeek) + "\n" +
_timeService.GetDateTimeNow().ToString("yyyy/M/d");
}
public Task WaitForDataLoadAsync() => _dataLoaded.Task;

View File

@@ -1,4 +1,4 @@
namespace CRSim.ViewModels.Dongchengnan
namespace CRSim.ViewModels.GuangdongIntercity
{
public class SecondaryScreenViewModel : ScreenViewModel
{
@@ -14,7 +14,7 @@
private async void Initialize()
{
await WaitForDataLoadAsync();
Text = $" 列 车 到 发 信 息";
Text = $"列 车 到 发 信 息";
RefreshDisplay(null,null);
}
private void RefreshDisplay(object? sender, EventArgs e)

View File

@@ -1,9 +1,9 @@
<Window x:Class="CRSim.Views.Dongchengnan.SecondaryScreenView"
<Window x:Class="CRSim.Views.GuangdongIntercity.SecondaryScreenView"
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.Views.Dongchengnan"
xmlns:local="clr-namespace:CRSim.Views.GuangdongIntercity"
mc:Ignorable="d"
xmlns:converters="clr-namespace:CRSim.Converters"
Title="引导屏" SizeToContent="WidthAndHeight"
@@ -69,8 +69,14 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" Text="{Binding Text}" Foreground="#ffffff" Margin="30,2" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontSize="32" FontWeight="Bold"/>
<TextBlock Grid.Column="2" Text="{Binding CurrentTime_Dongchengnan}" Foreground="#ffffff" Margin="30,2" HorizontalAlignment="Right" VerticalAlignment="Center" TextAlignment="Center" FontSize="10"/>
<TextBlock Grid.Column="1" Text="{Binding Text}" Foreground="#ffffff" Margin="30,2"
HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"
FontSize="32" FontWeight="Bold">
<TextBlock.LayoutTransform>
<ScaleTransform ScaleX="1.7" ScaleY="1"/>
</TextBlock.LayoutTransform>
</TextBlock>
<TextBlock Grid.Column="2" Text="{Binding CurrentTime_GuangdongIntercity}" Foreground="#ffffff" Margin="30,2" HorizontalAlignment="Right" VerticalAlignment="Center" TextAlignment="Center" FontSize="10"/>
</Grid>
<DataGrid ItemsSource="{Binding Screen, Mode=OneWay}" AutoGenerateColumns="False"
@@ -108,7 +114,7 @@
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Terminal}" Width="115">
<DataGridTextColumn Binding="{Binding Terminal}" MinWidth="115">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">

View File

@@ -1,6 +1,6 @@
using CRSim.ViewModels.Dongchengnan;
using CRSim.ViewModels.GuangdongIntercity;
namespace CRSim.Views.Dongchengnan
namespace CRSim.Views.GuangdongIntercity
{
/// <summary>
/// SecondaryScreen.xaml 的交互逻辑