private void AddElementBox(ESkillElement Element) { PictureBox pic = new PictureBox(); pic.SizeMode = PictureBoxSizeMode.AutoSize; pic.Image = Element.ToImage(); pic.Location = new Point(mLastLabel.Location.X + mLastLabel.Width + 2, mLastLabel.Location.Y + (mLastLabel.Height / 2) - (pic.Image.Height / 2)); Controls.Add(pic); }
public static Image ToImage(this ESkillElement Ele) { switch (Ele) { default: case ESkillElement.None: case ESkillElement.Neutral: return(Properties.Resources.mon_not); case ESkillElement.Feuer: return(Properties.Resources.mon_fire); case ESkillElement.Wasser: return(Properties.Resources.mon_water); case ESkillElement.Wind: return(Properties.Resources.mon_wind); case ESkillElement.Erde: return(Properties.Resources.mon_ground); } }
private void AddElementBox( ESkillElement Element ) { PictureBox pic = new PictureBox(); pic.SizeMode = PictureBoxSizeMode.AutoSize; pic.Image = Element.ToImage(); pic.Location = new Point( mLastLabel.Location.X + mLastLabel.Width + 2, mLastLabel.Location.Y + ( mLastLabel.Height / 2 ) - ( pic.Image.Height / 2 ) ); Controls.Add( pic ); }