mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-10 03:16:08 +08:00
feat: #169 添加成都双流机场次要看板
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
BIN
CRSim.ScreenSimulator/Assets/ChengduShuangliuAirport/logo-CR.png
Normal file
BIN
CRSim.ScreenSimulator/Assets/ChengduShuangliuAirport/logo-CR.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 98 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 385 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
@@ -12,6 +12,11 @@
|
||||
<None Remove="Assets\ChengduDong\cdcz.png" />
|
||||
<None Remove="Assets\ChengduDong\PillarTicketCheckScreen.png" />
|
||||
<None Remove="Assets\ChengduDong\TicketCheck.png" />
|
||||
<None Remove="Assets\ChengduShuangliuAirport\logo-CR.png" />
|
||||
<None Remove="Assets\ChengduShuangliuAirport\logo-CRH.png" />
|
||||
<None Remove="Assets\ChengduShuangliuAirport\logo-GTJT.png" />
|
||||
<None Remove="Assets\ChengduShuangliuAirport\planetakingoff.png" />
|
||||
<None Remove="Assets\ChengduShuangliuAirport\SecondaryScreen.png" />
|
||||
<None Remove="Assets\Niuzhou\PrimaryScreen.png" />
|
||||
<None Remove="Assets\ShenyangBei\PlatformScreen.png" />
|
||||
<None Remove="Assets\TianjinMetro\PlatformScreen.png" />
|
||||
@@ -50,6 +55,9 @@
|
||||
<Compile Update="Views\ChengduDong\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\ChengduShuangliuAirport\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Niuzhou\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -109,6 +117,11 @@
|
||||
<Resource Include="Assets\ChengduDong\TicketCheck.png" />
|
||||
<Resource Include="Assets\ChengduMetro\ChengduMetro-Icon.png" />
|
||||
<Resource Include="Assets\ChengduMetro\PlatformScreen.png" />
|
||||
<Resource Include="Assets\ChengduShuangliuAirport\logo-CR.png" />
|
||||
<Resource Include="Assets\ChengduShuangliuAirport\logo-CRH.png" />
|
||||
<Resource Include="Assets\ChengduShuangliuAirport\logo-GTJT.png" />
|
||||
<Resource Include="Assets\ChengduShuangliuAirport\planetakingoff.png" />
|
||||
<Resource Include="Assets\ChengduShuangliuAirport\SecondaryScreen.png" />
|
||||
<Resource Include="Assets\DaqingDong\ConcourseBridgeScreen.png" />
|
||||
<Resource Include="Assets\DaqingDong\PlatformScreen.png" />
|
||||
<Resource Include="Assets\DeZhouDong\PrimaryScreen.png" />
|
||||
|
||||
@@ -7,11 +7,7 @@ namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class ChineseToPinyinConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// 将中文字符串转换为拼音(带声调或不带声调)
|
||||
/// </summary>
|
||||
/// <param name="value">要转换的中文字符串</param>
|
||||
/// <returns>拼音字符串</returns>
|
||||
public bool Upper { get; set; } = false;
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null) return string.Empty;
|
||||
@@ -42,7 +38,7 @@ namespace CRSim.ScreenSimulator.Converters
|
||||
}
|
||||
}
|
||||
var result = sb.ToString().ToLower();
|
||||
return char.ToUpper(result[0], culture) + result[1..];
|
||||
return Upper ? result.ToUpper() : char.ToUpper(result[0], culture) + result[1..];
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
|
||||
22
CRSim.ScreenSimulator/Converters/IntAddOneConverter.cs
Normal file
22
CRSim.ScreenSimulator/Converters/IntAddOneConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class IntAddOneConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int intValue)
|
||||
return intValue + 1;
|
||||
return value;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int intValue)
|
||||
return intValue - 1;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class TrainNumberToImageConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
return null;
|
||||
string trainNumber = value.ToString();
|
||||
string imageName = "pack://application:,,,/CRSim.ScreenSimulator;component/Assets/ChengduShuangliuAirport/logo-GTJT.png";
|
||||
if (!string.IsNullOrEmpty(trainNumber) && (trainNumber.StartsWith('G') || trainNumber.StartsWith('C') || trainNumber.StartsWith('D')))
|
||||
{
|
||||
int probability = trainNumber.GetHashCode() % 2;
|
||||
if (probability == 1)
|
||||
{
|
||||
imageName = "pack://application:,,,/CRSim.ScreenSimulator;component/Assets/ChengduShuangliuAirport/logo-CR.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
imageName = "pack://application:,,,/CRSim.ScreenSimulator;component/Assets/ChengduShuangliuAirport/logo-CRH.png";
|
||||
}
|
||||
}
|
||||
var image = new System.Windows.Media.Imaging.BitmapImage();
|
||||
image.BeginInit();
|
||||
image.UriSource = new Uri(imageName, UriKind.Absolute);
|
||||
image.CacheOption = System.Windows.Media.Imaging.BitmapCacheOption.OnLoad;
|
||||
image.EndInit();
|
||||
return image;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,6 +128,17 @@
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"UniqueId": "ChengduShuangliuAirport.SecondaryScreen",
|
||||
"Title": "成都双流机场次要看板",
|
||||
"Region": "成都",
|
||||
"Author": "电排骨",
|
||||
"Type": "车站大屏",
|
||||
"Parameters": [
|
||||
"Station",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"UniqueId": "Shanghai.OutsideScreen",
|
||||
"Title": "上海站站外看板",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.ChengduShuangliuAirport
|
||||
{
|
||||
public class SecondaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
public SecondaryScreenViewModel(ITimeService timeService, ISettingsService settingsService)
|
||||
: base(timeService, settingsService)
|
||||
{
|
||||
Text = $"国内航班截载时间为起飞前{settingsService.GetSettings().StopCheckInAdvanceDuration.TotalMinutes}分钟。";
|
||||
ItemsPerPage = 7;
|
||||
PageCount = 1;
|
||||
StationType = StationType.Departure;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,15 @@ namespace CRSim.ScreenSimulator.ViewModels
|
||||
_timeService.RefreshSecondsElapsed += RefreshDisplay;
|
||||
Initialize();
|
||||
}
|
||||
public int CurrentPageIndex = 0;
|
||||
[ObservableProperty]
|
||||
private int _currentPageIndex = 0;
|
||||
public int PagesCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Min((int)Math.Ceiling((double)TrainInfo.Count / ItemsPerPage * PageCount.Value),_settings.MaxPages);
|
||||
}
|
||||
}
|
||||
public int ItemsPerPage = 1;
|
||||
|
||||
//<summary>
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
<views:BaseScreenView x:Class="CRSim.ScreenSimulator.Views.ChengduShuangliuAirport.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.ScreenSimulator.Views.ChengduShuangliuAirport"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
xmlns:views="clr-namespace:CRSim.ScreenSimulator.Views"
|
||||
FontFamily="黑体" FontSize="20" Foreground="White">
|
||||
<views:BaseScreenView.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#203063" Offset="0.0" />
|
||||
<GradientStop Color="#203063" Offset="0.2" />
|
||||
<GradientStop Color="#1B3592" Offset="0.55" />
|
||||
<GradientStop Color="#203063" Offset="0.8" />
|
||||
<GradientStop Color="#203063" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</views:BaseScreenView.Background>
|
||||
<Window.Resources>
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=", " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainNumberToImageConverter x:Key="TrainNumberToImageConverter" />
|
||||
<converters:IntAddOneConverter x:Key="IntAddOneConverter" />
|
||||
<converters:ChineseToPinyinConverter x:Key="ChineseToPinyinConverter" Upper="True"/>
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正常 Normal" CheckInText="正在登机 Boarding" StopCheckInText="关闭 PSG FULL"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#289CFF" CheckingTicketsColor="#FF6A1D" StopCheckingTicketsColor="#4456BE"/>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Padding" Value="0,4"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Background" Value="#203063"/>
|
||||
</Style>
|
||||
<Style x:Key="CommonHeaderStyle" TargetType="TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="Foreground" Value="#7EB0FE"/>
|
||||
</Style>
|
||||
<Style x:Key="CommonTextBlockStyle" TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="Foreground" Value="#C3E2FB"/>
|
||||
</Style>
|
||||
<Style x:Key="CommonRowStyle" TargetType="DataGridRow">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="AlternationIndex" Value="0">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#203063">
|
||||
<Border CornerRadius="12,12,0,0" Background="#2C407E">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="1">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#2C407E">
|
||||
<Border CornerRadius="12,12,0,0" Background="#23315D">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="2">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#23315D">
|
||||
<Border CornerRadius="12,12,0,0" Background="#2C407E">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="3">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#2C407E">
|
||||
<Border CornerRadius="12,12,0,0" Background="#23315D">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="4">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#23315D">
|
||||
<Border CornerRadius="12,12,0,0" Background="#2C407E">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="5">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#2C407E">
|
||||
<Border CornerRadius="12,12,0,0" Background="#23315D">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="AlternationIndex" Value="6">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Border Background="#23315D">
|
||||
<Border CornerRadius="12" Background="#2C407E">
|
||||
<DataGridCellsPresenter />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Border CornerRadius="0,0,20,20">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Color="#2463EF" Offset="0.0" />
|
||||
<GradientStop Color="#289CFF" Offset="0.45" />
|
||||
<GradientStop Color="#289CFF" Offset="0.55" />
|
||||
<GradientStop Color="#2463EF" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,6">
|
||||
<Image Height="38" Width="38" Margin="0,0,12,0"
|
||||
Source="/CRSim.ScreenSimulator;component/Assets/ChengduShuangliuAirport/planetakingoff.png"/>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding ThisStation.Name,StringFormat={}{0}出港航班动态}" FontSize="26"/>
|
||||
<TextBlock Text="{Binding ThisStation.Name,Converter={StaticResource ChineseToPinyinConverter},StringFormat={}{0} DEPARTURE FLIGHTS}" FontSize="17" FontFamily="Wasco Sans"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<views:BaseDataGrid ItemsSource="{Binding ScreenA}" RowHeight="51" Margin="8,0"
|
||||
RowStyle="{StaticResource CommonRowStyle}" AlternationCount="7">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="56">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Width="26" Height="26" Margin="0,0,8,0" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
Source="{Binding TrainNumber, Converter={StaticResource TrainNumberToImageConverter}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding TrainNumber}" MinWidth="110">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}, Path=ActualWidth}">
|
||||
<TextBlock Text="航班号" Style="{StaticResource CommonHeaderStyle}" Margin="0,0,25,0"/>
|
||||
<TextBlock Text="Flight" Style="{StaticResource CommonHeaderStyle}" FontFamily="Wasco Sans" FontSize="14" Margin="0,0,25,0"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonTextBlockStyle}">
|
||||
<Setter Property="FontFamily" Value="Tahoma"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding DepartureTime, Converter={StaticResource DateTimeToStringConverter}}" MinWidth="110">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}, Path=ActualWidth}">
|
||||
<TextBlock Text="时间" Style="{StaticResource CommonHeaderStyle}"/>
|
||||
<TextBlock Text="Time" Style="{StaticResource CommonHeaderStyle}" FontFamily="Wasco Sans" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonTextBlockStyle}">
|
||||
<Setter Property="FontFamily" Value="Tahoma"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn MinWidth="305">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}, Path=ActualWidth}">
|
||||
<TextBlock Text="终点/经停站" Style="{StaticResource CommonHeaderStyle}"/>
|
||||
<TextBlock Text="To/Via" Style="{StaticResource CommonHeaderStyle}" FontFamily="Wasco Sans" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonTextBlockStyle}">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="FontFamily" Value="微软雅黑"/>
|
||||
<Setter Property="Text">
|
||||
<Setter.Value>
|
||||
<MultiBinding StringFormat="{}{0} {1}">
|
||||
<Binding Path="Terminal"/>
|
||||
<Binding Path="Terminal" Converter="{StaticResource ChineseToPinyinConverter}" />
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}" MinWidth="66">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}, Path=ActualWidth}">
|
||||
<TextBlock Text="登机口" Style="{StaticResource CommonHeaderStyle}"/>
|
||||
<TextBlock Text="Gate" Style="{StaticResource CommonHeaderStyle}" FontFamily="Wasco Sans" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonTextBlockStyle}">
|
||||
<Setter Property="Foreground" Value="#F0EE9F"/>
|
||||
<Setter Property="FontFamily" Value="Tahoma"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTemplateColumn MinWidth="230">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}, Path=ActualWidth}">
|
||||
<TextBlock Text="状态" Style="{StaticResource CommonHeaderStyle}"/>
|
||||
<TextBlock Text="Status" Style="{StaticResource CommonHeaderStyle}" FontFamily="Wasco Sans" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border VerticalAlignment="Center" HorizontalAlignment="Center" Width="176" Height="30" CornerRadius="12">
|
||||
<Border.Background>
|
||||
<MultiBinding Converter="{StaticResource TrainStateColorConverter}">
|
||||
<Binding Path="ArrivalTime" />
|
||||
<Binding Path="DepartureTime" />
|
||||
<Binding Path="State" />
|
||||
</MultiBinding>
|
||||
</Border.Background>
|
||||
<TextBlock Foreground="#C3E2FB" FontFamily="微软雅黑" TextAlignment="Center" FontSize="18" VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Mode="OneWay" Converter="{StaticResource TrainStateConverter}">
|
||||
<Binding Path="ArrivalTime" />
|
||||
<Binding Path="DepartureTime" />
|
||||
<Binding Path="State" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</views:BaseDataGrid>
|
||||
<Grid Margin="12,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding Text}" Foreground="#C3E2FB"/>
|
||||
<Rectangle Grid.Column="2" Width="1" Height="16" Stroke="#C3E2FB" Margin="0,0,20,0"/>
|
||||
<TextBlock Grid.Column="3" Foreground="#C3E2FB">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}页码/Page {0}/{1}">
|
||||
<Binding Path="CurrentPageIndex">
|
||||
<Binding.Converter>
|
||||
<converters:IntAddOneConverter/>
|
||||
</Binding.Converter>
|
||||
</Binding>
|
||||
<Binding Path="PagesCount" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</views:BaseScreenView>
|
||||
@@ -0,0 +1,15 @@
|
||||
using CRSim.ScreenSimulator.ViewModels.ChengduShuangliuAirport;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Views.ChengduShuangliuAirport
|
||||
{
|
||||
public partial class SecondaryScreenView : BaseScreenView
|
||||
{
|
||||
public SecondaryScreenViewModel ViewModel { get; }
|
||||
public SecondaryScreenView(SecondaryScreenViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = viewModel;
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user