GTK: Show seasons for enemies in grid

This commit is contained in:
2020-03-12 22:10:27 +01:00
parent 3247ba17b8
commit 62d98b054b

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EstusShots.Gtk.Controls;
using EstusShots.Gtk.Dialogs;
@@ -24,7 +25,12 @@ namespace EstusShots.Gtk
{
new DataColumnText(nameof(Enemy.Name)),
new DataColumnBool(nameof(Enemy.Boss)) {Title = "Is Boss?"},
new DataColumnBool(nameof(Enemy.Defeated)){Title = "Defeated?"}
new DataColumnBool(nameof(Enemy.Defeated)) {Title = "Defeated?"},
new DataColumnText(nameof(Enemy.Seasons))
{
Title = "Game",
DisplayConverter = seasons => string.Join(", ", ((IEnumerable<Season>) seasons).Select(x => x.Game))
}
};
_enemiesControl = new BindableListControl<Enemy>(columns, nameof(Enemy.EnemyId), _enemiesTreeView);