private void display1_Click(object sender, EventArgs e) { resstruct[,] icefairy = yyfx.dmgcodetodata(textBox1.Text); if (tt == null || tt.IsDisposed) { tt = new tjt(icefairy, 1); tt.Show(); } else { tt.Activate(); } }
public zhuzhuang1(resstruct[] heidi, int x, int y, tjt main) { min.BorderStyle = BorderStyle.FixedSingle; //min.BackColor = Color.Blue; min.BackColor = Color.FromArgb(Pokemondata.MOVEDATA[(int)Pokemondata.EngMoveID[heidi[0].move]].color1 + (0xff << 24)); max.BorderStyle = BorderStyle.FixedSingle; //max.BackColor = Color.Red; max.BackColor = Color.FromArgb(Pokemondata.MOVEDATA[(int)Pokemondata.EngMoveID[heidi[0].move]].color2 + (0xff << 24)); //Color.FromArgb(0xaaaaaa); string[] sci = heidi[1].damagebfb.Substring(0, heidi[0].damagebfb.Length - 1).Split('-'); min.SetBounds(x, y, (int)(5 * double.Parse(sci[0])), 25); min.Text = Pokemondata.GetMoveName(Pokemondata.EnglishNametoMoveID(heidi[0].move)); min.TextAlign = ContentAlignment.MiddleCenter; max.SetBounds(x, y, (int)(5 * double.Parse(sci[1])), 25); minimg.SetBounds(x + 10, y + 25, 40, 40); while (!Pokemondata.EngPokemonID.Contains(heidi[1].pokemon)) { heidi[1].pokemon = heidi[1].pokemon.Substring(0, heidi[1].pokemon.LastIndexOf('-')); } minimg.Image = (Image)pokeimg.ResourceManager.GetObject(Pokemondata.GetPokemonBase(Pokemondata.EnglishNametopokeID(heidi[1].pokemon)).name.Replace('-', 'T')); dmgdec.Location = new Point(x + 50, y + 40); statdec.Location = new Point(x + 50, y + 60); dmgdec.Text = Pokemondata.GetPokemonBase(Pokemondata.EnglishNametopokeID(heidi[1].pokemon)).name; if (heidi[1].item != null) { dmgdec.Text += " " + Pokemondata.GetItemName(Pokemondata.EnglishNametoItemID(heidi[1].item)); } dmgdec.Text += "("; if (heidi[1].stat > 0) { dmgdec.Text += "+"; dmgdec.Text += heidi[1].stat.ToString() + " "; } else if (heidi[1].stat < 0) { dmgdec.Text += heidi[1].stat.ToString() + " "; } if (heidi[1].IVs.Value[2] != -1) { string scixing = (heidi[1].IVs.Value[2]).ToString(); if (heidi[1].defplus == 1) { scixing += "+"; } else if (heidi[1].defplus == -1) { scixing += "-"; } dmgdec.Text += string.Format("{0} HP {1} 物防)", heidi[1].IVs.Value[0], scixing); } else { string scixing = (heidi[1].IVs.Value[4]).ToString(); if (heidi[1].spaplus == 1) { scixing += "+"; } else if (heidi[1].spaplus == -1) { scixing += "-"; } dmgdec.Text += string.Format("{0} HP {1} 特防)", heidi[1].IVs.Value[0], scixing); } dmgdec.Text += "受到 " + Pokemondata.GetMoveName(Pokemondata.EnglishNametoMoveID(heidi[0].move)); if (heidi[0].movepow != 0) { dmgdec.Text += string.Format("({0} 威力)", heidi[0].movepow); } dmgdec.Text += " " + heidi[0].damagenum.Trim(); dmgdec.Text += string.Format(" ({0})", heidi[0].damagebfb); dmgdec.AutoSize = true; statdec.AutoSize = true; if (heidi[0].burn) { statdec.Text += ",灼伤"; } if (heidi[0].helpinghand) { statdec.Text += ",帮助"; } if (heidi[1].reflect) { statdec.Text += ",反射壁"; } if (heidi[1].lightscreen) { statdec.Text += ",光墙"; } if (heidi[1].auroraveil) { statdec.Text += ",极光幕"; } if (heidi[1].friendguard) { statdec.Text += ",友情防守"; } if (heidi[1].crit) { statdec.Text += ",CT"; } if (heidi[1].protect) { statdec.Text += ",保护"; } if (heidi[1].weather != null) { statdec.Text += "," + heidi[1].weather; } if (heidi[1].terrain != null) { statdec.Text += "," + heidi[1].terrain; } if (statdec.Text != "") { statdec.Text = "其他附加状态: " + statdec.Text.Substring(1); } if (heidi[0].damagedec.Contains("HKO")) { string mipha = Regex.Split(heidi[0].damagedec, "HKO")[0] + "HKO "; statdec.Text = mipha + statdec.Text; } main.Controls.Add(min); main.Controls.Add(dmgdec); main.Controls.Add(statdec); main.Controls.Add(max); main.Controls.Add(minimg); //main.Controls.Add(new Button()); }