From 1cd71c54fc689b7c871ace061db59d176c941c94 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 29 Jul 2025 10:34:23 +0200 Subject: [PATCH] Clean up --- MaddoShared/ImageCreationStuff.cs | 161 +----- MaddoShared/ImageCreatorSharp.cs | 748 ++++++++++++++++--------- imagecatalog/DataModel.cs | 14 + imagecatalog/MainForm.Designer.cs | 876 +++++++++++++++--------------- imagecatalog/MainForm.cs | 51 +- 5 files changed, 964 insertions(+), 886 deletions(-) diff --git a/MaddoShared/ImageCreationStuff.cs b/MaddoShared/ImageCreationStuff.cs index 66d03cc..a6e08c4 100644 --- a/MaddoShared/ImageCreationStuff.cs +++ b/MaddoShared/ImageCreationStuff.cs @@ -2,6 +2,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.IO; using System.Linq; @@ -13,6 +14,7 @@ using Microsoft.Extensions.Logging; namespace MaddoShared { + [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] public class ImageCreationStuff(ILogger logger, PicSettings picSettings, ImageCreatorSharp imageCreatorService) { public class Options @@ -38,11 +40,9 @@ namespace MaddoShared { var stopwatch = new Stopwatch(); stopwatch.Start(); - // todo immagini counter - //todo set label + await ProcessImagesParallel(options, results, updateEvent, cancellationToken); - // todo set finito label stopwatch.Stop(); return @@ -55,7 +55,7 @@ namespace MaddoShared EventHandler> updateEvent, CancellationToken cancellationToken = default) { - List dataToProcess = GetFilesToProcess(options); + var dataToProcess = GetFilesToProcess(options); // int threads = options.MaxThreads == 0 ? Environment.ProcessorCount * 2 : options.MaxThreads; int threads = options.MaxThreads; @@ -179,158 +179,7 @@ namespace MaddoShared }).ToList(); } - // public async Task CreaImmaginiParallel(Options options, ConcurrentBag results, - // EventHandler> updateEvent, - // CancellationToken cancellationToken = default(CancellationToken)) - // { - // var dataToProcess = new List(); - // if (options.AggiornaSottodirectory && options.CreaSottocartelle) - // { - // var helper = new FileHelperSharp(); - // dataToProcess = helper.GetFilesRecursive(new DirectoryInfo(options.SourcePath), - // new DirectoryInfo(options.DestinationPath), - // "*.jpg", new FileHelperOptions() - // { - // FilesPerFolder = options.FilePerCartella, - // Suffix = options.SuffissoCartelle, - // CounterSize = options.CifreContatore, - // NumerationType = options.NumerazioneType - // }); - // } - // else if (!options.CreaSottocartelle) - // { - // var files = Directory.EnumerateFiles(options.SourcePath, "*.jpg", - // options.AggiornaSottodirectory - // ? SearchOption.AllDirectories - // : SearchOption.TopDirectoryOnly); - // - // dataToProcess = files.Select(x => - // { - // var fInfo = new FileInfo(x); - // var filePath = fInfo.DirectoryName; - // var trimmedSourcePath = options.SourcePath.TrimEnd('\\'); - // var newFilePath = fInfo.FullName.Replace(trimmedSourcePath, "").TrimStart('\\'); - // newFilePath = Path.Combine(options.DestinationPath, newFilePath); - // - // var destFolderPath = new FileInfo(newFilePath).DirectoryName; - // var destFolderInfo = new DirectoryInfo(destFolderPath); - // destFolderInfo.EnsureDirectoryExists(); - // - // return new FileData(fInfo, new DirectoryInfo(new FileInfo(newFilePath).DirectoryName)); - // }).ToList(); - // - // //// TODO - // //dataToProcess = - // // (from f in Directory.EnumerateFiles(options.SourcePath, "*.jpg", - // // options.AggiornaSottodirectory - // // ? SearchOption.AllDirectories - // // : SearchOption.TopDirectoryOnly) - // // select new FileData(new FileInfo(f), - // // new DirectoryInfo(options.DestinationPath.PathCombine( - // // new FileInfo(f).DirectoryName.Replace(options.SourcePath.TrimEnd(new char[] {'\\'}), "") - // // ) - // // ) - // // ) - // // ) - // // .ToList(); - // } - // - // var threads = options.MaxThreads == 0 ? Environment.ProcessorCount * 2 : options.MaxThreads; - // var scheduler = new ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, threads) - // .ConcurrentScheduler; - // - // //var allTasks = new List(); - // var test = from d in dataToProcess - // select Task.Factory.StartNew(async () => - // { - // var imgCreator = new ImageCreatorSharp(d.File, d.Directory); - // await imgCreator.CreaImmagineThread(d.File.Name); - // - // //await new ImageCreatorSharp(d.File, d.Directory).CreaImmagineThread(d.File.Name); - // - // imgCreator = null; - // - // //var imgC = new ImageCreatorSharp(d.File, d.Directory); - // //imgC.CreaImmagineThread(d.File.Name); - // //imgC = null; - // }, CancellationToken.None, TaskCreationOptions.None, scheduler); - // - // //int count = 0; - // - // if (options.LinearExecution) - // { - // foreach (var task in test) - // { - // await task; - // } - // } - // else - // { - // if (options.ChunksSize == 0) - // { - // //var opts = new ParallelOptions() { MaxDegreeOfParallelism = threads, CancellationToken = cancellationToken, TaskScheduler = scheduler}; - // await dataToProcess.ParallelForEachAsync(async fileData => - // { - // var imgCreator = new ImageCreatorSharp(fileData.File, fileData.Directory); - // await imgCreator.CreaImmagineThread(fileData.File.Name); - // // await new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread(fileData.File.Name); - // results.Add(fileData.File.Name); - // //count = Interlocked.Increment(ref count); - // - // try - // { - // updateEvent?.Invoke(this, new Tuple(fileData.File.Name, dataToProcess.Count)); - // } - // catch (Exception e) - // { - // logger.LogError(e, "Error in reporting update"); - // //Console.WriteLine(e); - // throw; - // } - // finally - // { - // // Disposing of the creator - // imgCreator = null; - // } - // }, maxDegreeOfParallelism: threads, false, cancellationToken); - // } - // else - // { - // var asdf = SplitList(dataToProcess.ToList(), options.ChunksSize).ToList(); - // - // - // foreach (var sdaf in asdf) - // { - // await sdaf.ParallelForEachAsync(async fileData => - // { - // var imgCreator = new ImageCreatorSharp(fileData.File, fileData.Directory); - // await imgCreator.CreaImmagineThread(fileData.File.Name); - // // await new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread( - // // fileData.File.Name); - // results.Add(fileData.File.Name); - // //count = Interlocked.Increment(ref count); - // try - // { - // updateEvent?.Invoke(this, - // new Tuple(fileData.File.Name, dataToProcess.Count)); - // } - // catch (Exception e) - // { - // logger.LogError("Error in reporting update"); - // //Console.WriteLine(e); - // throw; - // } - // finally - // { - // imgCreator = null; - // } - // }, maxDegreeOfParallelism: threads, false, cancellationToken); - // } - // } - // } - // } - - public static IEnumerable> SplitList(List bigList, int nSize = 3) + private static IEnumerable> SplitList(List bigList, int nSize = 3) { for (int i = 0; i < bigList.Count; i += nSize) { diff --git a/MaddoShared/ImageCreatorSharp.cs b/MaddoShared/ImageCreatorSharp.cs index 4a241e2..e989984 100644 --- a/MaddoShared/ImageCreatorSharp.cs +++ b/MaddoShared/ImageCreatorSharp.cs @@ -19,7 +19,6 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger @@ -56,14 +55,8 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger 0) { - if (g.PropertyIdList.Length > 0) + switch (imgState.Orientation) { - //ExifReader DatiExif = new ExifReader((Bitmap)g); - - switch (imgState.Orientation /*DatiExif.Orientation*/) - { - case Orientations.BottomLeft: - case Orientations.BottomRight: - case Orientations.LeftTop: - case Orientations.LftBottom: - imgState.FotoRuotaASinistra = true; - break; - case Orientations.RightBottom: - case Orientations.RightTop: - case Orientations.TopLeft: - case Orientations.TopRight: - break; - - } + case Orientations.BottomLeft: + case Orientations.BottomRight: + case Orientations.LeftTop: + case Orientations.LftBottom: + imgState.FotoRuotaASinistra = true; + break; + case Orientations.RightBottom: + case Orientations.RightTop: + case Orientations.TopLeft: + case Orientations.TopRight: + break; } } @@ -149,7 +137,9 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger private void ImpostaTestoExtra(Image g, ImageState imgState) { - if (picSettings.UsaOrarioTestoApplicare | picSettings.UsaTempoGaraTestoApplicare | picSettings.UsaOrarioMiniatura | picSettings.TestoMin | picSettings.AggTempoGaraMin | picSettings.AggNumTempMin) + if (picSettings.UsaOrarioTestoApplicare | picSettings.UsaTempoGaraTestoApplicare | + picSettings.UsaOrarioMiniatura | picSettings.TestoMin | picSettings.AggTempoGaraMin | + picSettings.AggNumTempMin) { if (g.PropertyIdList.Length <= 0) return; //ExifReader DatiExif = new ExifReader((Bitmap)g); @@ -170,7 +160,7 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger g.Height) { @@ -225,209 +215,403 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger 0) + // { + // using var imgOutputSmall = (Bitmap)imgOutputBig.Clone(); + // using var grPhoto1 = Graphics.FromImage(imgOutputSmall); + // grPhoto1.SmoothingMode = SmoothingMode.AntiAlias; + // + // // quick fix + // imgState.DimensioneStandardMiniatura = 50; + // if (picSettings.Grassetto == true) + // { + // crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura, + // FontStyle.Bold); + // crFont2 = new Font(picSettings.IlFont, imgState.DimensioneStandard, FontStyle.Bold); + // } + // else + // { + // crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura); + // crFont2 = new Font(picSettings.IlFont, imgState.DimensioneStandard); + // } + // + // crSize1 = grPhoto1.MeasureString(imgState.TestoFirmaPiccola, crFont1); + // crSize2 = grPhoto1.MeasureString(imgState.TestoFirma, crFont1); + // var larghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); + // + // if (crSize1.Width > System.Convert.ToSingle(g.Width)) + // { + // int Conta = imgState.DimensioneStandardMiniatura; + // do + // { + // if (Conta > 20) + // Conta -= 5; + // else + // Conta -= 1; + // if (picSettings.Grassetto == true) + // crFont1 = new Font(picSettings.IlFont, Conta, FontStyle.Bold); + // else + // crFont1 = new Font(picSettings.IlFont, Conta); + // crSize1 = grPhoto1.MeasureString(imgState.TestoFirmaPiccola, crFont1); + // if (crSize1.Width < System.Convert.ToSingle(g.Width)) + // { + // larghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); + // break; + // } + // + // if (Conta <= 5) + // break; + // } while (true); + // + // imgState.DimensioneStandardMiniatura = Conta; + // } + // + // switch (picSettings.Posizione.ToUpper()) + // { + // case "ALTO": + // { + // imgState.YPosFromBottom1 = (picSettings.Margine); + // imgState.YPosFromBottom4 = (picSettings.MargVert); + // break; + // } + // + // case "BASSO": + // { + // imgState.YPosFromBottom1 = System.Convert.ToSingle((g.Height - crSize1.Height - + // (g.Height * picSettings.Margine / + // (double)100))); + // imgState.YPosFromBottom4 = System.Convert.ToSingle((g.Height - crSize1.Height - + // (g.Height * picSettings.MargVert / + // (double)100))); + // break; + // } + // } + // + // float xCenterOfImg1 = 0; + // + // using StringFormat strFormat1 = new StringFormat(); + // switch (picSettings.Allineamento.ToUpper()) + // { + // case "SINISTRA": + // { + // xCenterOfImg1 = + // System.Convert.ToSingle((picSettings.Margine + (larghezzaStandard1 / (double)2))); + // + // if ((larghezzaStandard1 / (double)2) > (g.Width / (double)2) - picSettings.Margine) + // xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); + // break; + // } + // + // case "CENTRO": + // { + // xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); + // break; + // } + // + // case "DESTRA": + // { + // xCenterOfImg1 = System.Convert.ToSingle((g.Width - picSettings.Margine - + // (larghezzaStandard1 / (double)2))); + // + // if ((larghezzaStandard1 / (double)2) > (g.Width / (double)2) - picSettings.Margine) + // xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); + // break; + // } + // } + // + // strFormat1.Alignment = StringAlignment.Center; + // + // using var semiTransBrush21 = new SolidBrush(Color.FromArgb(imgState.AlphaScelta, 0, 0, 0)); + // using var semiTransBrush1 = + // new SolidBrush(Color.FromArgb(imgState.AlphaScelta, picSettings.FontColoreRGB)); + // + // // quick fix + // imgState.DimensioneStandardMiniatura = picSettings.DimMin; + // + // if (picSettings.Grassetto == true) + // crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura, + // FontStyle.Bold); + // else + // crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura); + // + // if (picSettings.TestoMin) + // { + // grPhoto1.DrawString(imgState.NomeFileBig, crFont1, semiTransBrush21, + // new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); + // grPhoto1.DrawString(imgState.NomeFileBig, crFont1, semiTransBrush1, + // new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); + // } + // else if (picSettings.AggTempoGaraMin & picSettings.UsaTempoGaraTestoApplicare) + // { + // var diff = imgState.DataPartenzaI - imgState.DataFoto; + // var diffA = diff.TotalSeconds * 10000000; + // + // var orario = + // new TimeSpan(0, 0, + // (int)diffA); /* new TimeSpan(DateTime.DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000);*/ + // string tempstr = ""; + // + // + // tempstr += Environment.NewLine + imgState.TestoOrario + orario.Hours.ToString("00") + ":" + + // orario.Minutes.ToString("00") + ":" + orario.Seconds.ToString("00"); + // + // + // grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, + // new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); + // grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, + // new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); + // } + // else if (picSettings.AggNumTempMin) + // { + // var diff = imgState.DataPartenzaI - imgState.DataFoto; + // var diffA = diff.TotalSeconds * 10000000; + // TimeSpan Orario = new TimeSpan(0, 0, (int)diffA); + // string tempstr = ""; + // tempstr += imgState.NomeFileBig; + // + // tempstr += Environment.NewLine + imgState.TestoOrario + Orario.Hours.ToString("00") + ":" + + // Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + // + // + // grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, + // new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); + // grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, + // new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); + // } + // else + // { + // grPhoto1.DrawString(imgState.TestoFirmaPiccola, crFont1, semiTransBrush21, + // new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); + // grPhoto1.DrawString(imgState.TestoFirmaPiccola, crFont1, semiTransBrush1, + // new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); + // } + // + // // Salva la miniatura + // //using (var g22 = Image.FromHbitmap(imgOutputSmall)) + // + // + // using var imgOutputSmall2 = new Bitmap(imgOutputSmall, imgState.ThumbSizeSmall.Width, + // imgState.ThumbSizeSmall.Height); + // imgOutputSmall2.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), + // thisFormat); + // + // //imgOutputSmall2.Dispose(); + // + // //imgOutputSmall.Dispose(); + // + // + // //File.Delete(Path.Combine(DestDir.FullName, "Temp_" + nomeFileSmall)); + // //FileSystem.Kill(); + // } + // else + // { + // using var imgOutputSmall = new Bitmap(g, imgState.ThumbSizeSmall.Width, + // imgState.ThumbSizeSmall.Height); + // imgOutputSmall.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), + // thisFormat); + // //imgOutputSmall.Dispose(); + // } + // } + // else + // { + // using var imgOutputSmall = + // new Bitmap(g, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); + // imgOutputSmall.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), thisFormat); + // //imgOutputSmall.Dispose(); + // } + // + // crFont1?.Dispose(); + // crFont2?.Dispose(); + // } + + private void CreaMiniature(Image sourceImage, ImageState imgState, Bitmap imgOutputBig, ImageFormat format) + { + if (!picSettings.CreaMiniature || picSettings.AggiungiScritteMiniature) + return; + + PrepareSignatureText(imgState); + + if (IsSameDirectory(picSettings.DirectorySorgente, picSettings.DirectoryDestinazione)) + UpdateFileNameWithCode(imgState); + + if (ShouldRenderText()) + CreateMiniatureWithText(sourceImage, imgState, imgOutputBig, format); + else + CreateSimpleThumbnail(sourceImage, imgState, format); + } + + private void PrepareSignatureText(ImageState imgState) { if (picSettings.TestoMin) imgState.TestoFirmaPiccola = imgState.NomeFileBig; else if (picSettings.AggNumTempMin) imgState.TestoFirmaPiccola = imgState.NomeFileBig + " "; - // Dim yPosFromBottom4 As Single + } - Font crFont1 = null/* TODO Change to default(_) if this is not a reference type */; - Font crFont2 = null/* TODO Change to default(_) if this is not a reference type */; - var crSize1 = new SizeF(); - var crSize2 = new SizeF(); + private bool IsSameDirectory(string dir1, string dir2) => + string.Equals(dir1, dir2, StringComparison.OrdinalIgnoreCase); - if (picSettings.CreaMiniature == true) + private void UpdateFileNameWithCode(ImageState imgState) + { + var name = imgState.NomeFileSmall; + imgState.NomeFileSmall = name[..^4] + picSettings.Codice + name[^4..]; + } + + private bool ShouldRenderText() => + picSettings.UsaOrarioMiniatura || picSettings.TestoMin || picSettings.AggTempoGaraMin || + picSettings.AggNumTempMin; + + private void CreateSimpleThumbnail(Image image, ImageState imgState, ImageFormat format) + { + using var thumbnail = new Bitmap(image, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); + thumbnail.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), format); + } + + private void CreateMiniatureWithText(Image image, ImageState imgState, Bitmap sourceBitmap, ImageFormat format) + { + if (imgState.TestoFirmaPiccola.Length == 0) { - if (picSettings.AggiungiScritteMiniature == false) - { - if (string.Equals(picSettings.DirectorySorgente, picSettings.DirectoryDestinazione, StringComparison.OrdinalIgnoreCase)) - imgState.NomeFileSmall = imgState.NomeFileSmall.Substring(0, imgState.NomeFileSmall.Length - 4) + picSettings.Codice + imgState.NomeFileSmall.Substring(imgState.NomeFileSmall.Length - 4); - if (picSettings.UsaOrarioMiniatura | picSettings.TestoMin | picSettings.AggTempoGaraMin | picSettings.AggNumTempMin) - { - if (imgState.TestoFirmaPiccola.Length > 0) - { - using var imgOutputSmall = (Bitmap)imgOutputBig.Clone(); - using var grPhoto1 = Graphics.FromImage(imgOutputSmall); - grPhoto1.SmoothingMode = SmoothingMode.AntiAlias; - - // quick fix - imgState.DimensioneStandardMiniatura = 50; - if (picSettings.Grassetto == true) - { - crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura, FontStyle.Bold); - crFont2 = new Font(picSettings.IlFont, imgState.DimensioneStandard, FontStyle.Bold); - } - else - { - crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura); - crFont2 = new Font(picSettings.IlFont, imgState.DimensioneStandard); - } - - crSize1 = grPhoto1.MeasureString(imgState.TestoFirmaPiccola, crFont1); - crSize2 = grPhoto1.MeasureString(imgState.TestoFirma, crFont1); - var larghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); - - if (crSize1.Width > System.Convert.ToSingle(g.Width)) - { - int Conta = imgState.DimensioneStandardMiniatura; - do - { - if (Conta > 20) - Conta -= 5; - else - Conta -= 1; - if (picSettings.Grassetto == true) - crFont1 = new Font(picSettings.IlFont, Conta, FontStyle.Bold); - else - crFont1 = new Font(picSettings.IlFont, Conta); - crSize1 = grPhoto1.MeasureString(imgState.TestoFirmaPiccola, crFont1); - if (crSize1.Width < System.Convert.ToSingle(g.Width)) - { - larghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); - break; - } - - if (Conta <= 5) - break; - } - while (true); - imgState.DimensioneStandardMiniatura = Conta; - } - - switch (picSettings.Posizione.ToUpper()) - { - case "ALTO": - { - imgState.YPosFromBottom1 = (picSettings.Margine); - imgState.YPosFromBottom4 = (picSettings.MargVert); - break; - } - - case "BASSO": - { - imgState.YPosFromBottom1 = System.Convert.ToSingle((g.Height - crSize1.Height - (g.Height * picSettings.Margine / (double)100))); - imgState.YPosFromBottom4 = System.Convert.ToSingle((g.Height - crSize1.Height - (g.Height * picSettings.MargVert / (double)100))); - break; - } - } - - float xCenterOfImg1 = 0; - - using StringFormat strFormat1 = new StringFormat(); - switch (picSettings.Allineamento.ToUpper()) - { - case "SINISTRA": - { - xCenterOfImg1 = System.Convert.ToSingle((picSettings.Margine + (larghezzaStandard1 / (double)2))); - - if ((larghezzaStandard1 / (double)2) > (g.Width / (double)2) - picSettings.Margine) - xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); - break; - } - - case "CENTRO": - { - xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); - break; - } - - case "DESTRA": - { - xCenterOfImg1 = System.Convert.ToSingle((g.Width - picSettings.Margine - (larghezzaStandard1 / (double)2))); - - if ((larghezzaStandard1 / (double)2) > (g.Width / (double)2) - picSettings.Margine) - xCenterOfImg1 = System.Convert.ToSingle((g.Width / (double)2)); - break; - } - } - strFormat1.Alignment = StringAlignment.Center; - - using var semiTransBrush21 = new SolidBrush(Color.FromArgb(imgState.AlphaScelta, 0, 0, 0)); - using var semiTransBrush1 = new SolidBrush(Color.FromArgb(imgState.AlphaScelta, picSettings.FontColoreRGB)); - - // quick fix - imgState.DimensioneStandardMiniatura = picSettings.DimMin; - - if (picSettings.Grassetto == true) - crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura, FontStyle.Bold); - else - crFont1 = new Font(picSettings.IlFont, imgState.DimensioneStandardMiniatura); - // asdgadfhdfhjgfsjgfjygfdhsdafa - if (picSettings.TestoMin) - { - grPhoto1.DrawString(imgState.NomeFileBig, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); - grPhoto1.DrawString(imgState.NomeFileBig, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); - } - else if (picSettings.AggTempoGaraMin & picSettings.UsaTempoGaraTestoApplicare) - { - var diff = imgState.DataPartenzaI - imgState.DataFoto; - var diffA = diff.TotalSeconds * 10000000; - - var orario = new TimeSpan(0, 0, (int)diffA);/* new TimeSpan(DateTime.DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000);*/ - string tempstr = ""; - - - tempstr += Environment.NewLine + imgState.TestoOrario + orario.Hours.ToString("00") + ":" + orario.Minutes.ToString("00") + ":" + orario.Seconds.ToString("00"); - - - grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); - grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); - } - else if (picSettings.AggNumTempMin) - { - var diff = imgState.DataPartenzaI - imgState.DataFoto; - var diffA = diff.TotalSeconds * 10000000; - TimeSpan Orario = new TimeSpan(0, 0, (int)diffA); - string tempstr = ""; - tempstr += imgState.NomeFileBig; - - tempstr += Environment.NewLine + imgState.TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); - - - grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); - grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); - } - else - { - grPhoto1.DrawString(imgState.TestoFirmaPiccola, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, imgState.YPosFromBottom1 + 1), strFormat1); - grPhoto1.DrawString(imgState.TestoFirmaPiccola, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, imgState.YPosFromBottom1), strFormat1); - } - - // Salva la miniatura - //using (var g22 = Image.FromHbitmap(imgOutputSmall)) - - - using var imgOutputSmall2 = new Bitmap(imgOutputSmall, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); - imgOutputSmall2.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), thisFormat); - - //imgOutputSmall2.Dispose(); - - //imgOutputSmall.Dispose(); - - - //File.Delete(Path.Combine(DestDir.FullName, "Temp_" + nomeFileSmall)); - //FileSystem.Kill(); - } - else - { - using var imgOutputSmall = new Bitmap(g, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); - imgOutputSmall.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), thisFormat); - //imgOutputSmall.Dispose(); - } - } - else - { - using var imgOutputSmall = new Bitmap(g, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); - imgOutputSmall.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), thisFormat); - //imgOutputSmall.Dispose(); - } - } + CreateSimpleThumbnail(image, imgState, format); + return; } - crFont1?.Dispose(); - crFont2?.Dispose(); + using var imgOutputSmall = (Bitmap)sourceBitmap.Clone(); + using var graphics = Graphics.FromImage(imgOutputSmall); + graphics.SmoothingMode = SmoothingMode.AntiAlias; + + imgState.DimensioneStandardMiniatura = 50; + + using var font1 = CreateFont(picSettings.IlFont, imgState.DimensioneStandardMiniatura, picSettings.Grassetto); + var textSize = graphics.MeasureString(imgState.TestoFirmaPiccola, font1); + + AdjustFontToFitWidth(graphics, image.Width, imgState, ref textSize); + + SetVerticalPosition(image.Height, textSize.Height, imgState); + + float xCenter = CalculateHorizontalAlignment(image.Width, textSize.Width); + using var stringFormat = new StringFormat(); + stringFormat.Alignment = StringAlignment.Center; + + using var shadowBrush = new SolidBrush(Color.FromArgb(imgState.AlphaScelta, 0, 0, 0)); + using var textBrush = new SolidBrush(Color.FromArgb(imgState.AlphaScelta, picSettings.FontColoreRGB)); + + imgState.DimensioneStandardMiniatura = picSettings.DimMin; + + using var finalFont = + CreateFont(picSettings.IlFont, imgState.DimensioneStandardMiniatura, picSettings.Grassetto); + DrawText(graphics, imgState, xCenter, stringFormat, shadowBrush, textBrush, finalFont); + + using var finalThumb = + new Bitmap(imgOutputSmall, imgState.ThumbSizeSmall.Width, imgState.ThumbSizeSmall.Height); + finalThumb.Save(Path.Combine(imgState.DestDir.FullName, imgState.NomeFileSmall), format); + } + + private Font CreateFont(string fontName, int size, bool bold) => + new Font(fontName, size, bold ? FontStyle.Bold : FontStyle.Regular); + + private void AdjustFontToFitWidth(Graphics g, int maxWidth, ImageState imgState, ref SizeF size) + { + int currentSize = imgState.DimensioneStandardMiniatura; + + while (size.Width > maxWidth && currentSize > 5) + { + currentSize = (currentSize > 20) ? currentSize - 5 : currentSize - 1; + using var tempFont = CreateFont(picSettings.IlFont, currentSize, picSettings.Grassetto); + size = g.MeasureString(imgState.TestoFirmaPiccola, tempFont); + //tempFont.Dispose(); + } + + imgState.DimensioneStandardMiniatura = currentSize; + } + + private void SetVerticalPosition(int imgHeight, float textHeight, ImageState imgState) + { + switch (picSettings.Posizione.ToUpper()) + { + case "ALTO": + imgState.YPosFromBottom1 = picSettings.Margine; + imgState.YPosFromBottom4 = picSettings.MargVert; + break; + + case "BASSO": + imgState.YPosFromBottom1 = (float)(imgHeight - textHeight - (imgHeight * picSettings.Margine / 100.0)); + imgState.YPosFromBottom4 = (float)(imgHeight - textHeight - (imgHeight * picSettings.MargVert / 100.0)); + break; + } + } + + private float CalculateHorizontalAlignment(int imgWidth, float textWidth) + { + double halfWidth = textWidth / 2.0; + + return picSettings.Allineamento.ToUpper() switch + { + "SINISTRA" => (float)Math.Min(picSettings.Margine + halfWidth, imgWidth / 2.0), + "DESTRA" => (float)Math.Max(imgWidth - picSettings.Margine - halfWidth, imgWidth / 2.0), + _ => imgWidth / 2.0f, // CENTRO or default + }; + } + + private void DrawText(Graphics g, ImageState imgState, float x, StringFormat format, + Brush shadowBrush, Brush textBrush, Font font) + { + string content = imgState.TestoFirmaPiccola; + + if (picSettings.TestoMin) + { + content = imgState.NomeFileBig; + } + else if (picSettings.AggTempoGaraMin && picSettings.UsaTempoGaraTestoApplicare) + { + content = FormatTimeText(imgState, includeFileName: false); + } + else if (picSettings.AggNumTempMin) + { + content = FormatTimeText(imgState, includeFileName: true); + } + + var offset = new PointF(x + 1, imgState.YPosFromBottom1 + 1); + var actual = new PointF(x, imgState.YPosFromBottom1); + + g.DrawString(content, font, shadowBrush, offset, format); + g.DrawString(content, font, textBrush, actual, format); + } + + private string FormatTimeText(ImageState imgState, bool includeFileName) + { + var diff = imgState.DataPartenzaI - imgState.DataFoto; + var ticks = (long)(diff.TotalSeconds * 10000000); + var time = new TimeSpan(ticks); + + var formatted = $"{imgState.TestoOrario}{time:hh\\:mm\\:ss}"; + return includeFileName + ? $"{imgState.NomeFileBig}{Environment.NewLine}{formatted}" + : Environment.NewLine + formatted; } private void AggiungiTesto(Image g, ImageState imgState, Bitmap imgOutputBig) @@ -435,7 +619,7 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger (g.Width / (double)2) - picSettings.Margine) xCenterOfImg = System.Convert.ToSingle((g.Width / (double)2)); if ((larghezzaStandard / (double)2) > (g.Width / (double)2) - picSettings.MargVert) @@ -521,6 +711,7 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger fattoreAlt ? NewthumbSize(logo.Width, logo.Height, fotoLogoW, "Larghezza") : NewthumbSize(logo.Width, logo.Height, fotoLogoH, "Altezza"); + var nuovaSize = fattoreLarg > fattoreAlt + ? NewthumbSize(logo.Width, logo.Height, fotoLogoW, "Larghezza") + : NewthumbSize(logo.Width, logo.Height, fotoLogoH, "Altezza"); var inPercentualeL = picSettings.LogoMargine.EndsWith('%'); var margineL = System.Convert.ToInt32(picSettings.LogoMargine); - var margineUsato = inPercentualeL ? System.Convert.ToInt32(imgOutputBig.Height * margineL / (double)100) : margineL; + var margineUsato = + inPercentualeL ? System.Convert.ToInt32(imgOutputBig.Height * margineL / (double)100) : margineL; int xPosOfWm = 0; int yPosOfWm = 0; @@ -651,6 +863,7 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger g2.Height ? NewthumbSize(g2.Width, g2.Height, picSettings.LarghezzaBig, "Larghezza") : NewthumbSize(g2.Width, g2.Height, picSettings.AltezzaBig, "Altezza"); + imgState.ThumbSizeBig = g2.Width > g2.Height + ? NewthumbSize(g2.Width, g2.Height, picSettings.LarghezzaBig, "Larghezza") + : NewthumbSize(g2.Width, g2.Height, picSettings.AltezzaBig, "Altezza"); using var imgOutputBig2 = new Bitmap(g2, imgState.ThumbSizeBig.Width, imgState.ThumbSizeBig.Height); if (!picSettings.OverwriteFiles && File.Exists(fileName)) @@ -714,7 +930,6 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger /// ''' Calculate the Size of the New image /// ''' @@ -822,10 +1041,9 @@ public class ImageCreatorSharp(PicSettings picSettings, ILogger !_uiEnabled; + + private string _speedCounter = "-"; + + public string SpeedCounter + { + get => _speedCounter; + set + { + _speedCounter = value; + NotifyPropertyChanged(); + } + } private void Test(object parameter) { diff --git a/imagecatalog/MainForm.Designer.cs b/imagecatalog/MainForm.Designer.cs index 265c4cf..4945462 100644 --- a/imagecatalog/MainForm.Designer.cs +++ b/imagecatalog/MainForm.Designer.cs @@ -211,19 +211,19 @@ namespace ImageCatalog // // ProgressBar1 // - ProgressBar1.Location = new Point(719, 374); - ProgressBar1.Margin = new Padding(4, 5, 4, 5); + ProgressBar1.Location = new Point(1168, 598); + ProgressBar1.Margin = new Padding(6, 8, 6, 8); ProgressBar1.Name = "ProgressBar1"; - ProgressBar1.Size = new Size(256, 35); + ProgressBar1.Size = new Size(416, 56); ProgressBar1.TabIndex = 67; // // CheckBox22 // CheckBox22.AutoSize = true; - CheckBox22.Location = new Point(719, 551); - CheckBox22.Margin = new Padding(4, 5, 4, 5); + CheckBox22.Location = new Point(1168, 882); + CheckBox22.Margin = new Padding(6, 8, 6, 8); CheckBox22.Name = "CheckBox22"; - CheckBox22.Size = new Size(144, 24); + CheckBox22.Size = new Size(226, 36); CheckBox22.TabIndex = 65; CheckBox22.Text = "Arresta il sistema"; CheckBox22.UseVisualStyleBackColor = true; @@ -231,10 +231,11 @@ namespace ImageCatalog // Label43 // Label43.AutoSize = true; - Label43.Location = new Point(715, 526); - Label43.Margin = new Padding(4, 0, 4, 0); + Label43.DataBindings.Add(new Binding("Text", bindingSource1, "SpeedCounter", true)); + Label43.Location = new Point(1162, 842); + Label43.Margin = new Padding(6, 0, 6, 0); Label43.Name = "Label43"; - Label43.Size = new Size(33, 20); + Label43.Size = new Size(53, 32); Label43.TabIndex = 64; Label43.Text = "000"; Label43.TextAlign = ContentAlignment.MiddleLeft; @@ -247,11 +248,11 @@ namespace ImageCatalog TabControl1.Controls.Add(TabPage1); TabControl1.Controls.Add(TabPage4); TabControl1.DataBindings.Add(new Binding("Enabled", bindingSource1, "UiEnabled", true)); - TabControl1.Location = new Point(16, 18); - TabControl1.Margin = new Padding(4, 5, 4, 5); + TabControl1.Location = new Point(26, 24); + TabControl1.Margin = new Padding(6, 8, 6, 8); TabControl1.Name = "TabControl1"; TabControl1.SelectedIndex = 0; - TabControl1.Size = new Size(695, 580); + TabControl1.Size = new Size(1129, 928); TabControl1.TabIndex = 63; // // TabPage5 @@ -262,11 +263,11 @@ namespace ImageCatalog TabPage5.Controls.Add(GroupBox3); TabPage5.Controls.Add(GroupBox8); TabPage5.Controls.Add(GroupBox7); - TabPage5.Location = new Point(4, 29); - TabPage5.Margin = new Padding(4, 5, 4, 5); + TabPage5.Location = new Point(8, 46); + TabPage5.Margin = new Padding(6, 8, 6, 8); TabPage5.Name = "TabPage5"; - TabPage5.Padding = new Padding(4, 5, 4, 5); - TabPage5.Size = new Size(687, 547); + TabPage5.Padding = new Padding(6, 8, 6, 8); + TabPage5.Size = new Size(1113, 874); TabPage5.TabIndex = 4; TabPage5.Text = "Generale"; TabPage5.UseVisualStyleBackColor = true; @@ -274,9 +275,10 @@ namespace ImageCatalog // button1 // button1.DataBindings.Add(new Binding("Command", bindingSource1, "AsyncTestCommand", true)); - button1.Location = new Point(501, 480); + button1.Location = new Point(814, 768); + button1.Margin = new Padding(5); button1.Name = "button1"; - button1.Size = new Size(94, 29); + button1.Size = new Size(153, 46); button1.TabIndex = 50; button1.Text = "Test Async"; button1.UseVisualStyleBackColor = true; @@ -292,9 +294,10 @@ namespace ImageCatalog // btnTest // btnTest.DataBindings.Add(new Binding("Command", bindingSource1, "TestCommand", true)); - btnTest.Location = new Point(325, 472); + btnTest.Location = new Point(528, 755); + btnTest.Margin = new Padding(5); btnTest.Name = "btnTest"; - btnTest.Size = new Size(94, 29); + btnTest.Size = new Size(153, 46); btnTest.TabIndex = 49; btnTest.Text = "Test"; btnTest.UseVisualStyleBackColor = true; @@ -306,11 +309,11 @@ namespace ImageCatalog GroupBox11.Controls.Add(TextBox8); GroupBox11.Controls.Add(Label7); GroupBox11.Controls.Add(TextBox7); - GroupBox11.Location = new Point(9, 322); - GroupBox11.Margin = new Padding(4, 5, 4, 5); + GroupBox11.Location = new Point(15, 515); + GroupBox11.Margin = new Padding(6, 8, 6, 8); GroupBox11.Name = "GroupBox11"; - GroupBox11.Padding = new Padding(4, 5, 4, 5); - GroupBox11.Size = new Size(255, 203); + GroupBox11.Padding = new Padding(6, 8, 6, 8); + GroupBox11.Size = new Size(414, 325); GroupBox11.TabIndex = 48; GroupBox11.TabStop = false; GroupBox11.Text = "Avanzate (ATTENZIONE)"; @@ -319,20 +322,20 @@ namespace ImageCatalog // Panel3.Controls.Add(rdbNuovoMetodo); Panel3.Controls.Add(rdbVecchioMetodo); - Panel3.Location = new Point(9, 112); - Panel3.Margin = new Padding(4, 5, 4, 5); + Panel3.Location = new Point(15, 179); + Panel3.Margin = new Padding(6, 8, 6, 8); Panel3.Name = "Panel3"; - Panel3.Size = new Size(237, 82); + Panel3.Size = new Size(385, 131); Panel3.TabIndex = 4; // // rdbNuovoMetodo // rdbNuovoMetodo.AutoSize = true; rdbNuovoMetodo.Checked = true; - rdbNuovoMetodo.Location = new Point(11, 43); - rdbNuovoMetodo.Margin = new Padding(4, 5, 4, 5); + rdbNuovoMetodo.Location = new Point(18, 69); + rdbNuovoMetodo.Margin = new Padding(6, 8, 6, 8); rdbNuovoMetodo.Name = "rdbNuovoMetodo"; - rdbNuovoMetodo.Size = new Size(87, 24); + rdbNuovoMetodo.Size = new Size(134, 36); rdbNuovoMetodo.TabIndex = 1; rdbNuovoMetodo.TabStop = true; rdbNuovoMetodo.Text = "Parallelo"; @@ -341,10 +344,10 @@ namespace ImageCatalog // rdbVecchioMetodo // rdbVecchioMetodo.AutoSize = true; - rdbVecchioMetodo.Location = new Point(11, 6); - rdbVecchioMetodo.Margin = new Padding(4, 5, 4, 5); + rdbVecchioMetodo.Location = new Point(18, 10); + rdbVecchioMetodo.Margin = new Padding(6, 8, 6, 8); rdbVecchioMetodo.Name = "rdbVecchioMetodo"; - rdbVecchioMetodo.Size = new Size(78, 24); + rdbVecchioMetodo.Size = new Size(122, 36); rdbVecchioMetodo.TabIndex = 0; rdbVecchioMetodo.Text = "Lineare"; rdbVecchioMetodo.UseVisualStyleBackColor = true; @@ -352,38 +355,38 @@ namespace ImageCatalog // Label8 // Label8.AutoSize = true; - Label8.Location = new Point(85, 40); - Label8.Margin = new Padding(4, 0, 4, 0); + Label8.Location = new Point(138, 64); + Label8.Margin = new Padding(6, 0, 6, 0); Label8.Name = "Label8"; - Label8.Size = new Size(152, 20); + Label8.Size = new Size(248, 32); Label8.TabIndex = 3; Label8.Text = "Chunk Size (0 = MAX)"; // // TextBox8 // - TextBox8.Location = new Point(9, 31); - TextBox8.Margin = new Padding(4, 5, 4, 5); + TextBox8.Location = new Point(15, 50); + TextBox8.Margin = new Padding(6, 8, 6, 8); TextBox8.Name = "TextBox8"; - TextBox8.Size = new Size(61, 27); + TextBox8.Size = new Size(97, 39); TextBox8.TabIndex = 2; TextBox8.Text = "0"; // // Label7 // Label7.AutoSize = true; - Label7.Location = new Point(81, 74); - Label7.Margin = new Padding(4, 0, 4, 0); + Label7.Location = new Point(132, 118); + Label7.Margin = new Padding(6, 0, 6, 0); Label7.Name = "Label7"; - Label7.Size = new Size(146, 20); + Label7.Size = new Size(236, 32); Label7.TabIndex = 1; Label7.Text = "Threads (0 = CPU *2)"; // // TextBox7 // - TextBox7.Location = new Point(9, 71); - TextBox7.Margin = new Padding(4, 5, 4, 5); + TextBox7.Location = new Point(15, 114); + TextBox7.Margin = new Padding(6, 8, 6, 8); TextBox7.Name = "TextBox7"; - TextBox7.Size = new Size(61, 27); + TextBox7.Size = new Size(97, 39); TextBox7.TabIndex = 0; TextBox7.Text = "0"; // @@ -397,11 +400,11 @@ namespace ImageCatalog GroupBox3.Controls.Add(txtSorgente); GroupBox3.Controls.Add(txtDestinazione); GroupBox3.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox3.Location = new Point(8, 9); - GroupBox3.Margin = new Padding(4, 5, 4, 5); + GroupBox3.Location = new Point(13, 14); + GroupBox3.Margin = new Padding(6, 8, 6, 8); GroupBox3.Name = "GroupBox3"; - GroupBox3.Padding = new Padding(4, 5, 4, 5); - GroupBox3.Size = new Size(661, 155); + GroupBox3.Padding = new Padding(6, 8, 6, 8); + GroupBox3.Size = new Size(1074, 248); GroupBox3.TabIndex = 35; GroupBox3.TabStop = false; GroupBox3.Text = "Directory"; @@ -409,29 +412,29 @@ namespace ImageCatalog // chkAggiornaSottodirectory // chkAggiornaSottodirectory.ForeColor = Color.Black; - chkAggiornaSottodirectory.Location = new Point(107, 98); - chkAggiornaSottodirectory.Margin = new Padding(4, 5, 4, 5); + chkAggiornaSottodirectory.Location = new Point(174, 157); + chkAggiornaSottodirectory.Margin = new Padding(6, 8, 6, 8); chkAggiornaSottodirectory.Name = "chkAggiornaSottodirectory"; - chkAggiornaSottodirectory.Size = new Size(317, 37); + chkAggiornaSottodirectory.Size = new Size(515, 59); chkAggiornaSottodirectory.TabIndex = 25; chkAggiornaSottodirectory.Text = "aggiorna le sottodirectory"; // // _Button3 // - _Button3.Location = new Point(616, 62); - _Button3.Margin = new Padding(4, 5, 4, 5); + _Button3.Location = new Point(1001, 99); + _Button3.Margin = new Padding(6, 8, 6, 8); _Button3.Name = "_Button3"; - _Button3.Size = new Size(32, 31); + _Button3.Size = new Size(52, 50); _Button3.TabIndex = 6; _Button3.Text = "..."; _Button3.Click += Button3_Click; // // _Button2 // - _Button2.Location = new Point(616, 25); - _Button2.Margin = new Padding(4, 5, 4, 5); + _Button2.Location = new Point(1001, 40); + _Button2.Margin = new Padding(6, 8, 6, 8); _Button2.Name = "_Button2"; - _Button2.Size = new Size(32, 31); + _Button2.Size = new Size(52, 50); _Button2.TabIndex = 5; _Button2.Text = "..."; _Button2.Click += Button2_Click; @@ -440,10 +443,10 @@ namespace ImageCatalog // Label1.AutoSize = true; Label1.ForeColor = Color.Black; - Label1.Location = new Point(8, 29); - Label1.Margin = new Padding(4, 0, 4, 0); + Label1.Location = new Point(13, 46); + Label1.Margin = new Padding(6, 0, 6, 0); Label1.Name = "Label1"; - Label1.Size = new Size(69, 20); + Label1.Size = new Size(111, 32); Label1.TabIndex = 3; Label1.Text = "Sorgente"; // @@ -451,30 +454,29 @@ namespace ImageCatalog // Label2.AutoSize = true; Label2.ForeColor = Color.Black; - Label2.Location = new Point(8, 66); - Label2.Margin = new Padding(4, 0, 4, 0); + Label2.Location = new Point(13, 102); + Label2.Margin = new Padding(6, 0, 6, 0); Label2.Name = "Label2"; - Label2.Size = new Size(95, 20); + Label2.Size = new Size(152, 32); Label2.TabIndex = 4; Label2.Text = "Destinazione"; // // txtSorgente // txtSorgente.DataBindings.Add(new Binding("Text", bindingSource1, "SourcePath", true, DataSourceUpdateMode.OnPropertyChanged)); - txtSorgente.Location = new Point(107, 25); - txtSorgente.Margin = new Padding(4, 5, 4, 5); + txtSorgente.Location = new Point(174, 40); + txtSorgente.Margin = new Padding(6, 8, 6, 8); txtSorgente.Name = "txtSorgente"; - txtSorgente.Size = new Size(500, 27); + txtSorgente.Size = new Size(810, 39); txtSorgente.TabIndex = 0; - txtSorgente.Text = ""; // // txtDestinazione // txtDestinazione.DataBindings.Add(new Binding("Text", bindingSource1, "DestinationPath", true, DataSourceUpdateMode.OnPropertyChanged)); - txtDestinazione.Location = new Point(107, 62); - txtDestinazione.Margin = new Padding(4, 5, 4, 5); + txtDestinazione.Location = new Point(174, 99); + txtDestinazione.Margin = new Padding(6, 8, 6, 8); txtDestinazione.Name = "txtDestinazione"; - txtDestinazione.Size = new Size(500, 27); + txtDestinazione.Size = new Size(810, 39); txtDestinazione.TabIndex = 1; txtDestinazione.Text = "TextBox2"; // @@ -491,11 +493,11 @@ namespace ImageCatalog GroupBox8.Controls.Add(txtFilePerCartella); GroupBox8.Controls.Add(Label32); GroupBox8.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox8.Location = new Point(272, 174); - GroupBox8.Margin = new Padding(4, 5, 4, 5); + GroupBox8.Location = new Point(442, 278); + GroupBox8.Margin = new Padding(6, 8, 6, 8); GroupBox8.Name = "GroupBox8"; - GroupBox8.Padding = new Padding(4, 5, 4, 5); - GroupBox8.Size = new Size(256, 234); + GroupBox8.Padding = new Padding(6, 8, 6, 8); + GroupBox8.Size = new Size(416, 374); GroupBox8.TabIndex = 47; GroupBox8.TabStop = false; GroupBox8.Text = "Sottocartelle"; @@ -503,10 +505,10 @@ namespace ImageCatalog // rdbNumFiles // rdbNumFiles.ForeColor = Color.Black; - rdbNumFiles.Location = new Point(43, 197); - rdbNumFiles.Margin = new Padding(4, 5, 4, 5); + rdbNumFiles.Location = new Point(70, 315); + rdbNumFiles.Margin = new Padding(6, 8, 6, 8); rdbNumFiles.Name = "rdbNumFiles"; - rdbNumFiles.Size = new Size(181, 25); + rdbNumFiles.Size = new Size(294, 40); rdbNumFiles.TabIndex = 38; rdbNumFiles.Text = "Numerazione files"; // @@ -514,89 +516,89 @@ namespace ImageCatalog // rdbNumProgressiva.Checked = true; rdbNumProgressiva.ForeColor = Color.Black; - rdbNumProgressiva.Location = new Point(43, 172); - rdbNumProgressiva.Margin = new Padding(4, 5, 4, 5); + rdbNumProgressiva.Location = new Point(70, 275); + rdbNumProgressiva.Margin = new Padding(6, 8, 6, 8); rdbNumProgressiva.Name = "rdbNumProgressiva"; - rdbNumProgressiva.Size = new Size(203, 25); + rdbNumProgressiva.Size = new Size(330, 40); rdbNumProgressiva.TabIndex = 37; rdbNumProgressiva.TabStop = true; rdbNumProgressiva.Text = "Numerazione progressiva"; // // txtCifreContatore // - txtCifreContatore.Location = new Point(171, 135); - txtCifreContatore.Margin = new Padding(4, 5, 4, 5); + txtCifreContatore.Location = new Point(278, 216); + txtCifreContatore.Margin = new Padding(6, 8, 6, 8); txtCifreContatore.Name = "txtCifreContatore"; - txtCifreContatore.Size = new Size(73, 27); + txtCifreContatore.Size = new Size(116, 39); txtCifreContatore.TabIndex = 34; txtCifreContatore.Text = "4"; // // Label34 // Label34.ForeColor = Color.Black; - Label34.Location = new Point(11, 135); - Label34.Margin = new Padding(4, 0, 4, 0); + Label34.Location = new Point(18, 216); + Label34.Margin = new Padding(6, 0, 6, 0); Label34.Name = "Label34"; - Label34.Size = new Size(149, 25); + Label34.Size = new Size(242, 40); Label34.TabIndex = 33; Label34.Text = "Num. cifre contatore"; Label34.TextAlign = ContentAlignment.MiddleRight; // // txtSuffissoCartelle // - txtSuffissoCartelle.Location = new Point(75, 98); - txtSuffissoCartelle.Margin = new Padding(4, 5, 4, 5); + txtSuffissoCartelle.Location = new Point(122, 157); + txtSuffissoCartelle.Margin = new Padding(6, 8, 6, 8); txtSuffissoCartelle.Name = "txtSuffissoCartelle"; - txtSuffissoCartelle.Size = new Size(169, 27); + txtSuffissoCartelle.Size = new Size(272, 39); txtSuffissoCartelle.TabIndex = 32; txtSuffissoCartelle.Text = "TextBox20"; // // Label33 // Label33.ForeColor = Color.Black; - Label33.Location = new Point(8, 103); - Label33.Margin = new Padding(4, 0, 4, 0); + Label33.Location = new Point(13, 165); + Label33.Margin = new Padding(6, 0, 6, 0); Label33.Name = "Label33"; - Label33.Size = new Size(64, 25); + Label33.Size = new Size(104, 40); Label33.TabIndex = 31; Label33.Text = "Suffisso"; // // Label31 // Label31.ForeColor = Color.Black; - Label31.Location = new Point(32, 62); - Label31.Margin = new Padding(4, 0, 4, 0); + Label31.Location = new Point(52, 99); + Label31.Margin = new Padding(6, 0, 6, 0); Label31.Name = "Label31"; - Label31.Size = new Size(43, 25); + Label31.Size = new Size(70, 40); Label31.TabIndex = 30; Label31.Text = "ogni"; // // chkCreaSottocartelle // chkCreaSottocartelle.ForeColor = Color.Black; - chkCreaSottocartelle.Location = new Point(75, 25); - chkCreaSottocartelle.Margin = new Padding(4, 5, 4, 5); + chkCreaSottocartelle.Location = new Point(122, 40); + chkCreaSottocartelle.Margin = new Padding(6, 8, 6, 8); chkCreaSottocartelle.Name = "chkCreaSottocartelle"; - chkCreaSottocartelle.Size = new Size(149, 25); + chkCreaSottocartelle.Size = new Size(242, 40); chkCreaSottocartelle.TabIndex = 29; chkCreaSottocartelle.Text = "crea sottocartelle"; // // txtFilePerCartella // - txtFilePerCartella.Location = new Point(75, 62); - txtFilePerCartella.Margin = new Padding(4, 5, 4, 5); + txtFilePerCartella.Location = new Point(122, 99); + txtFilePerCartella.Margin = new Padding(6, 8, 6, 8); txtFilePerCartella.Name = "txtFilePerCartella"; - txtFilePerCartella.Size = new Size(84, 27); + txtFilePerCartella.Size = new Size(134, 39); txtFilePerCartella.TabIndex = 27; txtFilePerCartella.Text = "99"; // // Label32 // Label32.ForeColor = Color.Black; - Label32.Location = new Point(171, 62); - Label32.Margin = new Padding(4, 0, 4, 0); + Label32.Location = new Point(278, 99); + Label32.Margin = new Padding(6, 0, 6, 0); Label32.Name = "Label32"; - Label32.Size = new Size(32, 25); + Label32.Size = new Size(52, 40); Label32.TabIndex = 28; Label32.Text = "file"; // @@ -606,23 +608,23 @@ namespace ImageCatalog GroupBox7.Controls.Add(chkRotazioneAutomatica); GroupBox7.Controls.Add(chkForzaJpg); GroupBox7.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox7.Location = new Point(8, 174); - GroupBox7.Margin = new Padding(4, 5, 4, 5); + GroupBox7.Location = new Point(13, 278); + GroupBox7.Margin = new Padding(6, 8, 6, 8); GroupBox7.Name = "GroupBox7"; - GroupBox7.Padding = new Padding(4, 5, 4, 5); - GroupBox7.Size = new Size(256, 135); + GroupBox7.Padding = new Padding(6, 8, 6, 8); + GroupBox7.Size = new Size(416, 216); GroupBox7.TabIndex = 45; GroupBox7.TabStop = false; GroupBox7.Text = "Generale"; // // chkSovrascriviFile // - chkSovrascriviFile.DataBindings.Add(new Binding("Checked", bindingSource1, "OverwriteImages", true, DataSourceUpdateMode.OnPropertyChanged)); chkSovrascriviFile.AutoSize = true; - chkSovrascriviFile.Location = new Point(21, 94); - chkSovrascriviFile.Margin = new Padding(4, 5, 4, 5); + chkSovrascriviFile.DataBindings.Add(new Binding("Checked", bindingSource1, "OverwriteImages", true, DataSourceUpdateMode.OnPropertyChanged)); + chkSovrascriviFile.Location = new Point(34, 150); + chkSovrascriviFile.Margin = new Padding(6, 8, 6, 8); chkSovrascriviFile.Name = "chkSovrascriviFile"; - chkSovrascriviFile.Size = new Size(126, 24); + chkSovrascriviFile.Size = new Size(198, 36); chkSovrascriviFile.TabIndex = 2; chkSovrascriviFile.Text = "Sovrascrivi file"; chkSovrascriviFile.UseVisualStyleBackColor = true; @@ -630,10 +632,10 @@ namespace ImageCatalog // chkRotazioneAutomatica // chkRotazioneAutomatica.ForeColor = Color.Black; - chkRotazioneAutomatica.Location = new Point(21, 60); - chkRotazioneAutomatica.Margin = new Padding(4, 5, 4, 5); + chkRotazioneAutomatica.Location = new Point(34, 96); + chkRotazioneAutomatica.Margin = new Padding(6, 8, 6, 8); chkRotazioneAutomatica.Name = "chkRotazioneAutomatica"; - chkRotazioneAutomatica.Size = new Size(181, 25); + chkRotazioneAutomatica.Size = new Size(294, 40); chkRotazioneAutomatica.TabIndex = 1; chkRotazioneAutomatica.Text = "Rotazione automatica"; // @@ -642,10 +644,10 @@ namespace ImageCatalog chkForzaJpg.Checked = true; chkForzaJpg.CheckState = CheckState.Checked; chkForzaJpg.ForeColor = Color.Black; - chkForzaJpg.Location = new Point(21, 28); - chkForzaJpg.Margin = new Padding(4, 5, 4, 5); + chkForzaJpg.Location = new Point(34, 45); + chkForzaJpg.Margin = new Padding(6, 8, 6, 8); chkForzaJpg.Name = "chkForzaJpg"; - chkForzaJpg.Size = new Size(107, 25); + chkForzaJpg.Size = new Size(174, 40); chkForzaJpg.TabIndex = 0; chkForzaJpg.Text = "Forza Jpg"; // @@ -655,11 +657,11 @@ namespace ImageCatalog TabPage3.Controls.Add(GroupBox9); TabPage3.Controls.Add(GroupBox5); TabPage3.Controls.Add(GroupBox4); - TabPage3.Location = new Point(4, 29); - TabPage3.Margin = new Padding(4, 5, 4, 5); + TabPage3.Location = new Point(8, 46); + TabPage3.Margin = new Padding(6, 8, 6, 8); TabPage3.Name = "TabPage3"; - TabPage3.Padding = new Padding(4, 5, 4, 5); - TabPage3.Size = new Size(687, 547); + TabPage3.Padding = new Padding(6, 8, 6, 8); + TabPage3.Size = new Size(1113, 874); TabPage3.TabIndex = 2; TabPage3.Text = "Testo"; TabPage3.UseVisualStyleBackColor = true; @@ -670,11 +672,11 @@ namespace ImageCatalog GroupBox10.Controls.Add(Label41); GroupBox10.Controls.Add(TextBox31); GroupBox10.Controls.Add(TextBox30); - GroupBox10.Location = new Point(421, 120); - GroupBox10.Margin = new Padding(4, 5, 4, 5); + GroupBox10.Location = new Point(684, 192); + GroupBox10.Margin = new Padding(6, 8, 6, 8); GroupBox10.Name = "GroupBox10"; - GroupBox10.Padding = new Padding(4, 5, 4, 5); - GroupBox10.Size = new Size(248, 112); + GroupBox10.Padding = new Padding(6, 8, 6, 8); + GroupBox10.Size = new Size(403, 179); GroupBox10.TabIndex = 39; GroupBox10.TabStop = false; GroupBox10.Text = "Testo foto verticali"; @@ -682,48 +684,48 @@ namespace ImageCatalog // Label42 // Label42.AutoSize = true; - Label42.Location = new Point(9, 71); - Label42.Margin = new Padding(4, 0, 4, 0); + Label42.Location = new Point(15, 114); + Label42.Margin = new Padding(6, 0, 6, 0); Label42.Name = "Label42"; - Label42.Size = new Size(64, 20); + Label42.Size = new Size(103, 32); Label42.TabIndex = 3; Label42.Text = "Margine"; // // Label41 // Label41.AutoSize = true; - Label41.Location = new Point(9, 38); - Label41.Margin = new Padding(4, 0, 4, 0); + Label41.Location = new Point(15, 61); + Label41.Margin = new Padding(6, 0, 6, 0); Label41.Name = "Label41"; - Label41.Size = new Size(153, 20); + Label41.Size = new Size(246, 32); Label41.TabIndex = 2; Label41.Text = "Dimensione Carattere"; // // TextBox31 // - TextBox31.Location = new Point(175, 71); - TextBox31.Margin = new Padding(4, 5, 4, 5); + TextBox31.Location = new Point(284, 114); + TextBox31.Margin = new Padding(6, 8, 6, 8); TextBox31.Name = "TextBox31"; - TextBox31.Size = new Size(51, 27); + TextBox31.Size = new Size(80, 39); TextBox31.TabIndex = 1; // // TextBox30 // - TextBox30.Location = new Point(175, 34); - TextBox30.Margin = new Padding(4, 5, 4, 5); + TextBox30.Location = new Point(284, 54); + TextBox30.Margin = new Padding(6, 8, 6, 8); TextBox30.Name = "TextBox30"; - TextBox30.Size = new Size(51, 27); + TextBox30.Size = new Size(80, 39); TextBox30.TabIndex = 0; // // GroupBox9 // GroupBox9.Controls.Add(CheckBox17); GroupBox9.Controls.Add(CheckBox16); - GroupBox9.Location = new Point(421, 48); - GroupBox9.Margin = new Padding(4, 5, 4, 5); + GroupBox9.Location = new Point(684, 77); + GroupBox9.Margin = new Padding(6, 8, 6, 8); GroupBox9.Name = "GroupBox9"; - GroupBox9.Padding = new Padding(4, 5, 4, 5); - GroupBox9.Size = new Size(248, 69); + GroupBox9.Padding = new Padding(6, 8, 6, 8); + GroupBox9.Size = new Size(403, 110); GroupBox9.TabIndex = 38; GroupBox9.TabStop = false; GroupBox9.Text = "Slide show"; @@ -731,10 +733,10 @@ namespace ImageCatalog // CheckBox17 // CheckBox17.AutoSize = true; - CheckBox17.Location = new Point(128, 28); - CheckBox17.Margin = new Padding(4, 5, 4, 5); + CheckBox17.Location = new Point(208, 45); + CheckBox17.Margin = new Padding(6, 8, 6, 8); CheckBox17.Name = "CheckBox17"; - CheckBox17.Size = new Size(117, 24); + CheckBox17.Size = new Size(185, 36); CheckBox17.TabIndex = 1; CheckBox17.Text = "Numero foto"; CheckBox17.UseVisualStyleBackColor = true; @@ -742,10 +744,10 @@ namespace ImageCatalog // CheckBox16 // CheckBox16.AutoSize = true; - CheckBox16.Location = new Point(8, 29); - CheckBox16.Margin = new Padding(4, 5, 4, 5); + CheckBox16.Location = new Point(13, 46); + CheckBox16.Margin = new Padding(6, 8, 6, 8); CheckBox16.Name = "CheckBox16"; - CheckBox16.Size = new Size(63, 24); + CheckBox16.Size = new Size(95, 36); CheckBox16.TabIndex = 0; CheckBox16.Text = "Data"; CheckBox16.UseVisualStyleBackColor = true; @@ -763,31 +765,31 @@ namespace ImageCatalog GroupBox5.Controls.Add(Label11); GroupBox5.Controls.Add(CheckBox3); GroupBox5.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox5.Location = new Point(8, 48); - GroupBox5.Margin = new Padding(4, 5, 4, 5); + GroupBox5.Location = new Point(13, 77); + GroupBox5.Margin = new Padding(6, 8, 6, 8); GroupBox5.Name = "GroupBox5"; - GroupBox5.Padding = new Padding(4, 5, 4, 5); - GroupBox5.Size = new Size(405, 185); + GroupBox5.Padding = new Padding(6, 8, 6, 8); + GroupBox5.Size = new Size(658, 296); GroupBox5.TabIndex = 37; GroupBox5.TabStop = false; GroupBox5.Text = "Carattere"; // // TextBox34 // - TextBox34.Location = new Point(213, 140); - TextBox34.Margin = new Padding(4, 5, 4, 5); + TextBox34.Location = new Point(346, 224); + TextBox34.Margin = new Padding(6, 8, 6, 8); TextBox34.Name = "TextBox34"; - TextBox34.Size = new Size(73, 27); + TextBox34.Size = new Size(116, 39); TextBox34.TabIndex = 36; TextBox34.TextAlign = HorizontalAlignment.Right; // // _Button8 // _Button8.ForeColor = Color.Black; - _Button8.Location = new Point(296, 137); - _Button8.Margin = new Padding(4, 5, 4, 5); + _Button8.Location = new Point(481, 219); + _Button8.Margin = new Padding(6, 8, 6, 8); _Button8.Name = "_Button8"; - _Button8.Size = new Size(99, 37); + _Button8.Size = new Size(161, 59); _Button8.TabIndex = 35; _Button8.Text = "Scegli..."; _Button8.Click += Button8_Click; @@ -795,49 +797,49 @@ namespace ImageCatalog // Label36 // Label36.ForeColor = Color.Black; - Label36.Location = new Point(11, 92); - Label36.Margin = new Padding(4, 0, 4, 0); + Label36.Location = new Point(18, 147); + Label36.Margin = new Padding(6, 0, 6, 0); Label36.Name = "Label36"; - Label36.Size = new Size(160, 29); + Label36.Size = new Size(260, 46); Label36.TabIndex = 34; Label36.Text = "Dimensione miniatura"; Label36.TextAlign = ContentAlignment.MiddleLeft; // // TextBox25 // - TextBox25.Location = new Point(213, 91); - TextBox25.Margin = new Padding(4, 5, 4, 5); + TextBox25.Location = new Point(346, 146); + TextBox25.Margin = new Padding(6, 8, 6, 8); TextBox25.Name = "TextBox25"; - TextBox25.Size = new Size(73, 27); + TextBox25.Size = new Size(116, 39); TextBox25.TabIndex = 33; TextBox25.Text = "TextBox25"; // // Label35 // Label35.ForeColor = Color.Black; - Label35.Location = new Point(11, 143); - Label35.Margin = new Padding(4, 0, 4, 0); + Label35.Location = new Point(18, 229); + Label35.Margin = new Padding(6, 0, 6, 0); Label35.Name = "Label35"; - Label35.Size = new Size(96, 25); + Label35.Size = new Size(156, 40); Label35.TabIndex = 32; Label35.Text = "Colore RGB"; Label35.TextAlign = ContentAlignment.MiddleLeft; // // ComboBox3 // - ComboBox3.Location = new Point(128, 12); - ComboBox3.Margin = new Padding(4, 5, 4, 5); + ComboBox3.Location = new Point(208, 19); + ComboBox3.Margin = new Padding(6, 8, 6, 8); ComboBox3.Name = "ComboBox3"; - ComboBox3.Size = new Size(159, 28); + ComboBox3.Size = new Size(256, 40); ComboBox3.TabIndex = 28; ComboBox3.Text = "ComboBox3"; // // TextBox11 // - TextBox11.Location = new Point(213, 54); - TextBox11.Margin = new Padding(4, 5, 4, 5); + TextBox11.Location = new Point(346, 86); + TextBox11.Margin = new Padding(6, 8, 6, 8); TextBox11.Name = "TextBox11"; - TextBox11.Size = new Size(73, 27); + TextBox11.Size = new Size(116, 39); TextBox11.TabIndex = 27; TextBox11.Text = "TextBox11"; // @@ -845,10 +847,10 @@ namespace ImageCatalog // Label12.AutoSize = true; Label12.ForeColor = Color.Black; - Label12.Location = new Point(11, 58); - Label12.Margin = new Padding(4, 0, 4, 0); + Label12.Location = new Point(18, 93); + Label12.Margin = new Padding(6, 0, 6, 0); Label12.Name = "Label12"; - Label12.Size = new Size(88, 20); + Label12.Size = new Size(142, 32); Label12.TabIndex = 26; Label12.Text = "Dimensione"; Label12.TextAlign = ContentAlignment.MiddleLeft; @@ -857,20 +859,20 @@ namespace ImageCatalog // Label11.AutoSize = true; Label11.ForeColor = Color.Black; - Label11.Location = new Point(75, 12); - Label11.Margin = new Padding(4, 0, 4, 0); + Label11.Location = new Point(122, 19); + Label11.Margin = new Padding(6, 0, 6, 0); Label11.Name = "Label11"; - Label11.Size = new Size(38, 20); + Label11.Size = new Size(62, 32); Label11.TabIndex = 22; Label11.Text = "Font"; // // CheckBox3 // CheckBox3.ForeColor = Color.Black; - CheckBox3.Location = new Point(299, 12); - CheckBox3.Margin = new Padding(4, 5, 4, 5); + CheckBox3.Location = new Point(486, 19); + CheckBox3.Margin = new Padding(6, 8, 6, 8); CheckBox3.Name = "CheckBox3"; - CheckBox3.Size = new Size(96, 37); + CheckBox3.Size = new Size(156, 59); CheckBox3.TabIndex = 24; CheckBox3.Text = "Grassetto"; // @@ -894,11 +896,11 @@ namespace ImageCatalog GroupBox4.Controls.Add(TextBox12); GroupBox4.Controls.Add(Label15); GroupBox4.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox4.Location = new Point(8, 242); - GroupBox4.Margin = new Padding(4, 5, 4, 5); + GroupBox4.Location = new Point(13, 387); + GroupBox4.Margin = new Padding(6, 8, 6, 8); GroupBox4.Name = "GroupBox4"; - GroupBox4.Padding = new Padding(4, 5, 4, 5); - GroupBox4.Size = new Size(661, 286); + GroupBox4.Padding = new Padding(6, 8, 6, 8); + GroupBox4.Size = new Size(1074, 458); GroupBox4.TabIndex = 36; GroupBox4.TabStop = false; GroupBox4.Text = "Testo da applicare"; @@ -906,77 +908,77 @@ namespace ImageCatalog // Label40 // Label40.AutoSize = true; - Label40.Location = new Point(11, 80); - Label40.Margin = new Padding(4, 0, 4, 0); + Label40.Location = new Point(18, 128); + Label40.Margin = new Padding(6, 0, 6, 0); Label40.Name = "Label40"; - Label40.Size = new Size(66, 20); + Label40.Size = new Size(104, 32); Label40.TabIndex = 40; Label40.Text = "Verticale"; // // TextBox29 // TextBox29.DataBindings.Add(new Binding("Text", bindingSource1, "VerticalText", true, DataSourceUpdateMode.OnPropertyChanged)); - TextBox29.Location = new Point(96, 75); - TextBox29.Margin = new Padding(4, 5, 4, 5); + TextBox29.Location = new Point(156, 120); + TextBox29.Margin = new Padding(6, 8, 6, 8); TextBox29.Multiline = true; TextBox29.Name = "TextBox29"; - TextBox29.Size = new Size(543, 66); + TextBox29.Size = new Size(880, 103); TextBox29.TabIndex = 39; // // TextBox18 // - TextBox18.Location = new Point(309, 240); - TextBox18.Margin = new Padding(4, 5, 4, 5); + TextBox18.Location = new Point(502, 384); + TextBox18.Margin = new Padding(6, 8, 6, 8); TextBox18.Name = "TextBox18"; - TextBox18.Size = new Size(132, 27); + TextBox18.Size = new Size(212, 39); TextBox18.TabIndex = 38; // // Label26 // Label26.AutoSize = true; Label26.ForeColor = Color.Black; - Label26.Location = new Point(459, 240); - Label26.Margin = new Padding(4, 0, 4, 0); + Label26.Location = new Point(746, 384); + Label26.Margin = new Padding(6, 0, 6, 0); Label26.Name = "Label26"; - Label26.Size = new Size(67, 20); + Label26.Size = new Size(106, 32); Label26.TabIndex = 37; Label26.Text = "partenza"; // // DateTimePicker1 // DateTimePicker1.Format = DateTimePickerFormat.Time; - DateTimePicker1.Location = new Point(523, 240); - DateTimePicker1.Margin = new Padding(4, 5, 4, 5); + DateTimePicker1.Location = new Point(850, 384); + DateTimePicker1.Margin = new Padding(6, 8, 6, 8); DateTimePicker1.Name = "DateTimePicker1"; - DateTimePicker1.Size = new Size(116, 27); + DateTimePicker1.Size = new Size(186, 39); DateTimePicker1.TabIndex = 36; // // CheckBox8 // CheckBox8.ForeColor = Color.Black; - CheckBox8.Location = new Point(96, 240); - CheckBox8.Margin = new Padding(4, 5, 4, 5); + CheckBox8.Location = new Point(156, 384); + CheckBox8.Margin = new Padding(6, 8, 6, 8); CheckBox8.Name = "CheckBox8"; - CheckBox8.Size = new Size(75, 25); + CheckBox8.Size = new Size(122, 40); CheckBox8.TabIndex = 35; CheckBox8.Text = "Orario"; // // TextBox9 // - TextBox9.Location = new Point(160, 166); - TextBox9.Margin = new Padding(4, 5, 4, 5); + TextBox9.Location = new Point(260, 266); + TextBox9.Margin = new Padding(6, 8, 6, 8); TextBox9.Name = "TextBox9"; - TextBox9.Size = new Size(73, 27); + TextBox9.Size = new Size(116, 39); TextBox9.TabIndex = 20; TextBox9.Text = "TextBox9"; // // CheckBox7 // CheckBox7.ForeColor = Color.Black; - CheckBox7.Location = new Point(181, 240); - CheckBox7.Margin = new Padding(4, 5, 4, 5); + CheckBox7.Location = new Point(294, 384); + CheckBox7.Margin = new Padding(6, 8, 6, 8); CheckBox7.Name = "CheckBox7"; - CheckBox7.Size = new Size(117, 25); + CheckBox7.Size = new Size(190, 40); CheckBox7.TabIndex = 34; CheckBox7.Text = "Tempo gara"; // @@ -984,31 +986,30 @@ namespace ImageCatalog // Label4.AutoSize = true; Label4.ForeColor = Color.Black; - Label4.Location = new Point(11, 37); - Label4.Margin = new Padding(4, 0, 4, 0); + Label4.Location = new Point(18, 59); + Label4.Margin = new Padding(6, 0, 6, 0); Label4.Name = "Label4"; - Label4.Size = new Size(85, 20); + Label4.Size = new Size(135, 32); Label4.TabIndex = 9; Label4.Text = "Orizzontale"; // // TextBox4 // TextBox4.DataBindings.Add(new Binding("Text", bindingSource1, "HorizontalText", true, DataSourceUpdateMode.OnPropertyChanged)); - TextBox4.Location = new Point(96, 37); - TextBox4.Margin = new Padding(4, 5, 4, 5); + TextBox4.Location = new Point(156, 59); + TextBox4.Margin = new Padding(6, 8, 6, 8); TextBox4.Name = "TextBox4"; - TextBox4.Size = new Size(543, 27); + TextBox4.Size = new Size(880, 39); TextBox4.TabIndex = 8; - TextBox4.Text = ""; // // Label9 // Label9.AutoSize = true; Label9.ForeColor = Color.Black; - Label9.Location = new Point(11, 166); - Label9.Margin = new Padding(4, 0, 4, 0); + Label9.Location = new Point(18, 266); + Label9.Margin = new Padding(6, 0, 6, 0); Label9.Name = "Label9"; - Label9.Size = new Size(152, 20); + Label9.Size = new Size(242, 32); Label9.TabIndex = 19; Label9.Text = "Trasparenza (0-100%)"; // @@ -1016,28 +1017,28 @@ namespace ImageCatalog // Label13.AutoSize = true; Label13.ForeColor = Color.Black; - Label13.Location = new Point(21, 203); - Label13.Margin = new Padding(4, 0, 4, 0); + Label13.Location = new Point(34, 325); + Label13.Margin = new Padding(6, 0, 6, 0); Label13.Name = "Label13"; - Label13.Size = new Size(71, 20); + Label13.Size = new Size(114, 32); Label13.TabIndex = 29; Label13.Text = "Posizione"; // // ComboBox1 // - ComboBox1.Location = new Point(96, 203); - ComboBox1.Margin = new Padding(4, 5, 4, 5); + ComboBox1.Location = new Point(156, 325); + ComboBox1.Margin = new Padding(6, 8, 6, 8); ComboBox1.Name = "ComboBox1"; - ComboBox1.Size = new Size(137, 28); + ComboBox1.Size = new Size(220, 40); ComboBox1.TabIndex = 28; ComboBox1.Text = "ComboBox1"; // // ComboBox2 // - ComboBox2.Location = new Point(501, 203); - ComboBox2.Margin = new Padding(4, 5, 4, 5); + ComboBox2.Location = new Point(814, 325); + ComboBox2.Margin = new Padding(6, 8, 6, 8); ComboBox2.Name = "ComboBox2"; - ComboBox2.Size = new Size(137, 28); + ComboBox2.Size = new Size(220, 40); ComboBox2.TabIndex = 31; ComboBox2.Text = "ComboBox2"; // @@ -1045,19 +1046,19 @@ namespace ImageCatalog // Label14.AutoSize = true; Label14.ForeColor = Color.Black; - Label14.Location = new Point(405, 203); - Label14.Margin = new Padding(4, 0, 4, 0); + Label14.Location = new Point(658, 325); + Label14.Margin = new Padding(6, 0, 6, 0); Label14.Name = "Label14"; - Label14.Size = new Size(98, 20); + Label14.Size = new Size(156, 32); Label14.TabIndex = 30; Label14.Text = "Allineamento"; // // TextBox12 // - TextBox12.Location = new Point(501, 166); - TextBox12.Margin = new Padding(4, 5, 4, 5); + TextBox12.Location = new Point(814, 266); + TextBox12.Margin = new Padding(6, 8, 6, 8); TextBox12.Name = "TextBox12"; - TextBox12.Size = new Size(137, 27); + TextBox12.Size = new Size(220, 39); TextBox12.TabIndex = 33; TextBox12.Text = "TextBox12"; // @@ -1065,21 +1066,21 @@ namespace ImageCatalog // Label15.AutoSize = true; Label15.ForeColor = Color.Black; - Label15.Location = new Point(395, 166); - Label15.Margin = new Padding(4, 0, 4, 0); + Label15.Location = new Point(642, 266); + Label15.Margin = new Padding(6, 0, 6, 0); Label15.Name = "Label15"; - Label15.Size = new Size(110, 20); + Label15.Size = new Size(174, 32); Label15.TabIndex = 32; Label15.Text = "Margine (pixel)"; // // TabPage2 // TabPage2.Controls.Add(GroupBox2); - TabPage2.Location = new Point(4, 29); - TabPage2.Margin = new Padding(4, 5, 4, 5); + TabPage2.Location = new Point(8, 46); + TabPage2.Margin = new Padding(6, 8, 6, 8); TabPage2.Name = "TabPage2"; - TabPage2.Padding = new Padding(4, 5, 4, 5); - TabPage2.Size = new Size(687, 547); + TabPage2.Padding = new Padding(6, 8, 6, 8); + TabPage2.Size = new Size(1113, 874); TabPage2.TabIndex = 5; TabPage2.Text = "Foto"; TabPage2.UseVisualStyleBackColor = true; @@ -1096,11 +1097,11 @@ namespace ImageCatalog GroupBox2.Controls.Add(TextBox28); GroupBox2.Controls.Add(CheckBox15); GroupBox2.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox2.Location = new Point(4, 9); - GroupBox2.Margin = new Padding(4, 5, 4, 5); + GroupBox2.Location = new Point(6, 14); + GroupBox2.Margin = new Padding(6, 8, 6, 8); GroupBox2.Name = "GroupBox2"; - GroupBox2.Padding = new Padding(4, 5, 4, 5); - GroupBox2.Size = new Size(405, 240); + GroupBox2.Padding = new Padding(6, 8, 6, 8); + GroupBox2.Size = new Size(658, 384); GroupBox2.TabIndex = 36; GroupBox2.TabStop = false; GroupBox2.Text = "Foto grande"; @@ -1108,38 +1109,38 @@ namespace ImageCatalog // Label45 // Label45.AutoSize = true; - Label45.Location = new Point(15, 132); - Label45.Margin = new Padding(4, 0, 4, 0); + Label45.Location = new Point(24, 211); + Label45.Margin = new Padding(6, 0, 6, 0); Label45.Name = "Label45"; - Label45.Size = new Size(57, 20); + Label45.Size = new Size(90, 32); Label45.TabIndex = 22; Label45.Text = "Qualità"; // // TextBox32 // - TextBox32.Location = new Point(96, 123); - TextBox32.Margin = new Padding(4, 5, 4, 5); + TextBox32.Location = new Point(156, 197); + TextBox32.Margin = new Padding(6, 8, 6, 8); TextBox32.Name = "TextBox32"; - TextBox32.Size = new Size(95, 27); + TextBox32.Size = new Size(152, 39); TextBox32.TabIndex = 21; TextBox32.Text = "100"; // // TextBox26 // - TextBox26.Location = new Point(299, 74); - TextBox26.Margin = new Padding(4, 5, 4, 5); + TextBox26.Location = new Point(486, 118); + TextBox26.Margin = new Padding(6, 8, 6, 8); TextBox26.Name = "TextBox26"; - TextBox26.Size = new Size(73, 27); + TextBox26.Size = new Size(116, 39); TextBox26.TabIndex = 20; TextBox26.Text = "TextBox26"; // // Label37 // Label37.ForeColor = Color.Black; - Label37.Location = new Point(224, 74); - Label37.Margin = new Padding(4, 0, 4, 0); + Label37.Location = new Point(364, 118); + Label37.Margin = new Padding(6, 0, 6, 0); Label37.Name = "Label37"; - Label37.Size = new Size(64, 25); + Label37.Size = new Size(104, 40); Label37.TabIndex = 19; Label37.Text = "Suffisso"; Label37.TextAlign = ContentAlignment.MiddleRight; @@ -1148,19 +1149,19 @@ namespace ImageCatalog // Label38.AutoSize = true; Label38.ForeColor = Color.Black; - Label38.Location = new Point(32, 37); - Label38.Margin = new Padding(4, 0, 4, 0); + Label38.Location = new Point(52, 59); + Label38.Margin = new Padding(6, 0, 6, 0); Label38.Name = "Label38"; - Label38.Size = new Size(58, 20); + Label38.Size = new Size(90, 32); Label38.TabIndex = 16; Label38.Text = "Altezza"; // // TextBox27 // - TextBox27.Location = new Point(96, 37); - TextBox27.Margin = new Padding(4, 5, 4, 5); + TextBox27.Location = new Point(156, 59); + TextBox27.Margin = new Padding(6, 8, 6, 8); TextBox27.Name = "TextBox27"; - TextBox27.Size = new Size(95, 27); + TextBox27.Size = new Size(152, 39); TextBox27.TabIndex = 14; TextBox27.Text = "TextBox27"; // @@ -1168,19 +1169,19 @@ namespace ImageCatalog // Label39.AutoSize = true; Label39.ForeColor = Color.Black; - Label39.Location = new Point(11, 74); - Label39.Margin = new Padding(4, 0, 4, 0); + Label39.Location = new Point(18, 118); + Label39.Margin = new Padding(6, 0, 6, 0); Label39.Name = "Label39"; - Label39.Size = new Size(76, 20); + Label39.Size = new Size(120, 32); Label39.TabIndex = 17; Label39.Text = "Larghezza"; // // TextBox28 // - TextBox28.Location = new Point(96, 74); - TextBox28.Margin = new Padding(4, 5, 4, 5); + TextBox28.Location = new Point(156, 118); + TextBox28.Margin = new Padding(6, 8, 6, 8); TextBox28.Name = "TextBox28"; - TextBox28.Size = new Size(95, 27); + TextBox28.Size = new Size(152, 39); TextBox28.TabIndex = 15; TextBox28.Text = "TextBox28"; // @@ -1189,10 +1190,10 @@ namespace ImageCatalog CheckBox15.Checked = true; CheckBox15.CheckState = CheckState.Checked; CheckBox15.ForeColor = Color.Black; - CheckBox15.Location = new Point(224, 25); - CheckBox15.Margin = new Padding(4, 5, 4, 5); + CheckBox15.Location = new Point(364, 40); + CheckBox15.Margin = new Padding(6, 8, 6, 8); CheckBox15.Name = "CheckBox15"; - CheckBox15.Size = new Size(160, 49); + CheckBox15.Size = new Size(260, 78); CheckBox15.TabIndex = 18; CheckBox15.Text = "Mantieni dimensioni originali"; // @@ -1200,11 +1201,11 @@ namespace ImageCatalog // TabPage1.Controls.Add(Panel1); TabPage1.Controls.Add(GroupBox1); - TabPage1.Location = new Point(4, 29); - TabPage1.Margin = new Padding(4, 5, 4, 5); + TabPage1.Location = new Point(8, 46); + TabPage1.Margin = new Padding(6, 8, 6, 8); TabPage1.Name = "TabPage1"; - TabPage1.Padding = new Padding(4, 5, 4, 5); - TabPage1.Size = new Size(687, 547); + TabPage1.Padding = new Padding(6, 8, 6, 8); + TabPage1.Size = new Size(1113, 874); TabPage1.TabIndex = 0; TabPage1.Text = "Miniature"; TabPage1.UseVisualStyleBackColor = true; @@ -1214,20 +1215,20 @@ namespace ImageCatalog Panel1.Controls.Add(_CheckBox18); Panel1.Controls.Add(_CheckBox4); Panel1.Controls.Add(_CheckBox12); - Panel1.Location = new Point(69, 363); - Panel1.Margin = new Padding(4, 5, 4, 5); + Panel1.Location = new Point(112, 581); + Panel1.Margin = new Padding(6, 8, 6, 8); Panel1.Name = "Panel1"; - Panel1.Size = new Size(405, 112); + Panel1.Size = new Size(658, 179); Panel1.TabIndex = 26; Panel1.Visible = false; // // _CheckBox18 // _CheckBox18.AutoSize = true; - _CheckBox18.Location = new Point(187, 5); - _CheckBox18.Margin = new Padding(4, 5, 4, 5); + _CheckBox18.Location = new Point(304, 8); + _CheckBox18.Margin = new Padding(6, 8, 6, 8); _CheckBox18.Name = "_CheckBox18"; - _CheckBox18.Size = new Size(117, 24); + _CheckBox18.Size = new Size(185, 36); _CheckBox18.TabIndex = 36; _CheckBox18.Text = "Numero foto"; _CheckBox18.UseVisualStyleBackColor = true; @@ -1236,10 +1237,10 @@ namespace ImageCatalog // _CheckBox4 // _CheckBox4.ForeColor = Color.Black; - _CheckBox4.Location = new Point(13, 5); - _CheckBox4.Margin = new Padding(4, 5, 4, 5); + _CheckBox4.Location = new Point(21, 8); + _CheckBox4.Margin = new Padding(6, 8, 6, 8); _CheckBox4.Name = "_CheckBox4"; - _CheckBox4.Size = new Size(139, 26); + _CheckBox4.Size = new Size(226, 42); _CheckBox4.TabIndex = 34; _CheckBox4.Text = "Aggiungi scritta"; _CheckBox4.CheckedChanged += CheckBox4_CheckedChanged; @@ -1247,10 +1248,10 @@ namespace ImageCatalog // _CheckBox12 // _CheckBox12.ForeColor = Color.Black; - _CheckBox12.Location = new Point(13, 29); - _CheckBox12.Margin = new Padding(4, 5, 4, 5); + _CheckBox12.Location = new Point(21, 46); + _CheckBox12.Margin = new Padding(6, 8, 6, 8); _CheckBox12.Name = "_CheckBox12"; - _CheckBox12.Size = new Size(139, 32); + _CheckBox12.Size = new Size(226, 51); _CheckBox12.TabIndex = 35; _CheckBox12.Text = "Aggiungi orario"; _CheckBox12.CheckedChanged += CheckBox12_CheckedChanged; @@ -1268,11 +1269,11 @@ namespace ImageCatalog GroupBox1.Controls.Add(TextBox3); GroupBox1.Controls.Add(CheckBox1); GroupBox1.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox1.Location = new Point(8, 8); - GroupBox1.Margin = new Padding(4, 5, 4, 5); + GroupBox1.Location = new Point(13, 13); + GroupBox1.Margin = new Padding(6, 8, 6, 8); GroupBox1.Name = "GroupBox1"; - GroupBox1.Padding = new Padding(4, 5, 4, 5); - GroupBox1.Size = new Size(467, 323); + GroupBox1.Padding = new Padding(6, 8, 6, 8); + GroupBox1.Size = new Size(759, 517); GroupBox1.TabIndex = 25; GroupBox1.TabStop = false; GroupBox1.Text = "Miniature"; @@ -1280,19 +1281,19 @@ namespace ImageCatalog // Label46 // Label46.AutoSize = true; - Label46.Location = new Point(264, 66); - Label46.Margin = new Padding(4, 0, 4, 0); + Label46.Location = new Point(429, 106); + Label46.Margin = new Padding(6, 0, 6, 0); Label46.Name = "Label46"; - Label46.Size = new Size(57, 20); + Label46.Size = new Size(90, 32); Label46.TabIndex = 21; Label46.Text = "Qualità"; // // TextBox33 // - TextBox33.Location = new Point(325, 62); - TextBox33.Margin = new Padding(4, 5, 4, 5); + TextBox33.Location = new Point(528, 99); + TextBox33.Margin = new Padding(6, 8, 6, 8); TextBox33.Name = "TextBox33"; - TextBox33.Size = new Size(132, 27); + TextBox33.Size = new Size(212, 39); TextBox33.TabIndex = 20; // // Panel2 @@ -1302,19 +1303,19 @@ namespace ImageCatalog Panel2.Controls.Add(RadioButton4); Panel2.Controls.Add(RadioButton6); Panel2.Controls.Add(RadioButton5); - Panel2.Location = new Point(75, 175); - Panel2.Margin = new Padding(4, 5, 4, 5); + Panel2.Location = new Point(122, 280); + Panel2.Margin = new Padding(6, 8, 6, 8); Panel2.Name = "Panel2"; - Panel2.Size = new Size(313, 138); + Panel2.Size = new Size(509, 221); Panel2.TabIndex = 19; // // RadioButton3 // RadioButton3.AutoSize = true; - RadioButton3.Location = new Point(20, 25); - RadioButton3.Margin = new Padding(4, 5, 4, 5); + RadioButton3.Location = new Point(32, 40); + RadioButton3.Margin = new Padding(6, 8, 6, 8); RadioButton3.Name = "RadioButton3"; - RadioButton3.Size = new Size(137, 24); + RadioButton3.Size = new Size(215, 36); RadioButton3.TabIndex = 14; RadioButton3.TabStop = true; RadioButton3.Text = "Aggiungi Scritta"; @@ -1323,10 +1324,10 @@ namespace ImageCatalog // RadioButton7 // RadioButton7.AutoSize = true; - RadioButton7.Location = new Point(172, 62); - RadioButton7.Margin = new Padding(4, 5, 4, 5); + RadioButton7.Location = new Point(280, 99); + RadioButton7.Margin = new Padding(6, 8, 6, 8); RadioButton7.Name = "RadioButton7"; - RadioButton7.Size = new Size(135, 24); + RadioButton7.Size = new Size(215, 36); RadioButton7.TabIndex = 18; RadioButton7.TabStop = true; RadioButton7.Text = "numero+tempo"; @@ -1335,10 +1336,10 @@ namespace ImageCatalog // RadioButton4 // RadioButton4.AutoSize = true; - RadioButton4.Location = new Point(20, 62); - RadioButton4.Margin = new Padding(4, 5, 4, 5); + RadioButton4.Location = new Point(32, 99); + RadioButton4.Margin = new Padding(6, 8, 6, 8); RadioButton4.Name = "RadioButton4"; - RadioButton4.Size = new Size(135, 24); + RadioButton4.Size = new Size(211, 36); RadioButton4.TabIndex = 15; RadioButton4.TabStop = true; RadioButton4.Text = "Aggiungi orario"; @@ -1347,10 +1348,10 @@ namespace ImageCatalog // RadioButton6 // RadioButton6.AutoSize = true; - RadioButton6.Location = new Point(172, 25); - RadioButton6.Margin = new Padding(4, 5, 4, 5); + RadioButton6.Location = new Point(280, 40); + RadioButton6.Margin = new Padding(6, 8, 6, 8); RadioButton6.Name = "RadioButton6"; - RadioButton6.Size = new Size(116, 24); + RadioButton6.Size = new Size(184, 36); RadioButton6.TabIndex = 17; RadioButton6.TabStop = true; RadioButton6.Text = "Numero foto"; @@ -1359,10 +1360,10 @@ namespace ImageCatalog // RadioButton5 // RadioButton5.AutoSize = true; - RadioButton5.Location = new Point(20, 100); - RadioButton5.Margin = new Padding(4, 5, 4, 5); + RadioButton5.Location = new Point(32, 160); + RadioButton5.Margin = new Padding(6, 8, 6, 8); RadioButton5.Name = "RadioButton5"; - RadioButton5.Size = new Size(111, 24); + RadioButton5.Size = new Size(173, 36); RadioButton5.TabIndex = 16; RadioButton5.TabStop = true; RadioButton5.Text = "Tempo Gara"; @@ -1372,19 +1373,19 @@ namespace ImageCatalog // Label5.AutoSize = true; Label5.ForeColor = Color.Black; - Label5.Location = new Point(32, 135); - Label5.Margin = new Padding(4, 0, 4, 0); + Label5.Location = new Point(52, 216); + Label5.Margin = new Padding(6, 0, 6, 0); Label5.Name = "Label5"; - Label5.Size = new Size(58, 20); + Label5.Size = new Size(90, 32); Label5.TabIndex = 12; Label5.Text = "Altezza"; // // TextBox5 // - TextBox5.Location = new Point(96, 98); - TextBox5.Margin = new Padding(4, 5, 4, 5); + TextBox5.Location = new Point(156, 157); + TextBox5.Margin = new Padding(6, 8, 6, 8); TextBox5.Name = "TextBox5"; - TextBox5.Size = new Size(116, 27); + TextBox5.Size = new Size(186, 39); TextBox5.TabIndex = 10; TextBox5.Text = "TextBox5"; // @@ -1392,19 +1393,19 @@ namespace ImageCatalog // Label6.AutoSize = true; Label6.ForeColor = Color.Black; - Label6.Location = new Point(11, 98); - Label6.Margin = new Padding(4, 0, 4, 0); + Label6.Location = new Point(18, 157); + Label6.Margin = new Padding(6, 0, 6, 0); Label6.Name = "Label6"; - Label6.Size = new Size(76, 20); + Label6.Size = new Size(120, 32); Label6.TabIndex = 13; Label6.Text = "Larghezza"; // // TextBox6 // - TextBox6.Location = new Point(96, 135); - TextBox6.Margin = new Padding(4, 5, 4, 5); + TextBox6.Location = new Point(156, 216); + TextBox6.Margin = new Padding(6, 8, 6, 8); TextBox6.Name = "TextBox6"; - TextBox6.Size = new Size(116, 27); + TextBox6.Size = new Size(186, 39); TextBox6.TabIndex = 11; TextBox6.Text = "TextBox6"; // @@ -1412,40 +1413,40 @@ namespace ImageCatalog // Label3.AutoSize = true; Label3.ForeColor = Color.Black; - Label3.Location = new Point(32, 62); - Label3.Margin = new Padding(4, 0, 4, 0); + Label3.Location = new Point(52, 99); + Label3.Margin = new Padding(6, 0, 6, 0); Label3.Name = "Label3"; - Label3.Size = new Size(60, 20); + Label3.Size = new Size(97, 32); Label3.TabIndex = 7; Label3.Text = "Suffisso"; // // TextBox3 // - TextBox3.Location = new Point(96, 62); - TextBox3.Margin = new Padding(4, 5, 4, 5); + TextBox3.Location = new Point(156, 99); + TextBox3.Margin = new Padding(6, 8, 6, 8); TextBox3.Name = "TextBox3"; - TextBox3.Size = new Size(116, 27); + TextBox3.Size = new Size(186, 39); TextBox3.TabIndex = 6; TextBox3.Text = "TextBox3"; // // CheckBox1 // CheckBox1.ForeColor = Color.Black; - CheckBox1.Location = new Point(96, 25); - CheckBox1.Margin = new Padding(4, 5, 4, 5); + CheckBox1.Location = new Point(156, 40); + CheckBox1.Margin = new Padding(6, 8, 6, 8); CheckBox1.Name = "CheckBox1"; - CheckBox1.Size = new Size(139, 37); + CheckBox1.Size = new Size(226, 59); CheckBox1.TabIndex = 5; CheckBox1.Text = "Crea miniature"; // // TabPage4 // TabPage4.Controls.Add(GroupBox6); - TabPage4.Location = new Point(4, 29); - TabPage4.Margin = new Padding(4, 5, 4, 5); + TabPage4.Location = new Point(8, 46); + TabPage4.Margin = new Padding(6, 8, 6, 8); TabPage4.Name = "TabPage4"; - TabPage4.Padding = new Padding(4, 5, 4, 5); - TabPage4.Size = new Size(687, 547); + TabPage4.Padding = new Padding(6, 8, 6, 8); + TabPage4.Size = new Size(1113, 874); TabPage4.TabIndex = 3; TabPage4.Text = "Logo"; TabPage4.UseVisualStyleBackColor = true; @@ -1472,11 +1473,11 @@ namespace ImageCatalog GroupBox6.Controls.Add(Label30); GroupBox6.Controls.Add(PictureBox3); GroupBox6.ForeColor = Color.FromArgb(0, 0, 192); - GroupBox6.Location = new Point(8, 9); - GroupBox6.Margin = new Padding(4, 5, 4, 5); + GroupBox6.Location = new Point(13, 14); + GroupBox6.Margin = new Padding(6, 8, 6, 8); GroupBox6.Name = "GroupBox6"; - GroupBox6.Padding = new Padding(4, 5, 4, 5); - GroupBox6.Size = new Size(661, 345); + GroupBox6.Padding = new Padding(6, 8, 6, 8); + GroupBox6.Size = new Size(1074, 552); GroupBox6.TabIndex = 42; GroupBox6.TabStop = false; GroupBox6.Text = "Logo"; @@ -1484,10 +1485,10 @@ namespace ImageCatalog // PictureBox2 // PictureBox2.BorderStyle = BorderStyle.FixedSingle; - PictureBox2.Location = new Point(192, 295); - PictureBox2.Margin = new Padding(4, 5, 4, 5); + PictureBox2.Location = new Point(312, 472); + PictureBox2.Margin = new Padding(6, 8, 6, 8); PictureBox2.Name = "PictureBox2"; - PictureBox2.Size = new Size(31, 36); + PictureBox2.Size = new Size(49, 56); PictureBox2.TabIndex = 44; PictureBox2.TabStop = false; PictureBox2.Visible = false; @@ -1495,10 +1496,10 @@ namespace ImageCatalog // _PictureBox1 // _PictureBox1.Cursor = Cursors.Cross; - _PictureBox1.Location = new Point(341, 86); - _PictureBox1.Margin = new Padding(4, 5, 4, 5); + _PictureBox1.Location = new Point(554, 138); + _PictureBox1.Margin = new Padding(6, 8, 6, 8); _PictureBox1.Name = "_PictureBox1"; - _PictureBox1.Size = new Size(299, 246); + _PictureBox1.Size = new Size(486, 394); _PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; _PictureBox1.TabIndex = 43; _PictureBox1.TabStop = false; @@ -1507,38 +1508,38 @@ namespace ImageCatalog // // ComboBox5 // - ComboBox5.Location = new Point(192, 258); - ComboBox5.Margin = new Padding(4, 5, 4, 5); + ComboBox5.Location = new Point(312, 413); + ComboBox5.Margin = new Padding(6, 8, 6, 8); ComboBox5.Name = "ComboBox5"; - ComboBox5.Size = new Size(127, 28); + ComboBox5.Size = new Size(204, 40); ComboBox5.TabIndex = 42; ComboBox5.Text = "ComboBox5"; // // ComboBox4 // - ComboBox4.Location = new Point(192, 222); - ComboBox4.Margin = new Padding(4, 5, 4, 5); + ComboBox4.Location = new Point(312, 355); + ComboBox4.Margin = new Padding(6, 8, 6, 8); ComboBox4.Name = "ComboBox4"; - ComboBox4.Size = new Size(127, 28); + ComboBox4.Size = new Size(204, 40); ComboBox4.TabIndex = 41; ComboBox4.Text = "ComboBox4"; // // TextBox19 // - TextBox19.Location = new Point(192, 148); - TextBox19.Margin = new Padding(4, 5, 4, 5); + TextBox19.Location = new Point(312, 237); + TextBox19.Margin = new Padding(6, 8, 6, 8); TextBox19.Name = "TextBox19"; - TextBox19.Size = new Size(127, 27); + TextBox19.Size = new Size(204, 39); TextBox19.TabIndex = 40; TextBox19.Text = "TextBox19"; // // Label28 // Label28.ForeColor = Color.Black; - Label28.Location = new Point(23, 149); - Label28.Margin = new Padding(4, 0, 4, 0); + Label28.Location = new Point(37, 238); + Label28.Margin = new Padding(6, 0, 6, 0); Label28.Name = "Label28"; - Label28.Size = new Size(160, 25); + Label28.Size = new Size(260, 40); Label28.TabIndex = 39; Label28.Text = "Trasparenza (0-100%)"; Label28.TextAlign = ContentAlignment.MiddleLeft; @@ -1546,28 +1547,28 @@ namespace ImageCatalog // CheckBox5 // CheckBox5.ForeColor = Color.Black; - CheckBox5.Location = new Point(0, 40); - CheckBox5.Margin = new Padding(4, 5, 4, 5); + CheckBox5.Location = new Point(0, 64); + CheckBox5.Margin = new Padding(6, 8, 6, 8); CheckBox5.Name = "CheckBox5"; - CheckBox5.Size = new Size(96, 31); + CheckBox5.Size = new Size(156, 50); CheckBox5.TabIndex = 38; CheckBox5.Text = "Aggiungi"; // // TextBox15 // - TextBox15.Location = new Point(192, 111); - TextBox15.Margin = new Padding(4, 5, 4, 5); + TextBox15.Location = new Point(312, 178); + TextBox15.Margin = new Padding(6, 8, 6, 8); TextBox15.Name = "TextBox15"; - TextBox15.Size = new Size(127, 27); + TextBox15.Size = new Size(204, 39); TextBox15.TabIndex = 19; TextBox15.Text = "TextBox15"; // // TextBox14 // - TextBox14.Location = new Point(192, 74); - TextBox14.Margin = new Padding(4, 5, 4, 5); + TextBox14.Location = new Point(312, 118); + TextBox14.Margin = new Padding(6, 8, 6, 8); TextBox14.Name = "TextBox14"; - TextBox14.Size = new Size(127, 27); + TextBox14.Size = new Size(204, 39); TextBox14.TabIndex = 18; TextBox14.Text = "TextBox14"; // @@ -1575,20 +1576,20 @@ namespace ImageCatalog // Label25.AutoSize = true; Label25.ForeColor = Color.Black; - Label25.Location = new Point(23, 258); - Label25.Margin = new Padding(4, 0, 4, 0); + Label25.Location = new Point(37, 413); + Label25.Margin = new Padding(6, 0, 6, 0); Label25.Name = "Label25"; - Label25.Size = new Size(131, 20); + Label25.Size = new Size(210, 32); Label25.TabIndex = 36; Label25.Text = "Posizione verticale"; Label25.TextAlign = ContentAlignment.MiddleLeft; // // TextBox16 // - TextBox16.Location = new Point(192, 185); - TextBox16.Margin = new Padding(4, 5, 4, 5); + TextBox16.Location = new Point(312, 296); + TextBox16.Margin = new Padding(6, 8, 6, 8); TextBox16.Name = "TextBox16"; - TextBox16.Size = new Size(127, 27); + TextBox16.Size = new Size(204, 39); TextBox16.TabIndex = 35; TextBox16.Text = "TextBox16"; // @@ -1596,10 +1597,10 @@ namespace ImageCatalog // Label24.AutoSize = true; Label24.ForeColor = Color.Black; - Label24.Location = new Point(25, 189); - Label24.Margin = new Padding(4, 0, 4, 0); + Label24.Location = new Point(41, 302); + Label24.Margin = new Padding(6, 0, 6, 0); Label24.Name = "Label24"; - Label24.Size = new Size(128, 20); + Label24.Size = new Size(203, 32); Label24.TabIndex = 34; Label24.Text = "Margine (pixel/%)"; Label24.TextAlign = ContentAlignment.MiddleLeft; @@ -1608,10 +1609,10 @@ namespace ImageCatalog // Label22.AutoSize = true; Label22.ForeColor = Color.Black; - Label22.Location = new Point(25, 78); - Label22.Margin = new Padding(4, 0, 4, 0); + Label22.Location = new Point(41, 125); + Label22.Margin = new Padding(6, 0, 6, 0); Label22.Name = "Label22"; - Label22.Size = new Size(58, 20); + Label22.Size = new Size(90, 32); Label22.TabIndex = 20; Label22.Text = "Altezza"; Label22.TextAlign = ContentAlignment.MiddleLeft; @@ -1620,30 +1621,30 @@ namespace ImageCatalog // Label23.AutoSize = true; Label23.ForeColor = Color.Black; - Label23.Location = new Point(25, 115); - Label23.Margin = new Padding(4, 0, 4, 0); + Label23.Location = new Point(41, 184); + Label23.Margin = new Padding(6, 0, 6, 0); Label23.Name = "Label23"; - Label23.Size = new Size(76, 20); + Label23.Size = new Size(120, 32); Label23.TabIndex = 21; Label23.Text = "Larghezza"; Label23.TextAlign = ContentAlignment.MiddleLeft; // // _Button4 // - _Button4.Location = new Point(619, 37); - _Button4.Margin = new Padding(4, 5, 4, 5); + _Button4.Location = new Point(1006, 59); + _Button4.Margin = new Padding(6, 8, 6, 8); _Button4.Name = "_Button4"; - _Button4.Size = new Size(32, 31); + _Button4.Size = new Size(52, 50); _Button4.TabIndex = 8; _Button4.Text = "..."; _Button4.Click += Button4_Click; // // TextBox10 // - TextBox10.Location = new Point(192, 37); - TextBox10.Margin = new Padding(4, 5, 4, 5); + TextBox10.Location = new Point(312, 59); + TextBox10.Margin = new Padding(6, 8, 6, 8); TextBox10.Name = "TextBox10"; - TextBox10.Size = new Size(415, 27); + TextBox10.Size = new Size(672, 39); TextBox10.TabIndex = 6; TextBox10.Text = "TextBox10"; // @@ -1651,10 +1652,10 @@ namespace ImageCatalog // Label29.AutoSize = true; Label29.ForeColor = Color.Black; - Label29.Location = new Point(23, 226); - Label29.Margin = new Padding(4, 0, 4, 0); + Label29.Location = new Point(37, 362); + Label29.Margin = new Padding(6, 0, 6, 0); Label29.Name = "Label29"; - Label29.Size = new Size(149, 20); + Label29.Size = new Size(238, 32); Label29.TabIndex = 36; Label29.Text = "Posizione orizzontale"; Label29.TextAlign = ContentAlignment.MiddleLeft; @@ -1663,10 +1664,10 @@ namespace ImageCatalog // Label30.AutoSize = true; Label30.ForeColor = Color.Black; - Label30.Location = new Point(25, 312); - Label30.Margin = new Padding(4, 0, 4, 0); + Label30.Location = new Point(41, 499); + Label30.Margin = new Padding(6, 0, 6, 0); Label30.Name = "Label30"; - Label30.Size = new Size(132, 20); + Label30.Size = new Size(211, 32); Label30.TabIndex = 36; Label30.Text = "Colore trasparente"; Label30.TextAlign = ContentAlignment.MiddleLeft; @@ -1675,20 +1676,20 @@ namespace ImageCatalog // PictureBox3 // PictureBox3.BorderStyle = BorderStyle.FixedSingle; - PictureBox3.Location = new Point(288, 295); - PictureBox3.Margin = new Padding(4, 5, 4, 5); + PictureBox3.Location = new Point(468, 472); + PictureBox3.Margin = new Padding(6, 8, 6, 8); PictureBox3.Name = "PictureBox3"; - PictureBox3.Size = new Size(31, 36); + PictureBox3.Size = new Size(49, 56); PictureBox3.TabIndex = 44; PictureBox3.TabStop = false; PictureBox3.Visible = false; // // _Label27 // - _Label27.Location = new Point(788, 582); - _Label27.Margin = new Padding(4, 0, 4, 0); + _Label27.Location = new Point(1280, 931); + _Label27.Margin = new Padding(6, 0, 6, 0); _Label27.Name = "_Label27"; - _Label27.Size = new Size(187, 31); + _Label27.Size = new Size(304, 50); _Label27.TabIndex = 62; _Label27.Text = "Versione 2.2 2021"; _Label27.TextAlign = ContentAlignment.MiddleRight; @@ -1696,11 +1697,12 @@ namespace ImageCatalog // // _Button7 // + _Button7.DataBindings.Add(new Binding("Enabled", bindingSource1, "UiDisabled", true, DataSourceUpdateMode.OnPropertyChanged)); _Button7.Font = new Font("Microsoft Sans Serif", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 0); - _Button7.Location = new Point(719, 185); - _Button7.Margin = new Padding(4, 5, 4, 5); + _Button7.Location = new Point(1168, 296); + _Button7.Margin = new Padding(6, 8, 6, 8); _Button7.Name = "_Button7"; - _Button7.Size = new Size(256, 62); + _Button7.Size = new Size(416, 99); _Button7.TabIndex = 61; _Button7.Text = "stop creazione"; _Button7.Click += Button7_Click; @@ -1709,10 +1711,10 @@ namespace ImageCatalog // _Button5.DataBindings.Add(new Binding("Enabled", bindingSource1, "UiEnabled", true)); _Button5.Font = new Font("Microsoft Sans Serif", 11F, FontStyle.Bold, GraphicsUnit.Point, 0); - _Button5.Location = new Point(719, 66); - _Button5.Margin = new Padding(4, 5, 4, 5); + _Button5.Location = new Point(1168, 101); + _Button5.Margin = new Padding(6, 8, 6, 8); _Button5.Name = "_Button5"; - _Button5.Size = new Size(256, 49); + _Button5.Size = new Size(416, 78); _Button5.TabIndex = 60; _Button5.Text = "Salva impostazioni"; _Button5.Click += Button5_Click; @@ -1721,10 +1723,10 @@ namespace ImageCatalog // Label20.AutoSize = true; Label20.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0); - Label20.Location = new Point(719, 452); - Label20.Margin = new Padding(4, 0, 4, 0); + Label20.Location = new Point(1168, 723); + Label20.Margin = new Padding(6, 0, 6, 0); Label20.Name = "Label20"; - Label20.Size = new Size(126, 20); + Label20.Size = new Size(183, 30); Label20.TabIndex = 59; Label20.Text = "foto generate:"; // @@ -1732,10 +1734,10 @@ namespace ImageCatalog // Label19.AutoSize = true; Label19.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0); - Label19.Location = new Point(719, 423); - Label19.Margin = new Padding(4, 0, 4, 0); + Label19.Location = new Point(1168, 677); + Label19.Margin = new Padding(6, 0, 6, 0); Label19.Name = "Label19"; - Label19.Size = new Size(101, 20); + Label19.Size = new Size(143, 30); Label19.TabIndex = 58; Label19.Text = "foto totali: "; // @@ -1743,10 +1745,10 @@ namespace ImageCatalog // Label18.AutoSize = true; Label18.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Bold, GraphicsUnit.Point, 0); - Label18.Location = new Point(857, 452); - Label18.Margin = new Padding(4, 0, 4, 0); + Label18.Location = new Point(1393, 723); + Label18.Margin = new Padding(6, 0, 6, 0); Label18.Name = "Label18"; - Label18.Size = new Size(24, 25); + Label18.Size = new Size(36, 37); Label18.TabIndex = 57; Label18.Text = "0"; // @@ -1754,20 +1756,20 @@ namespace ImageCatalog // lblFotoTotaliNum.AutoSize = true; lblFotoTotaliNum.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Bold, GraphicsUnit.Point, 0); - lblFotoTotaliNum.Location = new Point(857, 423); - lblFotoTotaliNum.Margin = new Padding(4, 0, 4, 0); + lblFotoTotaliNum.Location = new Point(1393, 677); + lblFotoTotaliNum.Margin = new Padding(6, 0, 6, 0); lblFotoTotaliNum.Name = "lblFotoTotaliNum"; - lblFotoTotaliNum.Size = new Size(24, 25); + lblFotoTotaliNum.Size = new Size(36, 37); lblFotoTotaliNum.TabIndex = 56; lblFotoTotaliNum.Text = "0"; // // Label10 // Label10.Font = new Font("Microsoft Sans Serif", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 0); - Label10.Location = new Point(719, 251); - Label10.Margin = new Padding(4, 0, 4, 0); + Label10.Location = new Point(1168, 402); + Label10.Margin = new Padding(6, 0, 6, 0); Label10.Name = "Label10"; - Label10.Size = new Size(256, 111); + Label10.Size = new Size(416, 178); Label10.TabIndex = 55; Label10.Text = "file"; // @@ -1775,10 +1777,10 @@ namespace ImageCatalog // _Button6.DataBindings.Add(new Binding("Enabled", bindingSource1, "UiEnabled", true)); _Button6.Font = new Font("Microsoft Sans Serif", 11F, FontStyle.Bold, GraphicsUnit.Point, 0); - _Button6.Location = new Point(719, 18); - _Button6.Margin = new Padding(4, 5, 4, 5); + _Button6.Location = new Point(1168, 24); + _Button6.Margin = new Padding(6, 8, 6, 8); _Button6.Name = "_Button6"; - _Button6.Size = new Size(256, 49); + _Button6.Size = new Size(416, 78); _Button6.TabIndex = 54; _Button6.Text = "Carica impostazioni"; _Button6.Click += Button6_Click; @@ -1787,10 +1789,10 @@ namespace ImageCatalog // _btnCreaCatalogoAsync.DataBindings.Add(new Binding("Enabled", bindingSource1, "UiEnabled", true)); _btnCreaCatalogoAsync.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0); - _btnCreaCatalogoAsync.Location = new Point(719, 120); - _btnCreaCatalogoAsync.Margin = new Padding(4, 5, 4, 5); + _btnCreaCatalogoAsync.Location = new Point(1168, 187); + _btnCreaCatalogoAsync.Margin = new Padding(6, 8, 6, 8); _btnCreaCatalogoAsync.Name = "_btnCreaCatalogoAsync"; - _btnCreaCatalogoAsync.Size = new Size(256, 58); + _btnCreaCatalogoAsync.Size = new Size(416, 93); _btnCreaCatalogoAsync.TabIndex = 68; _btnCreaCatalogoAsync.Text = "CREA"; _btnCreaCatalogoAsync.UseVisualStyleBackColor = true; @@ -1802,9 +1804,9 @@ namespace ImageCatalog // // MainForm // - AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleDimensions = new SizeF(13F, 32F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(985, 617); + ClientSize = new Size(1601, 987); Controls.Add(_btnCreaCatalogoAsync); Controls.Add(ProgressBar1); Controls.Add(CheckBox22); @@ -1819,7 +1821,7 @@ namespace ImageCatalog Controls.Add(lblFotoTotaliNum); Controls.Add(Label10); Controls.Add(_Button6); - Margin = new Padding(4, 5, 4, 5); + Margin = new Padding(6, 8, 6, 8); MaximizeBox = false; Name = "MainForm"; Text = "Image Catalog"; diff --git a/imagecatalog/MainForm.cs b/imagecatalog/MainForm.cs index 63163af..b32189c 100644 --- a/imagecatalog/MainForm.cs +++ b/imagecatalog/MainForm.cs @@ -19,26 +19,25 @@ using Microsoft.Extensions.Logging; namespace ImageCatalog; -public delegate void XyThreadAdd(string Info); - public partial class MainForm { private readonly DataModel Model; - + private readonly ILogger _logger; private readonly ImageCreationStuff _imageCreationService; private readonly ParametriSetup _parametriSetup; private readonly PicSettings _picSettings; - - public MainForm(DataModel model, ImageCreationStuff imageCreationStuff, PicSettings picSettings, ParametriSetup parametriSetup, ILogger logger) + + public MainForm(DataModel model, ImageCreationStuff imageCreationStuff, PicSettings picSettings, + ParametriSetup parametriSetup, ILogger logger) { Model = model; _imageCreationService = imageCreationStuff; _parametriSetup = parametriSetup; _picSettings = picSettings; - + _logger = logger; _logger.LogDebug("Start"); @@ -97,7 +96,7 @@ public partial class MainForm { if (InvokeRequired) { - SetProgressCallback d = new SetProgressCallback(SetProgress); + var d = new SetProgressCallback(SetProgress); this.Invoke(d, new object[] { target, amount, maximum }); } else @@ -121,7 +120,7 @@ public partial class MainForm // Private ContaFotoCuori As Integer // Private TaskCuori() As PicInfo - + private int ContaImmaginiThread; private int maxThreads = 15; private int minThreads = 5; @@ -206,11 +205,8 @@ public partial class MainForm bindingSource1.DataSource = Model; Application.EnableVisualStyles(); SetDefaults(); - // /* TODO ERROR: Skipped IfDirectiveTrivia */ - // AllocConsole(); - // /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + _logger.LogInformation("Programma Avviato"); - //Console.WriteLine("Programma avviato"); } private void FixPaths() @@ -261,17 +257,17 @@ public partial class MainForm { long timediffH, timediffS; long timediffM; - + TimeSpan timeDiff = timeStop - timeStart; timediffM = (int)timeDiff.TotalMinutes; timediffS = (int)timeDiff.TotalSeconds; timediffH = (int)timeDiff.TotalHours; - + // timediffM = DateAndTime.DateDiff(DateInterval.Minute, timeStart, timeStop); // timediffS = DateAndTime.DateDiff(DateInterval.Second, timeStart, timeStop); // timediffH = DateAndTime.DateDiff(DateInterval.Hour, timeStart, timeStop); - + double fotoSec = numFoto / (double)timediffS; double fotoMin = numFoto / (double)timediffM; double fotoOra = numFoto / (double)timediffH; @@ -286,7 +282,7 @@ public partial class MainForm var dialog = new FolderBrowserDialog(); dialog.InitialDirectory = startingFolder; if (dialog.ShowDialog() != DialogResult.OK) return string.Empty; - + var directoryScelta = FixPath(dialog.SelectedPath); // dialog.FileName; return directoryScelta; @@ -319,7 +315,7 @@ public partial class MainForm SaveFileDlg.FilterIndex = 0; SaveFileDlg.RestoreDirectory = true; if (DialogResult.OK != SaveFileDlg.ShowDialog()) return; - + var ilNome = SaveFileDlg.FileName; _parametriSetup.NomeFileSetup = ilNome; _parametriSetup.AggiornaParametro("DirSorgente", Model.SourcePath); @@ -478,7 +474,7 @@ public partial class MainForm if (PictureBox1.Image.Height >= PictureBox1.Image.Width) { PictureBox1.Height = 160; - PictureBox1.Width = + PictureBox1.Width = (int)(160 * PictureBox1.Image.Width / (double)PictureBox1.Image.Height); } else @@ -699,7 +695,7 @@ public partial class MainForm return numerazioneType; } - + private void CopyDirectoryFile(string SourcePath, string DestPath, bool OverWrite = false) { @@ -774,8 +770,6 @@ public partial class MainForm { _logger.LogError(exception.Message); _logger.LogInformation("Ignora questo errore"); - // Console.WriteLine(exception); - // Console.WriteLine("Ignora questo errore"); } unlockUI(); @@ -911,20 +905,20 @@ public partial class MainForm _mainToken?.Dispose(); _mainToken = new CancellationTokenSource(); var token = _mainToken.Token; - + // timeStart = TimeOfDay FixPaths(); Label10.Text = "Elaborazione in corso..."; lblFotoTotaliNum.Text = "0"; Label18.Text = "0"; - Label43.Text = "-s"; + Model.SpeedCounter = "-s"; SetPicSettings(Model.SourcePath, Model.DestinationPath); ProgressBar1.Minimum = 0; ProgressBar1.Step = 1; ProgressBar1.Value = 0; // Await CreaCatalogoParallel() - + var imageCreationOptions = new ImageCreationStuff.Options { AggiornaSottodirectory = chkAggiornaSottodirectory.Checked, @@ -950,14 +944,14 @@ public partial class MainForm timer1.Interval = 1000 * 60; timer1.Enabled = true; - string time = await _imageCreationService.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token); - Label43.Text = time; + string time = + await _imageCreationService.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token); + Model.SpeedCounter = time; timer1.Enabled = false; } catch (OperationCanceledException operationCanceledException) { _logger.LogInformation("Operazione Cancellata"); - //Console.WriteLine("Operazione cancellata"); } finally { @@ -979,7 +973,8 @@ public partial class MainForm _previousAmount = _currentAmount; _currentAmount = _results.Count; int diff = _currentAmount - _previousAmount; - SetText(Label43, $"{diff} f/m"); + Model.SpeedCounter = $"{diff} f/m"; + //SetText(Label43, $"{diff} f/m"); } private void UpdateCounter(string text)