implemented #3
This commit is contained in:
parent
4d29cb3340
commit
03ea31e187
|
@ -858,6 +858,7 @@ namespace Mk0.Software.ImageSorter
|
|||
CountPicsInPath();
|
||||
LoadPicture(imageIndex);
|
||||
CheckUndo();
|
||||
ShowPreviewImages();
|
||||
|
||||
if (Properties.Settings.Default.fading)
|
||||
{
|
||||
|
@ -962,6 +963,7 @@ namespace Mk0.Software.ImageSorter
|
|||
CountPicsInPath();
|
||||
LoadPicture(imageIndex);
|
||||
CheckUndo();
|
||||
ShowPreviewImages();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1729,6 +1731,7 @@ namespace Mk0.Software.ImageSorter
|
|||
CountPicsInPath();
|
||||
LoadPicture(0);
|
||||
ResetUndo();
|
||||
ShowPreviewImages();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1992,6 +1995,9 @@ namespace Mk0.Software.ImageSorter
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bildvorschau erzeugen und laden
|
||||
/// </summary>
|
||||
private void ShowPreviewImages()
|
||||
{
|
||||
panelPreview.Controls.Clear();
|
||||
|
@ -2010,15 +2016,49 @@ namespace Mk0.Software.ImageSorter
|
|||
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
|
||||
BackgroundImage = Resources.no_picture,
|
||||
BackgroundImageLayout = ImageLayout.Stretch,
|
||||
BorderStyle = BorderStyle.FixedSingle,
|
||||
BorderStyle = BorderStyle.None,
|
||||
Location = new Point(moveNext, previewImageAbstand),
|
||||
Name = "pictureBoxPreview" + i,
|
||||
Size = new Size(previewImageWidth, previewImageWidth),
|
||||
TabIndex = 0,
|
||||
TabStop = false
|
||||
TabStop = false,
|
||||
SizeMode = PictureBoxSizeMode.Zoom
|
||||
};
|
||||
panelPreview.Controls.Add(pb);
|
||||
}
|
||||
|
||||
int pIndex = imageIndex;
|
||||
foreach (PictureBox pb in panelPreview.Controls.OfType<PictureBox>())
|
||||
{
|
||||
//preview laden
|
||||
if (images.Count() > pIndex)
|
||||
{
|
||||
pIndex += 1;
|
||||
if (pIndex >= images.Count() || pIndex < 0)
|
||||
{
|
||||
pIndex = 0;
|
||||
}
|
||||
pb.ImageLocation = images.ElementAt(pIndex);
|
||||
pb.BackgroundImage = null;
|
||||
pb.Tag = pIndex;
|
||||
pb.Click += new System.EventHandler(this.LoadPictureFromPreview_Click);
|
||||
}
|
||||
else
|
||||
{
|
||||
pb.BackgroundImage = Resources.no_picture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lädt Bilder, die in Vorschau angeklickt wurden
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void LoadPictureFromPreview_Click(object sender, EventArgs e)
|
||||
{
|
||||
var pb = (PictureBox)sender;
|
||||
LoadPicture((int)pb.Tag);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue