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; }
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(); }