コード例 #1
0
ファイル: Util.cs プロジェクト: bailie1912/pk3DS
        internal static List <cbItem> getVariedCBList(List <cbItem> cbList, string[] inStrings, int[] stringNum, int[] stringVal)
        {
            // Set up
            List <cbItem> newlist = new List <cbItem>();

            for (int i = 4; i > 1; i--) // add 4,3,2
            {
                // First 3 Balls are always first
                cbItem ncbi = new cbItem
                {
                    Text  = inStrings[i],
                    Value = i
                };
                newlist.Add(ncbi);
            }

            // Sort the Rest based on String Name
            string[] ballnames = new string[stringNum.Length];
            for (int i = 0; i < stringNum.Length; i++)
            {
                ballnames[i] = inStrings[stringNum[i]];
            }

            string[] sortedballs = new string[stringNum.Length];
            Array.Copy(ballnames, sortedballs, ballnames.Length);
            Array.Sort(sortedballs);

            // Add the rest of the balls
            newlist.AddRange(sortedballs.Select(t => new cbItem
            {
                Text = t, Value = stringVal[Array.IndexOf(ballnames, t)]
            }));
            return(newlist);
        }
コード例 #2
0
        internal static List <cbItem> getCBList(string[] inStrings, params int[][] allowed)
        {
            List <cbItem> cbList = new List <cbItem>();

            if (allowed == null)
            {
                allowed = new int[][] { Enumerable.Range(0, inStrings.Length).ToArray() }
            }
            ;

            foreach (int[] list in allowed)
            {
                // Sort the Rest based on String Name
                string[] unsortedChoices = new string[list.Length];
                for (int i = 0; i < list.Length; i++)
                {
                    unsortedChoices[i] = inStrings[list[i]];
                }

                string[] sortedChoices = new string[unsortedChoices.Length];
                Array.Copy(unsortedChoices, sortedChoices, unsortedChoices.Length);
                Array.Sort(sortedChoices);

                // Add the rest of the items
                for (int i = 0; i < sortedChoices.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedChoices[i];
                    ncbi.Value = list[Array.IndexOf(unsortedChoices, sortedChoices[i])];
                    cbList.Add(ncbi);
                }
            }
            return(cbList);
        }
コード例 #3
0
        private void getLangStrings()
        {
            // Memory Chooser
            string[] memories = new string[64];
            int[]    allowed  = new int[64];
            for (int i = 0; i < 64; i++)
            {
                memories[i] = Form1.memories[39 + i];
                allowed[i]  = i + 1;
            }
            List <cbItem> memory_list = getComboBoxItems2(memories, allowed);
            cbItem        def         = new cbItem();

            def.Text  = Form1.memories[38 + 0];
            def.Value = 0;
            memory_list.Insert(0, def);

            CB_OTMemory.DataSource    = memory_list;
            CB_OTMemory.DisplayMember = "Text";
            CB_OTMemory.ValueMember   = "Value";

            var mem1_list = new BindingSource(memory_list, null);

            CB_CTMemory.DataSource    = mem1_list;
            CB_CTMemory.DisplayMember = "Text";
            CB_CTMemory.ValueMember   = "Value";

            // Quality Chooser
            CB_CTQual.Items.Clear();
            CB_OTQual.Items.Clear();
            for (int i = 0; i < 7; i++)
            {
                CB_CTQual.Items.Add(Form1.memories[2 + i]);
                CB_OTQual.Items.Add(Form1.memories[2 + i]);
            }

            // Feeling Chooser
            CB_CTFeel.Items.Clear();
            CB_OTFeel.Items.Clear();
            for (int i = 0; i < 24; i++)
            {
                CB_CTFeel.Items.Add(Form1.memories[10 + i]);
                CB_OTFeel.Items.Add(Form1.memories[10 + i]);
            }
        }
コード例 #4
0
        internal static List <cbItem> getUnsortedCBList(string textfile)
        {
            // Set up
            List <cbItem> cbList = new List <cbItem>();

            string[] inputCSV = Util.getSimpleStringList(textfile);

            // Gather our data from the input file
            for (int i = 1; i < inputCSV.Length; i++)
            {
                string[] inputData = inputCSV[i].Split(',');
                cbItem   ncbi      = new cbItem();
                ncbi.Value = Convert.ToInt32(inputData[0]);
                ncbi.Text  = inputData[1];
                cbList.Add(ncbi);
            }
            return(cbList);
        }
