Exemple #1
0
 /// <summary>
 /// 選択しているイメージをフルスクリーン表示します。
 /// </summary>
 /// <param name="targetItem">フルスクリーン表示対象のThumbNailItem。</param>
 private void showFullScreenImage(ThumbNailItem targetItem)
 {
     using (var viewer = new Viewers.ViewerForm
     {
         AllThumbNailList = this.tnvMain.GetAllThumbNails(),
         SelectedThumbNailIndex = targetItem.ItemListIndex
     })
     {
         viewer.ShowDialog(this);
     }
 }
Exemple #2
0
        /// <summary>
        /// ピクチャボックスにImageをセットします。
        /// </summary>
        /// <param name="thumb">セットするImageを表すThumbNailItem。</param>
        private void setImage(ThumbNailItem thumb)
        {
            var img = Image.FromFile(thumb.ImageFilePath);

            if ((this.picView.Width < img.Width) && (this.picView.Height < img.Height))
            {
                this.picView.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            else
            {
                this.picView.SizeMode = PictureBoxSizeMode.CenterImage;
            }

            this.picView.Image = img;
        }