mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-11 20:29:45 +08:00
feat: 自定义站台占用图车次颜色
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CRSim.Core.Models
|
||||
namespace CRSim.Core.Models
|
||||
{
|
||||
public class Json
|
||||
{
|
||||
|
||||
14
CRSim.Core/Models/PlatformDiagram/TrainColor.cs
Normal file
14
CRSim.Core/Models/PlatformDiagram/TrainColor.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using CRSim.Core.Converters;
|
||||
using System.Drawing;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace CRSim.Core.Models.PlatformDiagram
|
||||
{
|
||||
public class TrainColor
|
||||
{
|
||||
public required string Prefix { get; set; }
|
||||
|
||||
[JsonConverter(typeof(ColorJsonConverter))]
|
||||
public required Color Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
using CRSim.Core.Abstractions;
|
||||
using CRSim.Core.Converters;
|
||||
using CRSim.Core.Models.PlatformDiagram;
|
||||
using CRSim.Core.Services;
|
||||
using System.Drawing;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace CRSim.Core.Models
|
||||
@@ -29,5 +32,18 @@ namespace CRSim.Core.Models
|
||||
public string UserKey { get; set; } = "";
|
||||
public bool LoadTodayOnly { get; set; } = false;
|
||||
public bool ReopenUnclosedScreensOnLoad { get; set; } = true;
|
||||
|
||||
public List<TrainColor> TrainColors { get; set; } =
|
||||
[
|
||||
new TrainColor { Prefix = "G", Color = Color.Magenta },
|
||||
new TrainColor { Prefix = "D", Color = Color.SteelBlue },
|
||||
new TrainColor { Prefix = "C", Color = Color.Teal },
|
||||
new TrainColor { Prefix = "T", Color = Color.Blue },
|
||||
new TrainColor { Prefix = "Z", Color = Color.SaddleBrown },
|
||||
new TrainColor { Prefix = "K", Color = Color.Red },
|
||||
new TrainColor { Prefix = "Y", Color = Color.Red },
|
||||
new TrainColor { Prefix = "L", Color = Color.Green },
|
||||
new TrainColor { Prefix = "默认", Color = Color.Green }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CRSim.Core.Models
|
||||
namespace CRSim.Core.Models
|
||||
{
|
||||
public class Station
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user