Ejemplo n.º 1
0
            public PokemonInfo(PokemonSearch.PokemonInfo poke, int id)
            {
                this.id = id;
                load_data.AutoTexin(Ability);
                ItemL.Text    = "道具";
                AbilityL.Text = "特性";
                NatureL.Text  = "性格";
                MoveL.Text    = "招式";
                tran.Text     = "detail";
                for (int i = 0; i < 4; ++i)
                {
                    Move[i] = new TextBox();
                    load_data.AutoZS(Move[i]);
                    //Move[i].BorderStyle = BorderStyle.FixedSingle;
                    // move[i].LostFocus += PokemonInfo_LostFocus;
                }
                PokemonBase[] temp = Pokemondata.Getpokemon();
                foreach (PokemonBase a in temp)
                {
                    Name.Items.Add((String)a.name);
                }



                Name.SelectedIndexChanged += Name_SelectedIndexChanged;
                Name.TextChanged          += Name_TextChanged;
                Name.SelectedItem          = "烈咬陆鲨";
                tran.Click += Tran_Click;
            }
Ejemplo n.º 2
0
        private void update(int i, int j, PokemonSearch.PokemonInfo poke)
        {
            if (poke == null)
            {
                qq[i, j].Name.SelectedItem = "烈咬陆鲨";
                qq[i, j].poke = Pokemondata.GetpPokemonUSE("烈咬陆鲨");
                for (int index1 = 0; index1 < 4; ++index1)
                {
                    qq[i, j].Move[index1++].Text = "";
                }
                qq[i, j].Item.Text    = "";
                qq[i, j].Nature.Text  = "";
                qq[i, j].Ability.Text = "";
            }
            else
            {
                qq[i, j].Name.SelectedItem = poke.name;

                qq[i, j].poke = poke;
                int index1 = 0;
                foreach (String item in poke.move)
                {
                    qq[i, j].Move[index1++].Text = item;
                }
                while (index1 < 4)
                {
                    qq[i, j].Move[index1++].Text = "";
                }
                qq[i, j].Item.Text    = poke.Item;
                qq[i, j].Nature.Text  = poke.Nature.name;
                qq[i, j].Ability.Text = poke.Ability;
            }
        }
Ejemplo n.º 3
0
 private void CALU_FormClosing(object sender, FormClosedEventArgs e)
 {
     for (int i = 0; i < 6; ++i)
     {
         CALU.poke.RacialValue.Value[i] = int.Parse(CALU.pokevalue[i, 0].Text);
         CALU.poke.IVS.Value[i]         = int.Parse(CALU.pokevalue[i, 1].Text);
         CALU.poke.EVS.Value[i]         = int.Parse(CALU.pokevalue[i, 2].Text);
         CALU.poke.Nature = Pokemondata.getNatureClass(CALU.nature.SelectedIndex);
     }
     qq[CALU.id / 2, CALU.id % 2].poke = CALU.poke;
 }
Ejemplo n.º 4
0
 public void SetPokemon(string poname)
 {
     if (poname == null)
     {
         this.poke = Pokemondata.GetpPokemonUSE("烈咬陆鲨");
     }
     else if (poname != this.poke.name)
     {
         this.poke = Pokemondata.GetpPokemonUSE(poname);
     }
 }
Ejemplo n.º 5
0
        private void Nature_SelectedIndexChanged(object sender, EventArgs e)
        {
            for (int i = 0; i < 6; ++i)
            {
                title[i].ForeColor = (Color.Black);
            }
            if (Pokemondata.getNatureClass(((ComboBox)sender).SelectedIndex).up == 0)
            {
                // rss.Text = "��ֻ����������ϲ�������е�rss��! ����";
                // System.out.println(1);
                return;
            }

            title[Pokemondata.getNatureClass(((ComboBox)sender).SelectedIndex).up].ForeColor = (Color.Red);
            title[Pokemondata.getNatureClass(((ComboBox)sender).SelectedIndex).down]
            .ForeColor = (Color.Blue);
            update();
            // power[xingge[(int)sexgenum[Sex.Text]].up].Text = ((int)(int.Parse(power[xingge[(int)sexgenum[Sex.Text]].up].Text) * 1.1)).ToString();
            // power[xingge[(int)sexgenum[Sex.Text]].down].Text = ((int)(int.Parse(power[xingge[(int)sexgenum[Sex.Text]].down].Text) * 0.9)).ToString();
        }
