Show episode count for each season

This commit is contained in:
2020-03-12 22:24:44 +01:00
parent 62d98b054b
commit 7bd44091cf
5 changed files with 10 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ namespace EstusShots.Gtk
new DataColumnText(nameof(Enemy.Seasons))
{
Title = "Game",
DisplayConverter = seasons => string.Join(", ", ((IEnumerable<Season>) seasons).Select(x => x.Game))
DisplayConverter = seasons => ((IEnumerable<Season>) seasons)?.Select(x => x.Game).StringJoin(", ")
}
};
_enemiesControl = new BindableListControl<Enemy>(columns, nameof(Enemy.EnemyId), _enemiesTreeView);

View File

@@ -116,7 +116,8 @@ namespace EstusShots.Gtk
new DataColumnText(nameof(Season.End))
{
DisplayConverter = date => (date as DateTime?)?.ToString("dd.MM.yyyy") ?? "Ongoing"
}
},
new DataColumnText(nameof(Season.EpisodeCount)) {Title = "Episode Count"}
};
SeasonsControl = new BindableListControl<Season>(columns, nameof(Season.SeasonId), SeasonsView);
SeasonsControl.SelectionChanged += SeasonsControlSelectionChanged;