diff --git a/.github/ISSUE_TEMPLATE/NewScreenStyle.yml b/.github/ISSUE_TEMPLATE/NewScreenStyle.yml
new file mode 100644
index 0000000..606cbfd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/NewScreenStyle.yml
@@ -0,0 +1,58 @@
+name: 新样式请求
+description: 提出一种新的屏幕样式
+title: (将此栏【替换】为你的屏幕名称 例:无锡站站外大屏)
+labels: ["新样式"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ 感谢您贡献您的想法。请在上面的文本框⬆️起一个能够清晰概括此样式的标题,便于开发者了解您的想法。
+
+ > [!important]
+ > 重要:如果您想要提出 **多项样式**,请为每一个样式开一个单独的 issue。
+ >
+ > 由于开发者时间精力有限,加上已经积压了大量的样式请求,提交的样式请求可能需要比较久的时间才能实现。
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: 检查清单
+ description: 在开始反馈这个问题之前,请先检查:
+ options:
+ - label: 我已将本应用更新到最新测试版 ,并看过 [最新提交](https://github.com/denglihong2007/CRSim/commits/dev/),确认我想要的样式还没有实现。我也已在 [Issues](https://github.com/denglihong2007/CRSim/issues?q=-label%3ABug) 确认我想要的样式未被提交过。
+ required: true
+ - label: 我已经仔细阅读过选项里的内容,并且知道这个选项不用勾选。
+ - label: 我已知晓由于开发者时间精力有限,加上已经积压了大量的样式请求,我提交的样式请求可能需要比较久的时间才能实现。
+ required: true
+ - type: input
+ id: stationName
+ attributes:
+ label: 站名
+ description:
+ placeholder: 无锡站
+ validations:
+ required: false
+ - type: dropdown
+ id: screentype
+ attributes:
+ label: 想要请求的新样式种类
+ options:
+ - 站外屏
+ - 站内屏
+ - 检票口屏
+ - 廊桥屏
+ - 站台屏
+ - 出站口屏
+ - type: markdown
+ attributes:
+ label: 上传图片
+ value: |
+ > [!note]
+ > 上传附件时**请优先使用 GitHub 的附件系统上传附件**,将需要上传的附件粘贴或拖动到撰写区域即可上传。多个文件可打包为 zip 格式后上传。**尽量避免使用需要登陆或安装客户端才能接收附件的网盘(如\*度网盘、\*克网盘、1\*3网盘等)上传附件**,以避免开发者因不具有对应网盘客户端或账户而延误问题诊断。
+ - type: checkboxes
+ id: revision
+ attributes:
+ label: 最后一步
+ description: 回顾您的回答
+ options:
+ - label: 我认为上述的描述已经足以详细,以便开发人员理解您想要的功能。如果我的 issue 没有按照上述的要求填写,可能会被无条件关闭。
+ required: true
diff --git a/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs b/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs
index 9dd658b..382f2a4 100644
--- a/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs
+++ b/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs
@@ -30,18 +30,26 @@ namespace CRSim.ScreenSimulator.Converters
// 到达模式或关键数据缺失
if (DisplayMode == "Arrive" || (values.Length > 1 && values[1] == null))
{
-
+
+
if (values[0] is DateTime arriveTime){
- if (values[2] is TimeSpan state){
- // arriveTime += TimeSpan.FromMinutes(state.TotalMinutes);
- if (now >= arriveTime){
- if (state.TotalMinutes > 0)
- return string.Format(ArrivedLateText, ToHourMinuteString(state));
- return ArrivedText;
- }else{
- if (state.TotalMinutes > 0)
- return string.Format(ArrivingLateText, ToHourMinuteString(state));
- return ArrivingText;
+ if (values.Length > 1)
+ {
+ if (values[2] is TimeSpan state)
+ {
+ // arriveTime += TimeSpan.FromMinutes(state.TotalMinutes);
+ if (now >= arriveTime)
+ {
+ if (state.TotalMinutes > 0)
+ return string.Format(ArrivedLateText, ToHourMinuteString(state));
+ return ArrivedText;
+ }
+ else
+ {
+ if (state.TotalMinutes > 0)
+ return string.Format(ArrivingLateText, ToHourMinuteString(state));
+ return ArrivingText;
+ }
}
}
return now >= arriveTime? ArrivedText : ArrivingText;
diff --git a/CRSim/Assets/HomeHeaderTiles/GalleryHeaderImage.jpg b/CRSim/Assets/HomeHeaderTiles/GalleryHeaderImage-Republic.jpg
similarity index 100%
rename from CRSim/Assets/HomeHeaderTiles/GalleryHeaderImage.jpg
rename to CRSim/Assets/HomeHeaderTiles/GalleryHeaderImage-Republic.jpg
diff --git a/CRSim/CRSim.csproj b/CRSim/CRSim.csproj
index eb09d00..f14fed8 100644
--- a/CRSim/CRSim.csproj
+++ b/CRSim/CRSim.csproj
@@ -167,4 +167,4 @@
0
zh-CN
-
\ No newline at end of file
+
diff --git a/CRSim/Controls/HomePageHeader.xaml b/CRSim/Controls/HomePageHeader.xaml
index 4091dc9..f86f608 100644
--- a/CRSim/Controls/HomePageHeader.xaml
+++ b/CRSim/Controls/HomePageHeader.xaml
@@ -63,11 +63,24 @@
x:Name="ImageGrid"
Margin="0,-100,0,0"
Background="{ThemeResource BackgroundGradient}">
-
+
+
+
+
+
+
+
diff --git a/CRSim/Controls/HomePageHeader.xaml.cs b/CRSim/Controls/HomePageHeader.xaml.cs
index 55f9013..87ad03e 100644
--- a/CRSim/Controls/HomePageHeader.xaml.cs
+++ b/CRSim/Controls/HomePageHeader.xaml.cs
@@ -2,9 +2,28 @@ namespace CRSim.Controls;
public sealed partial class HomePageHeader : UserControl
{
+ public List CarouselImages { get; set; }
+ private DispatcherTimer _timer;
public HomePageHeader()
{
InitializeComponent();
+ CarouselImages = new List
+ {
+ "ms-appx:///Assets/HomeHeaderTiles/GalleryHeaderImage-Republic.jpg"
+ };
+ this.DataContext = this;
+
+ _timer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(5)
+ };
+ _timer.Tick += (s, e) =>
+ {
+ var total = HeroImageFlipView.Items.Count;
+ var next = (HeroImageFlipView.SelectedIndex + 1) % total;
+ HeroImageFlipView.SelectedIndex = next;
+ };
+ _timer.Start();
}
}
\ No newline at end of file
diff --git a/CRSim/MainWindow.xaml b/CRSim/MainWindow.xaml
index 99e7808..4a20075 100644
--- a/CRSim/MainWindow.xaml
+++ b/CRSim/MainWindow.xaml
@@ -49,16 +49,17 @@
-
-
-
-
-
+
+
+
+
+
+