Ejemplo n.º 6
0
        private void update()
        {
            int temp = 0;

            for (int i = 0; i < 6; ++i)
            {
                temp += int.Parse(pokevalue[i, 2].Text);
            }
            sumEVs.Text = ((temp.ToString()));
            if (temp > 510)
            {
                sumEVs.ForeColor = (Color.Red);
            }
            else
            {
                sumEVs.ForeColor = (Color.Black);
            }
            for (int i = 0; i < 6; ++i)
            {
                if (i == 0)
                {
                    if (poke.RacialValue.Value[0] == 1)
                    {
                        stat[i].Text = ("1");
                    }
                    else
                    {
                        stat[0].Text = ((((int)((int.Parse(pokevalue[0, 0].Text) * 2 + int.Parse(pokevalue[0, 1].Text) + (int.Parse(pokevalue[0, 2].Text) / 4)) * poke.Level / 100 + 10 + poke.Level)))).ToString();
                    }
                }
                else
                {
                    stat[i].Text = ((((int)((int.Parse(pokevalue[i, 0].Text) * 2 + int.Parse(pokevalue[i, 1].Text) + (int.Parse(pokevalue[i, 2].Text) / 4)) * poke.Level / 100 + 5)))).ToString();
                }
            }
            if (Pokemondata.getNatureClass(nature.SelectedIndex).up != 0)
            {
                stat[Pokemondata.getNatureClass(nature.SelectedIndex).up].Text   = (((int)(int.Parse(stat[Pokemondata.getNatureClass(nature.SelectedIndex).up].Text) * 1.1))).ToString();
                stat[Pokemondata.getNatureClass(nature.SelectedIndex).down].Text = (((int)(int.Parse(stat[Pokemondata.getNatureClass(nature.SelectedIndex).down].Text) * 0.9))).ToString();
            }
        }
Ejemplo n.º 7
0
        private void init()
        {
            //this.setLayout(null);
            this.Text = "内部数值查看";
            // this.setIconImage(image);
            nature.DropDownStyle = ComboBoxStyle.DropDownList;
            Rectangle scr = System.Windows.Forms.Screen.GetWorkingArea(this);

            this.SetBounds(scr.Width / 2 - 160, scr.Height / 2 - 160, 320, 320);
            for (int i = 0; i < 3; ++i)
            {
                for (int j = 0; j < 6; ++j)
                {
                    pokevalue[j, i]      = new TextBox();
                    pokevalue[j, i].Text = "0";
                    pokevalue[j, i].SetBounds(100 + i * 45, 50 + j * 25, 40, 20);
                    this.Controls.Add(pokevalue[j, i]);
                    if (i == 0)
                    {
                        pokevalue[j, i].Enabled = (false);
                    }
                    if (i == 1)
                    {
                        pokevalue[j, i].TextChanged += Calu_TextChanged;
                    }
                    if (i == 2)
                    {
                        pokevalue[j, i].TextChanged += Calu_TextChanged1;
                    }
                    Controls.Add(pokevalue[j, i]);
                }
            }

            for (int i = 0; i < database.Naturedata.Length; ++i)
            {
                nature.Items.Add(Pokemondata.getNatureClass(i).name);
            }
            for (int i = 0; i < 6; ++i)
            {
                title[i]     = new Label();
                stat[i]      = new Label();
                stat[i].Text = ("0");

                title[i].SetBounds(50, 50 + i * 25, 30, 20);
                stat[i].SetBounds(250 - 8, 50 + i * 25 + 5, 30, 20);
                // stat[i].setFont();
                this.Controls.Add(title[i]);
                this.Controls.Add(stat[i]);
            }
            nature.SelectedIndexChanged += Nature_SelectedIndexChanged;
            rac.Text      = "种族值";
            IVs.Text      = "个体值";
            EVs.Text      = "努力值";
            sum.Text      = "总和";
            sumrac.Text   = "0";
            sumIVs.Text   = "6V";
            sumEVs.Text   = "0";
            stats.Text    = "能力值";
            natures.Text  = "性格";
            title[0].Text = ("HP");
            title[1].Text = ("物攻");
            title[2].Text = ("物防");
            title[3].Text = ("特攻");
            title[4].Text = ("特防");
            title[5].Text = ("速度");
            natures.SetBounds(50, 235, 30, 20);
            rac.SetBounds(100, 20, 40, 20);
            IVs.SetBounds(145, 20, 40, 20);
            EVs.SetBounds(190, 20, 40, 20);
            sumrac.SetBounds(100, 205, 40, 20);
            sumIVs.SetBounds(140, 200, 45, 20);
            sumIVs.Click += SumIVs_Click;
            sumEVs.SetBounds(190, 205, 40, 20);
            sum.SetBounds(50, 205, 40, 20);
            stats.SetBounds(240, 20, 40, 20);
            pokemonhead.SetBounds(50 - 10, 10, 40, 41);

            nature.SetBounds(100, 230, 130, 20);

            this.Controls.Add(rac);
            this.Controls.Add(IVs);
            this.Controls.Add(EVs);
            this.Controls.Add(sumrac);
            this.Controls.Add(sumIVs);
            this.Controls.Add(sumEVs);
            this.Controls.Add(stats);
            this.Controls.Add(pokemonhead);
            this.Controls.Add(nature);
            this.Controls.Add(natures);
            this.Controls.Add(sum);
        }