implemented #6
This commit is contained in:
parent
18c4eaaf16
commit
861174edcd
|
@ -491,7 +491,7 @@
|
||||||
this.groupBoxRander.Controls.Add(this.buttonRandOben);
|
this.groupBoxRander.Controls.Add(this.buttonRandOben);
|
||||||
this.groupBoxRander.Location = new System.Drawing.Point(161, 397);
|
this.groupBoxRander.Location = new System.Drawing.Point(161, 397);
|
||||||
this.groupBoxRander.Name = "groupBoxRander";
|
this.groupBoxRander.Name = "groupBoxRander";
|
||||||
this.groupBoxRander.Size = new System.Drawing.Size(125, 136);
|
this.groupBoxRander.Size = new System.Drawing.Size(123, 136);
|
||||||
this.groupBoxRander.TabIndex = 18;
|
this.groupBoxRander.TabIndex = 18;
|
||||||
this.groupBoxRander.TabStop = false;
|
this.groupBoxRander.TabStop = false;
|
||||||
this.groupBoxRander.Text = "Ränder schneiden";
|
this.groupBoxRander.Text = "Ränder schneiden";
|
||||||
|
@ -504,7 +504,7 @@
|
||||||
this.buttonRandAlle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.buttonRandAlle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.buttonRandAlle.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
this.buttonRandAlle.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
||||||
this.buttonRandAlle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonRandAlle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonRandAlle.Location = new System.Drawing.Point(64, 102);
|
this.buttonRandAlle.Location = new System.Drawing.Point(76, 102);
|
||||||
this.buttonRandAlle.Name = "buttonRandAlle";
|
this.buttonRandAlle.Name = "buttonRandAlle";
|
||||||
this.buttonRandAlle.Size = new System.Drawing.Size(23, 23);
|
this.buttonRandAlle.Size = new System.Drawing.Size(23, 23);
|
||||||
this.buttonRandAlle.TabIndex = 16;
|
this.buttonRandAlle.TabIndex = 16;
|
||||||
|
@ -519,7 +519,7 @@
|
||||||
this.buttonRandObenUnten.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.buttonRandObenUnten.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.buttonRandObenUnten.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
this.buttonRandObenUnten.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
||||||
this.buttonRandObenUnten.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonRandObenUnten.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonRandObenUnten.Location = new System.Drawing.Point(35, 102);
|
this.buttonRandObenUnten.Location = new System.Drawing.Point(47, 102);
|
||||||
this.buttonRandObenUnten.Name = "buttonRandObenUnten";
|
this.buttonRandObenUnten.Name = "buttonRandObenUnten";
|
||||||
this.buttonRandObenUnten.Size = new System.Drawing.Size(23, 23);
|
this.buttonRandObenUnten.Size = new System.Drawing.Size(23, 23);
|
||||||
this.buttonRandObenUnten.TabIndex = 15;
|
this.buttonRandObenUnten.TabIndex = 15;
|
||||||
|
@ -534,7 +534,7 @@
|
||||||
this.buttonRandLinksRechts.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.buttonRandLinksRechts.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.buttonRandLinksRechts.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
this.buttonRandLinksRechts.FlatAppearance.BorderColor = System.Drawing.Color.Silver;
|
||||||
this.buttonRandLinksRechts.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.buttonRandLinksRechts.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.buttonRandLinksRechts.Location = new System.Drawing.Point(6, 102);
|
this.buttonRandLinksRechts.Location = new System.Drawing.Point(18, 102);
|
||||||
this.buttonRandLinksRechts.Name = "buttonRandLinksRechts";
|
this.buttonRandLinksRechts.Name = "buttonRandLinksRechts";
|
||||||
this.buttonRandLinksRechts.Size = new System.Drawing.Size(23, 23);
|
this.buttonRandLinksRechts.Size = new System.Drawing.Size(23, 23);
|
||||||
this.buttonRandLinksRechts.TabIndex = 14;
|
this.buttonRandLinksRechts.TabIndex = 14;
|
||||||
|
@ -738,7 +738,7 @@
|
||||||
this.groupBoxTransformation.Controls.Add(this.buttonMirrorHorizontal);
|
this.groupBoxTransformation.Controls.Add(this.buttonMirrorHorizontal);
|
||||||
this.groupBoxTransformation.Location = new System.Drawing.Point(46, 445);
|
this.groupBoxTransformation.Location = new System.Drawing.Point(46, 445);
|
||||||
this.groupBoxTransformation.Name = "groupBoxTransformation";
|
this.groupBoxTransformation.Name = "groupBoxTransformation";
|
||||||
this.groupBoxTransformation.Size = new System.Drawing.Size(109, 88);
|
this.groupBoxTransformation.Size = new System.Drawing.Size(99, 88);
|
||||||
this.groupBoxTransformation.TabIndex = 17;
|
this.groupBoxTransformation.TabIndex = 17;
|
||||||
this.groupBoxTransformation.TabStop = false;
|
this.groupBoxTransformation.TabStop = false;
|
||||||
this.groupBoxTransformation.Text = "Transformation";
|
this.groupBoxTransformation.Text = "Transformation";
|
||||||
|
@ -871,7 +871,7 @@
|
||||||
this.KeyPreview = true;
|
this.KeyPreview = true;
|
||||||
this.MinimumSize = new System.Drawing.Size(983, 605);
|
this.MinimumSize = new System.Drawing.Size(983, 605);
|
||||||
this.Name = "Main";
|
this.Name = "Main";
|
||||||
this.Text = "Image Sorter v2.5 | © 2015-2023 by kmpr.at";
|
this.Text = "Image Sorter v2.6 | © 2015-2023 by kmpr.at";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
|
||||||
this.Load += new System.EventHandler(this.Main_Load);
|
this.Load += new System.EventHandler(this.Main_Load);
|
||||||
this.Shown += new System.EventHandler(this.Main_Shown);
|
this.Shown += new System.EventHandler(this.Main_Shown);
|
||||||
|
|
|
@ -17,6 +17,7 @@ using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Mk0.Software.OnlineUpdater;
|
using Mk0.Software.OnlineUpdater;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Mk0.Software.ImageSorter
|
namespace Mk0.Software.ImageSorter
|
||||||
{
|
{
|
||||||
|
@ -865,7 +866,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
CountPicsInPath();
|
CountPicsInPath();
|
||||||
LoadPicture(imageIndex);
|
LoadPicture(imageIndex);
|
||||||
CheckUndo();
|
CheckUndo();
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(false, true);
|
||||||
|
|
||||||
if (Properties.Settings.Default.fading)
|
if (Properties.Settings.Default.fading)
|
||||||
{
|
{
|
||||||
|
@ -970,7 +971,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
CountPicsInPath();
|
CountPicsInPath();
|
||||||
LoadPicture(imageIndex);
|
LoadPicture(imageIndex);
|
||||||
CheckUndo();
|
CheckUndo();
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1072,7 +1073,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
CountPicsInPath();
|
CountPicsInPath();
|
||||||
LoadPicture(imageIndex);
|
LoadPicture(imageIndex);
|
||||||
ShowDeletedMessage(myImg, pfad);
|
ShowDeletedMessage(myImg, pfad);
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1769,7 +1770,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
CountPicsInPath();
|
CountPicsInPath();
|
||||||
LoadPicture(imageIndex - 1);
|
LoadPicture(imageIndex - 1);
|
||||||
CheckUndo();
|
CheckUndo();
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1782,7 +1783,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
CountPicsInPath();
|
CountPicsInPath();
|
||||||
LoadPicture(imageIndex + 1);
|
LoadPicture(imageIndex + 1);
|
||||||
CheckUndo();
|
CheckUndo();
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1827,7 +1828,7 @@ namespace Mk0.Software.ImageSorter
|
||||||
Image myImg = CopyImage.GetCopyImage(targetPath);
|
Image myImg = CopyImage.GetCopyImage(targetPath);
|
||||||
ShowDuplicatedMessage(myImg, targetPath);
|
ShowDuplicatedMessage(myImg, targetPath);
|
||||||
|
|
||||||
ShowPreviewImages();
|
ShowPreviewImages(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2008,11 +2009,10 @@ namespace Mk0.Software.ImageSorter
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bildvorschau erzeugen und laden
|
/// Bildvorschau erzeugen und laden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ShowPreviewImages()
|
private void ShowPreviewImages(bool left = false, bool right = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
panelPreview.Controls.Clear();
|
|
||||||
int panelWidthAvailable = panelPreview.Width - 11; //verfügbare breite abzüglich ränder links+rechts
|
int panelWidthAvailable = panelPreview.Width - 11; //verfügbare breite abzüglich ränder links+rechts
|
||||||
int previewImageWidth = 80; //breite eines preview-bildes
|
int previewImageWidth = 80; //breite eines preview-bildes
|
||||||
int previewImageAbstand = 11; //abstand zwischen preview-bildern
|
int previewImageAbstand = 11; //abstand zwischen preview-bildern
|
||||||
|
@ -2020,44 +2020,118 @@ namespace Mk0.Software.ImageSorter
|
||||||
int previewNumber = panelWidthAvailable / previewBildmitAbstand; //anzahl der möglichen preview-bilder
|
int previewNumber = panelWidthAvailable / previewBildmitAbstand; //anzahl der möglichen preview-bilder
|
||||||
int bildAbstand = (panelPreview.Width - 22 - (previewNumber * previewImageWidth)) / previewNumber; //errechneter Bildabstand für bessere verteilung
|
int bildAbstand = (panelPreview.Width - 22 - (previewNumber * previewImageWidth)) / previewNumber; //errechneter Bildabstand für bessere verteilung
|
||||||
|
|
||||||
for (int i = 1; i <= previewNumber; i++)
|
if (left)
|
||||||
{
|
{
|
||||||
int moveNext = (i * previewImageWidth) + (bildAbstand * i) - 80;
|
//links neues bild laden
|
||||||
PictureBox pb = new PictureBox
|
//rechte pb entfernen
|
||||||
|
panelPreview.Controls.Remove(panelPreview.Controls.OfType<PictureBox>().Last());
|
||||||
|
int newPbX = panelPreview.Controls.OfType<PictureBox>().First().Location.X;
|
||||||
|
//alle nach rechts verschieben
|
||||||
|
foreach (PictureBox pb in panelPreview.Controls.OfType<PictureBox>())
|
||||||
|
{
|
||||||
|
pb.Location = new Point(pb.Location.X + bildAbstand + previewImageWidth, pb.Location.Y);
|
||||||
|
}
|
||||||
|
//links neue pb erstellen
|
||||||
|
int pIndex = imageIndex;
|
||||||
|
pIndex += 1;
|
||||||
|
if (pIndex >= images.Count() || pIndex < 0)
|
||||||
|
{
|
||||||
|
pIndex = 0;
|
||||||
|
}
|
||||||
|
PictureBox pbn = new PictureBox
|
||||||
{
|
{
|
||||||
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
|
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
|
||||||
BackgroundImage = Resources.no_picture,
|
|
||||||
BackgroundImageLayout = ImageLayout.Stretch,
|
BackgroundImageLayout = ImageLayout.Stretch,
|
||||||
BorderStyle = BorderStyle.None,
|
BorderStyle = BorderStyle.None,
|
||||||
Location = new Point(moveNext, previewImageAbstand),
|
Location = new Point(newPbX, previewImageAbstand),
|
||||||
Name = "pictureBoxPreview" + i,
|
|
||||||
Size = new Size(previewImageWidth, previewImageWidth),
|
Size = new Size(previewImageWidth, previewImageWidth),
|
||||||
TabIndex = 0,
|
TabIndex = 0,
|
||||||
TabStop = false,
|
TabStop = false,
|
||||||
SizeMode = PictureBoxSizeMode.Zoom
|
SizeMode = PictureBoxSizeMode.Zoom,
|
||||||
|
ImageLocation = images.ElementAt(pIndex),
|
||||||
|
Tag = pIndex
|
||||||
};
|
};
|
||||||
panelPreview.Controls.Add(pb);
|
panelPreview.SuspendLayout();
|
||||||
|
panelPreview.Controls.Add(pbn);
|
||||||
|
panelPreview.Controls.SetChildIndex(pbn, 0);
|
||||||
|
panelPreview.ResumeLayout();
|
||||||
|
pbn.Click += new EventHandler(LoadPictureFromPreview_Click);
|
||||||
}
|
}
|
||||||
|
else if (right)
|
||||||
int pIndex = imageIndex;
|
|
||||||
foreach (PictureBox pb in panelPreview.Controls.OfType<PictureBox>())
|
|
||||||
{
|
{
|
||||||
//preview laden
|
//rechts neues bild laden
|
||||||
if (images.Count() > pIndex)
|
//linke pb entfernen
|
||||||
|
panelPreview.Controls.Remove(panelPreview.Controls.OfType<PictureBox>().First());
|
||||||
|
int newPbX = panelPreview.Controls.OfType<PictureBox>().Last().Location.X;
|
||||||
|
//alle nach links verschieben
|
||||||
|
foreach (PictureBox pb in panelPreview.Controls.OfType<PictureBox>())
|
||||||
{
|
{
|
||||||
pIndex += 1;
|
pb.Location = new Point(pb.Location.X - bildAbstand - previewImageWidth, pb.Location.Y);
|
||||||
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
|
//rechts neue pb erstellen
|
||||||
|
int pIndex = imageIndex;
|
||||||
|
pIndex += previewNumber;
|
||||||
|
if (pIndex >= images.Count() || pIndex < 0)
|
||||||
{
|
{
|
||||||
pb.BackgroundImage = Resources.no_picture;
|
pIndex = 0;
|
||||||
|
}
|
||||||
|
PictureBox pbn = new PictureBox
|
||||||
|
{
|
||||||
|
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
|
||||||
|
BackgroundImageLayout = ImageLayout.Stretch,
|
||||||
|
BorderStyle = BorderStyle.None,
|
||||||
|
Location = new Point(newPbX, previewImageAbstand),
|
||||||
|
Size = new Size(previewImageWidth, previewImageWidth),
|
||||||
|
TabIndex = 0,
|
||||||
|
TabStop = false,
|
||||||
|
SizeMode = PictureBoxSizeMode.Zoom,
|
||||||
|
ImageLocation = images.ElementAt(pIndex),
|
||||||
|
Tag = pIndex
|
||||||
|
};
|
||||||
|
panelPreview.Controls.Add(pbn);
|
||||||
|
pbn.Click += new EventHandler(LoadPictureFromPreview_Click);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panelPreview.Controls.Clear();
|
||||||
|
for (int i = 1; i <= previewNumber; i++)
|
||||||
|
{
|
||||||
|
int moveNext = (i * previewImageWidth) + (bildAbstand * i) - 80;
|
||||||
|
PictureBox pb = new PictureBox
|
||||||
|
{
|
||||||
|
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left,
|
||||||
|
BackgroundImage = Resources.no_picture,
|
||||||
|
BackgroundImageLayout = ImageLayout.Stretch,
|
||||||
|
BorderStyle = BorderStyle.None,
|
||||||
|
Location = new Point(moveNext, previewImageAbstand),
|
||||||
|
Name = "pictureBoxPreview" + i,
|
||||||
|
Size = new Size(previewImageWidth, previewImageWidth),
|
||||||
|
TabIndex = 0,
|
||||||
|
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 EventHandler(LoadPictureFromPreview_Click);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pb.BackgroundImage = Resources.no_picture;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<PublisherName>manuelkamper.com</PublisherName>
|
<PublisherName>manuelkamper.com</PublisherName>
|
||||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
<ApplicationVersion>2.5.0.0</ApplicationVersion>
|
<ApplicationVersion>2.6.0.0</ApplicationVersion>
|
||||||
<UseApplicationTrust>true</UseApplicationTrust>
|
<UseApplicationTrust>true</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
|
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
|
||||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.5.*")]
|
[assembly: AssemblyVersion("2.6.*")]
|
||||||
//[assembly: AssemblyFileVersion("1.6.0.0")]
|
//[assembly: AssemblyFileVersion("1.6.0.0")]
|
||||||
|
|
Loading…
Reference in New Issue