diff --git a/pk3DS/Subforms/MEE.cs b/pk3DS/Subforms/MEE.cs index a5b81e5..4fda137 100644 --- a/pk3DS/Subforms/MEE.cs +++ b/pk3DS/Subforms/MEE.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.IO; using System.Linq; using System.Media; using System.Text; using System.Windows.Forms; -using pk3DS.Properties; namespace pk3DS { @@ -22,7 +20,6 @@ public partial class MEE : Form private ComboBox[] forme_spec, item_spec; private CheckBox[] checkbox_spec; private PictureBox[][] picturebox_spec; - private List monNames; private bool loaded; private string[][] AltForms; int entry = -1; @@ -49,16 +46,10 @@ public partial class MEE : Form } private void Setup() { - monNames = new List(); List temp_list = new List(specieslist); temp_list.Sort(); - foreach (string mon in temp_list) - { - Util.cbItem ncbi = new Util.cbItem {Text = mon, Value = Array.IndexOf(specieslist, mon)}; - monNames.Add(ncbi); - } - CB_Species.DataSource = monNames; + CB_Species.DataSource = temp_list.Select(mon => new Util.cbItem { Text = mon, Value = Array.IndexOf(specieslist, mon) }).ToList(); List items = new List(itemlist); List sorted_items = new List(itemlist); @@ -122,7 +113,7 @@ private void getEntry() for (int i = 0; i < 3; i++) { checkbox_spec[i].Checked = (me.Method[i] == 1); - item_spec[i].SelectedValue = me.Argument[i]; + item_spec[i].SelectedValue = (int)me.Argument[i]; forme_spec[i].SelectedIndex = me.Form[i]; } }