コード例 #5
0
        private List <cbItem> getComboBoxItems2(string[] list, int[] allowed)
        {
            List <cbItem> combolist = new List <cbItem>();

            // Sort the Rest based on String Name
            string[] sorter = new string[list.Length];
            Array.Copy(list, sorter, list.Length);
            Array.Sort(sorter);

            for (int i = 0; i < sorter.Length; i++)
            {
                int locnum = Array.IndexOf(list, sorter[i]);
                if (locnum >= 0)        // If the given text is allowed (if found, >0)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sorter[i];
                    ncbi.Value = allowed[locnum];
                    combolist.Add(ncbi);
                }
            }
            return(combolist);
        }
コード例 #6
0
ファイル: BmpForm.cs プロジェクト: ratzlaff/XCom-tools
        private void guess()
        {
            if (bmp != null && cbTypes.Items.Count > 0)
            {
                cbItem cbSel = null;
                foreach (cbItem cb in cbTypes.Items)
                {
                    XCom.Interfaces.IXCImageFile xcf = cb.itm;

                    if ((bmp.Width + 1) % (xcf.ImageSize.Width + 1) == 0 && (bmp.Height + 1) % (xcf.ImageSize.Height + 1) == 0)
                    {
                        cbSel = cb;
                        break;
                    }
                }

                if (cbSel != null)
                {
                    cbTypes.SelectedItem = cbSel;
                }
            }
        }
コード例 #7
0
        internal static List <cbItem> getCBList(string textfile, string lang)
        {
            // Set up
            List <cbItem> cbList = new List <cbItem>();

            string[] inputCSV = Util.getSimpleStringList(textfile);

            // Get Language we're fetching for
            int index = Array.IndexOf(new string[] { "ja", "en", "fr", "de", "it", "es", "ko", "zh", }, lang);

            // Set up our Temporary Storage
            string[] unsortedList = new string[inputCSV.Length - 1];
            int[]    indexes      = new int[inputCSV.Length - 1];

            // Gather our data from the input file
            for (int i = 1; i < inputCSV.Length; i++)
            {
                string[] countryData = inputCSV[i].Split(',');
                indexes[i - 1]      = Convert.ToInt32(countryData[0]);
                unsortedList[i - 1] = countryData[index + 1];
            }

            // Sort our input data
            string[] sortedList = new string[inputCSV.Length - 1];
            Array.Copy(unsortedList, sortedList, unsortedList.Length);
            Array.Sort(sortedList);

            // Arrange the input data based on original number
            for (int i = 0; i < sortedList.Length; i++)
            {
                cbItem ncbi = new cbItem();
                ncbi.Text  = sortedList[i];
                ncbi.Value = indexes[Array.IndexOf(unsortedList, sortedList[i])];
                cbList.Add(ncbi);
            }
            return(cbList);
        }
コード例 #8
0
        internal static List <cbItem> getOffsetCBList(List <cbItem> cbList, string[] inStrings, int offset, int[] allowed)
        {
            if (allowed == null)
            {
                allowed = Enumerable.Range(0, inStrings.Length).ToArray();
            }

            int[] list = (int[])allowed.Clone();
            for (int i = 0; i < list.Length; i++)
            {
                list[i] -= offset;
            }

            {
                // Sort the Rest based on String Name
                string[] unsortedChoices = new string[allowed.Length];
                for (int i = 0; i < allowed.Length; i++)
                {
                    unsortedChoices[i] = inStrings[list[i]];
                }

                string[] sortedChoices = new string[unsortedChoices.Length];
                Array.Copy(unsortedChoices, sortedChoices, unsortedChoices.Length);
                Array.Sort(sortedChoices);

                // Add the rest of the items
                for (int i = 0; i < sortedChoices.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedChoices[i];
                    ncbi.Value = allowed[Array.IndexOf(unsortedChoices, sortedChoices[i])];
                    cbList.Add(ncbi);
                }
            }
            return(cbList);
        }
