Пример #1
0
        private void Button3_Click(object sender, EventArgs e)
        {
            string localReverseHEX()
            {
                string argHEXData = Strings.Right("0000" + Conversion.Hex(ByteFunctions.SpeciestoDexNum(ComboBox3.SelectedIndex + 1)), 4); var ret = HexFunctions.ReverseHex(ref argHEXData); return(ret);
            }

            int    argStart = int.Parse(Ini.GetString(Conversions.ToString(MMainFunctions.GetIniFileLocation()), MainObject.Header, "PokedexSmallestTable", ""), System.Globalization.NumberStyles.HexNumber) + ListBox3.SelectedIndex * 2;
            string argData  = localReverseHEX();

            HexFunctions.WriteHex(ref MainObject.LoadedRom, ref argStart, ref argData);
            int refreshvar;
            int refreshvar2;

            refreshvar  = ListBox3.SelectedIndex;
            refreshvar2 = ComboBox3.SelectedIndex;
            if (ListBox3.SelectedIndex == 0)
            {
                ListBox3.SelectedIndex = ListBox3.SelectedIndex + 1;
            }
            else
            {
                ListBox3.SelectedIndex = ListBox3.SelectedIndex - 1;
            }

            ListBox3.Items.Insert(refreshvar, GetNameFunctions.GetPokemonName(refreshvar2 + 1));
            ListBox3.Items.RemoveAt(refreshvar + 1);
            ListBox3.SelectedIndex = refreshvar;
        }