From 392f01cb3edfd6fc6f0e00b965f3a4e41c665e8b Mon Sep 17 00:00:00 2001 From: Evan Dixon Date: Mon, 5 Feb 2018 14:12:42 -0600 Subject: [PATCH] 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. --- PKHeX.WinForms/MainWindow/Main.cs | 2 +- PKHeX.WinForms/Subforms/Save Editors/SAV_GameSelect.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index 91c1ab9cf..8f7d1f325 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -674,7 +674,7 @@ private static GameVersion SelectMemoryCardSaveGame(SAV3GCMemoryCard MC) if (MC.HasRSBOX) games.Add(new ComboItem { Text = "RS Box", Value = (int)GameVersion.RSBOX }); 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(); return dialog.Result; } diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_GameSelect.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_GameSelect.cs index d9a894a27..17b0b34aa 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_GameSelect.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_GameSelect.cs @@ -1,5 +1,7 @@ using System; using System.Collections; +using System.Collections.Generic; +using System.Linq; using System.Windows.Forms; using PKHeX.Core; @@ -8,7 +10,7 @@ namespace PKHeX.WinForms public partial class SAV_GameSelect : Form { public GameVersion Result = GameVersion.Invalid; - public SAV_GameSelect(IEnumerable items) + public SAV_GameSelect(IEnumerable items) { InitializeComponent(); CB_Game.DisplayMember = nameof(ComboItem.Text);