コード例 #9
0
        private void setup()
        {
            dataGridView1.Rows.Clear();
            dataGridView1.Columns.Clear();
            #region Species
            {
                List <cbItem> species_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] sortedspecies = new string[specieslist.Length];
                Array.Copy(specieslist, sortedspecies, specieslist.Length);
                Array.Sort(sortedspecies);

                // Add the rest of the items
                for (int i = 0; i < sortedspecies.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedspecies[i];
                    ncbi.Value = Array.IndexOf(specieslist, sortedspecies[i]);
                    species_list.Add(ncbi);
                }
                CB_Species.DisplayMember = "Text";
                CB_Species.ValueMember   = "Value";
                CB_Species.DataSource    = species_list;

                CB_S2.DisplayMember = "Text";
                CB_S2.ValueMember   = "Value";
                CB_S2.DataSource    = new BindingSource(species_list, null);
            }
            #endregion
            listBox1.SelectedIndex = 0;
            fillTrainingBags();

            CB_S2.SelectedValue = (int)BitConverter.ToUInt16(sav, offsetSpec + 4 * 30);
            TB_Time1.Text       = BitConverter.ToSingle(sav, offsetTime + 4 * 30).ToString();
            TB_Time2.Text       = BitConverter.ToSingle(sav, offsetTime + 4 * 31).ToString();
        }
コード例 #10
0
        private void Setup()
        {
            // Clear Listbox and ComboBox
            try
            {
                LB_Species.Items.Clear();
                CB_Species.Items.Clear();
            }
            catch { }

            // Fill List
            #region Species
            {
                List <cbItem> species_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] sortedspecies = new string[Form1.specieslist.Length];
                Array.Copy(Form1.specieslist, sortedspecies, Form1.specieslist.Length);
                Array.Sort(sortedspecies);

                // Add the rest of the items
                for (int i = 0; i < sortedspecies.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedspecies[i];
                    ncbi.Value = Array.IndexOf(Form1.specieslist, sortedspecies[i]);
                    species_list.Add(ncbi);
                }
                species_list.RemoveAt(0); // Remove 0th Entry
                CB_Species.DisplayMember = "Text";
                CB_Species.ValueMember   = "Value";
                CB_Species.DataSource    = species_list;
            }
            #endregion

            for (int i = 1; i < Form1.specieslist.Length; i++)
            {
                LB_Species.Items.Add(i.ToString("000") + " - " + Form1.specieslist[i]);
            }
            for (int i = 722; i <= 0x300; i++)
            {
                LB_Species.Items.Add(i.ToString("000") + " - ???");
            }

            // Fill Bit arrays
            for (int i = 0; i < 0xA; i++)
            {
                byte[] data = new Byte[0x60];
                Array.Copy(sav, dexoffset + 0x8 + 0x60 * i, data, 0, 0x60);
                BitArray BitRegion = new BitArray(data);
                for (int b = 0; b < (0x60 * 8); b++)
                {
                    specbools[i, b] = BitRegion[b];
                }
            }

            // Fill Language arrays
            byte[] langdata = new Byte[0x280];
            Array.Copy(sav, dexoffset + 0x400, langdata, 0, 0x280);
            BitArray LangRegion = new BitArray(langdata);
            for (int b = 0; b < (721); b++) // 721 Species
            {
                for (int i = 0; i < 7; i++) // 7 Languages
                {
                    langbools[i, b] = LangRegion[7 * b + i];
                }
            }

            // Fill Foreign array
            {
                byte[] foreigndata = new Byte[0x52];
                Array.Copy(sav, dexoffset + 0x688, foreigndata, 0, 0x52);
                BitArray ForeignRegion = new BitArray(foreigndata);
                for (int b = 0; b < (0x52 * 8); b++)
                {
                    foreignbools[b] = ForeignRegion[b];
                }
            }
        }
