PKHeX.Form1.getNatureModification C# (CSharp) Method

getNatureModification() private method

private getNatureModification ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void getNatureModification(object sender, EventArgs e)
        {
            if (sender is ComboBox && (sender as ComboBox).Name != CB_Nature.Name) return;
            int nature = Util.getIndex(CB_Nature);
            int incr = nature / 5;
            int decr = nature % 5;

            Label[] labarray = { Label_ATK, Label_DEF, Label_SPE, Label_SPA, Label_SPD };
            // Reset Label Colors
            foreach (Label label in labarray)
                label.ForeColor = defaultControlText;

            // Set Colored StatLabels only if Nature isn't Neutral
            NatureTip.SetToolTip(CB_Nature,
                incr != decr
                    ? String.Format("+{0} / -{1}", labarray[incr].Text, labarray[decr].Text).Replace(":", "")
                    : "-/-");
        }
        private void switchDaycare(object sender, EventArgs e)
Form1