mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
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:
parent
32c650c053
commit
392f01cb3e
2 changed files with 4 additions and 2 deletions
|
@ -674,7 +674,7 @@ namespace PKHeX.WinForms
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -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<ComboItem> items)
|
||||
{
|
||||
InitializeComponent();
|
||||
CB_Game.DisplayMember = nameof(ComboItem.Text);
|
||||
|
|
Loading…
Reference in a new issue