mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-13 04:55:43 +08:00
66
CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj
Normal file
66
CRSim.ScreenSimulator/CRSim.ScreenSimulator.csproj
Normal file
@@ -0,0 +1,66 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
|
||||
<PackageReference Include="PP.Wpf" Version="1.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CRSim.Core\CRSim.Core.csproj" />
|
||||
<ProjectReference Include="..\CRSim.Shared\CRSim.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\Windows\Stations\Ankang\ExitScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\BeijingXi\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\ChengduDong\PrimaryTicketCheckScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\ChengduDong\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\ChengduMetro\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\GuangdongIntercity\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Guangyuan\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Hanzhong\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Harbin\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Jinanxi\SmallScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Shanghai\OutsideScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Tianjin\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Zibo\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Zibo\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Converters
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class LandmarkToStringConverter : IValueConverter
|
||||
{
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace CRSim.Converters
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class LocationToStringConverter : IMultiValueConverter
|
||||
{
|
||||
@@ -1,4 +1,11 @@
|
||||
namespace CRSim.Converters
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class MetroDateTimeToStringConverter : IValueConverter
|
||||
{
|
||||
@@ -1,4 +1,11 @@
|
||||
namespace CRSim.Converters
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class MetroDateTimeToVisibilityConverter : IValueConverter
|
||||
{
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Converters
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class NumberToStringConverter : IValueConverter
|
||||
{
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Converters
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class TextSpacingConverter : IValueConverter
|
||||
{
|
||||
@@ -1,4 +1,11 @@
|
||||
namespace CRSim.Converters
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class TrainStateColorConverter : IMultiValueConverter
|
||||
{
|
||||
@@ -1,4 +1,11 @@
|
||||
namespace CRSim.Converters
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class TrainStateConverter : IMultiValueConverter
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace CRSim.Models
|
||||
namespace CRSim.ScreenSimulator.Models
|
||||
{
|
||||
public class TrainInfo
|
||||
{
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace CRSim.ViewModels
|
||||
namespace CRSim.ScreenSimulator.ViewModels
|
||||
{
|
||||
public partial class ScreenViewModel : ObservableObject
|
||||
{
|
||||
@@ -1,4 +1,10 @@
|
||||
namespace CRSim.ViewModels.Ankang
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using CRSim.Core.Models;
|
||||
using System.Windows;
|
||||
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Ankang
|
||||
{
|
||||
public class ExitScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.BeijingXi
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.BeijingXi
|
||||
{
|
||||
public class PrimaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.ChengduDong
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.ChengduDong
|
||||
{
|
||||
public class PrimaryTicketCheckScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.ChengduDong
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using System.Windows;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.ChengduDong
|
||||
{
|
||||
public class SecondaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace CRSim.ViewModels.ChengduMetro
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.ChengduMetro
|
||||
{
|
||||
public partial class PlatformScreenViewModel : ObservableObject
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Fuzhou
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using CRSim.Core.Models;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Fuzhou
|
||||
{
|
||||
public class TicketCheckScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace CRSim.ViewModels.GuangdongIntercity
|
||||
using System.Windows;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.GuangdongIntercity
|
||||
{
|
||||
public class SecondaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Guangyuan
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using CRSim.Core.Models;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Guangyuan
|
||||
{
|
||||
public class OutsideScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace CRSim.ViewModels.Hanzhong
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Hanzhong
|
||||
{
|
||||
public class PlatformScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Harbin
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Harbin
|
||||
{
|
||||
public class PrimaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Jinanxi
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Jinanxi
|
||||
{
|
||||
public class SmallScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Shanghai
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Shanghai
|
||||
{
|
||||
public class OutsideScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace CRSim.ViewModels.Tianjin
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Tianjin
|
||||
{
|
||||
public class PlatformScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Zibo
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Zibo
|
||||
{
|
||||
public class PrimaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace CRSim.ViewModels.Zibo
|
||||
using CRSim.Core.Models;
|
||||
using CRSim.Core.Services;
|
||||
using CRSim.ScreenSimulator.Models;
|
||||
using System.Windows;
|
||||
using System.Collections.ObjectModel;
|
||||
namespace CRSim.ScreenSimulator.ViewModels.Zibo
|
||||
{
|
||||
public class SecondaryScreenViewModel : ScreenViewModel
|
||||
{
|
||||
@@ -1,20 +1,21 @@
|
||||
<Window x:Class="CRSim.Views.Ankang.ExitScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Ankang.ExitScreenView"
|
||||
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.Ankang"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Ankang"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" ResizeMode="NoResize" MouseDown="Window_MouseDown"
|
||||
FontFamily="微软雅黑" FontSize="20">
|
||||
<Window.Resources>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=" - " />
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=" - " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正点"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#76C1FF"/>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
@@ -155,7 +156,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Background="#0484DB" Margin="6,6,0,4">
|
||||
<TextBlock FontFamily="{StaticResource SymbolThemeFontFamily}" Text=""
|
||||
<TextBlock FontFamily="Segoe Fluent Icons" Text=""
|
||||
VerticalAlignment="Center" Margin="4,2" Foreground="#9AFFFF"
|
||||
FontWeight="Bold" FontSize="15"/>
|
||||
<TextBlock Text="温馨提示" VerticalAlignment="Center" Margin="0,2,2,2"
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Ankang;
|
||||
using CRSim.ScreenSimulator.ViewModels.Ankang;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Ankang
|
||||
namespace CRSim.ScreenSimulator.Views.Ankang
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,18 +1,19 @@
|
||||
<Window x:Class="CRSim.Views.BeijingXi.PrimaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.BeijingXi.PrimaryScreenView"
|
||||
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.BeijingXi"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.BeijingXi"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown"
|
||||
ResizeMode="NoResize" MouseDown="Window_MouseDown">
|
||||
<Window.Resources>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator="" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator="" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正在候车"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#CDDBFF"/>
|
||||
<converters:TextSpacingConverter x:Key="TextSpacingConverter" />
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.BeijingXi;
|
||||
using CRSim.ScreenSimulator.ViewModels.BeijingXi;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.BeijingXi
|
||||
namespace CRSim.ScreenSimulator.Views.BeijingXi
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.ChengduDong.PrimaryTicketCheckScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.ChengduDong.PrimaryTicketCheckScreenView"
|
||||
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.ChengduDong"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.ChengduDong"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="等线" FontSize="20" FontWeight="Bold"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="#0036DF"
|
||||
@@ -22,9 +23,9 @@
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正在候车"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter"/>
|
||||
<converters:LandmarkToStringConverter x:Key="LandmarkToStringConverter"/>
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:NumberToStringConverter x:Key="NumberToStringConverter"/>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False"
|
||||
@@ -1,6 +1,8 @@
|
||||
using CRSim.ViewModels.ChengduDong;
|
||||
|
||||
namespace CRSim.Views.ChengduDong
|
||||
using CRSim.ScreenSimulator.ViewModels.ChengduDong;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
namespace CRSim.ScreenSimulator.Views.ChengduDong
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.ChengduDong.SecondaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.ChengduDong.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.ChengduDong"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.ChengduDong"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown"
|
||||
@@ -18,9 +19,9 @@
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator="" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator="" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" />
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" />
|
||||
</Window.Resources>
|
||||
@@ -114,7 +115,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource TicketCheckConverter}}" MinWidth="150">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource ListToStringConverter}}" MinWidth="150">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -298,7 +299,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource TicketCheckConverter}}" MinWidth="150">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource ListToStringConverter}}" MinWidth="150">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.ChengduDong;
|
||||
using CRSim.ScreenSimulator.ViewModels.ChengduDong;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.ChengduDong
|
||||
namespace CRSim.ScreenSimulator.Views.ChengduDong
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,22 +1,22 @@
|
||||
<Window x:Class="CRSim.Views.ChengduMetro.PlatformScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.ChengduMetro.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.Views.ChengduMetro"
|
||||
xmlns:controls="clr-namespace:CRSim.Controls"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.ChengduMetro"
|
||||
xmlns:pp="https://www.cnblogs.com/pumbaa"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters" xmlns:system="clr-namespace:System;assembly=netstandard"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" FontFamily="DengXian" FontWeight="SemiBold"
|
||||
ResizeMode="NoResize" MouseDown="Window_MouseDown">
|
||||
<Window.Resources>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToWeekdayConverter" Format="dddd" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToDateConverter" Format="yyyy-MM-dd" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToWeekdayEnglishConverter" Format="ddd" Culture="en-US"/>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToTimeConverter" Format="HH:mm:ss" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToWeekdayConverter" Format="dddd" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToDateConverter" Format="yyyy-MM-dd" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToWeekdayEnglishConverter" Format="ddd" Culture="en-US"/>
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToTimeConverter" Format="HH:mm:ss" />
|
||||
<converters:MetroDateTimeToVisibilityConverter x:Key="MetroDateTimeToVisibilityConverter"/>
|
||||
<converters:MetroDateTimeToStringConverter x:Key="MetroDateTimeToStringConverter"/>
|
||||
</Window.Resources>
|
||||
@@ -1,8 +1,9 @@
|
||||
using CRSim.ViewModels.ChengduMetro;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Animation;
|
||||
using CRSim.ScreenSimulator.ViewModels.ChengduMetro;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.ChengduMetro
|
||||
namespace CRSim.ScreenSimulator.Views.ChengduMetro
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.Fuzhou.TicketCheckScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Fuzhou.TicketCheckScreenView"
|
||||
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.Fuzhou"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Fuzhou"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="黑体" FontSize="20" FontWeight="Bold"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="Black"
|
||||
@@ -25,8 +26,8 @@
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#FFF150"/>
|
||||
<converters:LandmarkToStringConverter x:Key="LandmarkToStringConverter"/>
|
||||
<converters:NumberToStringConverter x:Key="NumberToStringConverter"/>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy-MM-dd HH:mm:ss" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Orientation="Vertical" Background="#545863">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Fuzhou;
|
||||
using CRSim.ScreenSimulator.ViewModels.Fuzhou;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Fuzhou
|
||||
namespace CRSim.ScreenSimulator.Views.Fuzhou
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,22 +1,23 @@
|
||||
<Window x:Class="CRSim.Views.GuangdongIntercity.SecondaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.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.GuangdongIntercity"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.GuangdongIntercity"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" ResizeMode="NoResize" MouseDown="Window_MouseDown"
|
||||
FontFamily="黑体" FontSize="18">
|
||||
<Window.Resources>
|
||||
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=" - " />
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringWeekdayConverter" Format="dddd" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringDateConverter" Format="yyyy/M/d" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=" - " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringWeekdayConverter" Format="dddd" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringDateConverter" Format="yyyy/M/d" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#ffffff" CheckingTicketsColor="#00ff00" StopCheckingTicketsColor="#ff0000"/>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
@@ -168,7 +169,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource TicketCheckConverter}}" MinWidth="100">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}" MinWidth="100">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Zibo;
|
||||
using CRSim.ScreenSimulator.ViewModels.GuangdongIntercity;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Zibo
|
||||
namespace CRSim.ScreenSimulator.Views.GuangdongIntercity
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.Guangyuan.PrimaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Guangyuan.PrimaryScreenView"
|
||||
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.Guangyuan"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Guangyuan"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="Microsoft YaHei" FontWeight="Bold"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="Black"
|
||||
@@ -19,10 +20,10 @@
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator="" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="HH:mm:ss" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringDateConverter" Format="yyyy/MM/dd" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator="" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="HH:mm:ss" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringDateConverter" Format="yyyy/MM/dd" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正点"/>
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -77,7 +78,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource TicketCheckConverter}}" MinWidth="70">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks, Converter={StaticResource ListToStringConverter}}" MinWidth="70">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="检票口" HorizontalAlignment="Stretch" Padding="3"
|
||||
@@ -1,6 +1,8 @@
|
||||
using CRSim.ViewModels.Guangyuan;
|
||||
|
||||
namespace CRSim.Views.Guangyuan
|
||||
using CRSim.ScreenSimulator.ViewModels.Guangyuan;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
namespace CRSim.ScreenSimulator.Views.Guangyuan
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,18 +1,19 @@
|
||||
<Window x:Class="CRSim.Views.Hanzhong.PlatformScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Hanzhong.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.Views.Hanzhong"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Hanzhong"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="黑体" FontSize="20"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="#0028BD"
|
||||
KeyDown="Window_KeyDown"
|
||||
ResizeMode="NoResize" MouseDown="Window_MouseDown">
|
||||
<Window.Resources>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Vertical" Margin="4,8,4,0">
|
||||
<Border Background="#0089FF" CornerRadius="8">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Tianjin;
|
||||
using CRSim.ScreenSimulator.ViewModels.Hanzhong;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Tianjin
|
||||
namespace CRSim.ScreenSimulator.Views.Hanzhong
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,20 +1,21 @@
|
||||
<Window x:Class="CRSim.Views.Harbin.PrimaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Harbin.PrimaryScreenView"
|
||||
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.Harbin"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Harbin"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" ResizeMode="NoResize" MouseDown="Window_MouseDown"
|
||||
FontFamily="黑体" FontSize="20">
|
||||
<Window.Resources>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=" - " />
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy/MM/dd HH:mm:ss" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=" - " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringTimeConverter" Format="yyyy/MM/dd HH:mm:ss" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正点"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#76C1FF"/>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
@@ -138,7 +139,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource TicketCheckConverter}}" MinWidth="72">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}" MinWidth="72">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -264,7 +265,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource TicketCheckConverter}}" MinWidth="72">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}" MinWidth="72">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Harbin;
|
||||
using CRSim.ScreenSimulator.ViewModels.Harbin;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Harbin
|
||||
namespace CRSim.ScreenSimulator.Views.Harbin
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.Jinanxi.SmallScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Jinanxi.SmallScreenView"
|
||||
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.Jinanxi"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Jinanxi"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" ResizeMode="NoResize" MouseDown="Window_MouseDown"
|
||||
@@ -14,9 +15,9 @@
|
||||
<SolidColorBrush x:Key="WhiteBorderBrush" Color="White"/>
|
||||
<SolidColorBrush x:Key="BuleBorderBrush" Color="#46b4ff" />
|
||||
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=" - " />
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=" - " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正在候车"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#ffffff" CheckingTicketsColor="#00ff00" StopCheckingTicketsColor="#ff0000"/>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
@@ -165,7 +166,7 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource TicketCheckConverter}}" MinWidth="100">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}" MinWidth="100">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=DataGridColumnHeader}}">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Jinanxi;
|
||||
using CRSim.ScreenSimulator.ViewModels.Jinanxi;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Jinanxi
|
||||
namespace CRSim.ScreenSimulator.Views.Jinanxi
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.Shanghai.OutsideScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Shanghai.OutsideScreenView"
|
||||
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.Shanghai"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Shanghai"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="黑体"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="Black"
|
||||
@@ -19,8 +20,8 @@
|
||||
<Setter Property="BorderBrush" Value="Black"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator="" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator="" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="候 车" CheckInText="检 票" StopCheckInText="停 检"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="LightYellow"/>
|
||||
</Window.Resources>
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Shanghai;
|
||||
using CRSim.ScreenSimulator.ViewModels.Shanghai;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Shanghai
|
||||
namespace CRSim.ScreenSimulator.Views.Shanghai
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,18 +1,19 @@
|
||||
<Window x:Class="CRSim.Views.Tianjin.PlatformScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Tianjin.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.Views.Tianjin"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Tianjin"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.ScreenSimulator.Converters"
|
||||
xmlns:converters1="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
FontFamily="黑体" FontSize="28"
|
||||
Title="引导屏" SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" AllowsTransparency="True" Background="Black"
|
||||
KeyDown="Window_KeyDown"
|
||||
ResizeMode="NoResize" MouseDown="Window_MouseDown">
|
||||
<Window.Resources>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:LocationToStringConverter x:Key="LocationToStringConverter" />
|
||||
</Window.Resources>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Hanzhong;
|
||||
using CRSim.ScreenSimulator.ViewModels.Tianjin;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Hanzhong
|
||||
namespace CRSim.ScreenSimulator.Views.Tianjin
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
@@ -1,11 +1,12 @@
|
||||
<Window x:Class="CRSim.Views.Zibo.PrimaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Zibo.PrimaryScreenView"
|
||||
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.Zibo"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Zibo"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown"
|
||||
@@ -18,8 +19,8 @@
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator="" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator="" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter" />
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="white" CheckingTicketsColor="#1ce048" StopCheckingTicketsColor="#df0122"/>
|
||||
</Window.Resources>
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.Zibo;
|
||||
using CRSim.ScreenSimulator.ViewModels.Zibo;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.Zibo
|
||||
namespace CRSim.ScreenSimulator.Views.Zibo
|
||||
{
|
||||
/// <summary>
|
||||
/// PrimaryScreen.xaml 的交互逻辑
|
||||
@@ -1,19 +1,20 @@
|
||||
<Window x:Class="CRSim.Views.Zibo.SecondaryScreenView"
|
||||
<Window x:Class="CRSim.ScreenSimulator.Views.Zibo.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.Zibo"
|
||||
xmlns:local="clr-namespace:CRSim.ScreenSimulator.Views.Zibo"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
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"
|
||||
KeyDown="Window_KeyDown" ResizeMode="NoResize" MouseDown="Window_MouseDown"
|
||||
FontFamily="等线" FontSize="16">
|
||||
<Window.Resources>
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=" - " />
|
||||
<converters:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters1:ListToStringConverter x:Key="ListToStringConverter" Separator=" - " />
|
||||
<converters1:EmptyToVisibilityConverter x:Key="EmptyToVisibilityConverter" />
|
||||
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:TrainStateConverter x:Key="TrainStateConverter"/>
|
||||
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="#ffffff" CheckingTicketsColor="#85ff3f" StopCheckingTicketsColor="#ff0200" />
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
@@ -1,6 +1,9 @@
|
||||
using CRSim.ViewModels.GuangdongIntercity;
|
||||
using CRSim.ScreenSimulator.ViewModels.Zibo;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CRSim.Views.GuangdongIntercity
|
||||
namespace CRSim.ScreenSimulator.Views.Zibo
|
||||
{
|
||||
/// <summary>
|
||||
/// SecondaryScreen.xaml 的交互逻辑
|
||||
10
CRSim.Shared/CRSim.Shared.csproj
Normal file
10
CRSim.Shared/CRSim.Shared.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace CRSim.Converters
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Shared.Converters
|
||||
{
|
||||
public class DateTimeToStringConverter : IValueConverter
|
||||
{
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace CRSim.Converters
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Shared.Converters
|
||||
{
|
||||
public class EmptyToVisibilityConverter : IValueConverter
|
||||
{
|
||||
@@ -1,6 +1,9 @@
|
||||
namespace CRSim.Converters
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Shared.Converters
|
||||
{
|
||||
public class TicketCheckConverter : IValueConverter
|
||||
public class ListToStringConverter : IValueConverter
|
||||
{
|
||||
public string Separator { get; set; } = ""; // 默认分隔符是双引号间隔
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace CRSim.Converters
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.Shared.Converters
|
||||
{
|
||||
public class TimeSpanToStringConverter : IValueConverter
|
||||
{
|
||||
17
CRSim.sln
17
CRSim.sln
@@ -1,12 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.12.35424.110 d17.12
|
||||
VisualStudioVersion = 17.12.35424.110
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRSim", "CRSim\CRSim.csproj", "{E16F847C-9278-42F5-ACDD-9FC96B45FFCF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRSim.Core", "CRSim.Core\CRSim.Core.csproj", "{C72B16CC-AA3E-4E0F-A424-07D3987A9FD9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRSim.ScreenSimulator", "CRSim.ScreenSimulator\CRSim.ScreenSimulator.csproj", "{BB0CE1B3-BE9E-42E7-A15E-EDD5AC531134}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CRSim.Shared", "CRSim.Shared\CRSim.Shared.csproj", "{C7153862-390F-404C-BC75-31D4F68A57BC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -21,8 +25,19 @@ Global
|
||||
{C72B16CC-AA3E-4E0F-A424-07D3987A9FD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C72B16CC-AA3E-4E0F-A424-07D3987A9FD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C72B16CC-AA3E-4E0F-A424-07D3987A9FD9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BB0CE1B3-BE9E-42E7-A15E-EDD5AC531134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BB0CE1B3-BE9E-42E7-A15E-EDD5AC531134}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BB0CE1B3-BE9E-42E7-A15E-EDD5AC531134}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BB0CE1B3-BE9E-42E7-A15E-EDD5AC531134}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C7153862-390F-404C-BC75-31D4F68A57BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C7153862-390F-404C-BC75-31D4F68A57BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C7153862-390F-404C-BC75-31D4F68A57BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C7153862-390F-404C-BC75-31D4F68A57BC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {93427FA9-CDA9-4093-98DC-B68FD973B48B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -35,36 +35,36 @@
|
||||
services.AddTransient<ScreenSimulationPage>();
|
||||
services.AddTransient<ScreenSimulationPageViewModel>();
|
||||
|
||||
services.AddTransient<ViewModels.ChengduDong.SecondaryScreenViewModel>();
|
||||
services.AddTransient<Views.ChengduDong.SecondaryScreenView>();
|
||||
services.AddTransient<ViewModels.ChengduDong.PrimaryTicketCheckScreenViewModel>();
|
||||
services.AddTransient<Views.ChengduDong.PrimaryTicketCheckScreenView>();
|
||||
services.AddTransient<ViewModels.BeijingXi.PrimaryScreenViewModel>();
|
||||
services.AddTransient<Views.BeijingXi.PrimaryScreenView>();
|
||||
services.AddTransient<ViewModels.Harbin.PrimaryScreenViewModel>();
|
||||
services.AddTransient<Views.Harbin.PrimaryScreenView>();
|
||||
services.AddTransient<ViewModels.Guangyuan.OutsideScreenViewModel>();
|
||||
services.AddTransient<Views.Guangyuan.PrimaryScreenView>();
|
||||
services.AddTransient<ViewModels.ChengduMetro.PlatformScreenViewModel>();
|
||||
services.AddTransient<Views.ChengduMetro.PlatformScreenView>();
|
||||
services.AddTransient<ViewModels.Shanghai.OutsideScreenViewModel>();
|
||||
services.AddTransient<Views.Shanghai.OutsideScreenView>();
|
||||
services.AddTransient<ViewModels.Hanzhong.PlatformScreenViewModel>();
|
||||
services.AddTransient<Views.Hanzhong.PlatformScreenView>();
|
||||
services.AddTransient<ViewModels.Zibo.PrimaryScreenViewModel>();
|
||||
services.AddTransient<Views.Zibo.PrimaryScreenView>();
|
||||
services.AddTransient<ViewModels.Zibo.SecondaryScreenViewModel>();
|
||||
services.AddTransient<Views.Zibo.SecondaryScreenView>();
|
||||
services.AddTransient<ViewModels.Jinanxi.SmallScreenViewModel>();
|
||||
services.AddTransient<Views.Jinanxi.SmallScreenView>();
|
||||
services.AddTransient<ViewModels.GuangdongIntercity.SecondaryScreenViewModel>();
|
||||
services.AddTransient<Views.GuangdongIntercity.SecondaryScreenView>();
|
||||
services.AddTransient<ViewModels.Tianjin.PlatformScreenViewModel>();
|
||||
services.AddTransient<Views.Tianjin.PlatformScreenView>();
|
||||
services.AddTransient<ViewModels.Fuzhou.TicketCheckScreenViewModel>();
|
||||
services.AddTransient<Views.Fuzhou.TicketCheckScreenView>();
|
||||
services.AddTransient<ViewModels.Ankang.ExitScreenViewModel>();
|
||||
services.AddTransient<Views.Ankang.ExitScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.ChengduDong.SecondaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.ChengduDong.SecondaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.ChengduDong.PrimaryTicketCheckScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.ChengduDong.PrimaryTicketCheckScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.BeijingXi.PrimaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.BeijingXi.PrimaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Harbin.PrimaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Harbin.PrimaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Guangyuan.OutsideScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Guangyuan.PrimaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.ChengduMetro.PlatformScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.ChengduMetro.PlatformScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Shanghai.OutsideScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Shanghai.OutsideScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Hanzhong.PlatformScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Hanzhong.PlatformScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Zibo.PrimaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Zibo.PrimaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Zibo.SecondaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Zibo.SecondaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Jinanxi.SmallScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Jinanxi.SmallScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.GuangdongIntercity.SecondaryScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.GuangdongIntercity.SecondaryScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Tianjin.PlatformScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Tianjin.PlatformScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Fuzhou.TicketCheckScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Fuzhou.TicketCheckScreenView>();
|
||||
services.AddTransient<ScreenSimulator.ViewModels.Ankang.ExitScreenViewModel>();
|
||||
services.AddTransient<ScreenSimulator.Views.Ankang.ExitScreenView>();
|
||||
}).Build();
|
||||
|
||||
[STAThread]
|
||||
|
||||
@@ -66,54 +66,13 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.3" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
|
||||
<PackageReference Include="PP.Wpf" Version="1.0.8" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CRSim.Core\CRSim.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\Windows\Stations\BeijingXi\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Guangyuan\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\ChengduMetro\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\ChengduDong\PrimaryTicketCheckScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Ankang\ExitScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Tianjin\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Hanzhong\PlatformScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Harbin\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Shanghai\OutsideScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Zibo\PrimaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Zibo\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\Jinanxi\SmallScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Views\Windows\Stations\GuangdongIntercity\SecondaryScreenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<ProjectReference Include="..\CRSim.ScreenSimulator\CRSim.ScreenSimulator.csproj" />
|
||||
<ProjectReference Include="..\CRSim.Shared\CRSim.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CRSim"
|
||||
xmlns:converterss="clr-namespace:CRSim.Converters"
|
||||
xmlns:converterss="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
Title="{Binding ViewModel.ApplicationTitle}"
|
||||
d:DataContext="{d:DesignInstance local:MainWindow, IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="650"
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace CRSim.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
string type = $"CRSim.Views.{Station}.{StyleName}";
|
||||
return _assembly.GetType(type);
|
||||
string type = $"CRSim.ScreenSimulator.Views.{Station}.{StyleName}";
|
||||
return Assembly.Load("CRSim.ScreenSimulator").GetType(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,6 @@ namespace CRSim.Models
|
||||
{
|
||||
return Title;
|
||||
}
|
||||
|
||||
private static readonly Assembly _assembly = typeof(StylesInfoDataItem).Assembly;
|
||||
}
|
||||
|
||||
public sealed class StylesInfoDataSource
|
||||
|
||||
@@ -55,19 +55,19 @@
|
||||
[RelayCommand]
|
||||
public void Unload()
|
||||
{
|
||||
UpdateSettings(_timeOffset, value => _settings.TimeOffset = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(DepartureCheckInAdvanceDuration, value => _settings.DepartureCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(PassingCheckInAdvanceDuration, value => _settings.PassingCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopDisplayUntilDepartureDuration, value => _settings.StopDisplayUntilDepartureDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopDisplayFromArrivalDuration, value => _settings.StopDisplayFromArrivalDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopCheckInAdvanceDuration, value => _settings.StopCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(MaxPages, value => _settings.MaxPages = value);
|
||||
UpdateSettings(SwitchPageSeconds, value => _settings.SwitchPageSeconds = value);
|
||||
UpdateSettings(TimeOffset, true, value => _settings.TimeOffset = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(DepartureCheckInAdvanceDuration, false, value => _settings.DepartureCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(PassingCheckInAdvanceDuration, false, value => _settings.PassingCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopDisplayUntilDepartureDuration, false, value => _settings.StopDisplayUntilDepartureDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopDisplayFromArrivalDuration, false, value => _settings.StopDisplayFromArrivalDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(StopCheckInAdvanceDuration, false, value => _settings.StopCheckInAdvanceDuration = TimeSpan.FromMinutes(value));
|
||||
UpdateSettings(MaxPages, false, value => _settings.MaxPages = value);
|
||||
UpdateSettings(SwitchPageSeconds, false, value => _settings.SwitchPageSeconds = value);
|
||||
_settingsService.SaveSettings();
|
||||
}
|
||||
private void UpdateSettings(string input, Action<int> updateAction)
|
||||
private void UpdateSettings(string input,bool allowNegative, Action<int> updateAction)
|
||||
{
|
||||
if (int.TryParse(input, out int value) && value >= 0)
|
||||
if (int.TryParse(input, out int value) && (allowNegative || value >= 0))
|
||||
{
|
||||
updateAction(value);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:CRSim.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:converters="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
Title="StationManagementPage"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
@@ -17,7 +17,7 @@
|
||||
>
|
||||
<Page.Resources>
|
||||
<converters:TimeSpanToStringConverter x:Key="TimeSpanToStringConverter" />
|
||||
<converters:TicketCheckConverter x:Key="TicketCheckConverter" Separator=", " />
|
||||
<converters:ListToStringConverter x:Key="ListToStringConverter" Separator=", " />
|
||||
<Style BasedOn="{StaticResource {x:Type DataGrid}}" x:Key="CustomDataGridStyle" TargetType="DataGrid">
|
||||
<Setter Property="CellStyle">
|
||||
<Setter.Value>
|
||||
@@ -602,7 +602,7 @@
|
||||
<TextBlock Text="发时" Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource TicketCheckConverter}}">
|
||||
<DataGridTextColumn Binding="{Binding TicketChecks,Converter={StaticResource ListToStringConverter}}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="检票口" Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
|
||||
@@ -1,326 +1,18 @@
|
||||
<Page
|
||||
IsEnabled="False"
|
||||
x:Class="CRSim.Views.TrainNumberManagementPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:CRSim.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:CRSim.Views"
|
||||
xmlns:converters="clr-namespace:CRSim.Converters"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:CRSim.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:CRSim.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:converters="clr-namespace:CRSim.Shared.Converters;assembly=CRSim.Shared"
|
||||
Title="TrainNumberManagementPage"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
FontFamily="Microsoft YaHei"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
|
||||
<converters:EmptyToVisibilityConverter x:Key="IntToVisibilityConverter"/>
|
||||
</Page.Resources>
|
||||
<Grid x:Name="ContentPagePane" Height="Auto">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:PageHeader Margin="0,0,0,32" Title="{Binding ViewModel.PageTitle}" Description="{Binding ViewModel.PageDescription}"/>
|
||||
<Grid Grid.Row="1" Margin="0,0,0,24">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Menu Grid.Row="0" Margin="0,0,0,8">
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<MenuItem Header="从路路通导入" FontSize="14">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.ImportFromLulutongCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
<MenuItem Header="从模拟广播系统导入" FontSize="14">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.ImportFromLulutongCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.DeleteAllTrainNumbersCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
<Separator/>
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.AddTrainNumberCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.DeleteTrainNumberCommand}" CommandParameter="{Binding SelectedItem,ElementName=NumbersList}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<ProgressBar Grid.Row="1" Value="{Binding ViewModel.ProgressValue}" Visibility="{Binding ViewModel.ProgressValue,Converter={StaticResource IntToVisibilityConverter}}"
|
||||
Width="{Binding ActualWidth,ElementName=grid}"/>
|
||||
<Border Grid.Row="2" Background="{DynamicResource SolidBackgroundFillColorBaseBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}" BorderThickness="1" CornerRadius="4">
|
||||
<ScrollViewer VerticalAlignment="Stretch">
|
||||
<ListView PreviewMouseWheel="NumbersList_PreviewMouseWheel" x:Name="NumbersList" ItemsSource="{Binding ViewModel.NumbersList}" SelectionMode="Single">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.NumberSelectedCommand}"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=NumbersList}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Column="1" Margin="0,0,0,24" Padding="0,0,24,0">
|
||||
<Grid Margin="12,0,0,0" IsEnabled="{Binding ViewModel.IsSelected}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Expander Grid.Row="0">
|
||||
<Expander.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Width="20" Height="20" Margin="10,5,10,5"
|
||||
VerticalAlignment="Center" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
Text="" FontSize="20"/>
|
||||
<StackPanel Grid.Column="1" Margin="12" Orientation="Vertical">
|
||||
<TextBlock Text="信息一览" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}">
|
||||
概览此车次基本信息
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<Grid Margin="48,0,48,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="车次号:" Margin="0,0,12,12"
|
||||
Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ViewModel.SelectedTrainNumber.Number}"
|
||||
Style="{StaticResource DetailTextBlockStyle}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="停站数:" Margin="0,0,12,12"
|
||||
Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding ViewModel.TrainStopsList.Count}"
|
||||
Style="{StaticResource DetailTextBlockStyle}"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="运行总时长:" Margin="0,0,12,0"
|
||||
Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding ViewModel.RunningTime}"
|
||||
Style="{StaticResource DetailTextBlockStyle}"/>
|
||||
</Grid>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
<Expander Margin="0,4,0,0" Grid.Row="1">
|
||||
<Expander.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Width="20" Height="20" Margin="10,5,10,5"
|
||||
VerticalAlignment="Center" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
Text="" FontSize="20"/>
|
||||
<StackPanel Grid.Column="1" Margin="12" Orientation="Vertical">
|
||||
<TextBlock Text="时刻表管理" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}">
|
||||
编辑此车次的时刻表
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<StackPanel Orientation="Vertical" Margin="48,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Menu Grid.Column="1" HorizontalContentAlignment="Right">
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.EditTrainStopCommand}" CommandParameter="{Binding SelectedItem,ElementName=TrainStopsList}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.GetTrainStopsOnlineCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.AddTrainStopCommand}" CommandParameter="{Binding SelectedItem,ElementName=TrainStopsList}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<MenuItem.Header>
|
||||
<TextBlock Focusable="False" FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" Text="" VerticalAlignment="Center"/>
|
||||
</MenuItem.Header>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ViewModel.DeleteTrainStopCommand}" CommandParameter="{Binding SelectedItem,ElementName=TrainStopsList}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</Grid>
|
||||
<DataGrid ItemsSource="{Binding ViewModel.TrainStopsList}" AutoGenerateColumns="False"
|
||||
CanUserAddRows="False" CanUserResizeRows="False" SelectionMode="Single"
|
||||
GridLinesVisibility="Vertical" x:Name="TrainStopsList" IsReadOnly="True"
|
||||
HeadersVisibility="Column" CanUserSortColumns="False" FontFamily="Microsoft YaHei">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding Station}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="车站名" Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ArrivalTime,Converter={StaticResource DateTimeToStringConverter}}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="到时" Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding DepartureTime,Converter={StaticResource DateTimeToStringConverter}}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="发时" Opacity="0.7" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#F6F6F6"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#F6F6F6"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
<Border Grid.Row="2" Background="{DynamicResource ExpanderHeaderBackground}" Margin="0,4,0,0"
|
||||
BorderBrush="{DynamicResource ExpanderHeaderBorderBrush}" BorderThickness="{StaticResource ExpanderBorderThemeThickness}"
|
||||
Padding="{StaticResource ExpanderPadding}" CornerRadius="{DynamicResource ControlCornerRadius}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Width="20" Height="20" Text="" FontSize="20"
|
||||
Margin="10,5,10,5" VerticalAlignment="Center" FontFamily="{StaticResource SymbolThemeFontFamily}"/>
|
||||
<StackPanel
|
||||
Grid.Column="1" Margin="12" Orientation="Vertical">
|
||||
<TextBlock Text="保存车次配置" FontSize="14" Style="{StaticResource BodyTextBlockStyle}"/>
|
||||
<TextBlock Opacity="0.7" FontSize="12" Style="{StaticResource CaptionTextBlockStyle}">请再次检查各项配置是否正确</TextBlock>
|
||||
</StackPanel>
|
||||
<Button HorizontalAlignment="Right" Margin="10" Grid.Column="2" Command="{Binding ViewModel.SaveChangesCommand}"
|
||||
FontFamily="Microsoft YaHei" FontSize="14" Style="{DynamicResource AccentButtonStyle}" Content="保存配置" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d"
|
||||
>
|
||||
</Page>
|
||||
|
||||
@@ -10,14 +10,4 @@ public partial class TrainNumberManagementPage : Page
|
||||
DataContext = this;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void NumbersList_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||
{
|
||||
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
|
||||
{
|
||||
RoutedEvent = UIElement.MouseWheelEvent,
|
||||
Source = sender
|
||||
};
|
||||
NumbersList.RaiseEvent(eventArg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user