示例#1
0
        private void JediImageValidation(IJedi jediCharacter, PictureBox paduin)
        {
            try
            {
                image = Image.FromFile(jediCharacter.CharacterImage);

                paduin.Image  = image;
                paduin.Height = image.Height;
                paduin.Width  = image.Width;
            }
            catch (FileNotFoundException)
            {
                throw new FileNotFoundException("The path of " + jediCharacter.GetType().Name + " is not in the correct format !");
            }
        }
示例#2
0
        private void JediImageValidation(IJedi jediCharacter, PictureBox paduin)
        {
            try
            {
                image = Image.FromFile(jediCharacter.CharacterImage);

                paduin.Image = image;
                paduin.Height = image.Height;
                paduin.Width = image.Width;
            }
            catch (FileNotFoundException)
            {
                throw new FileNotFoundException("The path of " + jediCharacter.GetType().Name + " is not in the correct format !");
            }
        }