Beispiel #1
0
        private void buttonGetImage_Click(object sender, EventArgs e)
        {
            if (textEmail.Text == string.Empty) return;
            pictureAvatar.Image = null;

            Gravatar gravatar = new Gravatar(textEmail.Text, int.Parse(comboSize.Text));
            gravatar.GetImage();
            pictureAvatar.Image = gravatar.Image;
        }
Beispiel #2
0
        private void buttonGetImageAsync_Click(object sender, EventArgs e)
        {
            if (textEmail.Text == string.Empty) return;
            pictureAvatar.Image = null;

            Gravatar gravatar = new Gravatar(textEmail.Text, int.Parse(comboSize.Text));
            gravatar.AsyncImageRetrieved += new EventHandler(this.GravatarReceived);
            gravatar.GetImageAsync();
        }