diff --git a/EstusShots.Gtk/Controls/BindableListControl.cs b/EstusShots.Gtk/Controls/BindableListControl.cs index 3c7004b..3d3b364 100644 --- a/EstusShots.Gtk/Controls/BindableListControl.cs +++ b/EstusShots.Gtk/Controls/BindableListControl.cs @@ -84,7 +84,7 @@ namespace EstusShots.Gtk.Controls $"Property '{column.PropertyName}' does not exist on Type '{item.GetType()}'"); var val = prop.GetValue(item); if (column.Format != null) val = column.Format(val); - row.Add(val.ToString()); + row.Add(val); } // The key value must be the first value in the row diff --git a/EstusShots.Gtk/Controls/DataColumn.cs b/EstusShots.Gtk/Controls/DataColumn.cs index 135a8cf..b03900c 100644 --- a/EstusShots.Gtk/Controls/DataColumn.cs +++ b/EstusShots.Gtk/Controls/DataColumn.cs @@ -11,7 +11,7 @@ namespace EstusShots.Gtk.Controls Reorderable = true; } - public DataColumn(string propertyName) + public DataColumn(string propertyName) : this() { PropertyName = propertyName; Title = propertyName; diff --git a/EstusShots.Gtk/Pages/PlayersPage.cs b/EstusShots.Gtk/Pages/PlayersPage.cs index 2b2128d..50d9dbb 100644 --- a/EstusShots.Gtk/Pages/PlayersPage.cs +++ b/EstusShots.Gtk/Pages/PlayersPage.cs @@ -28,8 +28,8 @@ namespace EstusShots.Gtk { new DataColumn(nameof(Player.Name)), new DataColumn(nameof(Player.Alias)), + new DataColumn(nameof(Player.Anonymous)) {Title = "Is Anonymous?", FixedWidth = 120}, new DataColumn(nameof(Player.HexId)) {Title = "Hex ID"}, - new DataColumn(nameof(Player.Anonymous)) {Title = "Is Anonymous?", FixedWidth = 30} }; PlayersControl = new BindableListControl(columns, nameof(Player.PlayerId), PlayersTreeView); PlayersControl.OnSelectionChanged += PlayersControlOnOnSelectionChanged;