コード例 #11
0
        private void getMemoryArguments(string ARG, ComboBox sender)
        {
            List <cbItem> argvals = new List <cbItem>();

            #region General Locations
            // add general locations
            int[] allowed = { };
            allowed = new int[62];
            for (int i = 0; i < 62; i++)
            {
                allowed[i] = i;
            }
            List <cbItem> genloc = getComboBoxItems(Form1.genloc, allowed);
            #endregion
            #region Items
            allowed = new int[697]
            {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
                50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
                100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 116, 117, 118, 119, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
                150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
                200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
                250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
                300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
                350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
                400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
                450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
                500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
                550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
                600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
                650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
                700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717
            };
            List <cbItem> item_list = getComboBoxItems(Form1.itemlist, allowed);
            #endregion
            List <cbItem> species_list = (List <cbItem>)m_parent.CB_Species.DataSource;

            // Met Locations for Pokecenters healing
            allowed = new int[] {
                2, 6, 8, 10, 12, 14, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168,
            };
            List <cbItem> locationXY = getComboBoxItems(Form1.metXY_00000, allowed);
            #region Moves

            List <cbItem> move_list = new List <cbItem>();
            // Sort the Rest based on String Name
            string[] sortedmoves = new string[Form1.movelist.Length];
            Array.Copy(Form1.movelist, sortedmoves, Form1.movelist.Length);
            Array.Sort(sortedmoves);

            // Add the rest of the items
            for (int i = 0; i < sortedmoves.Length; i++)
            {
                cbItem ncbi = new cbItem();
                ncbi.Text  = sortedmoves[i];
                ncbi.Value = Array.IndexOf(Form1.movelist, sortedmoves[i]);
                move_list.Add(ncbi);
            }

            #endregion
            string vs      = "";
            bool   enabled = true;
            if (ARG == "NONE")
            {
                enabled = false;
                vs      = "";
            }
            else if (ARG == "PKM")
            {
                argvals = species_list;
                vs      = vartypes[0];
            }
            else if (ARG == "GENLOC")
            {
                argvals = genloc;
                vs      = vartypes[1];
            }
            else if (ARG == "ITEM")
            {
                argvals = item_list;
                vs      = vartypes[2];
            }
            else if (ARG == "MOVE")
            {
                argvals = move_list;
                vs      = vartypes[3];
            }
            else if (ARG == "LOCATION")
            {
                argvals = locationXY;
                vs      = vartypes[4];
            }

            if (sender == CB_CTMemory)
            {
                List <cbItem> CTmemargs = new List <cbItem>();
                CTmemargs              = argvals;
                CB_CTVar.DataSource    = CTmemargs;
                CB_CTVar.DisplayMember = "Text";
                CB_CTVar.ValueMember   = "Value";
                LCTV.Text              = vs;
                LCTV.Visible           = CB_CTVar.Visible = CB_CTVar.Enabled = enabled;
            }
            else
            {
                List <cbItem> OTmemargs = new List <cbItem>();
                OTmemargs              = argvals;
                CB_OTVar.DataSource    = OTmemargs;
                CB_OTVar.DisplayMember = "Text";
                CB_OTVar.ValueMember   = "Value";
                LOTV.Text              = vs;
                LOTV.Visible           = CB_OTVar.Visible = CB_OTVar.Enabled = enabled;
            }
        }
