public DenIVs(int idx, DenManager dm)
        {
            InitializeComponent();
            this.dm = dm;
            Den den = dm.GetDen(idx);

            seedBox.Text         = den.seed.ToString("X");
            denBox.SelectedIndex = idx;
        }
        private void denBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Den den = dm.GetDen(denBox.SelectedIndex);

            this.seedBox.Text = den.seed.ToString("X");
            this.speciesList.Items.Clear();
            var s = GameInfo.Strings;

            for (int stars = min_stars[dm.badges]; stars <= max_stars[dm.badges]; stars++)
            {
                var entries = dm.GetAllEntriesWithStarcount(den, stars);
                foreach (var entry in entries)
                {
                    ComboboxItem item = new ComboboxItem();
                    item.Text  = string.Format("{0}\u2605 {1}", stars + 1, s.Species[entry.Species]);
                    item.Value = entry;
                    this.speciesList.Items.Add(item);
                }
            }
            speciesList.SelectedIndex = 0;
        }
Beispiel #3
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Den den = dm.GetDen(denBox.SelectedIndex);
            Pkmn pkmn = dm.GetPkmnFromDen(den);
            activeBox.Checked = den.active_den;
            rareBox.Checked = den.rare_den;
            EventBox.Checked = den.event_den;
            denSeed.Text = den.seed.ToString("X");

            // draw stars
            var star = "\u2605";
            var output = star;
            for (int i = 0; i < den.stars; i++) output += star;
            StarLbl.Text = output;
            
            var s = GameInfo.Strings;
            abilityLbl.Text = s.Ability[pkmn.ability];

            natureLbl.Text = s.natures[pkmn.nature];
            TextBox[] ivtextw = { TB_HP_IV1, TB_ATK_IV1, TB_DEF_IV1, TB_SPA_IV1, TB_SPD_IV1, TB_SPE_IV1 };
            for(int i=0; i < 6; i++)
            {
                ivtextw[i].Text = pkmn.ivs[i].ToString();
            }

            Image sprite = PKHeX.Drawing.SpriteUtil.GetSprite(pkmn.species, pkmn.form, pkmn.gender, 0, false, pkmn.shinytype > 0);
            if (pkmn.isGigantamax)
            {
                var gm = Properties.Resources.dyna;
                sprite = ImageUtil.LayerImage(sprite, gm, (sprite.Width - gm.Width) / 2, 0);
            }
            if (!activeBox.Checked)
            {
                sprite = MakeGrayscale((Bitmap) sprite);
            }
            PB_PK1.BackgroundImage = sprite;
            shinyframes.Text = shiny_in(den.seed).ToString();
            locationLabel.Text = den.location;
        }