Fix build error (#1816)

IEnumerable doesn't support LINQ methods, only the generic variant does. So this commit changes SAV_GameSelect's parameter to a generic IEnumerable of the only type being passed into it. I didn't realize it until afterward, but this is 100% the way it should have been because the databinding members expect ComboItems.
This commit is contained in:
Evan Dixon 2018-02-05 14:12:42 -06:00 committed by Kurt
parent 32c650c053
commit 392f01cb3e
2 changed files with 4 additions and 2 deletions

View file

@ -674,7 +674,7 @@ namespace PKHeX.WinForms
if (MC.HasRSBOX) games.Add(new ComboItem { Text = "RS Box", Value = (int)GameVersion.RSBOX }); if (MC.HasRSBOX) games.Add(new ComboItem { Text = "RS Box", Value = (int)GameVersion.RSBOX });
WinFormsUtil.Alert("Multiple games detected", "Select a game to edit."); WinFormsUtil.Alert("Multiple games detected", "Select a game to edit.");
var dialog = new SAV_GameSelect(games.ToArray()); var dialog = new SAV_GameSelect(games);
dialog.ShowDialog(); dialog.ShowDialog();
return dialog.Result; return dialog.Result;
} }

View file

@ -1,5 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using PKHeX.Core; using PKHeX.Core;
@ -8,7 +10,7 @@ namespace PKHeX.WinForms
public partial class SAV_GameSelect : Form public partial class SAV_GameSelect : Form
{ {
public GameVersion Result = GameVersion.Invalid; public GameVersion Result = GameVersion.Invalid;
public SAV_GameSelect(IEnumerable items) public SAV_GameSelect(IEnumerable<ComboItem> items)
{ {
InitializeComponent(); InitializeComponent();
CB_Game.DisplayMember = nameof(ComboItem.Text); CB_Game.DisplayMember = nameof(ComboItem.Text);