mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-09 02:56:00 +08:00
feat: #169 添加成都双流机场次要看板
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user