Пример #1
0
  /// <summary>Initializes this form with the given <see cref="UserImage"/>.</summary>
  public void Initialize(UserImage photoId)
  {
    if(photoId == null) throw new ArgumentNullException();

    Text = "Photo ID for " + photoId.PrimaryKey.PrimaryUserId.Name;
    lblId.Text = Text + "\nKey ID: " + photoId.PrimaryKey.ShortKeyId;

    picture.Image = photoId.GetBitmap();

    // set the initial height of the form based on the picture
    Height = Math.Min(picture.Image.Height + 2, 384) + topSpace + bottomSpace;
  }