コード例 #12
0
        private void setupComboBoxes()
        {
            #region Balls
            {
                // Allowed Balls
                int[] ball_nums = { 7, 576, 13, 492, 497, 14, 495, 493, 496, 494, 11, 498, 8, 6, 12, 15, 9, 5, 499, 10, 1, 16 };
                int[] ball_vals = { 7, 25, 13, 17, 22, 14, 20, 18, 21, 19, 11, 23, 8, 6, 12, 15, 9, 5, 24, 10, 1, 16 };

                // Set up
                List <cbItem> ball_list = new List <cbItem>();

                for (int i = 4; i > 1; i--) // add 4,3,2
                {
                    // First 3 Balls are always first
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = itemlist[i];
                    ncbi.Value = i;
                    ball_list.Add(ncbi);
                }

                // Sort the Rest based on String Name
                string[] ballnames = new string[ball_nums.Length];
                for (int i = 0; i < ball_nums.Length; i++)
                {
                    ballnames[i] = itemlist[ball_nums[i]];
                }

                string[] sortedballs = new string[ball_nums.Length];
                Array.Copy(ballnames, sortedballs, ballnames.Length);
                Array.Sort(sortedballs);

                // Add the rest of the balls
                for (int i = 0; i < sortedballs.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedballs[i];
                    ncbi.Value = ball_vals[Array.IndexOf(ballnames, sortedballs[i])];
                    ball_list.Add(ncbi);
                }
                CB_Ball.DisplayMember = "Text";
                CB_Ball.ValueMember   = "Value";
                CB_Ball.DataSource    = ball_list;
            }
            #endregion
            #region Held Items
            {
                // List of valid items to hold
                int[] item_nums =
                {
                    000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, 017, 018, 019, 020, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, 032, 033, 034, 035,
                    036, 037, 038, 039, 040, 041, 042, 043, 044, 045, 046, 047, 048, 049, 050, 051, 052, 053, 054, 055, 056, 057, 058, 059, 060, 061, 062, 063, 064, 065, 066, 067, 068, 069, 070,
                    071, 072, 073, 074, 075, 076, 077, 078, 079, 080, 081, 082, 083, 084, 085, 086, 087, 088, 089, 090, 091, 092, 093, 094, 099, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
                    110, 112, 116, 117, 118, 119, 134, 135, 136, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
                    175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
                    210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
                    245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
                    280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
                    315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 504, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
                    558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 577, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 639, 640, 644, 645, 646, 647,
                    648, 649, 650, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683,
                    684, 685, 686, 687, 688, 699, 704, 708, 709, 710, 711, 715,

                    // Appended ORAS Items (Orbs & Mega Stones)
                    534, 535,
                    752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 767, 768, 769, 770,
                };
                List <cbItem> item_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] itemnames = new string[item_nums.Length];
                for (int i = 0; i < item_nums.Length; i++)
                {
                    itemnames[i] = itemlist[item_nums[i]];
                }

                string[] sorteditems = new string[item_nums.Length];
                Array.Copy(itemnames, sorteditems, itemnames.Length);
                Array.Sort(sorteditems);

                // Add the rest of the items
                for (int i = 0; i < sorteditems.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sorteditems[i];
                    ncbi.Value = item_nums[Array.IndexOf(itemnames, sorteditems[i])];
                    item_list.Add(ncbi);
                }
                CB_HeldItem.DisplayMember = "Text";
                CB_HeldItem.ValueMember   = "Value";
                CB_HeldItem.DataSource    = item_list;
            }
            #endregion
            #region Species
            {
                List <cbItem> species_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] sortedspecies = new string[specieslist.Length];
                Array.Copy(specieslist, sortedspecies, specieslist.Length);
                Array.Sort(sortedspecies);

                // Add the rest of the items
                for (int i = 0; i < sortedspecies.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedspecies[i];
                    ncbi.Value = Array.IndexOf(specieslist, sortedspecies[i]);
                    species_list.Add(ncbi);
                }
                CB_Species.DisplayMember = "Text";
                CB_Species.ValueMember   = "Value";
                CB_Species.DataSource    = species_list;
            }
            #endregion
            #region Natures
            {
                List <cbItem> natures_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] sortednatures = new string[natures.Length];
                Array.Copy(natures, sortednatures, natures.Length);
                Array.Sort(sortednatures);

                // Add the rest of the items
                for (int i = 0; i < sortednatures.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortednatures[i];
                    ncbi.Value = Array.IndexOf(natures, sortednatures[i]);
                    natures_list.Add(ncbi);
                }
                CB_Nature.DisplayMember = "Text";
                CB_Nature.ValueMember   = "Value";
                CB_Nature.DataSource    = natures_list;
            }
            #endregion
            #region Moves
            {
                List <cbItem> move_list = new List <cbItem>();
                // Sort the Rest based on String Name
                string[] sortedmoves = new string[movelist.Length];
                Array.Copy(movelist, sortedmoves, movelist.Length);
                Array.Sort(sortedmoves);

                // Add the rest of the items
                for (int i = 0; i < sortedmoves.Length; i++)
                {
                    cbItem ncbi = new cbItem();
                    ncbi.Text  = sortedmoves[i];
                    ncbi.Value = Array.IndexOf(movelist, sortedmoves[i]);
                    move_list.Add(ncbi);
                }

                CB_Move1.DisplayMember = CB_Move2.DisplayMember = CB_Move3.DisplayMember = CB_Move4.DisplayMember = "Text";
                CB_Move1.ValueMember   = CB_Move2.ValueMember = CB_Move3.ValueMember = CB_Move4.ValueMember = "Value";

                var move1_list = new BindingSource(move_list, null);
                CB_Move1.DataSource = move1_list;

                var move2_list = new BindingSource(move_list, null);
                CB_Move2.DataSource = move2_list;

                var move3_list = new BindingSource(move_list, null);
                CB_Move3.DataSource = move3_list;

                var move4_list = new BindingSource(move_list, null);
                CB_Move4.DataSource = move4_list;
            }
            #endregion
        }