diff --git a/.upgrade-assistant b/.upgrade-assistant new file mode 100644 index 0000000..d7035e5 --- /dev/null +++ b/.upgrade-assistant @@ -0,0 +1 @@ +{"Build":"0.2.212405\u002B8e7b4314944e5328780f06f20721a4d6ef9783bb","CurrentProject":"","EntryPoint":"","IsComplete":true} \ No newline at end of file diff --git a/CatalogLib/CatalogLib.csproj b/CatalogLib/CatalogLib.csproj index c88f86e..e563fc5 100644 --- a/CatalogLib/CatalogLib.csproj +++ b/CatalogLib/CatalogLib.csproj @@ -9,7 +9,7 @@ Properties CatalogLib CatalogLib - v4.6 + v4.8 512 SAK SAK diff --git a/CatalogLib/app.config b/CatalogLib/app.config index b5d559f..f007515 100644 --- a/CatalogLib/app.config +++ b/CatalogLib/app.config @@ -1,35 +1,35 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - \ No newline at end of file + diff --git a/CatalogLib/packages.config b/CatalogLib/packages.config index 8beea34..86dfa50 100644 --- a/CatalogLib/packages.config +++ b/CatalogLib/packages.config @@ -10,7 +10,7 @@ - + @@ -19,45 +19,45 @@ - + - + - - - + + + - + - - - + + + - + - + - + - + - + \ No newline at end of file diff --git a/CatalogVbLib/CatalogVbLib.vbproj b/CatalogVbLib/CatalogVbLib.vbproj index c6e2591..fbd3245 100644 --- a/CatalogVbLib/CatalogVbLib.vbproj +++ b/CatalogVbLib/CatalogVbLib.vbproj @@ -10,11 +10,12 @@ CatalogVbLib 512 Windows - v4.5 + v4.8 SAK SAK SAK SAK + true @@ -112,6 +113,7 @@ True Application.myapp + True True diff --git a/CatalogVbLib/My Project/Application.Designer.vb b/CatalogVbLib/My Project/Application.Designer.vb index 96b7331..88dd01c 100644 --- a/CatalogVbLib/My Project/Application.Designer.vb +++ b/CatalogVbLib/My Project/Application.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34011 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. diff --git a/CatalogVbLib/My Project/Resources.Designer.vb b/CatalogVbLib/My Project/Resources.Designer.vb index 4c63fee..176c107 100644 --- a/CatalogVbLib/My Project/Resources.Designer.vb +++ b/CatalogVbLib/My Project/Resources.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34011 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -11,6 +11,7 @@ Option Strict On Option Explicit On +Imports System Namespace My.Resources @@ -21,20 +22,20 @@ Namespace My.Resources ''' ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ + _ Friend Module Resources - + Private resourceMan As Global.System.Resources.ResourceManager - + Private resourceCulture As Global.System.Globalization.CultureInfo - + ''' ''' Returns the cached ResourceManager instance used by this class. ''' - _ + _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then @@ -44,17 +45,17 @@ Namespace My.Resources Return resourceMan End Get End Property - + ''' ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. ''' - _ + _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) + Set resourceCulture = value End Set End Property diff --git a/CatalogVbLib/My Project/Settings.Designer.vb b/CatalogVbLib/My Project/Settings.Designer.vb index 30ce19b..9abf647 100644 --- a/CatalogVbLib/My Project/Settings.Designer.vb +++ b/CatalogVbLib/My Project/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34011 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -13,42 +13,42 @@ Option Explicit On Namespace My - - _ + + _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean + Private Shared addedHandler As Boolean - Private Shared addedHandlerLockObject As New Object + Private Shared addedHandlerLockObject As New Object - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub #End If #End Region - + Public Shared ReadOnly Property [Default]() As MySettings Get - + #If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If #End If Return defaultInstance End Get diff --git a/ImageCatalogCS/App.config b/ImageCatalogCS/App.config index 8e15646..4bfa005 100644 --- a/ImageCatalogCS/App.config +++ b/ImageCatalogCS/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/ImageCatalogCS/ImageCatalog 3.csproj b/ImageCatalogCS/ImageCatalog 3.csproj index 993bc20..ef71c58 100644 --- a/ImageCatalogCS/ImageCatalog 3.csproj +++ b/ImageCatalogCS/ImageCatalog 3.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties ImageCatalogCS ImageCatalogCS - v4.5 + v4.8 512 SAK SAK SAK SAK + AnyCPU @@ -105,6 +106,7 @@ True Resources.resx + True SettingsSingleFileGenerator diff --git a/ImageCatalogCS/Properties/Resources.Designer.cs b/ImageCatalogCS/Properties/Resources.Designer.cs index 9c3a10e..6af1fd8 100644 --- a/ImageCatalogCS/Properties/Resources.Designer.cs +++ b/ImageCatalogCS/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace ImageCatalogCS.Properties -{ - - +namespace ImageCatalogCS.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace ImageCatalogCS.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageCatalogCS.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/ImageCatalogCS/Properties/Settings.Designer.cs b/ImageCatalogCS/Properties/Settings.Designer.cs index 684a319..0e29f59 100644 --- a/ImageCatalogCS/Properties/Settings.Designer.cs +++ b/ImageCatalogCS/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18010 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace ImageCatalogCS.Properties -{ - - +namespace ImageCatalogCS.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/MaddoShared.backup/FileData.cs b/MaddoShared.backup/FileData.cs new file mode 100644 index 0000000..37bd735 --- /dev/null +++ b/MaddoShared.backup/FileData.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MaddoShared +{ + public class FileData + { + /// + /// Il file originale + /// + public FileInfo File { get; set; } + /// + /// La cartella di destinazione + /// + public DirectoryInfo Directory { get; set; } + + public FileData(FileInfo newFile, DirectoryInfo newDirectory) + { + this.File = newFile; + this.Directory = newDirectory; + } + } +} diff --git a/MaddoShared.backup/FileHelperSharp.cs b/MaddoShared.backup/FileHelperSharp.cs new file mode 100644 index 0000000..905999e --- /dev/null +++ b/MaddoShared.backup/FileHelperSharp.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MaddoShared +{ + public class FileHelperOptions + { + public bool SeparateFiles { get; set; } + public NumerazioneType NumerationType { get; set; } + public int CounterSize { get; set; } + public string Suffix { get; set; } + public int FilesPerFolder { get; set; } + } + public enum NumerazioneType + { + Progressiva, + Files + } + public class FileHelperSharp + { + + public List GetFilesRecursive(DirectoryInfo root, DirectoryInfo destRoot, string filter, FileHelperOptions options) + { + ConcurrentDictionary dirSourceDest = new ConcurrentDictionary(); + List result = new List(); + + // Dim stack As New Stack(Of DirectoryInfo) + Stack> stack = new Stack>(); + + + + KeyValuePair pair = new KeyValuePair(); + + + // stack.Push(root) + stack.Push(new KeyValuePair(root, destRoot)); + + while ((stack.Count > 0)) + { + KeyValuePair curDirKV = stack.Pop(); + // curDirKP = stack.Pop() + DirectoryInfo dir = curDirKV.Key; + DirectoryInfo dDir = curDirKV.Value; + try + { + // result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly)) + // dividere file qui + if (options.FilesPerFolder > 0 & options.SeparateFiles) + AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir, options, filter)); + else + AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir, options, filter)); + + foreach (DirectoryInfo subDirectory in dir.GetDirectories()) + stack.Push(new KeyValuePair(subDirectory, new DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name)))); + } + catch (Exception ex) + { + // TODO ERROR + } + } + + List resultData = new List(); + resultData.AddRange(from p in dirSourceDest + select new FileData(p.Key, p.Value)); + return resultData; + } + + public ConcurrentDictionary AppendDictionaryConcurrent(ConcurrentDictionary dictA, ConcurrentDictionary dictB) + { + foreach (KeyValuePair pair in dictB) + dictA.TryAdd(pair.Key, pair.Value); + return dictA; + } + + + private ConcurrentDictionary DividiFilesInDirConcurrent(DirectoryInfo dir, DirectoryInfo dirDest, FileHelperOptions options, string filter) + { + //int filesCount = dir.GetFiles(Filter).Length; + int contaFilePerDir = 0; + int contaDirPerDir = 0; + string tempText;// = string.Empty; + ConcurrentDictionary foldersDict = new ConcurrentDictionary(); + + DirectoryInfo destDir; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName)); + foreach (FileInfo file in dir.GetFiles(filter)) + { + contaFilePerDir += 1; + + if (contaFilePerDir == (contaDirPerDir * options.FilesPerFolder) + 1) + { + contaDirPerDir += 1; + + tempText = options.NumerationType == NumerazioneType.Progressiva ? contaDirPerDir.ToString() : (contaDirPerDir * options.FilesPerFolder).ToString(); + int i; + for (i = 1; i <= (options.CounterSize - tempText.Length); i++) + tempText = "0" + tempText; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName, options.Suffix + tempText)); + } + + if (!destDir.Exists) + destDir.Create(); + + foldersDict.TryAdd(file, destDir); + } + + return foldersDict; + } + + } +} diff --git a/MaddoShared.backup/ImageCreationStuff.cs b/MaddoShared.backup/ImageCreationStuff.cs new file mode 100644 index 0000000..439f3dc --- /dev/null +++ b/MaddoShared.backup/ImageCreationStuff.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using CatalogVbLib; +using Dasync.Collections; + +namespace MaddoShared +{ + public class ImageCreationStuff + { + public class Options + { + public bool AggiornaSottodirectory { get; set; } + public bool CreaSottocartelle { get; set; } + + public int FilePerCartella { get; set; } + public string SuffissoCartelle { get; set; } + public int CifreContatore { get; set; } + public NumerazioneType NumerazioneType { get; set; } + public string SourcePath { get; set; } + public string DestinationPath { get; set; } + + public int MaxThreads { get; set; } + public int ChunksSize { get; set; } + public bool LinearExecution { get; set; } + } + + public async Task CreaCatalogoParallel(Options options, ConcurrentBag results, EventHandler> updateEvent, CancellationToken cancellationToken = default(CancellationToken)) + { + var stopwatch = new Stopwatch(); + stopwatch.Start(); + // todo immagini counter + //todo set label + await CreaImmaginiParallel(options, results, updateEvent, cancellationToken); + + // todo set finito label + stopwatch.Stop(); + + return $"{stopwatch.Elapsed.Hours}h {stopwatch.Elapsed.Minutes}m ${stopwatch.Elapsed.Seconds}s ({stopwatch.Elapsed.TotalSeconds}s)"; + + + } + + 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 () => + { + await new ImageCreatorSharp(d.File, d.Directory).CreaImmagineThread(d.File.Name); + + //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 => + { + 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) + { + Console.WriteLine(e); + throw; + } + + }, maxDegreeOfParallelism: threads, false, cancellationToken); + + + } + else + { + + var asdf = SplitList(dataToProcess.ToList(), options.ChunksSize).ToList(); + + + foreach (var sdaf in asdf) + { + await sdaf.ParallelForEachAsync(async fileData => + { + 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) + { + Console.WriteLine(e); + throw; + } + }, maxDegreeOfParallelism: threads, false, cancellationToken); + } + + + + } + } + + + } + + public static IEnumerable> SplitList(List bigList, int nSize = 3) + { + for (int i = 0; i < bigList.Count; i += nSize) + { + yield return bigList.GetRange(i, Math.Min(nSize, bigList.Count - i)); + } + } + } +} diff --git a/MaddoShared.backup/ImageCreatorSharp.cs b/MaddoShared.backup/ImageCreatorSharp.cs new file mode 100644 index 0000000..13f0d8e --- /dev/null +++ b/MaddoShared.backup/ImageCreatorSharp.cs @@ -0,0 +1,1021 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Security; +using System.Text; +using System.Threading.Tasks; +using Microsoft.VisualBasic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Windows.Forms; +using CatalogVbLib; +using SixLabors.ImageSharp.Metadata.Profiles.Exif; + +// Imports System.Threading + +public class ImageCreatorSharp +{ + private bool FotoRuotaADestra = false; + private bool FotoRuotaASinistra = false; + + private string TempMinText = ""; + // Private crFont1 As Font + private string _NomeFileChild; + + private DirectoryInfo _SourceDir; + private DirectoryInfo _DestDirStart; + private DirectoryInfo _DestDir; + + private FileInfo _workFile; + + private string testoFirma; + private string testoFirmaV; + private int alphaScelta; + private int DimensioneStandard; + private int DimensioneStandardMiniatura; + private DateTime dataFoto; + private DateTime dataPartenzaI; + private string testoOrario; + private string testoFirmaPiccola; + private Size thumbSizeSmall; + private Size thumbSizeBig; + private string nomeFileSmall; + private string nomeFileBig; + private string nomeFileBig2; + + private float yPosFromBottom; + private float yPosFromBottom1; + private float yPosFromBottom2; + private float yPosFromBottom3; + private float yPosFromBottom4; + + private ExifReader.Orientations _orientation; + private DateTime? _creationDate; + + public ImageCreatorSharp() + { + } + + public ImageCreatorSharp(string nomeFileChild, DirectoryInfo sourceDir, DirectoryInfo destDir, DirectoryInfo destDirStart) + { + this.NomeFileChild = nomeFileChild; + this.SourceDir = sourceDir; + this.DestDir = destDir; + this.DestDirStart = destDirStart; + this.WorkFile = new FileInfo(nomeFileChild); + } + + public ImageCreatorSharp(string nomeFileChild, DirectoryInfo sourceDir, DirectoryInfo destDir) + { + this.NomeFileChild = nomeFileChild; + this.DestDir = destDir; + } + + public ImageCreatorSharp(FileInfo file, DirectoryInfo destination) + { + this.WorkFile = file; + this.DestDir = destination; + } + + public async Task CreaImmagineThread(string Info) + { + try + { + await Task.Run(() => + { + Console.WriteLine($"File: {WorkFile} Dest: {DestDir}"); + preparaVariabili(); + ExtractExif(); + // Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(SourceDir.FullName, NomeFileChild)) + using (Image g = Image.FromFile(WorkFile.FullName)) + { + + // Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(WorkFile.FullName) + + // Imposta testo extra + impostaTestoExtra(g); + + // Ruota l'immagine in base ai dati EXIF + Rotation(g); + + // Forza jpeg se è selezionata l'opzione + System.Drawing.Imaging.ImageFormat thisFormat = g.RawFormat; + if (PicSettings.UsaForzaJpg == true) + thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg; + + prepareThumbnailSize(g); + + using (Bitmap imgOutputBig = new Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height)) + { + //Bitmap imgOutputBig = new Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height); + imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution); + + // Crea le miniature + creaMiniature(g, imgOutputBig, thisFormat); + + AggiungiTesto(g, imgOutputBig); + + aggiungiLogo(imgOutputBig); + + SalvaFoto(imgOutputBig, thumbSizeBig, nomeFileBig, nomeFileSmall, thumbSizeSmall, thisFormat); + } + + + } + }); + + // g.Dispose() + + //GC.Collect(); + } + + // PicSettings.mainForm.stepProgressBar() + + catch (Exception ex) + { + var e = ex.Demystify(); + Console.WriteLine(e); + Console.WriteLine(e.Message); + Console.WriteLine(e.StackTrace); + } + } + + private void ExtractExif() + { + using (var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName)) + { + ExifReader.Orientations finalOrientation; + var rotation = img.Metadata?.ExifProfile?.GetValue(ExifTag.Orientation); + if (rotation == null) + { + finalOrientation = ExifReader.Orientations.TopLeft; + } + else + { + finalOrientation = (ExifReader.Orientations)rotation.Value; + } + + _orientation = finalOrientation; + + var creation = img.Metadata?.ExifProfile?.GetValue(ExifTag.DateTime); + if (creation != null) + { + var succ = DateTime.TryParse(creation.Value, out var crDate); + if (succ) + { + _creationDate = crDate; + } + else + { + _creationDate = null; + } + } + else + { + _creationDate = null; + } + + + } + } + + private void Rotation(System.Drawing.Image g) + { + FotoRuotaADestra = false; + FotoRuotaASinistra = false; + + if (PicSettings.UsaRotazioneAutomatica == true) + { + if (g.PropertyIdList.Length > 0) + { + + + //ExifReader DatiExif = new ExifReader((Bitmap)g); + + switch (_orientation /*DatiExif.Orientation*/) + { + case ExifReader.Orientations.BottomLeft: + case ExifReader.Orientations.BottomRight: + case ExifReader.Orientations.LeftTop: + case ExifReader.Orientations.LftBottom: + FotoRuotaASinistra = true; + break; + case ExifReader.Orientations.RightBottom: + case ExifReader.Orientations.RightTop: + case ExifReader.Orientations.TopLeft: + case ExifReader.Orientations.TopRight: + break; + + } + } + } + + if (FotoRuotaASinistra == true) + g.RotateFlip(RotateFlipType.Rotate270FlipNone); + if (FotoRuotaADestra == true) + g.RotateFlip(RotateFlipType.Rotate90FlipNone); + } + /// + /// ''' Aggiunge Orario, tempo gara e altri + /// ''' + /// ''' Image + /// ''' + private void impostaTestoExtra(Image g) + { + if (PicSettings.UsaOrarioTestoApplicare | PicSettings.UsaTempoGaraTestoApplicare | PicSettings.UsaOrarioMiniatura | PicSettings.TestoMin | PicSettings.AggTempoGaraMin | PicSettings.AggNumTempMin) + { + if (g.PropertyIdList.Length > 0) + { + //ExifReader DatiExif = new ExifReader((Bitmap)g); + dataFoto = _creationDate ?? DateTime.Now; //DatiExif.DateTimeOriginal; + testoFirma = PicSettings.TestoFirmaStart; + testoFirmaV = PicSettings.TestoFirmaStartV; + + if (dataFoto.Year != 1) + { + testoFirmaPiccola = dataFoto.ToShortTimeString(); + if (PicSettings.UsaOrarioTestoApplicare == true) + { + testoFirma += " " + dataFoto.ToShortDateString() + " " + dataFoto.ToLongTimeString(); + testoFirmaV += " " + dataFoto.ToShortDateString() + " " + dataFoto.ToLongTimeString(); + } + if (PicSettings.UsaTempoGaraTestoApplicare == true) + { + + var diff = dataPartenzaI - dataFoto; + var diffA = diff.TotalSeconds * 10000000; + + TimeSpan Orario = new TimeSpan(0, 0, 0, (int)diffA); + testoFirma += " " + testoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + testoFirmaV += " " + testoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + } + } + } + } + else + { + testoFirma = PicSettings.TestoFirmaStart; + testoFirmaV = PicSettings.TestoFirmaStartV; + } + } + + /// + /// ''' Prepara diverse variabili azzerandole, elaborandole e prendendole dalle impostazioni + /// ''' + /// ''' + private void preparaVariabili() + { + alphaScelta = System.Convert.ToInt32((255 * (100 - PicSettings.Trasparenza) / (double)100)); + testoFirma = ""; + testoFirmaV = ""; + dataPartenzaI = PicSettings.DataPartenza; + testoOrario = PicSettings.TestoOrario; + if (testoOrario.Length > 0) + testoOrario += " "; + testoFirmaPiccola = ""; + thumbSizeSmall = new Size(); + thumbSizeBig = new Size(); + nomeFileSmall = ""; + nomeFileBig2 = ""; + nomeFileBig = ""; + DimensioneStandard = PicSettings.DimStandard; + DimensioneStandardMiniatura = PicSettings.DimStandardMiniatura; + // nomeFileSmall = Suffisso & NomeFileChild + // nomeFileBig = NomeFileChild + nomeFileSmall = PicSettings.Suffisso + WorkFile.Name; + nomeFileBig = WorkFile.Name; + } + + private void prepareThumbnailSize(Image g) + { + if (g.Width > g.Height) + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, PicSettings.LarghezzaSmall, "Larghezza"); + Size SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + else + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, PicSettings.AltezzaSmall, "Altezza"); + Size SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + } + + private void creaMiniature(Image g, Bitmap imgOutputBig, ImageFormat thisFormat) + { + if (PicSettings.TestoMin) + testoFirmaPiccola = nomeFileBig; + else if (PicSettings.AggNumTempMin) + testoFirmaPiccola = 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 */; + SizeF crSize1 = new SizeF(); + SizeF crSize2 = new SizeF(); + + if (PicSettings.CreaMiniature == true) + { + if (PicSettings.AggiungiScritteMiniature == false) + { + if (string.Equals(PicSettings.DirectorySorgente, PicSettings.DirectoryDestinazione, StringComparison.OrdinalIgnoreCase)) + nomeFileSmall = nomeFileSmall.Substring(0, nomeFileSmall.Length - 4) + PicSettings.Codice + nomeFileSmall.Substring(nomeFileSmall.Length - 4); + if (PicSettings.UsaOrarioMiniatura | PicSettings.TestoMin | PicSettings.AggTempoGaraMin | PicSettings.AggNumTempMin) + { + if (testoFirmaPiccola.Length > 0) + { + using (var imgOutputSmall = (Bitmap)imgOutputBig.Clone()) + { + Graphics grPhoto1; + grPhoto1 = Graphics.FromImage(imgOutputSmall); + grPhoto1.SmoothingMode = SmoothingMode.AntiAlias; + + int LarghezzaStandard1; + // quick fix + DimensioneStandardMiniatura = 50; + if (PicSettings.Grassetto == true) + { + crFont1 = new Font(PicSettings.IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + crFont2 = new Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont1 = new Font(PicSettings.IlFont, DimensioneStandardMiniatura); + crFont2 = new Font(PicSettings.IlFont, DimensioneStandard); + } + + crSize1 = grPhoto1.MeasureString(testoFirmaPiccola, crFont1); + crSize2 = grPhoto1.MeasureString(testoFirma, crFont1); + LarghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); + + if (crSize1.Width > System.Convert.ToSingle(g.Width)) + { + int Conta = 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(testoFirmaPiccola, crFont1); + if (crSize1.Width < System.Convert.ToSingle(g.Width)) + { + LarghezzaStandard1 = System.Convert.ToInt32(crSize1.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandardMiniatura = Conta; + } + + switch (PicSettings.Posizione.ToUpper()) + { + case "ALTO": + { + yPosFromBottom1 = (PicSettings.Margine); + yPosFromBottom4 = (PicSettings.MargVert); + break; + } + + case "BASSO": + { + yPosFromBottom1 = System.Convert.ToSingle((g.Height - crSize1.Height - (g.Height * PicSettings.Margine / (double)100))); + yPosFromBottom4 = System.Convert.ToSingle((g.Height - crSize1.Height - (g.Height * PicSettings.MargVert / (double)100))); + break; + } + } + + float xCenterOfImg1 = 0; + + 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; + + SolidBrush semiTransBrush21 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0)); + SolidBrush semiTransBrush1 = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB)); + + // quick fix + DimensioneStandardMiniatura = PicSettings.DimMin; + + if (PicSettings.Grassetto == true) + crFont1 = new Font(PicSettings.IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + else + crFont1 = new Font(PicSettings.IlFont, DimensioneStandardMiniatura); + // asdgadfhdfhjgfsjgfjygfdhsdafa + if (PicSettings.TestoMin) + { + grPhoto1.DrawString(nomeFileBig, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1); + grPhoto1.DrawString(nomeFileBig, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else if (PicSettings.AggTempoGaraMin & PicSettings.UsaTempoGaraTestoApplicare) + { + var diff = dataPartenzaI - dataFoto; + var diffA = diff.TotalSeconds * 10000000; + + TimeSpan Orario = new TimeSpan(0, 0, (int)diffA);/* new TimeSpan(DateTime.DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000);*/ + string tempstr = ""; + + + tempstr += Environment.NewLine + testoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + + + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else if (PicSettings.AggNumTempMin) + { + var diff = dataPartenzaI - dataFoto; + var diffA = diff.TotalSeconds * 10000000; + TimeSpan Orario = new TimeSpan(0, 0, (int)diffA); + string tempstr = ""; + tempstr += nomeFileBig; + + tempstr += Environment.NewLine + testoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + + + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else + { + grPhoto1.DrawString(testoFirmaPiccola, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1); + grPhoto1.DrawString(testoFirmaPiccola, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + + // Salva la miniatura + //using (var g22 = Image.FromHbitmap(imgOutputSmall)) + + + using (var imgOutputSmall2 = new Bitmap(imgOutputSmall, thumbSizeSmall.Width, thumbSizeSmall.Height)) + { + imgOutputSmall2.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat); + + //imgOutputSmall2.Dispose(); + } + + //imgOutputSmall.Dispose(); + } + + + //File.Delete(Path.Combine(DestDir.FullName, "Temp_" + nomeFileSmall)); + //FileSystem.Kill(); + } + else + { + using (Bitmap imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)) + { + imgOutputSmall.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat); + //imgOutputSmall.Dispose(); + } + } + } + else + { + using (Bitmap imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)) + { + imgOutputSmall.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat); + //imgOutputSmall.Dispose(); + } + } + } + } + + crFont1?.Dispose(); + crFont2?.Dispose(); + } + + private void AggiungiTesto(Image g, Bitmap imgOutputBig) + { + using (var grPhoto = Graphics.FromImage(imgOutputBig)) + { + grPhoto.SmoothingMode = SmoothingMode.AntiAlias; + + Font crFont = null/* TODO Change to default(_) if this is not a reference type */; + SizeF crSize = new SizeF(); + int LarghezzaStandard; + + if (PicSettings.Grassetto == true) + crFont = new Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold); + else + crFont = new Font(PicSettings.IlFont, DimensioneStandard); + crSize = grPhoto.MeasureString(testoFirma, crFont); + LarghezzaStandard = System.Convert.ToInt32(crSize.Width); + + if (crSize.Width > System.Convert.ToSingle(g.Width)) + { + int Conta = DimensioneStandard; + do + { + if (Conta > 20) + Conta -= 5; + else + Conta -= 1; + if (PicSettings.Grassetto == true) + crFont = new Font(PicSettings.IlFont, Conta, FontStyle.Bold); + else + crFont = new Font(PicSettings.IlFont, Conta); + crSize = grPhoto.MeasureString(testoFirma, crFont); + if (crSize.Width < System.Convert.ToSingle(g.Width)) + { + LarghezzaStandard = System.Convert.ToInt32(crSize.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandard = Conta; + } + + + switch (PicSettings.Posizione.ToUpper()) + { + case "ALTO": + { + yPosFromBottom = (PicSettings.Margine); + yPosFromBottom3 = (PicSettings.MargVert); + break; + } + + case "BASSO": + { + yPosFromBottom = System.Convert.ToSingle((g.Height - crSize.Height - (g.Height * PicSettings.Margine / (double)100))); + yPosFromBottom3 = System.Convert.ToSingle((g.Height - crSize.Height - (g.Height * PicSettings.MargVert / (double)100))); + break; + } + } + + float xCenterOfImg = 0; + float xCenterOfImg3 = 0; + StringFormat StrFormat = new StringFormat(); + switch (PicSettings.Allineamento.ToUpper()) + { + case "SINISTRA": + { + xCenterOfImg = System.Convert.ToSingle((PicSettings.Margine + (LarghezzaStandard / (double)2))); + xCenterOfImg3 = System.Convert.ToSingle((PicSettings.MargVert + (LarghezzaStandard / (double)2))); + if ((LarghezzaStandard / (double)2) > (g.Width / (double)2) - PicSettings.Margine) + xCenterOfImg = System.Convert.ToSingle((g.Width / (double)2)); + if ((LarghezzaStandard / (double)2) > (g.Width / (double)2) - PicSettings.MargVert) + xCenterOfImg3 = System.Convert.ToSingle((g.Width / (double)2)); + break; + } + + case "CENTRO": + { + xCenterOfImg = System.Convert.ToSingle((g.Width / (double)2)); + break; + } + + case "DESTRA": + { + xCenterOfImg = System.Convert.ToSingle((g.Width - PicSettings.Margine - (LarghezzaStandard / (double)2))); + xCenterOfImg3 = System.Convert.ToSingle((g.Width - PicSettings.MargVert - (LarghezzaStandard / (double)2))); + if ((LarghezzaStandard / (double)2) > (g.Width / (double)2) - PicSettings.Margine) + xCenterOfImg = System.Convert.ToSingle((g.Width / (double)2)); + if ((LarghezzaStandard / (double)2) > (g.Width / (double)2) - PicSettings.MargVert) + xCenterOfImg3 = System.Convert.ToSingle((g.Width / (double)2)); + break; + } + } + StrFormat.Alignment = StringAlignment.Center; + + SolidBrush semiTransBrush2 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0)); + // Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)) + SolidBrush semiTransBrush = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB)); + + if (FotoRuotaADestra | FotoRuotaASinistra) + { + if (PicSettings.Grassetto == true) + crFont = new Font(PicSettings.IlFont, PicSettings.DimVert, FontStyle.Bold); + else + crFont = new Font(PicSettings.IlFont, PicSettings.DimVert); + } + else if (PicSettings.Grassetto == true) + crFont = new Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold); + else + crFont = new Font(PicSettings.IlFont, DimensioneStandard); + + + // qui scrive il testo (nomefilebig) + if (PicSettings.TestoNome) + { + if (PicSettings.NomeData & g.PropertyIdList.Length > 0) + { + //ExifReader DatiExif = new ExifReader((Bitmap)g); + dataFoto = _creationDate ?? DateTime.Now; //DatiExif.DateTimeOriginal; + + grPhoto.DrawString((nomeFileBig + " " + dataFoto.ToShortDateString()), crFont, semiTransBrush2, new PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat); + grPhoto.DrawString((nomeFileBig + " " + dataFoto.ToShortDateString()), crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + else + { + grPhoto.DrawString(nomeFileBig, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat); + grPhoto.DrawString(nomeFileBig, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + } + + if (PicSettings.TestoNome == false) + { + if (FotoRuotaADestra | FotoRuotaASinistra) + { + if (PicSettings.TestoMin == false) + { + grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1, yPosFromBottom3 + 1), StrFormat); + grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom3), StrFormat); + } + if (PicSettings.TestoMin == true) + { + grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1, yPosFromBottom4 + 1), StrFormat); + grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom4), StrFormat); + } + } + else + { + grPhoto.DrawString(testoFirma, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat); + grPhoto.DrawString(testoFirma, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + } + + if (string.Equals(PicSettings.DirectorySorgente, PicSettings.DirectoryDestinazione, StringComparison.OrdinalIgnoreCase)) + { + nomeFileBig2 = nomeFileBig; + nomeFileBig = nomeFileBig.Substring(0, nomeFileBig.Length - 4) + PicSettings.Codice + nomeFileBig.Substring(nomeFileBig.Length - 4); + } + //grPhoto.Dispose(); + + crFont?.Dispose(); + } + + + } + + + + + private void aggiungiLogo(Bitmap imgOutputBig) + { + // imgOutputBig + if (PicSettings.LogoAggiungi == true & File.Exists(PicSettings.LogoNomeFile)) + { + Image ImmagineLogo = Image.FromFile(PicSettings.LogoNomeFile); + + Color LogoColoreTrasparente = Color.White; + // Dim bmWatermark As Bitmap + + // * Create a Bitmap based on the previously modified photograph Bitmap + // bmWatermark = New Bitmap(imgOutputBig) + // bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution) + + // * Load this Bitmap into a new Graphic Object + using (Graphics grWatermark = Graphics.FromImage(imgOutputBig)) + { + ImageAttributes imageAttributes = new ImageAttributes(); + + // * The first step replace the background color with one that is transparent (Alpha=0, R=0, G=0, B=0) + ColorMap colorMap = new ColorMap(); + + // * background this will be the color we search for and replace with transparency + colorMap.OldColor = LogoColoreTrasparente; + colorMap.NewColor = Color.FromArgb(0, 0, 0, 0); + + ColorMap[] remapTable = new[] { colorMap }; + imageAttributes.SetRemapTable(remapTable, ColorAdjustType.Bitmap); + + // * The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f + float[][] colorMatrixElements = new[] { new float[] { 1.0F, 0.0F, 0.0F, 0.0F, 0.0F }, new float[] { 0.0F, 1.0F, 0.0F, 0.0F, 0.0F }, new float[] { 0.0F, 0.0F, 1.0F, 0.0F, 0.0F }, new float[] { 0.0F, 0.0F, 0.0F, System.Convert.ToSingle(PicSettings.LogoTrasparenza) / 100F, 0.0F }, new float[] { 0.0F, 0.0F, 0.0F, 0.0F, 1.0F } }; + ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements); + imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); + + int FotoLogoH = PicSettings.LogoAltezza; + int FotoLogoW = PicSettings.LogoLarghezza; + double FattoreAlt = ImmagineLogo.Height / (double)FotoLogoH; + double FattoreLarg = ImmagineLogo.Width / (double)FotoLogoW; + Size NuovaSize; + if (FattoreLarg > FattoreAlt) + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza"); + else + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza"); + + int MargineUsato; + int MargineL; + bool InPercentualeL; + if (PicSettings.LogoMargine.EndsWith("%") == true) + InPercentualeL = true; + else + InPercentualeL = false; + MargineL = System.Convert.ToInt32(PicSettings.LogoMargine); + if (InPercentualeL == true) + MargineUsato = System.Convert.ToInt32(imgOutputBig.Height * MargineL / (double)100); + else + MargineUsato = MargineL; + + int xPosOfWm = 0; + int yPosOfWm = 0; + switch (PicSettings.LogoPosizioneH.ToUpper()) + { + case "SINISTRA": + case "NESSUNA": + { + xPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + xPosOfWm = System.Convert.ToInt32((imgOutputBig.Width - NuovaSize.Width) / (double)2); + break; + } + + case "DESTRA": + { + xPosOfWm = ((imgOutputBig.Width - NuovaSize.Width) - MargineUsato); + break; + } + } + switch (PicSettings.LogoPosizioneV.ToUpper()) + { + case "ALTO": + case "NESSUNA": + { + yPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + yPosOfWm = System.Convert.ToInt32((imgOutputBig.Height - NuovaSize.Height) / (double)2); + break; + } + + case "BASSO": + { + yPosOfWm = ((imgOutputBig.Height - NuovaSize.Height) - MargineUsato); + break; + } + } + + grWatermark.DrawImage(ImmagineLogo, new Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes); + //grWatermark.Dispose(); + } + } + } + + + private void SalvaFoto(Bitmap imgOutputBig, Size thumbSizeBig, string NomeFileBig, string NomeFileSmall, Size thumbSizeSmall, ImageFormat thisFormat) + { + using (var image1Stream = new MemoryStream()) + { + + + + if (PicSettings.FotoGrandeDimOrigina == false) + { + // attenzione non controlla se è png + // imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat) + if (thisFormat.Equals(ImageFormat.Jpeg)) + { + MakeImageCustomQuality(imgOutputBig, image1Stream); + } + //SalvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, "Temp_" + NomeFileBig), PicSettings.jpegQuality); + else + { + imgOutputBig.Save(image1Stream, thisFormat); + } + //imgOutputBig.Save(Path.Combine(DestDir.FullName, "Temp_" + NomeFileBig), thisFormat); + image1Stream.Seek(0, SeekOrigin.Begin); + using (var g2 = Image.FromStream(image1Stream)) + { + thumbSizeBig = g2.Width > g2.Height ? NewthumbSize(g2.Width, g2.Height, PicSettings.LarghezzaBig, "Larghezza") : NewthumbSize(g2.Width, g2.Height, PicSettings.AltezzaBig, "Altezza"); + using (Bitmap imgOutputBig2 = new Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height)) + { + if (thisFormat.Equals(ImageFormat.Jpeg)) + SalvaImmagineCustomQuality(imgOutputBig2, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.jpegQuality); + else + imgOutputBig2.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat); + + //imgOutputBig2.Dispose(); + } + } + + //imgOutputBig.Dispose(); + //g2.Dispose(); + } + else + { + // + if (thisFormat.Equals(ImageFormat.Jpeg)) + SalvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.jpegQuality); + else + imgOutputBig.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat); + + //imgOutputBig.Dispose(); + } + image1Stream.Seek(0, SeekOrigin.Begin); + + if (PicSettings.CreaMiniature) + { + if (PicSettings.AggiungiScritteMiniature) + { + using (System.Drawing.Image g1 = PicSettings.FotoGrandeDimOrigina ? (Image)imgOutputBig.Clone() : Image.FromStream(image1Stream)) + { + //if (PicSettings.FotoGrandeDimOrigina == false) + // g1 = Image.FromStream(image1Stream); + ////g1 = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, "Temp_" + NomeFileBig)); + //else + // g1 = (Image)imgOutputBig.Clone(); + //g1 = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, NomeFileBig)); + using (Bitmap imgOutputSmall = new Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height)) + { + if (string.Equals(PicSettings.DirectorySorgente, PicSettings.DirectoryDestinazione, StringComparison.OrdinalIgnoreCase)) + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + PicSettings.Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4); + // + if (thisFormat.Equals(ImageFormat.Jpeg)) + SalvaImmagineCustomQuality(imgOutputSmall, Path.Combine(DestDir.FullName, NomeFileSmall), PicSettings.jpegQualityMin); + else + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + + //imgOutputSmall.Dispose(); + } + + //g1.Dispose(); + } + } + } + + //if (File.Exists(Path.Combine(DestDir.FullName, "Temp_" + NomeFileBig))) + // File.Delete(Path.Combine(DestDir.FullName, "Temp_" + NomeFileBig)); + + } + } + + private void SalvaImmagineCustomQuality(Bitmap imageToSave, string nomeFileFinale, long quality) + { + ImageCodecInfo JgpEncoder = GetEncoder(ImageFormat.Jpeg); + System.Drawing.Imaging.Encoder MyEncoder = System.Drawing.Imaging.Encoder.Quality; + + EncoderParameters MyEncoderParameters = new EncoderParameters(1); + + EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.jpegQuality); + MyEncoderParameters.Param[0] = MyEncoderParameter; + imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters); + //imageToSave.Dispose(); + } + + private void MakeImageCustomQuality(Bitmap imageToSave, Stream destinationStream) + { + ImageCodecInfo JgpEncoder = GetEncoder(ImageFormat.Jpeg); + System.Drawing.Imaging.Encoder MyEncoder = System.Drawing.Imaging.Encoder.Quality; + + EncoderParameters MyEncoderParameters = new EncoderParameters(1); + + EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.jpegQuality); + MyEncoderParameters.Param[0] = MyEncoderParameter; + destinationStream.Seek(0, SeekOrigin.Begin); + imageToSave.Save(destinationStream, JgpEncoder, MyEncoderParameters); + //imageToSave.Dispose(); + } + + + private ImageCodecInfo GetEncoder(ImageFormat format) + { + ImageCodecInfo[] codecs = ImageCodecInfo.GetImageDecoders(); + + + foreach (var codec in codecs) + { + if (codec.FormatID == format.Guid) + return codec; + } + return null/* TODO Change to default(_) if this is not a reference type */; + } + + + + + + + /// + /// ''' Calculate the Size of the New image + /// ''' + /// ''' Larghezza + /// ''' Altezza + /// ''' + /// ''' + /// ''' + /// ''' + private Size NewthumbSize(int currentwidth, int currentheight, int MaxPixel, string TipoSize) + { + // e + // *** Larghezza, Altezza, Auto + + double tempMultiplier; + + if (TipoSize.ToUpper() == "Larghezza".ToUpper()) + tempMultiplier = MaxPixel / (double)currentwidth; + else if (TipoSize.ToUpper() == "Altezza".ToUpper()) + tempMultiplier = MaxPixel / (double)currentheight; + else if (currentheight > currentwidth) + tempMultiplier = MaxPixel / (double)currentheight; + else + tempMultiplier = MaxPixel / (double)currentwidth; + + Size NewSize = new Size(System.Convert.ToInt32(currentwidth * tempMultiplier), System.Convert.ToInt32(currentheight * tempMultiplier)); + + return NewSize; + } + + public FileInfo WorkFile + { + get + { + return _workFile; + } + set + { + _workFile = value; + } + } + + public DirectoryInfo DestDir + { + get => _DestDir; + set => _DestDir = value; + } + + public DirectoryInfo SourceDir + { + get + { + return _SourceDir; + } + set + { + _SourceDir = value; + } + } + + public DirectoryInfo DestDirStart + { + get + { + return _DestDirStart; + } + set + { + _DestDirStart = value; + } + } + + public string NomeFileChild + { + get + { + return _NomeFileChild; + } + set + { + _NomeFileChild = value; + } + } +} diff --git a/MaddoShared.backup/MaddoShared.csproj b/MaddoShared.backup/MaddoShared.csproj new file mode 100644 index 0000000..03c762e --- /dev/null +++ b/MaddoShared.backup/MaddoShared.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B} + Library + Properties + MaddoShared + MaddoShared + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll + + + ..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\SixLabors.ImageSharp.1.0.3\lib\net472\SixLabors.ImageSharp.dll + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll + + + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + + + + + + + + ..\packages\Z.ExtensionMethods.2.1.1\lib\net45\Z.ExtensionMethods.dll + + + + + + + + + + + + + {44465926-240d-473f-90b8-786ba4384406} + CatalogVbLib + + + + + + + + \ No newline at end of file diff --git a/MaddoShared.backup/Properties/AssemblyInfo.cs b/MaddoShared.backup/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..52a601e --- /dev/null +++ b/MaddoShared.backup/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MaddoShared")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MaddoShared")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("aebfe9e3-277c-4a7b-8448-145d1b11998b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MaddoShared.backup/ThreadingHelper.cs b/MaddoShared.backup/ThreadingHelper.cs new file mode 100644 index 0000000..f0ce4db --- /dev/null +++ b/MaddoShared.backup/ThreadingHelper.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MaddoShared +{ + public static class ThreadingHelper + { + /// + /// Starts the given tasks and waits for them to complete. This will run, at most, the specified number of tasks in parallel. + /// NOTE: If one of the given tasks has already been started, an exception will be thrown. + /// + /// The tasks to run. + /// The maximum number of tasks to run in parallel. + /// The cancellation token. + public static void StartAndWaitAllThrottled(IEnumerable tasksToRun, int maxTasksToRunInParallel, CancellationToken cancellationToken = new CancellationToken()) + { + StartAndWaitAllThrottled(tasksToRun, maxTasksToRunInParallel, -1, cancellationToken); + } + + /// + /// Starts the given tasks and waits for them to complete. This will run, at most, the specified number of tasks in parallel. + /// NOTE: If one of the given tasks has already been started, an exception will be thrown. + /// + /// The tasks to run. + /// The maximum number of tasks to run in parallel. + /// The maximum milliseconds we should allow the max tasks to run in parallel before allowing another task to start. Specify -1 to wait indefinitely. + /// The cancellation token. + public static void StartAndWaitAllThrottled(IEnumerable tasksToRun, int maxTasksToRunInParallel, int timeoutInMilliseconds, CancellationToken cancellationToken = new CancellationToken()) + { + // Convert to a list of tasks so that we don't enumerate over it multiple times needlessly. + var tasks = tasksToRun.ToList(); + + using (var throttler = new SemaphoreSlim(maxTasksToRunInParallel)) + { + var postTaskTasks = new List(); + + // Have each task notify the throttler when it completes so that it decrements the number of tasks currently running. + tasks.ForEach(t => postTaskTasks.Add(t.ContinueWith(tsk => throttler.Release()))); + + // Start running each task. + foreach (var task in tasks) + { + // Increment the number of tasks currently running and wait if too many are running. + throttler.Wait(timeoutInMilliseconds, cancellationToken); + + cancellationToken.ThrowIfCancellationRequested(); + task.Start(); + } + + // Wait for all of the provided tasks to complete. + // We wait on the list of "post" tasks instead of the original tasks, otherwise there is a potential race condition where the throttler's using block is exited before some Tasks have had their "post" action completed, which references the throttler, resulting in an exception due to accessing a disposed object. + Task.WaitAll(postTaskTasks.ToArray(), cancellationToken); + } + } + } +} diff --git a/MaddoShared.backup/app.config b/MaddoShared.backup/app.config new file mode 100644 index 0000000..8d59e6b --- /dev/null +++ b/MaddoShared.backup/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MaddoShared/packages.config b/MaddoShared.backup/packages.config similarity index 100% rename from MaddoShared/packages.config rename to MaddoShared.backup/packages.config diff --git a/MaddoShared.backup/upgrade.backup b/MaddoShared.backup/upgrade.backup new file mode 100644 index 0000000..3d26f1f --- /dev/null +++ b/MaddoShared.backup/upgrade.backup @@ -0,0 +1 @@ +Backup created at 1615021651 (06/03/2021 09:07:31 +00:00) \ No newline at end of file diff --git a/MaddoShared/MaddoShared.csproj b/MaddoShared/MaddoShared.csproj index 03c762e..7fb81a2 100644 --- a/MaddoShared/MaddoShared.csproj +++ b/MaddoShared/MaddoShared.csproj @@ -1,101 +1,29 @@ - - - + - Debug - AnyCPU - {AEBFE9E3-277C-4A7B-8448-145D1B11998B} + net8.0-windows7.0 Library - Properties - MaddoShared - MaddoShared - v4.7.2 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + false + true + true - - ..\packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll - - - ..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\SixLabors.ImageSharp.1.0.3\lib\net472\SixLabors.ImageSharp.dll - - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll - - - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - - - - - - - - ..\packages\Z.ExtensionMethods.2.1.1\lib\net45\Z.ExtensionMethods.dll - + - - - - - - + + + + + + + + + + + + + all + + - - - {44465926-240d-473f-90b8-786ba4384406} - CatalogVbLib - - - - - - - \ No newline at end of file diff --git a/imagecatalog.backup/AssemblyInfo.cs b/imagecatalog.backup/AssemblyInfo.cs new file mode 100644 index 0000000..70c63ca --- /dev/null +++ b/imagecatalog.backup/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. + +// Review the values of the assembly attributes + +[assembly: AssemblyTitle("Image Catalog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("FornaSoft")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(C) 2002-08")] +[assembly: AssemblyTrademark("")] +[assembly: CLSCompliant(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("948AA2AA-5BED-4DD5-9C67-3126EE9109C6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.74.*")] diff --git a/imagecatalog.backup/AssemblyInfo.vb b/imagecatalog.backup/AssemblyInfo.vb new file mode 100644 index 0000000..96c6530 --- /dev/null +++ b/imagecatalog.backup/AssemblyInfo.vb @@ -0,0 +1,31 @@ +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: + + diff --git a/imagecatalog.backup/ClassDiagram1.cd b/imagecatalog.backup/ClassDiagram1.cd new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/imagecatalog.backup/ClassDiagram1.cd @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/imagecatalog.backup/CreaImmagineSeparateMultiCore.cs b/imagecatalog.backup/CreaImmagineSeparateMultiCore.cs new file mode 100644 index 0000000..8ead6eb --- /dev/null +++ b/imagecatalog.backup/CreaImmagineSeparateMultiCore.cs @@ -0,0 +1,1255 @@ +using System; +using System.Drawing; +using System.IO; +using Microsoft.VisualBasic; +using Microsoft.VisualBasic.CompilerServices; + +namespace ImageCatalog +{ + // Imports System.Drawing.Drawing2D + // Imports System.Drawing.Imaging + // Imports System.Threading + + public class CreaImmagineSeparateMultiCore + { + private string _DirectorySorgente; + private string _DirectoryDestinazione; + private DirectoryInfo _SourceDir; + private DirectoryInfo _DestDirStart; + private int _DimStandard; + private int _DimStandardMiniatura; + private bool _UsaOrarioMiniatura; + private bool _UsaOrarioTestoApplicare; + private bool _UsaTempoGaraTestoApplicare; + private string _TestoFirmaStart; + private string _TestoFirmaStartV; + private DateTime _DataPartenza; + private string _TestoOrario; + private bool _UsaRotazioneAutomatica; + private bool _UsaForzaJpg; + private int _LarghezzaSmall; + private int _AltezzaSmall; + private bool _CreaMiniature; + private bool _AggiungiScritteMiniature; + private string _NomeFileChild; + private string _Suffisso; + private string _Codice; + private int _Trasparenza; + private string _IlFont; + private bool _Grassetto; + private string _Posizione; + private string _Allineamento; + private int _Margine; + private int _LogoAltezza; + private int _LogoLarghezza; + private int _FontColoreR; + private int _FontColoreG; + private int _FontColoreB; + private bool _LogoAggiungi; + private string _LogoNomeFile; + private string _LogoTrasparenza; + private string _LogoMargine; + private string _LogoPosizioneH; + private string _LogoPosizioneV; + private bool _FotoGrandeDimOrigina; + private int _AltezzaBig; + private int _LarghezzaBig; + private DirectoryInfo _DestDir; + + public void CreaImmagine(PicInfo InfoImg) + { + string TestoFirma = ""; + _DestDir = InfoImg.DirDest; + _SourceDir = InfoImg.DirSource; + _DestDirStart = InfoImg.DirDestStart; + _NomeFileChild = InfoImg.NomeImmagine; + int AlphaScelta = Conversions.ToInteger(255 * (100 - _Trasparenza) / 100d); + int DimensioneStandard; + int DimensioneStandardMiniatura; + DateTime DataFoto; + var DataPartenzaI = _DataPartenza; + if (_TestoOrario.Length > 0) + { + _TestoOrario += " "; + } + + string TestoFirmaPiccola = ""; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + DimensioneStandard = _DimStandard; + DimensioneStandardMiniatura = _DimStandardMiniatura; + var g = Image.FromFile(Path.Combine(_SourceDir.FullName, _NomeFileChild)); + if (_UsaOrarioTestoApplicare == true | _UsaTempoGaraTestoApplicare == true | _UsaOrarioMiniatura == true) + { + if (g.PropertyIdList.Length > 0) // ci sono dati exif + { + var DatiExif = new ExifReader((Bitmap)g); + DataFoto = DatiExif.DateTimeOriginal; + TestoFirma = _TestoFirmaStart; + if (DataFoto.Year != 1) + { + TestoFirmaPiccola = DataFoto.ToShortTimeString(); + if (_UsaOrarioTestoApplicare == true) + { + TestoFirma += " - " + DataFoto.ToShortDateString() + " " + DataFoto.ToLongTimeString(); + } + + if (_UsaTempoGaraTestoApplicare == true) + { + var Orario = new TimeSpan(DateAndTime.DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000L); + TestoFirma += " - " + _TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + } + } + } + } + else + { + TestoFirma = _TestoFirmaStart; + } + + bool FotoRuotaADestra = false; + bool FotoRuotaASinistra = false; + if (_UsaRotazioneAutomatica == true) + { + if (g.PropertyIdList.Length > 0) // ci sono dati exif + { + var DatiExif = new ExifReader((Bitmap)g); + switch (DatiExif.Orientation) + { + case ExifReader.Orientations.BottomLeft: + { + break; + } + + case ExifReader.Orientations.BottomRight: + { + break; + } + + case ExifReader.Orientations.LeftTop: + { + break; + } + + case ExifReader.Orientations.LftBottom: + { + FotoRuotaASinistra = true; + break; + } + + case ExifReader.Orientations.RightBottom: + { + break; + } + + case ExifReader.Orientations.RightTop: + { + break; + } + + case ExifReader.Orientations.TopLeft: + { + break; + } + + case ExifReader.Orientations.TopRight: + { + break; + } + } + } + } + // rotazione + if (FotoRuotaASinistra == true) + { + g.RotateFlip(RotateFlipType.Rotate270FlipNone); + } + + if (FotoRuotaADestra == true) + { + g.RotateFlip(RotateFlipType.Rotate90FlipNone); + } + + var thisFormat = g.RawFormat; + if (_UsaForzaJpg == true) + { + thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg; + } + + var thumbSizeSmall = new Size(); + var thumbSizeBig = new Size(); + string NomeFileSmall = ""; + string NomeFileBig = ""; + string NomeFileBig2 = ""; + if (g.Width > g.Height) + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza"); + var SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + else + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza"); + var SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + + NomeFileSmall = Suffisso + _NomeFileChild; + NomeFileBig = _NomeFileChild; + var imgOutputBig = new Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height); + imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution); + if (_CreaMiniature == true) + { + if (_AggiungiScritteMiniature == false) + { + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4); + } + + if (_UsaOrarioMiniatura == true) + { + if (TestoFirmaPiccola.Length > 0) + { + Bitmap imgOutputSmall; + imgOutputSmall = (Bitmap)imgOutputBig.Clone(); + Graphics grPhoto1; + grPhoto1 = Graphics.FromImage(imgOutputSmall); + grPhoto1.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + Font crFont1 = null; + var crSize1 = new SizeF(); + int LarghezzaStandard1; + if (_Grassetto == true) + { + crFont1 = new Font(IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura); + } + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1); + LarghezzaStandard1 = Conversions.ToInteger(crSize1.Width); + if (crSize1.Width > Conversions.ToSingle(g.Width)) + { + int Conta = DimensioneStandardMiniatura; + do + { + if (Conta > 20) + { + Conta -= 5; + } + else + { + Conta -= 1; + } + + if (_Grassetto == true) + { + crFont1 = new Font(_IlFont, Conta, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, Conta); + } + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1); + if (crSize1.Width < Conversions.ToSingle(g.Width)) + { + LarghezzaStandard1 = Conversions.ToInteger(crSize1.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandardMiniatura = Conta; + } + + var yPosFromBottom1 = default(float); + switch (_Posizione.ToUpper() ?? "") + { + case "ALTO": + { + yPosFromBottom1 = _Margine; + break; + } + + case "BASSO": + { + // yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + // yPosFromBottom1 = CType((g.Height - crFont1.Height - (g.Height * _Margine / 100) - (crFont1.Height * 0.3)), Single) + yPosFromBottom1 = Conversions.ToSingle(g.Height - crSize1.Height - g.Height * _Margine / 100d); + break; + } + } + + var xCenterOfImg1 = default(float); + var StrFormat1 = new StringFormat(); + switch (_Allineamento.ToUpper() ?? "") + { + case "SINISTRA": + { + xCenterOfImg1 = Conversions.ToSingle(_Margine + LarghezzaStandard1 / 2d); + if (LarghezzaStandard1 / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + + case "CENTRO": + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + break; + } + + case "DESTRA": + { + xCenterOfImg1 = Conversions.ToSingle(g.Width - _Margine - LarghezzaStandard1 / 2d); + if (LarghezzaStandard1 / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + } + + StrFormat1.Alignment = StringAlignment.Center; + var semiTransBrush21 = new SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)); + var semiTransBrush1 = new SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)); + if (_Grassetto == true) + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura); + } + + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1f, yPosFromBottom1 + 1f), StrFormat1); + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall), thisFormat); + var g2 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall)); + var imgOutputSmall2 = new Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall2.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall2.Dispose(); + imgOutputSmall.Dispose(); + g2.Dispose(); + FileSystem.Kill(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall)); + } + else + { + var imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall.Dispose(); + } + } + else + { + var imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall.Dispose(); + } + } + } + + Graphics grPhoto; + grPhoto = Graphics.FromImage(imgOutputBig); + grPhoto.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + Font crFont = null; + var crSize = new SizeF(); + int LarghezzaStandard; + if (_Grassetto == true) + { + crFont = new Font(_IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, DimensioneStandard); + } + + crSize = grPhoto.MeasureString(TestoFirma, crFont); + LarghezzaStandard = Conversions.ToInteger(crSize.Width); + if (crSize.Width > Conversions.ToSingle(g.Width)) + { + int Conta = DimensioneStandard; + do + { + if (Conta > 20) + { + Conta -= 5; + } + else + { + Conta -= 1; + } + + if (_Grassetto == true) + { + crFont = new Font(_IlFont, Conta, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, Conta); + } + + crSize = grPhoto.MeasureString(TestoFirma, crFont); + if (crSize.Width < Conversions.ToSingle(g.Width)) + { + LarghezzaStandard = Conversions.ToInteger(crSize.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandard = Conta; + } + + var yPosFromBottom = default(float); + switch (_Posizione.ToUpper() ?? "") + { + case "ALTO": + { + yPosFromBottom = _Margine; + break; + } + + case "BASSO": + { + // yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + // yPosFromBottom = CType((g.Height - DimensioneStandard - (g.Height * _Margine / 100) - (DimensioneStandard * 0.3)), Single) + yPosFromBottom = Conversions.ToSingle(g.Height - crSize.Height - g.Height * _Margine / 100d); + break; + } + } + + var xCenterOfImg = default(float); + var StrFormat = new StringFormat(); + switch (_Allineamento.ToUpper() ?? "") + { + case "SINISTRA": + { + xCenterOfImg = Conversions.ToSingle(_Margine + LarghezzaStandard / 2d); + if (LarghezzaStandard / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + + case "CENTRO": + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + break; + } + + case "DESTRA": + { + xCenterOfImg = Conversions.ToSingle(g.Width - _Margine - LarghezzaStandard / 2d); + if (LarghezzaStandard / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + } + + StrFormat.Alignment = StringAlignment.Center; + var semiTransBrush2 = new SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)); + var semiTransBrush = new SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)); + if (_Grassetto == true) + { + crFont = new Font(_IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, DimensioneStandard); + } + + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom + 1f), StrFormat); + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileBig2 = NomeFileBig; + NomeFileBig = NomeFileBig.Substring(0, NomeFileBig.Length - 4) + Codice + NomeFileBig.Substring(NomeFileBig.Length - 4); + } + + + // imgOutputBig + if (_LogoAggiungi == true & File.Exists(_LogoNomeFile)) + { + var ImmagineLogo = Image.FromFile(_LogoNomeFile); + var LogoColoreTrasparente = Color.White; + // Dim bmWatermark As Bitmap + + // * Create a Bitmap based on the previously modified photograph Bitmap + // bmWatermark = New Bitmap(imgOutputBig) + // bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution) + + // * Load this Bitmap into a new Graphic Object + var grWatermark = Graphics.FromImage(imgOutputBig); + + // * To achieve a transulcent watermark we will apply (2) color manipulations + var imageAttributes = new System.Drawing.Imaging.ImageAttributes(); + + // * The first step replace the background color with one that is trasparent (Alpha=0, R=0, G=0, B=0) + var colorMap = new System.Drawing.Imaging.ColorMap(); + + // * background this will be the color we search for and replace with transparency + colorMap.OldColor = LogoColoreTrasparente; + colorMap.NewColor = Color.FromArgb(0, 0, 0, 0); + var remapTable = new[] { colorMap }; + imageAttributes.SetRemapTable(remapTable, System.Drawing.Imaging.ColorAdjustType.Bitmap); + + // * The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f + var colorMatrixElements = new[] { new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f }, new float[] { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }, new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }, new float[] { 0.0f, 0.0f, 0.0f, Conversions.ToSingle(_LogoTrasparenza) / 100f, 0.0f }, new float[] { 0.0f, 0.0f, 0.0f, 0.0f, 1.0f } }; + var wmColorMatrix = new System.Drawing.Imaging.ColorMatrix(colorMatrixElements); + imageAttributes.SetColorMatrix(wmColorMatrix, System.Drawing.Imaging.ColorMatrixFlag.Default, System.Drawing.Imaging.ColorAdjustType.Bitmap); + int FotoLogoH = _LogoAltezza; + int FotoLogoW = _LogoLarghezza; + double FattoreAlt = ImmagineLogo.Height / (double)FotoLogoH; + double FattoreLarg = ImmagineLogo.Width / (double)FotoLogoW; + Size NuovaSize; + if (FattoreLarg > FattoreAlt) + { + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza"); + } + else + { + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza"); + } + + int MargineUsato; + int MargineL; + bool InPercentualeL; + if (_LogoMargine.EndsWith("%") == true) + { + InPercentualeL = true; + } + else + { + InPercentualeL = false; + } + + MargineL = Conversions.ToInteger(Conversion.Val(_LogoMargine)); + if (InPercentualeL == true) + { + MargineUsato = Conversions.ToInteger(imgOutputBig.Height * MargineL / 100d); + } + else + { + MargineUsato = MargineL; + } + + var xPosOfWm = default(int); + var yPosOfWm = default(int); + switch (_LogoPosizioneH.ToUpper() ?? "") + { + case "SINISTRA": + case "NESSUNA": + { + xPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + xPosOfWm = Conversions.ToInteger((imgOutputBig.Width - NuovaSize.Width) / 2d); + break; + } + + case "DESTRA": + { + xPosOfWm = imgOutputBig.Width - NuovaSize.Width - MargineUsato; + break; + } + } + + switch (_LogoPosizioneV.ToUpper() ?? "") + { + case "ALTO": + case "NESSUNA": + { + yPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + yPosOfWm = Conversions.ToInteger((imgOutputBig.Height - NuovaSize.Height) / 2d); + break; + } + + case "BASSO": + { + yPosOfWm = imgOutputBig.Height - NuovaSize.Height - MargineUsato; + break; + } + } + + grWatermark.DrawImage(ImmagineLogo, new Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes); + grWatermark.Dispose(); + } + + if (_FotoGrandeDimOrigina == false) + { + imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig), thisFormat); + var g2 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + if (g2.Width > g2.Height) + { + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _LarghezzaBig, "Larghezza"); + } + else + { + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _AltezzaBig, "Altezza"); + } + + var imgOutputBig2 = new Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height); + imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat); + imgOutputBig2.Dispose(); + imgOutputBig.Dispose(); + g2.Dispose(); + } + else + { + imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat); + imgOutputBig.Dispose(); + } + + if (_CreaMiniature == true) + { + if (_AggiungiScritteMiniature == true) + { + Image g1; + if (_FotoGrandeDimOrigina == false) + { + g1 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + } + else + { + g1 = Image.FromFile(Path.Combine(_DestDir.FullName, NomeFileBig)); + } + + var imgOutputSmall = new Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height); + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4); + } + + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall.Dispose(); + g1.Dispose(); + } + } + + if (File.Exists(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)) == true) + { + FileSystem.Kill(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + } + + g.Dispose(); + grPhoto.Dispose(); + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + FileSystem.Kill(Path.Combine(_SourceDir.FullName, NomeFileBig2)); + } + } + + public Size NewthumbSize(int currentwidth, int currentheight, int MaxPixel, string TipoSize) + { + // Calculate the Size of the New image + // *** Larghezza, Altezza, Auto + + double tempMultiplier; + if ((TipoSize.ToUpper() ?? "") == ("Larghezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + else if ((TipoSize.ToUpper() ?? "") == ("Altezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else if (currentheight > currentwidth) // portrait + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + + var NewSize = new Size((int)Math.Round(currentwidth * tempMultiplier), (int)Math.Round(currentheight * tempMultiplier)); + return NewSize; + } + + public string DirectorySorgente + { + get + { + return _DirectorySorgente; + } + + set + { + _DirectorySorgente = value; + } + } + + public string DirectoryDestinazione + { + get + { + return _DirectoryDestinazione; + } + + set + { + _DirectoryDestinazione = value; + } + } + + public DirectoryInfo SourceDir + { + get + { + return _SourceDir; + } + + set + { + _SourceDir = value; + } + } + + public DirectoryInfo DestDirStart + { + get + { + return _DestDirStart; + } + + set + { + _DestDirStart = value; + } + } + + public string TestoFirmaStart + { + get + { + return _TestoFirmaStart; + } + + set + { + _TestoFirmaStart = value; + } + } + + public string TestoFirmaStartV + { + get + { + return _TestoFirmaStartV; + } + + set + { + _TestoFirmaStartV = value; + } + } + + public DateTime DataPartenza + { + get + { + return _DataPartenza; + } + + set + { + _DataPartenza = value; + } + } + + public string TestoOrario + { + get + { + return _TestoOrario; + } + + set + { + _TestoOrario = value; + } + } + + public int DimStandard + { + get + { + return _DimStandard; + } + + set + { + _DimStandard = value; + } + } + + public int DimStandardMiniatura + { + get + { + return _DimStandardMiniatura; + } + + set + { + _DimStandardMiniatura = value; + } + } + + public bool UsaOrarioMiniatura + { + get + { + return _UsaOrarioMiniatura; + } + + set + { + _UsaOrarioMiniatura = value; + } + } + + public bool UsaOrarioTestoApplicare + { + get + { + return _UsaOrarioTestoApplicare; + } + + set + { + _UsaOrarioTestoApplicare = value; + } + } + + public bool UsaTempoGaraTestoApplicare + { + get + { + return _UsaTempoGaraTestoApplicare; + } + + set + { + _UsaTempoGaraTestoApplicare = value; + } + } + + public bool UsaRotazioneAutomatica + { + get + { + return _UsaRotazioneAutomatica; + } + + set + { + _UsaRotazioneAutomatica = value; + } + } + + public bool UsaForzaJpg + { + get + { + return _UsaForzaJpg; + } + + set + { + _UsaForzaJpg = value; + } + } + + public int LarghezzaSmall + { + get + { + return _LarghezzaSmall; + } + + set + { + _LarghezzaSmall = value; + } + } + + public int AltezzaSmall + { + get + { + return _AltezzaSmall; + } + + set + { + _AltezzaSmall = value; + } + } + + public bool CreaMiniature + { + get + { + return _CreaMiniature; + } + + set + { + _CreaMiniature = value; + } + } + + public bool AggiungiScritteMiniature + { + get + { + return _AggiungiScritteMiniature; + } + + set + { + _AggiungiScritteMiniature = value; + } + } + + public string NomeFileChild + { + get + { + return _NomeFileChild; + } + + set + { + _NomeFileChild = value; + } + } + + public string Suffisso + { + get + { + return _Suffisso; + } + + set + { + _Suffisso = value; + } + } + + public string Codice + { + get + { + return _Codice; + } + + set + { + _Codice = value; + } + } + + public int Trasparenza + { + get + { + return _Trasparenza; + } + + set + { + _Trasparenza = value; + } + } + + public string IlFont + { + get + { + return _IlFont; + } + + set + { + _IlFont = value; + } + } + + public bool Grassetto + { + get + { + return _Grassetto; + } + + set + { + _Grassetto = value; + } + } + + public string Posizione + { + get + { + return _Posizione; + } + + set + { + _Posizione = value; + } + } + + public string Allineamento + { + get + { + return _Allineamento; + } + + set + { + _Allineamento = value; + } + } + + public int Margine + { + get + { + return _Margine; + } + + set + { + _Margine = value; + } + } + + public int LogoAltezza + { + get + { + return _LogoAltezza; + } + + set + { + _LogoAltezza = value; + } + } + + public int LogoLarghezza + { + get + { + return _LogoLarghezza; + } + + set + { + _LogoLarghezza = value; + } + } + + public int FontColoreR + { + get + { + return _FontColoreR; + } + + set + { + _FontColoreR = value; + } + } + + public int FontColoreG + { + get + { + return _FontColoreG; + } + + set + { + _FontColoreG = value; + } + } + + public int FontColoreB + { + get + { + return _FontColoreB; + } + + set + { + _FontColoreB = value; + } + } + + public bool LogoAggiungi + { + get + { + return _LogoAggiungi; + } + + set + { + _LogoAggiungi = value; + } + } + + public string LogoNomeFile + { + get + { + return _LogoNomeFile; + } + + set + { + _LogoNomeFile = value; + } + } + + public string LogoTrasparenza + { + get + { + return _LogoTrasparenza; + } + + set + { + _LogoTrasparenza = value; + } + } + + public string LogoMargine + { + get + { + return _LogoMargine; + } + + set + { + _LogoMargine = value; + } + } + + public string LogoPosizioneH + { + get + { + return _LogoPosizioneH; + } + + set + { + _LogoPosizioneH = value; + } + } + + public string LogoPosizioneV + { + get + { + return _LogoPosizioneV; + } + + set + { + _LogoPosizioneV = value; + } + } + + public bool FotoGrandeDimOrigina + { + get + { + return _FotoGrandeDimOrigina; + } + + set + { + _FotoGrandeDimOrigina = value; + } + } + + public int AltezzaBig + { + get + { + return _AltezzaBig; + } + + set + { + _AltezzaBig = value; + } + } + + public int LarghezzaBig + { + get + { + return _LarghezzaBig; + } + + set + { + _LarghezzaBig = value; + } + } + + public DirectoryInfo DestDir + { + get + { + return _DestDir; + } + + set + { + _DestDir = value; + } + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/CreaImmagineSeparateMultiCore.vb b/imagecatalog.backup/CreaImmagineSeparateMultiCore.vb new file mode 100644 index 0000000..4b645f8 --- /dev/null +++ b/imagecatalog.backup/CreaImmagineSeparateMultiCore.vb @@ -0,0 +1,943 @@ +Imports System.IO +'Imports System.Drawing.Drawing2D +'Imports System.Drawing.Imaging +'Imports System.Threading + +Public Class CreaImmagineSeparateMultiCore + + Private _DirectorySorgente As String + Private _DirectoryDestinazione As String + + + Private _SourceDir As DirectoryInfo + Private _DestDirStart As DirectoryInfo + Private _DimStandard As Integer + Private _DimStandardMiniatura As Integer + + + Private _UsaOrarioMiniatura As Boolean + Private _UsaOrarioTestoApplicare As Boolean + Private _UsaTempoGaraTestoApplicare As Boolean + Private _TestoFirmaStart As String + Private _TestoFirmaStartV As String + Private _DataPartenza As DateTime + Private _TestoOrario As String + + Private _UsaRotazioneAutomatica As Boolean + Private _UsaForzaJpg As Boolean + + Private _LarghezzaSmall As Integer + Private _AltezzaSmall As Integer + + Private _CreaMiniature As Boolean + Private _AggiungiScritteMiniature As Boolean + + Private _NomeFileChild As String + Private _Suffisso As String + Private _Codice As String + + Private _Trasparenza As Integer + Private _IlFont As String + Private _Grassetto As Boolean + + Private _Posizione As String + Private _Allineamento As String + Private _Margine As Integer + + Private _LogoAltezza As Integer + Private _LogoLarghezza As Integer + + Private _FontColoreR As Integer + Private _FontColoreG As Integer + Private _FontColoreB As Integer + + Private _LogoAggiungi As Boolean + Private _LogoNomeFile As String + Private _LogoTrasparenza As String + Private _LogoMargine As String + Private _LogoPosizioneH As String + Private _LogoPosizioneV As String + + Private _FotoGrandeDimOrigina As Boolean + Private _AltezzaBig As Integer + Private _LarghezzaBig As Integer + Private _DestDir As DirectoryInfo + + Public Sub CreaImmagine(ByVal InfoImg As PicInfo) + Dim TestoFirma As String = "" + + _DestDir = InfoImg.DirDest + _SourceDir = InfoImg.DirSource + _DestDirStart = InfoImg.DirDestStart + _NomeFileChild = InfoImg.NomeImmagine + + Dim AlphaScelta As Integer = CType((255 * (100 - _Trasparenza) / 100), Integer) + + Dim DimensioneStandard As Integer + Dim DimensioneStandardMiniatura As Integer + + Dim DataFoto As DateTime + Dim DataPartenzaI As DateTime = _DataPartenza + If _TestoOrario.Length > 0 Then + _TestoOrario &= " " + End If + Dim TestoFirmaPiccola As String = "" + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + DimensioneStandard = _DimStandard + DimensioneStandardMiniatura = _DimStandardMiniatura + + Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_SourceDir.FullName, _NomeFileChild)) + + If _UsaOrarioTestoApplicare = True Or _UsaTempoGaraTestoApplicare = True Or _UsaOrarioMiniatura = True Then + If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + Dim DatiExif As New ExifReader(CType(g, Bitmap)) + DataFoto = DatiExif.DateTimeOriginal + TestoFirma = _TestoFirmaStart + If DataFoto.Year <> 1 Then + TestoFirmaPiccola = DataFoto.ToShortTimeString + If _UsaOrarioTestoApplicare = True Then + TestoFirma &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + End If + If _UsaTempoGaraTestoApplicare = True Then + Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + TestoFirma &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + End If + End If + End If + Else + TestoFirma = _TestoFirmaStart + End If + + Dim FotoRuotaADestra As Boolean = False + Dim FotoRuotaASinistra As Boolean = False + + If _UsaRotazioneAutomatica = True Then + If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + Dim DatiExif As New ExifReader(CType(g, Bitmap)) + + Select Case DatiExif.Orientation + Case ExifReader.Orientations.BottomLeft + + Case ExifReader.Orientations.BottomRight + + Case ExifReader.Orientations.LeftTop + + Case ExifReader.Orientations.LftBottom + FotoRuotaASinistra = True + Case ExifReader.Orientations.RightBottom + + Case ExifReader.Orientations.RightTop + + Case ExifReader.Orientations.TopLeft + + Case ExifReader.Orientations.TopRight + + End Select + End If + End If + 'rotazione + If FotoRuotaASinistra = True Then + g.RotateFlip(RotateFlipType.Rotate270FlipNone) + End If + If FotoRuotaADestra = True Then + g.RotateFlip(RotateFlipType.Rotate90FlipNone) + End If + + Dim thisFormat As System.Drawing.Imaging.ImageFormat = g.RawFormat + If _UsaForzaJpg = True Then + thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg + End If + + Dim thumbSizeSmall As New Size + Dim thumbSizeBig As New Size + Dim NomeFileSmall As String = "" + Dim NomeFileBig As String = "" + Dim NomeFileBig2 As String = "" + + If g.Width > g.Height Then + thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza") + Dim SizeOrig As New Size(g.Width, g.Height) + thumbSizeBig = SizeOrig + Else + thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza") + Dim SizeOrig As New Size(g.Width, g.Height) + thumbSizeBig = SizeOrig + End If + + NomeFileSmall = Suffisso & _NomeFileChild + NomeFileBig = _NomeFileChild + + Dim imgOutputBig As New Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height) + imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution) + + If _CreaMiniature = True Then + If _AggiungiScritteMiniature = False Then + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4) + End If + If _UsaOrarioMiniatura = True Then + If TestoFirmaPiccola.Length > 0 Then + Dim imgOutputSmall As Bitmap + imgOutputSmall = CType(imgOutputBig.Clone, Bitmap) + + Dim grPhoto1 As Graphics + grPhoto1 = Graphics.FromImage(imgOutputSmall) + grPhoto1.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias + + Dim crFont1 As Font = Nothing + Dim crSize1 As SizeF = New SizeF + Dim LarghezzaStandard1 As Integer + + If _Grassetto = True Then + crFont1 = New Font(IlFont, DimensioneStandardMiniatura, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura) + End If + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1) + LarghezzaStandard1 = CType(crSize1.Width, Integer) + + If crSize1.Width > CType(g.Width, Single) Then + Dim Conta As Integer = DimensioneStandardMiniatura + Do + If Conta > 20 Then + Conta -= 5 + Else + Conta -= 1 + End If + If _Grassetto = True Then + crFont1 = New Font(_IlFont, Conta, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, Conta) + End If + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1) + If crSize1.Width < CType(g.Width, Single) Then + LarghezzaStandard1 = CType(crSize1.Width, Integer) + Exit Do + End If + If Conta <= 5 Then Exit Do + Loop + DimensioneStandardMiniatura = Conta + End If + + Dim yPosFromBottom1 As Single + Select Case _Posizione.ToUpper + Case "ALTO" + yPosFromBottom1 = (_Margine) + + Case "BASSO" + 'yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + 'yPosFromBottom1 = CType((g.Height - crFont1.Height - (g.Height * _Margine / 100) - (crFont1.Height * 0.3)), Single) + yPosFromBottom1 = CType((g.Height - crSize1.Height - (g.Height * _Margine / 100)), Single) + + End Select + + Dim xCenterOfImg1 As Single + Dim StrFormat1 As StringFormat = New StringFormat + Select Case _Allineamento.ToUpper + Case "SINISTRA" + xCenterOfImg1 = CType((_Margine + (LarghezzaStandard1 / 2)), Single) + If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg1 = CType((g.Width / 2), Single) + End If + + Case "CENTRO" + xCenterOfImg1 = CType((g.Width / 2), Single) + + Case "DESTRA" + xCenterOfImg1 = CType((g.Width - _Margine - (LarghezzaStandard1 / 2)), Single) + If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg1 = CType((g.Width / 2), Single) + End If + + End Select + StrFormat1.Alignment = StringAlignment.Center + + Dim semiTransBrush21 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)) + Dim semiTransBrush1 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)) + + If _Grassetto = True Then + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura) + End If + + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1) + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1) + + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall), thisFormat) + Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall)) + Dim imgOutputSmall2 As New Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall2.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + + imgOutputSmall2.Dispose() + imgOutputSmall.Dispose() + g2.Dispose() + Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall)) + Else + Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + imgOutputSmall.Dispose() + End If + Else + Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + imgOutputSmall.Dispose() + End If + End If + End If + + Dim grPhoto As Graphics + grPhoto = Graphics.FromImage(imgOutputBig) + grPhoto.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias + + Dim crFont As Font = Nothing + Dim crSize As SizeF = New SizeF + Dim LarghezzaStandard As Integer + + If _Grassetto = True Then + crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold) + Else + crFont = New Font(_IlFont, DimensioneStandard) + End If + crSize = grPhoto.MeasureString(TestoFirma, crFont) + LarghezzaStandard = CType(crSize.Width, Integer) + + If crSize.Width > CType(g.Width, Single) Then + Dim Conta As Integer = DimensioneStandard + Do + If Conta > 20 Then + Conta -= 5 + Else + Conta -= 1 + End If + If _Grassetto = True Then + crFont = New Font(_IlFont, Conta, FontStyle.Bold) + Else + crFont = New Font(_IlFont, Conta) + End If + crSize = grPhoto.MeasureString(TestoFirma, crFont) + If crSize.Width < CType(g.Width, Single) Then + LarghezzaStandard = CType(crSize.Width, Integer) + Exit Do + End If + If Conta <= 5 Then Exit Do + Loop + DimensioneStandard = Conta + End If + + Dim yPosFromBottom As Single + Select Case _Posizione.ToUpper + Case "ALTO" + yPosFromBottom = (_Margine) + + Case "BASSO" + 'yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + 'yPosFromBottom = CType((g.Height - DimensioneStandard - (g.Height * _Margine / 100) - (DimensioneStandard * 0.3)), Single) + yPosFromBottom = CType((g.Height - crSize.Height - (g.Height * _Margine / 100)), Single) + End Select + + Dim xCenterOfImg As Single + Dim StrFormat As StringFormat = New StringFormat + Select Case _Allineamento.ToUpper + Case "SINISTRA" + xCenterOfImg = CType((_Margine + (LarghezzaStandard / 2)), Single) + If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg = CType((g.Width / 2), Single) + End If + + Case "CENTRO" + xCenterOfImg = CType((g.Width / 2), Single) + + Case "DESTRA" + xCenterOfImg = CType((g.Width - _Margine - (LarghezzaStandard / 2)), Single) + If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg = CType((g.Width / 2), Single) + End If + + End Select + StrFormat.Alignment = StringAlignment.Center + + Dim semiTransBrush2 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)) + Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)) + + If _Grassetto = True Then + crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold) + Else + crFont = New Font(_IlFont, DimensioneStandard) + End If + + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat) + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat) + + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileBig2 = NomeFileBig + NomeFileBig = NomeFileBig.Substring(0, NomeFileBig.Length - 4) & Codice & NomeFileBig.Substring(NomeFileBig.Length - 4) + End If + + + 'imgOutputBig + If _LogoAggiungi = True And File.Exists(_LogoNomeFile) Then + + Dim ImmagineLogo As Image = Image.FromFile(_LogoNomeFile) + + Dim LogoColoreTrasparente As Color = Color.White + 'Dim bmWatermark As Bitmap + + '* Create a Bitmap based on the previously modified photograph Bitmap + 'bmWatermark = New Bitmap(imgOutputBig) + 'bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution) + + '* Load this Bitmap into a new Graphic Object + Dim grWatermark As Graphics = Graphics.FromImage(imgOutputBig) + + '* To achieve a transulcent watermark we will apply (2) color manipulations + Dim imageAttributes As Imaging.ImageAttributes = New Imaging.ImageAttributes + + '* The first step replace the background color with one that is trasparent (Alpha=0, R=0, G=0, B=0) + Dim colorMap As Imaging.ColorMap = New Imaging.ColorMap + + '* background this will be the color we search for and replace with transparency + colorMap.OldColor = LogoColoreTrasparente + colorMap.NewColor = Color.FromArgb(0, 0, 0, 0) + + Dim remapTable As Imaging.ColorMap() = {colorMap} + imageAttributes.SetRemapTable(remapTable, Imaging.ColorAdjustType.Bitmap) + + '* The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f + Dim colorMatrixElements As Single()() = {New Single() {1.0F, 0.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 1.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 1.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, CType(_LogoTrasparenza, Single) / 100, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, 0.0F, 1.0F}} + Dim wmColorMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(colorMatrixElements) + imageAttributes.SetColorMatrix(wmColorMatrix, Imaging.ColorMatrixFlag.Default, Imaging.ColorAdjustType.Bitmap) + + Dim FotoLogoH As Integer = _LogoAltezza + Dim FotoLogoW As Integer = _LogoLarghezza + Dim FattoreAlt As Double = ImmagineLogo.Height / FotoLogoH + Dim FattoreLarg As Double = ImmagineLogo.Width / FotoLogoW + Dim NuovaSize As Size + If FattoreLarg > FattoreAlt Then + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza") + Else + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza") + End If + + Dim MargineUsato As Integer + Dim MargineL As Integer + Dim InPercentualeL As Boolean + If _LogoMargine.EndsWith("%") = True Then + InPercentualeL = True + Else + InPercentualeL = False + End If + MargineL = CType(Val(_LogoMargine), Integer) + If InPercentualeL = True Then + MargineUsato = CType(imgOutputBig.Height * MargineL / 100, Integer) + Else + MargineUsato = MargineL + End If + + Dim xPosOfWm As Integer + Dim yPosOfWm As Integer + Select Case _LogoPosizioneH.ToUpper + Case "SINISTRA", "NESSUNA" + xPosOfWm = MargineUsato + + Case "CENTRO" + xPosOfWm = CType((imgOutputBig.Width - NuovaSize.Width) / 2, Integer) + + Case "DESTRA" + xPosOfWm = ((imgOutputBig.Width - NuovaSize.Width) - MargineUsato) + End Select + Select Case _LogoPosizioneV.ToUpper + Case "ALTO", "NESSUNA" + yPosOfWm = MargineUsato + + Case "CENTRO" + yPosOfWm = CType((imgOutputBig.Height - NuovaSize.Height) / 2, Integer) + + Case "BASSO" + yPosOfWm = ((imgOutputBig.Height - NuovaSize.Height) - MargineUsato) + End Select + + grWatermark.DrawImage(ImmagineLogo, New Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes) + grWatermark.Dispose() + End If + + If _FotoGrandeDimOrigina = False Then + imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat) + Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + If g2.Width > g2.Height Then + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _LarghezzaBig, "Larghezza") + Else + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _AltezzaBig, "Altezza") + End If + Dim imgOutputBig2 As New Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height) + imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + imgOutputBig2.Dispose() + imgOutputBig.Dispose() + g2.Dispose() + Else + imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + imgOutputBig.Dispose() + End If + + If _CreaMiniature = True Then + If _AggiungiScritteMiniature = True Then + Dim g1 As System.Drawing.Image + If _FotoGrandeDimOrigina = False Then + g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + Else + g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, NomeFileBig)) + End If + Dim imgOutputSmall As New Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height) + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4) + End If + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + imgOutputSmall.Dispose() + g1.Dispose() + End If + End If + + If File.Exists(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) = True Then + Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + End If + + g.Dispose() + grPhoto.Dispose() + + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + Kill(Path.Combine(_SourceDir.FullName, NomeFileBig2)) + End If + + End Sub + + + + Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size + ' Calculate the Size of the New image + '*** Larghezza, Altezza, Auto + + Dim tempMultiplier As Double + + If TipoSize.ToUpper = "Larghezza".ToUpper Then + tempMultiplier = MaxPixel / currentwidth + ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then + tempMultiplier = MaxPixel / currentheight + Else + If currentheight > currentwidth Then ' portrait + tempMultiplier = MaxPixel / currentheight + Else + tempMultiplier = MaxPixel / currentwidth + End If + End If + + Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier)) + + Return NewSize + End Function + + + + + Public Property DirectorySorgente() As String + Get + Return _DirectorySorgente + End Get + Set(ByVal value As String) + _DirectorySorgente = value + End Set + End Property + + Public Property DirectoryDestinazione() As String + Get + Return _DirectoryDestinazione + End Get + Set(ByVal value As String) + _DirectoryDestinazione = value + End Set + End Property + + + Public Property SourceDir() As DirectoryInfo + Get + Return _SourceDir + End Get + Set(ByVal value As DirectoryInfo) + _SourceDir = value + End Set + End Property + + Public Property DestDirStart() As DirectoryInfo + Get + Return _DestDirStart + End Get + Set(ByVal value As DirectoryInfo) + _DestDirStart = value + End Set + End Property + + + + Public Property TestoFirmaStart() As String + Get + Return _TestoFirmaStart + End Get + Set(ByVal value As String) + _TestoFirmaStart = value + End Set + End Property + Public Property TestoFirmaStartV() As String + Get + Return _TestoFirmaStartV + End Get + Set(ByVal value As String) + _TestoFirmaStartV = value + End Set + End Property + + Public Property DataPartenza() As DateTime + Get + Return _DataPartenza + End Get + Set(ByVal value As DateTime) + _DataPartenza = value + End Set + End Property + + Public Property TestoOrario() As String + Get + Return _TestoOrario + End Get + Set(ByVal value As String) + _TestoOrario = value + End Set + End Property + + Public Property DimStandard() As Integer + Get + Return _DimStandard + End Get + Set(ByVal value As Integer) + _DimStandard = value + End Set + End Property + + Public Property DimStandardMiniatura() As Integer + Get + Return _DimStandardMiniatura + End Get + Set(ByVal value As Integer) + _DimStandardMiniatura = value + End Set + End Property + + Public Property UsaOrarioMiniatura() As Boolean + Get + Return _UsaOrarioMiniatura + End Get + Set(ByVal value As Boolean) + _UsaOrarioMiniatura = value + End Set + End Property + + Public Property UsaOrarioTestoApplicare() As Boolean + Get + Return _UsaOrarioTestoApplicare + End Get + Set(ByVal value As Boolean) + _UsaOrarioTestoApplicare = value + End Set + End Property + + Public Property UsaTempoGaraTestoApplicare() As Boolean + Get + Return _UsaTempoGaraTestoApplicare + End Get + Set(ByVal value As Boolean) + _UsaTempoGaraTestoApplicare = value + End Set + End Property + + Public Property UsaRotazioneAutomatica() As Boolean + Get + Return _UsaRotazioneAutomatica + End Get + Set(ByVal value As Boolean) + _UsaRotazioneAutomatica = value + End Set + End Property + + Public Property UsaForzaJpg() As Boolean + Get + Return _UsaForzaJpg + End Get + Set(ByVal value As Boolean) + _UsaForzaJpg = value + End Set + End Property + + + + Public Property LarghezzaSmall() As Integer + Get + Return _LarghezzaSmall + End Get + Set(ByVal value As Integer) + _LarghezzaSmall = value + End Set + End Property + + Public Property AltezzaSmall() As Integer + Get + Return _AltezzaSmall + End Get + Set(ByVal value As Integer) + _AltezzaSmall = value + End Set + End Property + + + Public Property CreaMiniature() As Boolean + Get + Return _CreaMiniature + End Get + Set(ByVal value As Boolean) + _CreaMiniature = value + End Set + End Property + + Public Property AggiungiScritteMiniature() As Boolean + Get + Return _AggiungiScritteMiniature + End Get + Set(ByVal value As Boolean) + _AggiungiScritteMiniature = value + End Set + End Property + + Public Property NomeFileChild() As String + Get + Return _NomeFileChild + End Get + Set(ByVal value As String) + _NomeFileChild = value + End Set + End Property + + Public Property Suffisso() As String + Get + Return _Suffisso + End Get + Set(ByVal value As String) + _Suffisso = value + End Set + End Property + + Public Property Codice() As String + Get + Return _Codice + End Get + Set(ByVal value As String) + _Codice = value + End Set + End Property + + + Public Property Trasparenza() As Integer + Get + Return _Trasparenza + End Get + Set(ByVal value As Integer) + _Trasparenza = value + End Set + End Property + + Public Property IlFont() As String + Get + Return _IlFont + End Get + Set(ByVal value As String) + _IlFont = value + End Set + End Property + + Public Property Grassetto() As Boolean + Get + Return _Grassetto + End Get + Set(ByVal value As Boolean) + _Grassetto = value + End Set + End Property + + Public Property Posizione() As String + Get + Return _Posizione + End Get + Set(ByVal value As String) + _Posizione = value + End Set + End Property + + Public Property Allineamento() As String + Get + Return _Allineamento + End Get + Set(ByVal value As String) + _Allineamento = value + End Set + End Property + + Public Property Margine() As Integer + Get + Return _Margine + End Get + Set(ByVal value As Integer) + _Margine = value + End Set + End Property + + Public Property LogoAltezza() As Integer + Get + Return _LogoAltezza + End Get + Set(ByVal value As Integer) + _LogoAltezza = value + End Set + End Property + + Public Property LogoLarghezza() As Integer + Get + Return _LogoLarghezza + End Get + Set(ByVal value As Integer) + _LogoLarghezza = value + End Set + End Property + + Public Property FontColoreR() As Integer + Get + Return _FontColoreR + End Get + Set(ByVal value As Integer) + _FontColoreR = value + End Set + End Property + + Public Property FontColoreG() As Integer + Get + Return _FontColoreG + End Get + Set(ByVal value As Integer) + _FontColoreG = value + End Set + End Property + + Public Property FontColoreB() As Integer + Get + Return _FontColoreB + End Get + Set(ByVal value As Integer) + _FontColoreB = value + End Set + End Property + + Public Property LogoAggiungi() As Boolean + Get + Return _LogoAggiungi + End Get + Set(ByVal value As Boolean) + _LogoAggiungi = value + End Set + End Property + + Public Property LogoNomeFile() As String + Get + Return _LogoNomeFile + End Get + Set(ByVal value As String) + _LogoNomeFile = value + End Set + End Property + + Public Property LogoTrasparenza() As String + Get + Return _LogoTrasparenza + End Get + Set(ByVal value As String) + _LogoTrasparenza = value + End Set + End Property + + Public Property LogoMargine() As String + Get + Return _LogoMargine + End Get + Set(ByVal value As String) + _LogoMargine = value + End Set + End Property + + Public Property LogoPosizioneH() As String + Get + Return _LogoPosizioneH + End Get + Set(ByVal value As String) + _LogoPosizioneH = value + End Set + End Property + + Public Property LogoPosizioneV() As String + Get + Return _LogoPosizioneV + End Get + Set(ByVal value As String) + _LogoPosizioneV = value + End Set + End Property + + Public Property FotoGrandeDimOrigina() As Boolean + Get + Return _FotoGrandeDimOrigina + End Get + Set(ByVal value As Boolean) + _FotoGrandeDimOrigina = value + End Set + End Property + + Public Property AltezzaBig() As Integer + Get + Return _AltezzaBig + End Get + Set(ByVal value As Integer) + _AltezzaBig = value + End Set + End Property + + Public Property LarghezzaBig() As Integer + Get + Return _LarghezzaBig + End Get + Set(ByVal value As Integer) + _LarghezzaBig = value + End Set + End Property + + Public Property DestDir() As DirectoryInfo + Get + Return _DestDir + End Get + Set(ByVal value As DirectoryInfo) + _DestDir = value + End Set + End Property + + + +End Class diff --git a/imagecatalog.backup/CreaImmagineSeparateThread.cs b/imagecatalog.backup/CreaImmagineSeparateThread.cs new file mode 100644 index 0000000..cf80e50 --- /dev/null +++ b/imagecatalog.backup/CreaImmagineSeparateThread.cs @@ -0,0 +1,1721 @@ +using System; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.IO; +using Microsoft.VisualBasic; +using Microsoft.VisualBasic.CompilerServices; + +namespace ImageCatalog +{ + // Imports System.Threading + + public class CreaImmagineSeparateThread + { + /* TODO ERROR: Skipped RegionDirectiveTrivia */ + private string _DirectorySorgente; + private string _DirectoryDestinazione; + private int _DimVert; + private int _MargVert; + private DirectoryInfo _SourceDir; + private DirectoryInfo _DestDirStart; + private int _DimStandard; + private int _DimStandardMiniatura; + private bool _NomeData; + private bool _TestoNome; + private bool _UsaOrarioMiniatura; + private bool _UsaOrarioTestoApplicare; + private bool _UsaTempoGaraTestoApplicare; + private string _TestoFirmaStart; + private string _TestoFirmaStartV; + private DateTime _DataPartenza; + private string _TestoOrario; + private bool _UsaRotazioneAutomatica; + private bool _UsaForzaJpg; + private int _LarghezzaSmall; + private int _AltezzaSmall; + private bool _CreaMiniature; + private bool _AggiungiScritteMiniature; + private bool _AggTempoGaraMin; + private bool _AggNumTempMin; + private string _NomeFileChild; + private string _Suffisso; + private string _Codice; + private int _Trasparenza; + private string _IlFont; + private bool _Grassetto; + private string _Posizione; + private string _Allineamento; + private int _Margine; + private int _LogoAltezza; + private int _LogoLarghezza; + private int _FontColoreR; + private int _FontColoreG; + private int _FontColoreB; + private Color _fontColoreRGB; + private bool _LogoAggiungi; + private string _LogoNomeFile; + private string _LogoTrasparenza; + private string _LogoMargine; + private string _LogoPosizioneH; + private string _LogoPosizioneV; + private bool _FotoGrandeDimOrigina; + private int _AltezzaBig; + private int _LarghezzaBig; + private DirectoryInfo _DestDir; + private int _DimMin; + private bool _TestoMin; + private bool _SecretDefault; + private bool _SecretBig; + private bool _SecretSmall; + private string _SecretPathSmall; + private string _SecretPathBig; + private long _jpegQuality; + private long _jpegQualityMin; + private bool FotoRuotaADestra = false; + private bool FotoRuotaASinistra = false; + private string TempMinText = ""; + // Private crFont1 As Font + + + /* TODO ERROR: Skipped EndRegionDirectiveTrivia */ + private void ProcA(ref Image g, ref DateTime DataFoto, ref string TestoFirma, ref string TestoFirmaV, ref string TestoFirmaPiccola, ref DateTime DataPartenzaI) + { + if (g.PropertyIdList.Length > 0) // ci sono dati exif + { + var DatiExif = new ExifReader((Bitmap)g); + DataFoto = DatiExif.DateTimeOriginal; + TestoFirma = _TestoFirmaStart; + TestoFirmaV = _TestoFirmaStartV; + if (DataFoto.Year != 1) + { + TestoFirmaPiccola = DataFoto.ToShortTimeString(); + if (_UsaOrarioTestoApplicare == true) + { + TestoFirma += " " + DataFoto.ToShortDateString() + " " + DataFoto.ToLongTimeString(); + TestoFirmaV += " " + DataFoto.ToShortDateString() + " " + DataFoto.ToLongTimeString(); + } + + if (_UsaTempoGaraTestoApplicare == true) + { + var Orario = new TimeSpan(DateAndTime.DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000L); + TestoFirma += " " + _TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + TestoFirmaV += " " + _TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + } + } + } + } + + private void Rotation(ref Image g) + { + FotoRuotaADestra = false; + FotoRuotaASinistra = false; + if (_UsaRotazioneAutomatica == true) + { + if (g.PropertyIdList.Length > 0) // ci sono dati exif + { + var DatiExif = new ExifReader((Bitmap)g); + switch (DatiExif.Orientation) + { + case ExifReader.Orientations.BottomLeft: + { + break; + } + + case ExifReader.Orientations.BottomRight: + { + break; + } + + case ExifReader.Orientations.LeftTop: + { + break; + } + + case ExifReader.Orientations.LftBottom: + { + FotoRuotaASinistra = true; + break; + } + + case ExifReader.Orientations.RightBottom: + { + break; + } + + case ExifReader.Orientations.RightTop: + { + break; + } + + case ExifReader.Orientations.TopLeft: + { + break; + } + + case ExifReader.Orientations.TopRight: + { + break; + } + } + } + } + + if (FotoRuotaASinistra == true) + { + g.RotateFlip(RotateFlipType.Rotate270FlipNone); + } + + if (FotoRuotaADestra == true) + { + g.RotateFlip(RotateFlipType.Rotate90FlipNone); + } + } + + public void CreaImmagineThread(string Info) + { + string TestoFirma = ""; + string TestoFirmaV = ""; + int AlphaScelta = Conversions.ToInteger(255 * (100 - _Trasparenza) / 100d); + int DimensioneStandard; + int DimensioneStandardMiniatura; + var DataFoto = default(DateTime); + var DataPartenzaI = _DataPartenza; + if (_TestoOrario.Length > 0) + { + _TestoOrario += " "; + } + + string TestoFirmaPiccola = ""; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + DimensioneStandard = _DimStandard; + DimensioneStandardMiniatura = _DimStandardMiniatura; + var g = Image.FromFile(Path.Combine(_SourceDir.FullName, _NomeFileChild)); + // dati extra in fondo + if (_UsaOrarioTestoApplicare | _UsaTempoGaraTestoApplicare | _UsaOrarioMiniatura | _TestoMin | _AggTempoGaraMin | _AggNumTempMin) + { + ProcA(ref g, ref DataFoto, ref TestoFirma, ref TestoFirmaV, ref TestoFirmaPiccola, ref DataPartenzaI); + } + + // If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + // Dim DatiExif As New ExifReader(CType(g, Bitmap)) + // DataFoto = DatiExif.DateTimeOriginal + // TestoFirma = _TestoFirmaStart + // TestoFirmaV = _TestoFirmaStartV + + // If DataFoto.Year <> 1 Then + // TestoFirmaPiccola = DataFoto.ToShortTimeString + // If _UsaOrarioTestoApplicare = True Then + // TestoFirma &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + // TestoFirmaV &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + // End If + // If _UsaTempoGaraTestoApplicare = True Then + // Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + // TestoFirma &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + // TestoFirmaV &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + // End If + // End If + + // End If + + else + { + TestoFirma = _TestoFirmaStart; + TestoFirmaV = _TestoFirmaStartV; + } + + Rotation(ref g); + + // Dim FotoRuotaADestra As Boolean = False + // Dim FotoRuotaASinistra As Boolean = False + + // If _UsaRotazioneAutomatica = True Then + // If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + // Dim DatiExif As New ExifReader(CType(g, Bitmap)) + + // Select Case DatiExif.Orientation + // Case ExifReader.Orientations.BottomLeft + + // Case ExifReader.Orientations.BottomRight + + // Case ExifReader.Orientations.LeftTop + + // Case ExifReader.Orientations.LftBottom + // FotoRuotaASinistra = True + // Case ExifReader.Orientations.RightBottom + + // Case ExifReader.Orientations.RightTop + + // Case ExifReader.Orientations.TopLeft + + // Case ExifReader.Orientations.TopRight + + // End Select + // End If + // End If + + // If FotoRuotaASinistra = True Then + // g.RotateFlip(RotateFlipType.Rotate270FlipNone) + // End If + // If FotoRuotaADestra = True Then + // g.RotateFlip(RotateFlipType.Rotate90FlipNone) + // End If + + var thisFormat = g.RawFormat; + if (_UsaForzaJpg == true) + { + thisFormat = ImageFormat.Jpeg; + } + + var thumbSizeSmall = new Size(); + var thumbSizeBig = new Size(); + string NomeFileSmall = ""; + string NomeFileBig2 = ""; + string NomeFileBig = ""; + if (g.Width > g.Height) + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza"); + var SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + else + { + thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza"); + var SizeOrig = new Size(g.Width, g.Height); + thumbSizeBig = SizeOrig; + } + + NomeFileSmall = Suffisso + _NomeFileChild; + NomeFileBig = _NomeFileChild; + var imgOutputBig = new Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height); + imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution); + if (_TestoMin) + { + TestoFirmaPiccola = NomeFileBig; + } + else if (_AggNumTempMin) + { + TestoFirmaPiccola = NomeFileBig + " "; + } + + var yPosFromBottom4 = default(float); + Font crFont1 = null; + Font crFont2 = null; + var crSize1 = new SizeF(); + var crSize2 = new SizeF(); + if (_CreaMiniature == true) + { + if (_AggiungiScritteMiniature == false) + { + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4); + } + + if (_UsaOrarioMiniatura | _TestoMin | _AggTempoGaraMin | _AggNumTempMin) + { + if (TestoFirmaPiccola.Length > 0) + { + Bitmap imgOutputSmall; + imgOutputSmall = (Bitmap)imgOutputBig.Clone(); + Graphics grPhoto1; + grPhoto1 = Graphics.FromImage(imgOutputSmall); + grPhoto1.SmoothingMode = SmoothingMode.AntiAlias; + + // erano qui + + int LarghezzaStandard1; + // quick fix + DimensioneStandardMiniatura = 50; + if (_Grassetto == true) + { + crFont1 = new Font(IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + crFont2 = new Font(IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura); + crFont2 = new Font(IlFont, DimensioneStandard); + } + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1); + crSize2 = grPhoto1.MeasureString(TestoFirma, crFont1); + LarghezzaStandard1 = Conversions.ToInteger(crSize1.Width); + if (crSize1.Width > Conversions.ToSingle(g.Width)) + { + int Conta = DimensioneStandardMiniatura; + do + { + if (Conta > 20) + { + Conta -= 5; + } + else + { + Conta -= 1; + } + + if (_Grassetto == true) + { + crFont1 = new Font(_IlFont, Conta, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, Conta); + } + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1); + if (crSize1.Width < Conversions.ToSingle(g.Width)) + { + LarghezzaStandard1 = Conversions.ToInteger(crSize1.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandardMiniatura = Conta; + } + + var yPosFromBottom1 = default(float); + switch (_Posizione.ToUpper() ?? "") + { + case "ALTO": + { + yPosFromBottom1 = _Margine; + yPosFromBottom4 = _MargVert; + break; + } + + case "BASSO": + { + // yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + // yPosFromBottom1 = CType((g.Height - crFont1.Height - (g.Height * _Margine / 100) - (crFont1.Height * 0.3)), Single) + yPosFromBottom1 = Conversions.ToSingle(g.Height - crSize1.Height - g.Height * _Margine / 100d); + yPosFromBottom4 = Conversions.ToSingle(g.Height - crSize1.Height - g.Height * _MargVert / 100d); + break; + } + } + + var xCenterOfImg1 = default(float); + var StrFormat1 = new StringFormat(); + switch (_Allineamento.ToUpper() ?? "") + { + case "SINISTRA": + { + xCenterOfImg1 = Conversions.ToSingle(_Margine + LarghezzaStandard1 / 2d); + if (LarghezzaStandard1 / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + + case "CENTRO": + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + break; + } + + case "DESTRA": + { + xCenterOfImg1 = Conversions.ToSingle(g.Width - _Margine - LarghezzaStandard1 / 2d); + if (LarghezzaStandard1 / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg1 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + } + + StrFormat1.Alignment = StringAlignment.Center; + var semiTransBrush21 = new SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)); + var semiTransBrush1 = new SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)); + // quick fix + DimensioneStandardMiniatura = _DimMin; + if (_Grassetto == true) + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura, FontStyle.Bold); + } + else + { + crFont1 = new Font(_IlFont, DimensioneStandardMiniatura); + } + // asdgadfhdfhjgfsjgfjygfdhsdafa + if (_TestoMin) + { + grPhoto1.DrawString(NomeFileBig, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1f, yPosFromBottom1 + 1f), StrFormat1); + grPhoto1.DrawString(NomeFileBig, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else if (_AggTempoGaraMin & _UsaTempoGaraTestoApplicare) + { + var Orario = new TimeSpan(DateAndTime.DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000L); + string tempstr = ""; + tempstr += ControlChars.CrLf + _TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1f, yPosFromBottom1 + 1f), StrFormat1); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else if (_AggNumTempMin) + { + var Orario = new TimeSpan(DateAndTime.DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000L); + string tempstr = ""; + tempstr += NomeFileBig; + tempstr += ControlChars.CrLf + _TestoOrario + Orario.Hours.ToString("00") + ":" + Orario.Minutes.ToString("00") + ":" + Orario.Seconds.ToString("00"); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1f, yPosFromBottom1 + 1f), StrFormat1); + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + else + { + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush21, new PointF(xCenterOfImg1 + 1f, yPosFromBottom1 + 1f), StrFormat1); + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush1, new PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1); + } + + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall), thisFormat); + var g2 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall)); + var imgOutputSmall2 = new Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall2.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall2.Dispose(); + imgOutputSmall.Dispose(); + g2.Dispose(); + FileSystem.Kill(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileSmall)); + } + else + { + var imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall.Dispose(); + } + } + else + { + var imgOutputSmall = new Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height); + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat); + imgOutputSmall.Dispose(); + } + } + } + + Graphics grPhoto; + grPhoto = Graphics.FromImage(imgOutputBig); + grPhoto.SmoothingMode = SmoothingMode.AntiAlias; + Font crFont = null; + var crSize = new SizeF(); + int LarghezzaStandard; + if (_Grassetto == true) + { + crFont = new Font(_IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, DimensioneStandard); + } + + crSize = grPhoto.MeasureString(TestoFirma, crFont); + LarghezzaStandard = Conversions.ToInteger(crSize.Width); + if (crSize.Width > Conversions.ToSingle(g.Width)) + { + int Conta = DimensioneStandard; + do + { + if (Conta > 20) + { + Conta -= 5; + } + else + { + Conta -= 1; + } + + if (_Grassetto == true) + { + crFont = new Font(_IlFont, Conta, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, Conta); + } + + crSize = grPhoto.MeasureString(TestoFirma, crFont); + if (crSize.Width < Conversions.ToSingle(g.Width)) + { + LarghezzaStandard = Conversions.ToInteger(crSize.Width); + break; + } + + if (Conta <= 5) + break; + } + while (true); + DimensioneStandard = Conta; + } + + var yPosFromBottom = default(float); + var yPosFromBottom3 = default(float); + switch (_Posizione.ToUpper() ?? "") + { + case "ALTO": + { + yPosFromBottom = _Margine; + yPosFromBottom3 = _MargVert; + break; + } + + case "BASSO": + { + // yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + // yPosFromBottom = CType((g.Height - DimensioneStandard - (g.Height * _Margine / 100) - (DimensioneStandard * 0.3)), Single) + yPosFromBottom = Conversions.ToSingle(g.Height - crSize.Height - g.Height * _Margine / 100d); + yPosFromBottom3 = Conversions.ToSingle(g.Height - crSize.Height - g.Height * _MargVert / 100d); + break; + } + } + + var xCenterOfImg = default(float); + float xCenterOfImg3; + var StrFormat = new StringFormat(); + switch (_Allineamento.ToUpper() ?? "") + { + case "SINISTRA": + { + xCenterOfImg = Conversions.ToSingle(_Margine + LarghezzaStandard / 2d); + xCenterOfImg3 = Conversions.ToSingle(_MargVert + LarghezzaStandard / 2d); + if (LarghezzaStandard / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + } + + if (LarghezzaStandard / 2d > g.Width / 2d - _MargVert) + { + xCenterOfImg3 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + + case "CENTRO": + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + break; + } + + case "DESTRA": + { + xCenterOfImg = Conversions.ToSingle(g.Width - _Margine - LarghezzaStandard / 2d); + xCenterOfImg3 = Conversions.ToSingle(g.Width - _MargVert - LarghezzaStandard / 2d); + if (LarghezzaStandard / 2d > g.Width / 2d - _Margine) + { + xCenterOfImg = Conversions.ToSingle(g.Width / 2d); + } + + if (LarghezzaStandard / 2d > g.Width / 2d - _MargVert) + { + xCenterOfImg3 = Conversions.ToSingle(g.Width / 2d); + } + + break; + } + } + + StrFormat.Alignment = StringAlignment.Center; + var semiTransBrush2 = new SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)); + var semiTransBrush = new SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)); + if (FotoRuotaADestra | FotoRuotaASinistra) + { + if (_Grassetto == true) + { + crFont = new Font(_IlFont, DimVert, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, DimVert); + } + } + else if (_Grassetto == true) + { + crFont = new Font(_IlFont, DimensioneStandard, FontStyle.Bold); + } + else + { + crFont = new Font(_IlFont, DimensioneStandard); + } + + aggiungiTesto(g, DataFoto, grPhoto, NomeFileBig, crFont, semiTransBrush, semiTransBrush2, xCenterOfImg, yPosFromBottom, StrFormat, TestoFirmaV, yPosFromBottom3, yPosFromBottom4, TestoFirma, NomeFileBig2); + aggiungiLogo(imgOutputBig); + salvaFoto(imgOutputBig, thumbSizeBig, NomeFileBig, NomeFileSmall, thumbSizeSmall); + g.Dispose(); + grPhoto.Dispose(); + GC.Collect(); + } + + private void aggiungiTesto(Image g, DateTime DataFoto, Graphics grPhoto, string NomeFileBig, Font crFont, SolidBrush semiTransBrush, SolidBrush semiTransBrush2, float xCenterOfImg, float yPosFromBottom, StringFormat StrFormat, string TestoFirmav, float yPosFromBottom3, float yPosFromBottom4, string TestoFirma, string NomeFileBig2) + { + // qui scrive il testo (nomefilebig) + if (_TestoNome) + { + if (NomeData & g.PropertyIdList.Length > 0) + { + var DatiExif = new ExifReader((Bitmap)g); + DataFoto = DatiExif.DateTimeOriginal; + grPhoto.DrawString(NomeFileBig + " " + DataFoto.ToShortDateString(), crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom + 1f), StrFormat); + grPhoto.DrawString(NomeFileBig + " " + DataFoto.ToShortDateString(), crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + else + { + grPhoto.DrawString(NomeFileBig, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom + 1f), StrFormat); + grPhoto.DrawString(NomeFileBig, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + } + + if (_TestoNome == false) + { + if (FotoRuotaADestra | FotoRuotaASinistra) + { + if (_TestoMin == false) + { + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom3 + 1f), StrFormat); + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom3), StrFormat); + } + + if (_TestoMin == true) + { + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom4 + 1f), StrFormat); + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom4), StrFormat); + } + } + else + { + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush2, new PointF(xCenterOfImg + 1f, yPosFromBottom + 1f), StrFormat); + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush, new PointF(xCenterOfImg, yPosFromBottom), StrFormat); + } + } + + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileBig2 = NomeFileBig; + NomeFileBig = NomeFileBig.Substring(0, NomeFileBig.Length - 4) + Codice + NomeFileBig.Substring(NomeFileBig.Length - 4); + } + } + + private void aggiungiLogo(Bitmap imgOutputBig) + { + // imgOutputBig + if (_LogoAggiungi == true & File.Exists(_LogoNomeFile)) + { + var ImmagineLogo = Image.FromFile(_LogoNomeFile); + var LogoColoreTrasparente = Color.White; + // Dim bmWatermark As Bitmap + + // * Create a Bitmap based on the previously modified photograph Bitmap + // bmWatermark = New Bitmap(imgOutputBig) + // bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution) + + // * Load this Bitmap into a new Graphic Object + var grWatermark = Graphics.FromImage(imgOutputBig); + + // * To achieve a transulcent watermark we will apply (2) color manipulations + var imageAttributes = new ImageAttributes(); + + // * The first step replace the background color with one that is trasparent (Alpha=0, R=0, G=0, B=0) + var colorMap = new ColorMap(); + + // * background this will be the color we search for and replace with transparency + colorMap.OldColor = LogoColoreTrasparente; + colorMap.NewColor = Color.FromArgb(0, 0, 0, 0); + var remapTable = new[] { colorMap }; + imageAttributes.SetRemapTable(remapTable, ColorAdjustType.Bitmap); + + // * The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f + var colorMatrixElements = new[] { new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f }, new float[] { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }, new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }, new float[] { 0.0f, 0.0f, 0.0f, Conversions.ToSingle(_LogoTrasparenza) / 100f, 0.0f }, new float[] { 0.0f, 0.0f, 0.0f, 0.0f, 1.0f } }; + var wmColorMatrix = new ColorMatrix(colorMatrixElements); + imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); + int FotoLogoH = _LogoAltezza; + int FotoLogoW = _LogoLarghezza; + double FattoreAlt = ImmagineLogo.Height / (double)FotoLogoH; + double FattoreLarg = ImmagineLogo.Width / (double)FotoLogoW; + Size NuovaSize; + if (FattoreLarg > FattoreAlt) + { + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza"); + } + else + { + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza"); + } + + int MargineUsato; + int MargineL; + bool InPercentualeL; + if (_LogoMargine.EndsWith("%") == true) + { + InPercentualeL = true; + } + else + { + InPercentualeL = false; + } + + MargineL = Conversions.ToInteger(Conversion.Val(_LogoMargine)); + if (InPercentualeL == true) + { + MargineUsato = Conversions.ToInteger(imgOutputBig.Height * MargineL / 100d); + } + else + { + MargineUsato = MargineL; + } + + var xPosOfWm = default(int); + var yPosOfWm = default(int); + switch (_LogoPosizioneH.ToUpper() ?? "") + { + case "SINISTRA": + case "NESSUNA": + { + xPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + xPosOfWm = Conversions.ToInteger((imgOutputBig.Width - NuovaSize.Width) / 2d); + break; + } + + case "DESTRA": + { + xPosOfWm = imgOutputBig.Width - NuovaSize.Width - MargineUsato; + break; + } + } + + switch (_LogoPosizioneV.ToUpper() ?? "") + { + case "ALTO": + case "NESSUNA": + { + yPosOfWm = MargineUsato; + break; + } + + case "CENTRO": + { + yPosOfWm = Conversions.ToInteger((imgOutputBig.Height - NuovaSize.Height) / 2d); + break; + } + + case "BASSO": + { + yPosOfWm = imgOutputBig.Height - NuovaSize.Height - MargineUsato; + break; + } + } + + grWatermark.DrawImage(ImmagineLogo, new Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes); + grWatermark.Dispose(); + } + } + + private void salvaFoto(Bitmap imgOutputBig, Size thumbSizeBig, string NomeFileBig, string NomeFileSmall, Size thumbSizeSmall) + { + if (_FotoGrandeDimOrigina == false) + { + // attenzione non controlla se è png + // imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig, Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig), jpegQuality); + var g2 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + if (g2.Width > g2.Height) + { + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _LarghezzaBig, "Larghezza"); + } + else + { + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _AltezzaBig, "Altezza"); + } + + var imgOutputBig2 = new Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height); + // imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig2, Path.Combine(_DestDir.FullName, NomeFileBig), jpegQuality); + // imgOutputBig2.Dispose() + // imgOutputBig.Dispose() + g2.Dispose(); + } + else + { + // imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig, Path.Combine(_DestDir.FullName, NomeFileBig), jpegQuality); + imgOutputBig.Dispose(); + } + + if (_CreaMiniature) + { + if (_AggiungiScritteMiniature == true) + { + Image g1; + if (_FotoGrandeDimOrigina == false) + { + g1 = Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + } + else + { + g1 = Image.FromFile(Path.Combine(_DestDir.FullName, NomeFileBig)); + } + + var imgOutputSmall = new Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height); + if ((_DirectorySorgente.ToUpper() ?? "") == (_DirectoryDestinazione.ToUpper() ?? "")) + { + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4); + } + // imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + salvaImmagineCustomQuality(imgOutputSmall, Path.Combine(_DestDir.FullName, NomeFileSmall), jpegQualityMin); + // imgOutputSmall.Dispose() + g1.Dispose(); + } + } + + if (File.Exists(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)) == true) + { + FileSystem.Kill(Path.Combine(_DestDir.FullName, "Temp_" + NomeFileBig)); + } + } + + private void salvaImmagineCustomQuality(Bitmap imageToSave, string nomeFileFinale, long quality) + { + var JgpEncoder = GetEncoder(ImageFormat.Jpeg); + var MyEncoder = Encoder.Quality; + var MyEncoderParameters = new EncoderParameters(1); + var MyEncoderParameter = new EncoderParameter(MyEncoder, jpegQuality); + MyEncoderParameters.Param[0] = MyEncoderParameter; + imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters); + imageToSave.Dispose(); + } + + private ImageCodecInfo GetEncoder(ImageFormat format) + { + var codecs = ImageCodecInfo.GetImageDecoders(); + foreach (var codec in codecs) + { + if (codec.FormatID == format.Guid) + { + return codec; + } + } + + return null; + } + + + + + + + /// + /// Calculate the Size of the New image + /// + /// Larghezza + /// Altezza + /// + /// + /// + /// + public Size NewthumbSize(int currentwidth, int currentheight, int MaxPixel, string TipoSize) + { + // e + // *** Larghezza, Altezza, Auto + + double tempMultiplier; + if ((TipoSize.ToUpper() ?? "") == ("Larghezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + else if ((TipoSize.ToUpper() ?? "") == ("Altezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else if (currentheight > currentwidth) // portrait + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + + var NewSize = new Size((int)Math.Round(currentwidth * tempMultiplier), (int)Math.Round(currentheight * tempMultiplier)); + return NewSize; + } + + public string DirectorySorgente + { + get + { + return _DirectorySorgente; + } + + set + { + _DirectorySorgente = value; + } + } + + public string DirectoryDestinazione + { + get + { + return _DirectoryDestinazione; + } + + set + { + _DirectoryDestinazione = value; + } + } + + public DirectoryInfo SourceDir + { + get + { + return _SourceDir; + } + + set + { + _SourceDir = value; + } + } + + public DirectoryInfo DestDirStart + { + get + { + return _DestDirStart; + } + + set + { + _DestDirStart = value; + } + } + + public string TestoFirmaStart + { + get + { + return _TestoFirmaStart; + } + + set + { + _TestoFirmaStart = value; + } + } + + public string TestoFirmaStartV + { + get + { + return _TestoFirmaStartV; + } + + set + { + _TestoFirmaStartV = value; + } + } + + public DateTime DataPartenza + { + get + { + return _DataPartenza; + } + + set + { + _DataPartenza = value; + } + } + + public string TestoOrario + { + get + { + return _TestoOrario; + } + + set + { + _TestoOrario = value; + } + } + + public int DimStandard + { + get + { + return _DimStandard; + } + + set + { + _DimStandard = value; + } + } + + public int DimStandardMiniatura + { + get + { + return _DimStandardMiniatura; + } + + set + { + _DimStandardMiniatura = value; + } + } + + public bool NomeData + { + get + { + return _NomeData; + } + + set + { + _NomeData = value; + } + } + + public bool TestoNome + { + get + { + return _TestoNome; + } + + set + { + _TestoNome = value; + } + } + + public bool UsaOrarioMiniatura + { + get + { + return _UsaOrarioMiniatura; + } + + set + { + _UsaOrarioMiniatura = value; + } + } + + public bool UsaOrarioTestoApplicare + { + get + { + return _UsaOrarioTestoApplicare; + } + + set + { + _UsaOrarioTestoApplicare = value; + } + } + + public bool UsaTempoGaraTestoApplicare + { + get + { + return _UsaTempoGaraTestoApplicare; + } + + set + { + _UsaTempoGaraTestoApplicare = value; + } + } + + public bool UsaRotazioneAutomatica + { + get + { + return _UsaRotazioneAutomatica; + } + + set + { + _UsaRotazioneAutomatica = value; + } + } + + public bool UsaForzaJpg + { + get + { + return _UsaForzaJpg; + } + + set + { + _UsaForzaJpg = value; + } + } + + public int LarghezzaSmall + { + get + { + return _LarghezzaSmall; + } + + set + { + _LarghezzaSmall = value; + } + } + + public int AltezzaSmall + { + get + { + return _AltezzaSmall; + } + + set + { + _AltezzaSmall = value; + } + } + + public bool CreaMiniature + { + get + { + return _CreaMiniature; + } + + set + { + _CreaMiniature = value; + } + } + + public bool AggiungiScritteMiniature + { + get + { + return _AggiungiScritteMiniature; + } + + set + { + _AggiungiScritteMiniature = value; + } + } + + public string NomeFileChild + { + get + { + return _NomeFileChild; + } + + set + { + _NomeFileChild = value; + } + } + + public string Suffisso + { + get + { + return _Suffisso; + } + + set + { + _Suffisso = value; + } + } + + public string Codice + { + get + { + return _Codice; + } + + set + { + _Codice = value; + } + } + + public int Trasparenza + { + get + { + return _Trasparenza; + } + + set + { + _Trasparenza = value; + } + } + + public string IlFont + { + get + { + return _IlFont; + } + + set + { + _IlFont = value; + } + } + + public bool Grassetto + { + get + { + return _Grassetto; + } + + set + { + _Grassetto = value; + } + } + + public string Posizione + { + get + { + return _Posizione; + } + + set + { + _Posizione = value; + } + } + + public string Allineamento + { + get + { + return _Allineamento; + } + + set + { + _Allineamento = value; + } + } + + public int Margine + { + get + { + return _Margine; + } + + set + { + _Margine = value; + } + } + + public int LogoAltezza + { + get + { + return _LogoAltezza; + } + + set + { + _LogoAltezza = value; + } + } + + public int LogoLarghezza + { + get + { + return _LogoLarghezza; + } + + set + { + _LogoLarghezza = value; + } + } + + public int FontColoreR + { + get + { + return _FontColoreR; + } + + set + { + _FontColoreR = value; + } + } + + public int FontColoreG + { + get + { + return _FontColoreG; + } + + set + { + _FontColoreG = value; + } + } + + public int FontColoreB + { + get + { + return _FontColoreB; + } + + set + { + _FontColoreB = value; + } + } + + public Color fontColoreRGB + { + get + { + return _fontColoreRGB; + } + + set + { + _fontColoreRGB = value; + } + } + + public bool LogoAggiungi + { + get + { + return _LogoAggiungi; + } + + set + { + _LogoAggiungi = value; + } + } + + public string LogoNomeFile + { + get + { + return _LogoNomeFile; + } + + set + { + _LogoNomeFile = value; + } + } + + public string LogoTrasparenza + { + get + { + return _LogoTrasparenza; + } + + set + { + _LogoTrasparenza = value; + } + } + + public string LogoMargine + { + get + { + return _LogoMargine; + } + + set + { + _LogoMargine = value; + } + } + + public string LogoPosizioneH + { + get + { + return _LogoPosizioneH; + } + + set + { + _LogoPosizioneH = value; + } + } + + public string LogoPosizioneV + { + get + { + return _LogoPosizioneV; + } + + set + { + _LogoPosizioneV = value; + } + } + + public bool FotoGrandeDimOrigina + { + get + { + return _FotoGrandeDimOrigina; + } + + set + { + _FotoGrandeDimOrigina = value; + } + } + + public int AltezzaBig + { + get + { + return _AltezzaBig; + } + + set + { + _AltezzaBig = value; + } + } + + public int LarghezzaBig + { + get + { + return _LarghezzaBig; + } + + set + { + _LarghezzaBig = value; + } + } + + public DirectoryInfo DestDir + { + get + { + return _DestDir; + } + + set + { + _DestDir = value; + } + } + + public int DimVert + { + get + { + return _DimVert; + } + + set + { + _DimVert = value; + } + } + + public int MargVert + { + get + { + return _MargVert; + } + + set + { + _MargVert = value; + } + } + + public bool TestoMin + { + get + { + return _TestoMin; + } + + set + { + _TestoMin = value; + } + } + + public int DimMin + { + get + { + return _DimMin; + } + + set + { + _DimMin = value; + } + } + + public bool SecretDefault + { + get + { + return _SecretDefault; + } + + set + { + _SecretDefault = value; + } + } + + public bool SecretBig + { + get + { + return _SecretBig; + } + + set + { + _SecretBig = value; + } + } + + public bool SecretSmall + { + get + { + return _SecretSmall; + } + + set + { + _SecretSmall = value; + } + } + + public string SecretPathSmall + { + get + { + return _SecretPathSmall; + } + + set + { + _SecretPathSmall = value; + } + } + + public string SecretPathBig + { + get + { + return _SecretPathBig; + } + + set + { + _SecretPathBig = value; + } + } + + public bool AggTempoGaraMin + { + get + { + return _AggTempoGaraMin; + } + + set + { + _AggTempoGaraMin = value; + } + } + + public bool AggNumTempMin + { + get + { + return _AggNumTempMin; + } + + set + { + _AggNumTempMin = value; + } + } + + public long jpegQuality + { + get + { + return _jpegQuality; + } + + set + { + _jpegQuality = value; + } + } + + public long jpegQualityMin + { + get + { + return _jpegQualityMin; + } + + set + { + _jpegQualityMin = value; + } + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/CreaImmagineSeparateThread.vb b/imagecatalog.backup/CreaImmagineSeparateThread.vb new file mode 100644 index 0000000..59767e6 --- /dev/null +++ b/imagecatalog.backup/CreaImmagineSeparateThread.vb @@ -0,0 +1,1409 @@ +Imports System.IO +Imports System.Drawing.Drawing2D +Imports System.Drawing.Imaging +'Imports System.Threading + +Public Class CreaImmagineSeparateThread +#Region "dichiarazioni" + Private _DirectorySorgente As String + Private _DirectoryDestinazione As String + + Private _DimVert As Integer + Private _MargVert As Integer + + Private _SourceDir As DirectoryInfo + Private _DestDirStart As DirectoryInfo + Private _DimStandard As Integer + Private _DimStandardMiniatura As Integer + + Private _NomeData As Boolean + Private _TestoNome As Boolean + Private _UsaOrarioMiniatura As Boolean + Private _UsaOrarioTestoApplicare As Boolean + Private _UsaTempoGaraTestoApplicare As Boolean + Private _TestoFirmaStart As String + Private _TestoFirmaStartV As String + Private _DataPartenza As DateTime + Private _TestoOrario As String + + Private _UsaRotazioneAutomatica As Boolean + Private _UsaForzaJpg As Boolean + + Private _LarghezzaSmall As Integer + Private _AltezzaSmall As Integer + + Private _CreaMiniature As Boolean + Private _AggiungiScritteMiniature As Boolean + Private _AggTempoGaraMin As Boolean + Private _AggNumTempMin As Boolean + + + Private _NomeFileChild As String + Private _Suffisso As String + Private _Codice As String + + Private _Trasparenza As Integer + Private _IlFont As String + Private _Grassetto As Boolean + + Private _Posizione As String + Private _Allineamento As String + Private _Margine As Integer + + Private _LogoAltezza As Integer + Private _LogoLarghezza As Integer + + Private _FontColoreR As Integer + Private _FontColoreG As Integer + Private _FontColoreB As Integer + Private _fontColoreRGB As Color + + Private _LogoAggiungi As Boolean + Private _LogoNomeFile As String + Private _LogoTrasparenza As String + Private _LogoMargine As String + Private _LogoPosizioneH As String + Private _LogoPosizioneV As String + + Private _FotoGrandeDimOrigina As Boolean + Private _AltezzaBig As Integer + Private _LarghezzaBig As Integer + Private _DestDir As DirectoryInfo + Private _DimMin As Integer + + Private _TestoMin As Boolean + + Private _SecretDefault As Boolean + Private _SecretBig As Boolean + Private _SecretSmall As Boolean + + Private _SecretPathSmall As String + Private _SecretPathBig As String + + Private _jpegQuality As Long + Private _jpegQualityMin As Long + + Private FotoRuotaADestra As Boolean = False + Private FotoRuotaASinistra As Boolean = False + + Private TempMinText As String = "" + 'Private crFont1 As Font + + +#End Region + + Private Sub ProcA(ByRef g As System.Drawing.Image, ByRef DataFoto As DateTime, ByRef TestoFirma As String, ByRef TestoFirmaV As String, ByRef TestoFirmaPiccola As String, ByRef DataPartenzaI As DateTime) + If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + Dim DatiExif As New ExifReader(CType(g, Bitmap)) + DataFoto = DatiExif.DateTimeOriginal + TestoFirma = _TestoFirmaStart + TestoFirmaV = _TestoFirmaStartV + + If DataFoto.Year <> 1 Then + TestoFirmaPiccola = DataFoto.ToShortTimeString + If _UsaOrarioTestoApplicare = True Then + TestoFirma &= " " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + TestoFirmaV &= " " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + End If + If _UsaTempoGaraTestoApplicare = True Then + Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + TestoFirma &= " " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + TestoFirmaV &= " " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + End If + End If + + End If + End Sub + + Private Sub Rotation(ByRef g As System.Drawing.Image) + + FotoRuotaADestra = False + FotoRuotaASinistra = False + + If _UsaRotazioneAutomatica = True Then + If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + Dim DatiExif As New ExifReader(CType(g, Bitmap)) + + Select Case DatiExif.Orientation + Case ExifReader.Orientations.BottomLeft + + Case ExifReader.Orientations.BottomRight + + Case ExifReader.Orientations.LeftTop + + Case ExifReader.Orientations.LftBottom + FotoRuotaASinistra = True + Case ExifReader.Orientations.RightBottom + + Case ExifReader.Orientations.RightTop + + Case ExifReader.Orientations.TopLeft + + Case ExifReader.Orientations.TopRight + + End Select + End If + End If + + If FotoRuotaASinistra = True Then + g.RotateFlip(RotateFlipType.Rotate270FlipNone) + End If + If FotoRuotaADestra = True Then + g.RotateFlip(RotateFlipType.Rotate90FlipNone) + End If + + + + End Sub + + + Public Sub CreaImmagineThread(ByVal Info As String) + Dim TestoFirma As String = "" + Dim TestoFirmaV As String = "" + + Dim AlphaScelta As Integer = CType((255 * (100 - _Trasparenza) / 100), Integer) + + Dim DimensioneStandard As Integer + Dim DimensioneStandardMiniatura As Integer + + Dim DataFoto As DateTime + Dim DataPartenzaI As DateTime = _DataPartenza + If _TestoOrario.Length > 0 Then + _TestoOrario &= " " + End If + Dim TestoFirmaPiccola As String = "" + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + DimensioneStandard = _DimStandard + DimensioneStandardMiniatura = _DimStandardMiniatura + + Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_SourceDir.FullName, _NomeFileChild)) + 'dati extra in fondo + If _UsaOrarioTestoApplicare Or + _UsaTempoGaraTestoApplicare Or + _UsaOrarioMiniatura Or + _TestoMin Or + _AggTempoGaraMin Or + _AggNumTempMin Then + + ProcA(g, DataFoto, TestoFirma, TestoFirmaV, TestoFirmaPiccola, DataPartenzaI) + + 'If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + ' Dim DatiExif As New ExifReader(CType(g, Bitmap)) + ' DataFoto = DatiExif.DateTimeOriginal + ' TestoFirma = _TestoFirmaStart + ' TestoFirmaV = _TestoFirmaStartV + + ' If DataFoto.Year <> 1 Then + ' TestoFirmaPiccola = DataFoto.ToShortTimeString + ' If _UsaOrarioTestoApplicare = True Then + ' TestoFirma &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + ' TestoFirmaV &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString + ' End If + ' If _UsaTempoGaraTestoApplicare = True Then + ' Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + ' TestoFirma &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + ' TestoFirmaV &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + ' End If + ' End If + + 'End If + + Else + TestoFirma = _TestoFirmaStart + TestoFirmaV = _TestoFirmaStartV + + End If + + + Rotation(g) + + 'Dim FotoRuotaADestra As Boolean = False + 'Dim FotoRuotaASinistra As Boolean = False + + 'If _UsaRotazioneAutomatica = True Then + ' If g.PropertyIdList.Length > 0 Then ' ci sono dati exif + ' Dim DatiExif As New ExifReader(CType(g, Bitmap)) + + ' Select Case DatiExif.Orientation + ' Case ExifReader.Orientations.BottomLeft + + ' Case ExifReader.Orientations.BottomRight + + ' Case ExifReader.Orientations.LeftTop + + ' Case ExifReader.Orientations.LftBottom + ' FotoRuotaASinistra = True + ' Case ExifReader.Orientations.RightBottom + + ' Case ExifReader.Orientations.RightTop + + ' Case ExifReader.Orientations.TopLeft + + ' Case ExifReader.Orientations.TopRight + + ' End Select + ' End If + 'End If + + 'If FotoRuotaASinistra = True Then + ' g.RotateFlip(RotateFlipType.Rotate270FlipNone) + 'End If + 'If FotoRuotaADestra = True Then + ' g.RotateFlip(RotateFlipType.Rotate90FlipNone) + 'End If + + Dim thisFormat As System.Drawing.Imaging.ImageFormat = g.RawFormat + If _UsaForzaJpg = True Then + thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg + End If + + Dim thumbSizeSmall As New Size + Dim thumbSizeBig As New Size + Dim NomeFileSmall As String = "" + + Dim NomeFileBig2 As String = "" + Dim NomeFileBig As String = "" + + + If g.Width > g.Height Then + thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza") + Dim SizeOrig As New Size(g.Width, g.Height) + thumbSizeBig = SizeOrig + Else + thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza") + Dim SizeOrig As New Size(g.Width, g.Height) + thumbSizeBig = SizeOrig + End If + + NomeFileSmall = Suffisso & _NomeFileChild + NomeFileBig = _NomeFileChild + + Dim imgOutputBig As New Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height) + imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution) + + If _TestoMin Then + TestoFirmaPiccola = NomeFileBig + ElseIf _AggNumTempMin Then + TestoFirmaPiccola = NomeFileBig + " " + End If + Dim yPosFromBottom4 As Single + + Dim crFont1 As Font = Nothing + Dim crFont2 As Font = Nothing + Dim crSize1 As SizeF = New SizeF + Dim crSize2 As SizeF = New SizeF + + If _CreaMiniature = True Then + If _AggiungiScritteMiniature = False Then + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4) + End If + If _UsaOrarioMiniatura Or + _TestoMin Or + _AggTempoGaraMin Or + _AggNumTempMin Then + + If TestoFirmaPiccola.Length > 0 Then + Dim imgOutputSmall As Bitmap + imgOutputSmall = CType(imgOutputBig.Clone, Bitmap) + + Dim grPhoto1 As Graphics + grPhoto1 = Graphics.FromImage(imgOutputSmall) + grPhoto1.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias + + 'erano qui + + Dim LarghezzaStandard1 As Integer + 'quick fix + DimensioneStandardMiniatura = 50 + If _Grassetto = True Then + crFont1 = New Font(IlFont, DimensioneStandardMiniatura, FontStyle.Bold) + crFont2 = New Font(IlFont, DimensioneStandard, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura) + crFont2 = New Font(IlFont, DimensioneStandard) + End If + + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1) + crSize2 = grPhoto1.MeasureString(TestoFirma, crFont1) + LarghezzaStandard1 = CType(crSize1.Width, Integer) + + If crSize1.Width > CType(g.Width, Single) Then + Dim Conta As Integer = DimensioneStandardMiniatura + Do + If Conta > 20 Then + Conta -= 5 + Else + Conta -= 1 + End If + If _Grassetto = True Then + crFont1 = New Font(_IlFont, Conta, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, Conta) + End If + crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1) + If crSize1.Width < CType(g.Width, Single) Then + LarghezzaStandard1 = CType(crSize1.Width, Integer) + Exit Do + End If + If Conta <= 5 Then Exit Do + Loop + DimensioneStandardMiniatura = Conta + End If + + Dim yPosFromBottom1 As Single + + + + Select Case _Posizione.ToUpper + Case "ALTO" + + yPosFromBottom1 = (_Margine) + yPosFromBottom4 = (_MargVert) + + Case "BASSO" + 'yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + 'yPosFromBottom1 = CType((g.Height - crFont1.Height - (g.Height * _Margine / 100) - (crFont1.Height * 0.3)), Single) + yPosFromBottom1 = CType((g.Height - crSize1.Height - (g.Height * _Margine / 100)), Single) + yPosFromBottom4 = CType((g.Height - crSize1.Height - (g.Height * _MargVert / 100)), Single) + + End Select + + Dim xCenterOfImg1 As Single + + Dim StrFormat1 As StringFormat = New StringFormat + Select Case _Allineamento.ToUpper + Case "SINISTRA" + xCenterOfImg1 = CType((_Margine + (LarghezzaStandard1 / 2)), Single) + + If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg1 = CType((g.Width / 2), Single) + End If + + + Case "CENTRO" + xCenterOfImg1 = CType((g.Width / 2), Single) + + + Case "DESTRA" + xCenterOfImg1 = CType((g.Width - _Margine - (LarghezzaStandard1 / 2)), Single) + + If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg1 = CType((g.Width / 2), Single) + End If + + + End Select + StrFormat1.Alignment = StringAlignment.Center + + Dim semiTransBrush21 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)) + Dim semiTransBrush1 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)) + 'quick fix + DimensioneStandardMiniatura = _DimMin + + If _Grassetto = True Then + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura, FontStyle.Bold) + Else + crFont1 = New Font(_IlFont, DimensioneStandardMiniatura) + End If + 'asdgadfhdfhjgfsjgfjygfdhsdafa + If _TestoMin Then + grPhoto1.DrawString(NomeFileBig, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1) + grPhoto1.DrawString(NomeFileBig, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1) + ElseIf _AggTempoGaraMin And _UsaTempoGaraTestoApplicare Then + Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + Dim tempstr As String = "" + + + tempstr &= ControlChars.CrLf & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + + + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1) + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1) + + ElseIf _AggNumTempMin Then + Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000) + Dim tempstr As String = "" + tempstr &= NomeFileBig + + tempstr &= ControlChars.CrLf & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00") + + + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1) + grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1) + + + Else + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1) + grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1) + End If + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall), thisFormat) + Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall)) + Dim imgOutputSmall2 As New Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall2.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + + imgOutputSmall2.Dispose() + imgOutputSmall.Dispose() + g2.Dispose() + Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall)) + Else + Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + imgOutputSmall.Dispose() + End If + Else + Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height) + imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + imgOutputSmall.Dispose() + End If + End If + End If + + Dim grPhoto As Graphics + grPhoto = Graphics.FromImage(imgOutputBig) + grPhoto.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias + + Dim crFont As Font = Nothing + Dim crSize As SizeF = New SizeF + Dim LarghezzaStandard As Integer + + If _Grassetto = True Then + crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold) + Else + crFont = New Font(_IlFont, DimensioneStandard) + End If + crSize = grPhoto.MeasureString(TestoFirma, crFont) + LarghezzaStandard = CType(crSize.Width, Integer) + + If crSize.Width > CType(g.Width, Single) Then + Dim Conta As Integer = DimensioneStandard + Do + If Conta > 20 Then + Conta -= 5 + Else + Conta -= 1 + End If + If _Grassetto = True Then + crFont = New Font(_IlFont, Conta, FontStyle.Bold) + Else + crFont = New Font(_IlFont, Conta) + End If + crSize = grPhoto.MeasureString(TestoFirma, crFont) + If crSize.Width < CType(g.Width, Single) Then + LarghezzaStandard = CType(crSize.Width, Integer) + Exit Do + End If + If Conta <= 5 Then Exit Do + Loop + DimensioneStandard = Conta + End If + + Dim yPosFromBottom As Single + Dim yPosFromBottom3 As Single + Select Case _Posizione.ToUpper + Case "ALTO" + yPosFromBottom = (_Margine) + yPosFromBottom3 = (_MargVert) + + Case "BASSO" + 'yPosFromBottom = (g.Height - _Margine - DimensioneStandard) + 'yPosFromBottom = CType((g.Height - DimensioneStandard - (g.Height * _Margine / 100) - (DimensioneStandard * 0.3)), Single) + yPosFromBottom = CType((g.Height - crSize.Height - (g.Height * _Margine / 100)), Single) + yPosFromBottom3 = CType((g.Height - crSize.Height - (g.Height * _MargVert / 100)), Single) + End Select + + Dim xCenterOfImg As Single + Dim xCenterOfImg3 As Single + Dim StrFormat As StringFormat = New StringFormat + Select Case _Allineamento.ToUpper + Case "SINISTRA" + xCenterOfImg = CType((_Margine + (LarghezzaStandard / 2)), Single) + xCenterOfImg3 = CType((_MargVert + (LarghezzaStandard / 2)), Single) + If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg = CType((g.Width / 2), Single) + End If + If (LarghezzaStandard / 2) > (g.Width / 2) - _MargVert Then + xCenterOfImg3 = CType((g.Width / 2), Single) + End If + + Case "CENTRO" + xCenterOfImg = CType((g.Width / 2), Single) + + Case "DESTRA" + xCenterOfImg = CType((g.Width - _Margine - (LarghezzaStandard / 2)), Single) + xCenterOfImg3 = CType((g.Width - _MargVert - (LarghezzaStandard / 2)), Single) + If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then + xCenterOfImg = CType((g.Width / 2), Single) + End If + If (LarghezzaStandard / 2) > (g.Width / 2) - _MargVert Then + xCenterOfImg3 = CType((g.Width / 2), Single) + End If + + End Select + StrFormat.Alignment = StringAlignment.Center + + Dim semiTransBrush2 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0)) + Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB)) + + If FotoRuotaADestra Or FotoRuotaASinistra Then + + If _Grassetto = True Then + crFont = New Font(_IlFont, DimVert, FontStyle.Bold) + Else + crFont = New Font(_IlFont, DimVert) + End If + + Else + + If _Grassetto = True Then + crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold) + Else + crFont = New Font(_IlFont, DimensioneStandard) + End If + End If + + aggiungiTesto(g, DataFoto, grPhoto, NomeFileBig, crFont, semiTransBrush, + semiTransBrush2, xCenterOfImg, yPosFromBottom, StrFormat, + TestoFirmaV, yPosFromBottom3, yPosFromBottom4, TestoFirma, NomeFileBig2) + + aggiungiLogo(imgOutputBig) + salvaFoto(imgOutputBig, thumbSizeBig, NomeFileBig, NomeFileSmall, thumbSizeSmall) + + g.Dispose() + grPhoto.Dispose() + GC.Collect() + + End Sub + + Private Sub aggiungiTesto(g As Image, DataFoto As Date, grPhoto As Graphics, NomeFileBig As String, crFont As Font, semiTransBrush As SolidBrush, + semiTransBrush2 As SolidBrush, xCenterOfImg As Single, yPosFromBottom As Single, StrFormat As StringFormat, + TestoFirmav As String, yPosFromBottom3 As Single, yPosFromBottom4 As Single, TestoFirma As String, NomeFileBig2 As String) + 'qui scrive il testo (nomefilebig) + If _TestoNome Then + If NomeData And g.PropertyIdList.Length > 0 Then + Dim DatiExif As New ExifReader(CType(g, Bitmap)) + DataFoto = DatiExif.DateTimeOriginal + + + grPhoto.DrawString((NomeFileBig & " " & DataFoto.ToShortDateString), crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat) + grPhoto.DrawString((NomeFileBig & " " & DataFoto.ToShortDateString), crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat) + + + Else + + grPhoto.DrawString(NomeFileBig, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat) + grPhoto.DrawString(NomeFileBig, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat) + + End If + End If + + If _TestoNome = False Then + If FotoRuotaADestra Or FotoRuotaASinistra Then + If _TestoMin = False Then + + + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom3 + 1), StrFormat) + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom3), StrFormat) + End If + If _TestoMin = True Then + + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom4 + 1), StrFormat) + grPhoto.DrawString(TestoFirmav, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom4), StrFormat) + + End If + Else + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat) + grPhoto.DrawString(TestoFirma, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat) + + + End If + End If + + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileBig2 = NomeFileBig + NomeFileBig = NomeFileBig.Substring(0, NomeFileBig.Length - 4) & Codice & NomeFileBig.Substring(NomeFileBig.Length - 4) + End If + End Sub + + Private Sub aggiungiLogo(imgOutputBig As Bitmap) + 'imgOutputBig + If _LogoAggiungi = True And File.Exists(_LogoNomeFile) Then + + Dim ImmagineLogo As Image = Image.FromFile(_LogoNomeFile) + + Dim LogoColoreTrasparente As Color = Color.White + 'Dim bmWatermark As Bitmap + + '* Create a Bitmap based on the previously modified photograph Bitmap + 'bmWatermark = New Bitmap(imgOutputBig) + 'bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution) + + '* Load this Bitmap into a new Graphic Object + Dim grWatermark As Graphics = Graphics.FromImage(imgOutputBig) + + '* To achieve a transulcent watermark we will apply (2) color manipulations + Dim imageAttributes As Imaging.ImageAttributes = New Imaging.ImageAttributes + + '* The first step replace the background color with one that is trasparent (Alpha=0, R=0, G=0, B=0) + Dim colorMap As Imaging.ColorMap = New Imaging.ColorMap + + '* background this will be the color we search for and replace with transparency + colorMap.OldColor = LogoColoreTrasparente + colorMap.NewColor = Color.FromArgb(0, 0, 0, 0) + + Dim remapTable As Imaging.ColorMap() = {colorMap} + imageAttributes.SetRemapTable(remapTable, Imaging.ColorAdjustType.Bitmap) + + '* The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f + Dim colorMatrixElements As Single()() = {New Single() {1.0F, 0.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 1.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 1.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, CType(_LogoTrasparenza, Single) / 100, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, 0.0F, 1.0F}} + Dim wmColorMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(colorMatrixElements) + imageAttributes.SetColorMatrix(wmColorMatrix, Imaging.ColorMatrixFlag.Default, Imaging.ColorAdjustType.Bitmap) + + Dim FotoLogoH As Integer = _LogoAltezza + Dim FotoLogoW As Integer = _LogoLarghezza + Dim FattoreAlt As Double = ImmagineLogo.Height / FotoLogoH + Dim FattoreLarg As Double = ImmagineLogo.Width / FotoLogoW + Dim NuovaSize As Size + If FattoreLarg > FattoreAlt Then + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza") + Else + NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza") + End If + + Dim MargineUsato As Integer + Dim MargineL As Integer + Dim InPercentualeL As Boolean + If _LogoMargine.EndsWith("%") = True Then + InPercentualeL = True + Else + InPercentualeL = False + End If + MargineL = CType(Val(_LogoMargine), Integer) + If InPercentualeL = True Then + MargineUsato = CType(imgOutputBig.Height * MargineL / 100, Integer) + Else + MargineUsato = MargineL + End If + + Dim xPosOfWm As Integer + Dim yPosOfWm As Integer + Select Case _LogoPosizioneH.ToUpper + Case "SINISTRA", "NESSUNA" + xPosOfWm = MargineUsato + + Case "CENTRO" + xPosOfWm = CType((imgOutputBig.Width - NuovaSize.Width) / 2, Integer) + + Case "DESTRA" + xPosOfWm = ((imgOutputBig.Width - NuovaSize.Width) - MargineUsato) + End Select + Select Case _LogoPosizioneV.ToUpper + Case "ALTO", "NESSUNA" + yPosOfWm = MargineUsato + + Case "CENTRO" + yPosOfWm = CType((imgOutputBig.Height - NuovaSize.Height) / 2, Integer) + + Case "BASSO" + yPosOfWm = ((imgOutputBig.Height - NuovaSize.Height) - MargineUsato) + End Select + + grWatermark.DrawImage(ImmagineLogo, New Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes) + grWatermark.Dispose() + End If + End Sub + + + Private Sub salvaFoto(imgOutputBig As Bitmap, thumbSizeBig As Size, NomeFileBig As String, NomeFileSmall As String, thumbSizeSmall As Size) + + If _FotoGrandeDimOrigina = False Then + 'attenzione non controlla se è png + 'imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig, Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), jpegQuality) + + Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + If g2.Width > g2.Height Then + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _LarghezzaBig, "Larghezza") + Else + thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _AltezzaBig, "Altezza") + End If + Dim imgOutputBig2 As New Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height) + 'imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig2, Path.Combine(_DestDir.FullName, NomeFileBig), jpegQuality) + 'imgOutputBig2.Dispose() + 'imgOutputBig.Dispose() + g2.Dispose() + Else + 'imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat) + salvaImmagineCustomQuality(imgOutputBig, Path.Combine(_DestDir.FullName, NomeFileBig), jpegQuality) + imgOutputBig.Dispose() + End If + + + If _CreaMiniature Then + If _AggiungiScritteMiniature = True Then + Dim g1 As System.Drawing.Image + If _FotoGrandeDimOrigina = False Then + g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + Else + g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, NomeFileBig)) + End If + Dim imgOutputSmall As New Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height) + If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then + NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4) + End If + 'imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat) + salvaImmagineCustomQuality(imgOutputSmall, Path.Combine(_DestDir.FullName, NomeFileSmall), jpegQualityMin) + 'imgOutputSmall.Dispose() + g1.Dispose() + End If + + + + End If + + If File.Exists(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) = True Then + Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) + End If + + + End Sub + + Private Sub salvaImmagineCustomQuality(imageToSave As Bitmap, nomeFileFinale As String, quality As Long) + + Dim JgpEncoder As ImageCodecInfo = GetEncoder(ImageFormat.Jpeg) + Dim MyEncoder As Encoder = Encoder.Quality + + Dim MyEncoderParameters As New EncoderParameters(1) + + Dim MyEncoderParameter As New EncoderParameter(MyEncoder, jpegQuality) + MyEncoderParameters.Param(0) = MyEncoderParameter + imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters) + imageToSave.Dispose() + End Sub + + + + Private Function GetEncoder(ByVal format As ImageFormat) As ImageCodecInfo + + Dim codecs As ImageCodecInfo() = ImageCodecInfo.GetImageDecoders() + + Dim codec As ImageCodecInfo + For Each codec In codecs + If codec.FormatID = format.Guid Then + Return codec + End If + Next codec + Return Nothing + + End Function + + + + + + + ''' + ''' Calculate the Size of the New image + ''' + ''' Larghezza + ''' Altezza + ''' + ''' + ''' + ''' + Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size + ' e + '*** Larghezza, Altezza, Auto + + Dim tempMultiplier As Double + + If TipoSize.ToUpper = "Larghezza".ToUpper Then + tempMultiplier = MaxPixel / currentwidth + ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then + tempMultiplier = MaxPixel / currentheight + Else + If currentheight > currentwidth Then ' portrait + tempMultiplier = MaxPixel / currentheight + Else + tempMultiplier = MaxPixel / currentwidth + End If + End If + + Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier)) + + Return NewSize + End Function + + + + + Public Property DirectorySorgente() As String + Get + Return _DirectorySorgente + End Get + Set(ByVal value As String) + _DirectorySorgente = value + End Set + End Property + + Public Property DirectoryDestinazione() As String + Get + Return _DirectoryDestinazione + End Get + Set(ByVal value As String) + _DirectoryDestinazione = value + End Set + End Property + + + Public Property SourceDir() As DirectoryInfo + Get + Return _SourceDir + End Get + Set(ByVal value As DirectoryInfo) + _SourceDir = value + End Set + End Property + + Public Property DestDirStart() As DirectoryInfo + Get + Return _DestDirStart + End Get + Set(ByVal value As DirectoryInfo) + _DestDirStart = value + End Set + End Property + + + + Public Property TestoFirmaStart() As String + Get + Return _TestoFirmaStart + End Get + Set(ByVal value As String) + _TestoFirmaStart = value + End Set + End Property + + Public Property TestoFirmaStartV() As String + Get + Return _TestoFirmaStartV + End Get + + Set(ByVal value As String) + _TestoFirmaStartV = value + End Set + End Property + + Public Property DataPartenza() As DateTime + Get + Return _DataPartenza + End Get + Set(ByVal value As DateTime) + _DataPartenza = value + End Set + End Property + + Public Property TestoOrario() As String + Get + Return _TestoOrario + End Get + Set(ByVal value As String) + _TestoOrario = value + End Set + End Property + + Public Property DimStandard() As Integer + Get + Return _DimStandard + End Get + Set(ByVal value As Integer) + _DimStandard = value + End Set + End Property + + Public Property DimStandardMiniatura() As Integer + Get + Return _DimStandardMiniatura + End Get + Set(ByVal value As Integer) + _DimStandardMiniatura = value + End Set + End Property + + Public Property NomeData() As Boolean + Get + Return _NomeData + End Get + Set(ByVal value As Boolean) + _NomeData = value + End Set + End Property + + Public Property TestoNome() As Boolean + Get + Return _TestoNome + End Get + Set(ByVal value As Boolean) + _TestoNome = value + End Set + End Property + + Public Property UsaOrarioMiniatura() As Boolean + Get + Return _UsaOrarioMiniatura + End Get + Set(ByVal value As Boolean) + _UsaOrarioMiniatura = value + End Set + End Property + + Public Property UsaOrarioTestoApplicare() As Boolean + Get + Return _UsaOrarioTestoApplicare + End Get + Set(ByVal value As Boolean) + _UsaOrarioTestoApplicare = value + End Set + End Property + + Public Property UsaTempoGaraTestoApplicare() As Boolean + Get + Return _UsaTempoGaraTestoApplicare + End Get + Set(ByVal value As Boolean) + _UsaTempoGaraTestoApplicare = value + End Set + End Property + + Public Property UsaRotazioneAutomatica() As Boolean + Get + Return _UsaRotazioneAutomatica + End Get + Set(ByVal value As Boolean) + _UsaRotazioneAutomatica = value + End Set + End Property + + Public Property UsaForzaJpg() As Boolean + Get + Return _UsaForzaJpg + End Get + Set(ByVal value As Boolean) + _UsaForzaJpg = value + End Set + End Property + + + + Public Property LarghezzaSmall() As Integer + Get + Return _LarghezzaSmall + End Get + Set(ByVal value As Integer) + _LarghezzaSmall = value + End Set + End Property + + Public Property AltezzaSmall() As Integer + Get + Return _AltezzaSmall + End Get + Set(ByVal value As Integer) + _AltezzaSmall = value + End Set + End Property + + + Public Property CreaMiniature() As Boolean + Get + Return _CreaMiniature + End Get + Set(ByVal value As Boolean) + _CreaMiniature = value + End Set + End Property + + Public Property AggiungiScritteMiniature() As Boolean + Get + Return _AggiungiScritteMiniature + End Get + Set(ByVal value As Boolean) + _AggiungiScritteMiniature = value + End Set + End Property + + Public Property NomeFileChild() As String + Get + Return _NomeFileChild + End Get + Set(ByVal value As String) + _NomeFileChild = value + End Set + End Property + + Public Property Suffisso() As String + Get + Return _Suffisso + End Get + Set(ByVal value As String) + _Suffisso = value + End Set + End Property + + Public Property Codice() As String + Get + Return _Codice + End Get + Set(ByVal value As String) + _Codice = value + End Set + End Property + + + Public Property Trasparenza() As Integer + Get + Return _Trasparenza + End Get + Set(ByVal value As Integer) + _Trasparenza = value + End Set + End Property + + Public Property IlFont() As String + Get + Return _IlFont + End Get + Set(ByVal value As String) + _IlFont = value + End Set + End Property + + Public Property Grassetto() As Boolean + Get + Return _Grassetto + End Get + Set(ByVal value As Boolean) + _Grassetto = value + End Set + End Property + + Public Property Posizione() As String + Get + Return _Posizione + End Get + Set(ByVal value As String) + _Posizione = value + End Set + End Property + + Public Property Allineamento() As String + Get + Return _Allineamento + End Get + Set(ByVal value As String) + _Allineamento = value + End Set + End Property + + Public Property Margine() As Integer + Get + Return _Margine + End Get + Set(ByVal value As Integer) + _Margine = value + End Set + End Property + + Public Property LogoAltezza() As Integer + Get + Return _LogoAltezza + End Get + Set(ByVal value As Integer) + _LogoAltezza = value + End Set + End Property + + Public Property LogoLarghezza() As Integer + Get + Return _LogoLarghezza + End Get + Set(ByVal value As Integer) + _LogoLarghezza = value + End Set + End Property + + Public Property FontColoreR() As Integer + Get + Return _FontColoreR + End Get + Set(ByVal value As Integer) + _FontColoreR = value + End Set + End Property + + Public Property FontColoreG() As Integer + Get + Return _FontColoreG + End Get + Set(ByVal value As Integer) + _FontColoreG = value + End Set + End Property + + Public Property FontColoreB() As Integer + Get + Return _FontColoreB + End Get + Set(ByVal value As Integer) + _FontColoreB = value + End Set + End Property + + Public Property fontColoreRGB() As Color + Get + Return _fontColoreRGB + End Get + Set(ByVal value As Color) + _fontColoreRGB = value + End Set + End Property + + Public Property LogoAggiungi() As Boolean + Get + Return _LogoAggiungi + End Get + Set(ByVal value As Boolean) + _LogoAggiungi = value + End Set + End Property + + Public Property LogoNomeFile() As String + Get + Return _LogoNomeFile + End Get + Set(ByVal value As String) + _LogoNomeFile = value + End Set + End Property + + Public Property LogoTrasparenza() As String + Get + Return _LogoTrasparenza + End Get + Set(ByVal value As String) + _LogoTrasparenza = value + End Set + End Property + + Public Property LogoMargine() As String + Get + Return _LogoMargine + End Get + Set(ByVal value As String) + _LogoMargine = value + End Set + End Property + + Public Property LogoPosizioneH() As String + Get + Return _LogoPosizioneH + End Get + Set(ByVal value As String) + _LogoPosizioneH = value + End Set + End Property + + Public Property LogoPosizioneV() As String + Get + Return _LogoPosizioneV + End Get + Set(ByVal value As String) + _LogoPosizioneV = value + End Set + End Property + + Public Property FotoGrandeDimOrigina() As Boolean + Get + Return _FotoGrandeDimOrigina + End Get + Set(ByVal value As Boolean) + _FotoGrandeDimOrigina = value + End Set + End Property + + Public Property AltezzaBig() As Integer + Get + Return _AltezzaBig + End Get + Set(ByVal value As Integer) + _AltezzaBig = value + End Set + End Property + + Public Property LarghezzaBig() As Integer + Get + Return _LarghezzaBig + End Get + Set(ByVal value As Integer) + _LarghezzaBig = value + End Set + End Property + + Public Property DestDir() As DirectoryInfo + Get + Return _DestDir + End Get + Set(ByVal value As DirectoryInfo) + _DestDir = value + End Set + End Property + + Public Property DimVert() As Integer + Get + Return _DimVert + + End Get + Set(ByVal value As Integer) + _DimVert = value + + End Set + End Property + + Public Property MargVert() As Integer + Get + Return _MargVert + + End Get + Set(ByVal value As Integer) + _MargVert = value + End Set + End Property + + Public Property TestoMin() As Boolean + Get + Return _TestoMin + + End Get + Set(ByVal value As Boolean) + _TestoMin = value + + End Set + End Property + + Public Property DimMin() As Integer + Get + Return _DimMin + + End Get + Set(ByVal value As Integer) + _DimMin = value + + End Set + End Property + + Public Property SecretDefault() As Boolean + Get + Return _SecretDefault + + End Get + Set(ByVal value As Boolean) + _SecretDefault = value + + End Set + End Property + + Public Property SecretBig() As Boolean + Get + Return _SecretBig + + End Get + Set(ByVal value As Boolean) + _SecretBig = value + + End Set + End Property + + Public Property SecretSmall() As Boolean + Get + Return _SecretSmall + + End Get + Set(ByVal value As Boolean) + _SecretSmall = value + + End Set + End Property + + Public Property SecretPathSmall() As String + Get + Return _SecretPathSmall + + End Get + Set(ByVal value As String) + _SecretPathSmall = value + + End Set + End Property + + Public Property SecretPathBig() As String + Get + Return _SecretPathBig + + End Get + Set(ByVal value As String) + _SecretPathBig = value + + End Set + End Property + + Public Property AggTempoGaraMin() As Boolean + Get + Return _AggTempoGaraMin + + End Get + Set(ByVal value As Boolean) + _AggTempoGaraMin = value + + End Set + End Property + + Public Property AggNumTempMin() As Boolean + Get + Return _AggNumTempMin + + End Get + Set(ByVal value As Boolean) + _AggNumTempMin = value + + End Set + End Property + + Public Property jpegQuality() As Long + Get + Return _jpegQuality + End Get + Set(ByVal value As Long) + _jpegQuality = value + End Set + + End Property + + Public Property jpegQualityMin() As Long + Get + Return _jpegQualityMin + End Get + Set(ByVal value As Long) + _jpegQualityMin = value + End Set + + End Property + +End Class diff --git a/imagecatalog.backup/ExifReader.cs b/imagecatalog.backup/ExifReader.cs new file mode 100644 index 0000000..97005ca --- /dev/null +++ b/imagecatalog.backup/ExifReader.cs @@ -0,0 +1,1190 @@ +/// ----------------------------------------------------------------------------- +/// +/// Utility class for reading EXIF data from images. Provides abstraction +/// for most common data and generic utilities for work with all other. +/// +/// +/// Copyright (c) Michal A. Valášek - Altair Communications, 2003 +/// Copmany: http://software.altaircom.net * support@altaircom.net +/// Private: http://www.rider.cz * developer@rider.cz +/// This is free software licensed under GNU Lesser General Public License +/// +/// +/// [altair] 10.9.2003 Created +/// +/// ----------------------------------------------------------------------------- +using System; +using System.Drawing; +using Microsoft.VisualBasic; +using Microsoft.VisualBasic.CompilerServices; + +namespace ImageCatalog +{ + public class ExifReader : IDisposable + { + private Bitmap Image; + + /// ----------------------------------------------------------------------------- + /// + /// Contains possible values of EXIF tag names (ID) + /// + /// See GdiPlusImaging.h + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum TagNames + { + ExifIFD = 0x8769, + GpsIFD = 0x8825, + NewSubfileType = 0xFE, + SubfileType = 0xFF, + ImageWidth = 0x100, + ImageHeight = 0x101, + BitsPerSample = 0x102, + Compression = 0x103, + PhotometricInterp = 0x106, + ThreshHolding = 0x107, + CellWidth = 0x108, + CellHeight = 0x109, + FillOrder = 0x10A, + DocumentName = 0x10D, + ImageDescription = 0x10E, + EquipMake = 0x10F, + EquipModel = 0x110, + StripOffsets = 0x111, + Orientation = 0x112, + SamplesPerPixel = 0x115, + RowsPerStrip = 0x116, + StripBytesCount = 0x117, + MinSampleValue = 0x118, + MaxSampleValue = 0x119, + XResolution = 0x11A, + YResolution = 0x11B, + PlanarConfig = 0x11C, + PageName = 0x11D, + XPosition = 0x11E, + YPosition = 0x11F, + FreeOffset = 0x120, + FreeByteCounts = 0x121, + GrayResponseUnit = 0x122, + GrayResponseCurve = 0x123, + T4Option = 0x124, + T6Option = 0x125, + ResolutionUnit = 0x128, + PageNumber = 0x129, + TransferFuncition = 0x12D, + SoftwareUsed = 0x131, + DateTime = 0x132, + Artist = 0x13B, + HostComputer = 0x13C, + Predictor = 0x13D, + WhitePoint = 0x13E, + PrimaryChromaticities = 0x13F, + ColorMap = 0x140, + HalftoneHints = 0x141, + TileWidth = 0x142, + TileLength = 0x143, + TileOffset = 0x144, + TileByteCounts = 0x145, + InkSet = 0x14C, + InkNames = 0x14D, + NumberOfInks = 0x14E, + DotRange = 0x150, + TargetPrinter = 0x151, + ExtraSamples = 0x152, + SampleFormat = 0x153, + SMinSampleValue = 0x154, + SMaxSampleValue = 0x155, + TransferRange = 0x156, + JPEGProc = 0x200, + JPEGInterFormat = 0x201, + JPEGInterLength = 0x202, + JPEGRestartInterval = 0x203, + JPEGLosslessPredictors = 0x205, + JPEGPointTransforms = 0x206, + JPEGQTables = 0x207, + JPEGDCTables = 0x208, + JPEGACTables = 0x209, + YCbCrCoefficients = 0x211, + YCbCrSubsampling = 0x212, + YCbCrPositioning = 0x213, + REFBlackWhite = 0x214, + ICCProfile = 0x8773, + Gamma = 0x301, + ICCProfileDescriptor = 0x302, + SRGBRenderingIntent = 0x303, + ImageTitle = 0x320, + Copyright = 0x8298, + ResolutionXUnit = 0x5001, + ResolutionYUnit = 0x5002, + ResolutionXLengthUnit = 0x5003, + ResolutionYLengthUnit = 0x5004, + PrintFlags = 0x5005, + PrintFlagsVersion = 0x5006, + PrintFlagsCrop = 0x5007, + PrintFlagsBleedWidth = 0x5008, + PrintFlagsBleedWidthScale = 0x5009, + HalftoneLPI = 0x500A, + HalftoneLPIUnit = 0x500B, + HalftoneDegree = 0x500C, + HalftoneShape = 0x500D, + HalftoneMisc = 0x500E, + HalftoneScreen = 0x500F, + JPEGQuality = 0x5010, + GridSize = 0x5011, + ThumbnailFormat = 0x5012, + ThumbnailWidth = 0x5013, + ThumbnailHeight = 0x5014, + ThumbnailColorDepth = 0x5015, + ThumbnailPlanes = 0x5016, + ThumbnailRawBytes = 0x5017, + ThumbnailSize = 0x5018, + ThumbnailCompressedSize = 0x5019, + ColorTransferFunction = 0x501A, + ThumbnailData = 0x501B, + ThumbnailImageWidth = 0x5020, + ThumbnailImageHeight = 0x502, + ThumbnailBitsPerSample = 0x5022, + ThumbnailCompression = 0x5023, + ThumbnailPhotometricInterp = 0x5024, + ThumbnailImageDescription = 0x5025, + ThumbnailEquipMake = 0x5026, + ThumbnailEquipModel = 0x5027, + ThumbnailStripOffsets = 0x5028, + ThumbnailOrientation = 0x5029, + ThumbnailSamplesPerPixel = 0x502A, + ThumbnailRowsPerStrip = 0x502B, + ThumbnailStripBytesCount = 0x502C, + ThumbnailResolutionX = 0x502D, + ThumbnailResolutionY = 0x502E, + ThumbnailPlanarConfig = 0x502F, + ThumbnailResolutionUnit = 0x5030, + ThumbnailTransferFunction = 0x5031, + ThumbnailSoftwareUsed = 0x5032, + ThumbnailDateTime = 0x5033, + ThumbnailArtist = 0x5034, + ThumbnailWhitePoint = 0x5035, + ThumbnailPrimaryChromaticities = 0x5036, + ThumbnailYCbCrCoefficients = 0x5037, + ThumbnailYCbCrSubsampling = 0x5038, + ThumbnailYCbCrPositioning = 0x5039, + ThumbnailRefBlackWhite = 0x503A, + ThumbnailCopyRight = 0x503B, + LuminanceTable = 0x5090, + ChrominanceTable = 0x5091, + FrameDelay = 0x5100, + LoopCount = 0x5101, + PixelUnit = 0x5110, + PixelPerUnitX = 0x5111, + PixelPerUnitY = 0x5112, + PaletteHistogram = 0x5113, + ExifExposureTime = 0x829A, + ExifFNumber = 0x829D, + ExifExposureProg = 0x8822, + ExifSpectralSense = 0x8824, + ExifISOSpeed = 0x8827, + ExifOECF = 0x8828, + ExifVer = 0x9000, + ExifDTOrig = 0x9003, + ExifDTDigitized = 0x9004, + ExifCompConfig = 0x9101, + ExifCompBPP = 0x9102, + ExifShutterSpeed = 0x9201, + ExifAperture = 0x9202, + ExifBrightness = 0x9203, + ExifExposureBias = 0x9204, + ExifMaxAperture = 0x9205, + ExifSubjectDist = 0x9206, + ExifMeteringMode = 0x9207, + ExifLightSource = 0x9208, + ExifFlash = 0x9209, + ExifFocalLength = 0x920A, + ExifMakerNote = 0x927C, + ExifUserComment = 0x9286, + ExifDTSubsec = 0x9290, + ExifDTOrigSS = 0x9291, + ExifDTDigSS = 0x9292, + ExifFPXVer = 0xA000, + ExifColorSpace = 0xA001, + ExifPixXDim = 0xA002, + ExifPixYDim = 0xA003, + ExifRelatedWav = 0xA004, + ExifInterop = 0xA005, + ExifFlashEnergy = 0xA20B, + ExifSpatialFR = 0xA20C, + ExifFocalXRes = 0xA20E, + ExifFocalYRes = 0xA20F, + ExifFocalResUnit = 0xA210, + ExifSubjectLoc = 0xA214, + ExifExposureIndex = 0xA215, + ExifSensingMethod = 0xA217, + ExifFileSource = 0xA300, + ExifSceneType = 0xA301, + ExifCfaPattern = 0xA302, + GpsVer = 0x0, + GpsLatitudeRef = 0x1, + GpsLatitude = 0x2, + GpsLongitudeRef = 0x3, + GpsLongitude = 0x4, + GpsAltitudeRef = 0x5, + GpsAltitude = 0x6, + GpsGpsTime = 0x7, + GpsGpsSatellites = 0x8, + GpsGpsStatus = 0x9, + GpsGpsMeasureMode = 0xA, + GpsGpsDop = 0xB, + GpsSpeedRef = 0xC, + GpsSpeed = 0xD, + GpsTrackRef = 0xE, + GpsTrack = 0xF, + GpsImgDirRef = 0x10, + GpsImgDir = 0x11, + GpsMapDatum = 0x12, + GpsDestLatRef = 0x13, + GpsDestLat = 0x14, + GpsDestLongRef = 0x15, + GpsDestLong = 0x16, + GpsDestBearRef = 0x17, + GpsDestBear = 0x18, + GpsDestDistRef = 0x19, + GpsDestDist = 0x1A + } + + /// ----------------------------------------------------------------------------- + /// + /// Real position of 0th row and column of picture + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum Orientations + { + TopLeft = 1, + TopRight = 2, + BottomRight = 3, + BottomLeft = 4, + LeftTop = 5, + RightTop = 6, + RightBottom = 7, + LftBottom = 8 + } + + /// ----------------------------------------------------------------------------- + /// + /// Exposure programs + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum ExposurePrograms + { + Manual = 1, + Normal = 2, + AperturePriority = 3, + ShutterPriority = 4, + Creative = 5, + Action = 6, + Portrait = 7, + Landscape = 8 + } + + /// ----------------------------------------------------------------------------- + /// + /// Exposure metering modes + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum ExposureMeteringModes + { + Unknown = 0, + Average = 1, + CenterWeightedAverage = 2, + Spot = 3, + MultiSpot = 4, + MultiSegment = 5, + Partial = 6, + Other = 255 + } + + /// ----------------------------------------------------------------------------- + /// + /// Flash activity modes + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum FlashModes + { + NotFired = 0, + Fired = 1, + FiredButNoStrobeReturned = 5, + FiredAndStrobeReturned = 7 + } + + /// ----------------------------------------------------------------------------- + /// + /// Possible light sources (white balance) + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public enum LightSources + { + Unknown = 0, + Daylight = 1, + Fluorescent = 2, + Tungsten = 3, + Flash = 10, + StandardLightA = 17, + StandardLightB = 18, + StandardLightC = 19, + D55 = 20, + D65 = 21, + D75 = 22, + Other = 255 + } + + /// ----------------------------------------------------------------------------- + /// + /// Represents rational which is type of some Exif properties + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public struct Rational + { + public int Numerator; + public int Denominator; + + /// ----------------------------------------------------------------------------- + /// + /// Converts rational to string representation + /// + /// Optional, default "/". String to be used as delimiter of components. + /// String representation of the rational. + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public new string ToString(string Delimiter = "/") + { + return Numerator + Delimiter + Denominator; + } + + /// ----------------------------------------------------------------------------- + /// + /// Converts rational to double precision real number + /// + /// The rational as double precision real number. + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double ToDouble() + { + return Numerator / (double)Denominator; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Initializes new instance of this class. + /// + /// Bitmap to read exif information from + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public ExifReader(Bitmap Bitmap) + { + if (Bitmap is null) + throw new ArgumentNullException("Bitmap"); + Image = Bitmap; + } + + /// ----------------------------------------------------------------------------- + /// + /// Returns all available data in formatted string form + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public override string ToString() + { + var SB = new System.Text.StringBuilder(); + SB.Append("Image:"); + SB.Append(@"\n\tDimensions: " + Width + " x " + Height + " px"); + SB.Append(@"\n\tResolution: " + ResolutionX + " x " + ResolutionY + " dpi"); + SB.Append(@"\n\tOrientation: " + Enum.GetName(typeof(Orientations), Orientation)); + SB.Append(@"\n\tTitle: " + Title); + SB.Append(@"\n\tDescription: " + Description); + SB.Append(@"\n\tCopyright: " + Copyright); + SB.Append(@"\nEquipment:"); + SB.Append(@"\n\tMaker: " + EquipmentMaker); + SB.Append(@"\n\tModel: " + EquipmentModel); + SB.Append(@"\n\tSoftware: " + Software); + SB.Append(@"\nDate and time:"); + SB.Append(@"\n\tGeneral: " + DateTimeLastModified.ToString()); + SB.Append(@"\n\tOriginal: " + DateTimeOriginal.ToString()); + SB.Append(@"\n\tDigitized: " + DateTimeDigitized.ToString()); + SB.Append(@"\nShooting conditions:"); + SB.Append(@"\n\tExposure time: " + ExposureTime.ToString("N4") + " s"); + SB.Append(@"\n\tExposure program: " + Enum.GetName(typeof(ExposurePrograms), ExposureProgram)); + SB.Append(@"\n\tExposure mode: " + Enum.GetName(typeof(ExposureMeteringModes), ExposureMeteringMode)); + SB.Append(@"\n\tAperture: F" + Aperture.ToString("N2")); + SB.Append(@"\n\tISO sensitivity: " + ISO); + SB.Append(@"\n\tSubject distance: " + SubjectDistance.ToString("N2") + " m"); + SB.Append(@"\n\tFocal length: " + FocalLength); + SB.Append(@"\n\tFlash: " + Enum.GetName(typeof(FlashModes), FlashMode)); + SB.Append(@"\n\tLight source (WB): " + Enum.GetName(typeof(LightSources), LightSource)); + SB.Append(@"\n\nCopyright (c) Michal A. Valasek - Altair Communications, 2003"); + SB.Append(@"\nhttp://software.altaircom.net * support@altaircom.net"); + SB.Replace(@"\n", Constants.vbCrLf); + SB.Replace(@"\t", Constants.vbTab); + return SB.ToString(); + } + + /// ----------------------------------------------------------------------------- + /// + /// Brand of equipment (EXIF EquipMake) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string EquipmentMaker + { + get + { + return GetPropertyString((int)TagNames.EquipMake); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Model of equipment (EXIF EquipModel) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string EquipmentModel + { + get + { + return GetPropertyString((int)TagNames.EquipModel); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Software used for processing (EXIF Software) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string Software + { + get + { + return GetPropertyString((int)TagNames.SoftwareUsed); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Orientation of image (position of row 0, column 0) (EXIF Orientation) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public Orientations Orientation + { + get + { + int X = GetPropertyInt16((int)TagNames.Orientation); + if (!Enum.IsDefined(typeof(Orientations), X)) + { + return Orientations.TopLeft; + } + else + { + return (Orientations)Conversions.ToInteger(Enum.Parse(typeof(Orientations), Enum.GetName(typeof(Orientations), X))); + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Time when image was last modified (EXIF DateTime). + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public DateTime DateTimeLastModified + { + get + { + try + { + return DateTime.ParseExact(GetPropertyString((int)TagNames.DateTime), @"yyyy\:MM\:dd HH\:mm\:ss", null); + } + catch (Exception ex) + { + return DateTime.MinValue; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Time when image was taken (EXIF DateTimeOriginal). + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public DateTime DateTimeOriginal + { + get + { + try + { + return DateTime.ParseExact(GetPropertyString((int)TagNames.ExifDTOrig), @"yyyy\:MM\:dd HH\:mm\:ss", null); + } + catch (Exception ex) + { + return DateTime.MinValue; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Time when image was digitized (EXIF DateTimeDigitized). + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public DateTime DateTimeDigitized + { + get + { + try + { + return DateTime.ParseExact(GetPropertyString((int)TagNames.ExifDTDigitized), @"yyyy\:MM\:dd HH\:mm\:ss", null); + } + catch (Exception ex) + { + return DateTime.MinValue; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Image width + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public short Width + { + get + { + return GetPropertyInt16((int)TagNames.ImageWidth); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Image height + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public short Height + { + get + { + return GetPropertyInt16((int)TagNames.ImageHeight); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// X resolution in dpi (EXIF XResolution/ResolutionUnit) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double ResolutionX + { + get + { + double R = GetPropertyRational((int)TagNames.XResolution).ToDouble(); + if (GetPropertyInt16((int)TagNames.ResolutionUnit) == 3) + { + // -- resolution is in points/cm + return R * 2.54d; + } + else + { + // -- resolution is in points/inch + return R; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Y resolution in dpi (EXIF YResolution/ResolutionUnit) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double ResolutionY + { + get + { + double R = GetPropertyRational((int)TagNames.YResolution).ToDouble(); + if (GetPropertyInt16((int)TagNames.ResolutionUnit) == 3) + { + // -- resolution is in points/cm + return R * 2.54d; + } + else + { + // -- resolution is in points/inch + return R; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Image title (EXIF ImageTitle) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string Title + { + get + { + return GetPropertyString((int)TagNames.ImageTitle); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Image description (EXIF ImageDescription) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string Description + { + get + { + return GetPropertyString((int)TagNames.ImageDescription); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Image copyright (EXIF Copyright) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string Copyright + { + get + { + return GetPropertyString((int)TagNames.Copyright); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Exposure time in seconds (EXIF ExifExposureTime/ExifShutterSpeed) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double ExposureTime + { + get + { + if (IsPropertyDefined((int)TagNames.ExifExposureTime)) + { + // -- Exposure time is explicitly specified + return GetPropertyRational((int)TagNames.ExifExposureTime).ToDouble(); + } + else if (IsPropertyDefined((int)TagNames.ExifShutterSpeed)) + { + // -- Compute exposure time from shutter speed + return 1d / Math.Pow(2d, GetPropertyRational((int)TagNames.ExifShutterSpeed).ToDouble()); + } + else + { + // -- Can't figure out + return 0d; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Aperture value as F number (EXIF ExifFNumber/ExifApertureValue) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double Aperture + { + get + { + if (IsPropertyDefined((int)TagNames.ExifFNumber)) + { + return GetPropertyRational((int)TagNames.ExifFNumber).ToDouble(); + } + else if (IsPropertyDefined((int)TagNames.ExifAperture)) + { + return Math.Pow(Math.Sqrt(2d), GetPropertyRational((int)TagNames.ExifAperture).ToDouble()); + } + else + { + return 0d; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Exposure program used (EXIF ExifExposureProg) + /// + /// + /// If not specified, returns Normal (2) + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public ExposurePrograms ExposureProgram + { + get + { + int X = GetPropertyInt16((int)TagNames.ExifExposureProg); + if (Enum.IsDefined(typeof(ExposurePrograms), X)) + { + return (ExposurePrograms)Conversions.ToInteger(Enum.Parse(typeof(ExposurePrograms), Enum.GetName(typeof(ExposurePrograms), X))); + } + else + { + return ExposurePrograms.Normal; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// ISO sensitivity + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public short ISO + { + get + { + return GetPropertyInt16((int)TagNames.ExifISOSpeed); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Subject distance in meters (EXIF SubjectDistance) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double SubjectDistance + { + get + { + return GetPropertyRational((int)TagNames.ExifSubjectDist).ToDouble(); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Exposure method metering mode used (EXIF MeteringMode) + /// + /// + /// If not specified, returns Unknown (0) + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public ExposureMeteringModes ExposureMeteringMode + { + get + { + int X = GetPropertyInt16((int)TagNames.ExifMeteringMode); + if (Enum.IsDefined(typeof(ExposureMeteringModes), X)) + { + return (ExposureMeteringModes)Conversions.ToInteger(Enum.Parse(typeof(ExposureMeteringModes), Enum.GetName(typeof(ExposureMeteringModes), X))); + } + else + { + return ExposureMeteringModes.Unknown; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Focal length of lenses in mm (EXIF FocalLength) + /// + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public double FocalLength + { + get + { + return GetPropertyRational((int)TagNames.ExifFocalLength).ToDouble(); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Flash mode (EXIF Flash) + /// + /// + /// If not present, value NotFired (0) is returned + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public FlashModes FlashMode + { + get + { + int X = GetPropertyInt16((int)TagNames.ExifFlash); + if (Enum.IsDefined(typeof(FlashModes), X)) + { + return (FlashModes)Conversions.ToInteger(Enum.Parse(typeof(FlashModes), Enum.GetName(typeof(FlashModes), X))); + } + else + { + return FlashModes.NotFired; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Light source / white balance (EXIF LightSource) + /// + /// + /// If not specified, returns Unknown (0). + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public LightSources LightSource + { + get + { + int X = GetPropertyInt16((int)TagNames.ExifLightSource); + if (Enum.IsDefined(typeof(LightSources), X)) + { + return (LightSources)Conversions.ToInteger(Enum.Parse(typeof(LightSources), Enum.GetName(typeof(LightSources), X))); + } + else + { + return LightSources.Unknown; + } + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Checks if current image has specified certain property + /// + /// + /// True if image has specified property, False otherwise. + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public bool IsPropertyDefined(int PID) + { + return Array.IndexOf(Image.PropertyIdList, PID) > -1; + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets specified Int32 property + /// + /// Property ID + /// Optional, default 0. Default value returned if property is not present. + /// Value of property or DefaultValue if property is not present. + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public int GetPropertyInt32(int PID, int DefaultValue = 0) + { + if (IsPropertyDefined(PID)) + { + return GetInt32(Image.GetPropertyItem(PID).Value); + } + else + { + return DefaultValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets specified Int16 property + /// + /// Property ID + /// Optional, default 0. Default value returned if property is not present. + /// Value of property or DefaultValue if property is not present. + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public short GetPropertyInt16(int PID, short DefaultValue = 0) + { + if (IsPropertyDefined(PID)) + { + return GetInt16(Image.GetPropertyItem(PID).Value); + } + else + { + return DefaultValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets specified string property + /// + /// Property ID + /// Optional, default String.Empty. Default value returned if property is not present. + /// + /// Value of property or DefaultValue if property is not present. + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public string GetPropertyString(int PID, string DefaultValue = "") + { + if (IsPropertyDefined(PID)) + { + return GetString(Image.GetPropertyItem(PID).Value); + } + else + { + return DefaultValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets specified rational property + /// + /// Property ID + /// + /// Value of property or 0/1 if not present. + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public Rational GetPropertyRational(int PID) + { + if (IsPropertyDefined(PID)) + { + return GetRational(Image.GetPropertyItem(PID).Value); + } + else + { + Rational R; + R.Numerator = 0; + R.Denominator = 1; + return R; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Reads Int32 from EXIF bytearray. + /// + /// EXIF bytearray to process + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public static int GetInt32(byte[] B) + { + if (B.Length < 4) + throw new ArgumentException("Data too short (4 bytes expected)", "B"); + return B[3] << 24 | B[2] << 16 | B[1] << 8 | B[0]; + } + + /// ----------------------------------------------------------------------------- + /// + /// Reads Int16 from EXIF bytearray. + /// + /// EXIF bytearray to process + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public static short GetInt16(byte[] B) + { + if (B.Length < 2) + throw new ArgumentException("Data too short (2 bytes expected)", "B"); + return (short)(B[1] << 8 | B[0]); + } + + /// ----------------------------------------------------------------------------- + /// + /// Reads string from EXIF bytearray. + /// + /// EXIF bytearray to process + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public static string GetString(byte[] B) + { + string R = System.Text.Encoding.ASCII.GetString(B); + if (R.EndsWith(Constants.vbNullChar)) + R = R.Substring(0, R.Length - 1); + return R; + } + + /// ----------------------------------------------------------------------------- + /// + /// Reads rational from EXIF bytearray. + /// + /// EXIF bytearray to process + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public static Rational GetRational(byte[] B) + { + var R = new Rational(); + byte[] N = new byte[4], D = new byte[4]; + Array.Copy(B, 0, N, 0, 4); + Array.Copy(B, 4, D, 0, 4); + R.Denominator = GetInt32(D); + R.Numerator = GetInt32(N); + return R; + } + + /// ----------------------------------------------------------------------------- + /// + /// Disposes unmanaged resources of this class + /// + /// + /// + /// [altair] 10.9.2003 Created + /// + /// ----------------------------------------------------------------------------- + public void Dispose() + { + Image.Dispose(); + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/ExifReader.vb b/imagecatalog.backup/ExifReader.vb new file mode 100644 index 0000000..15a19bd --- /dev/null +++ b/imagecatalog.backup/ExifReader.vb @@ -0,0 +1,1068 @@ +'''----------------------------------------------------------------------------- +''' +''' Utility class for reading EXIF data from images. Provides abstraction +''' for most common data and generic utilities for work with all other. +''' +''' +''' Copyright (c) Michal A. Valášek - Altair Communications, 2003 +''' Copmany: http://software.altaircom.net * support@altaircom.net +''' Private: http://www.rider.cz * developer@rider.cz +''' This is free software licensed under GNU Lesser General Public License +''' +''' +''' [altair] 10.9.2003 Created +''' +'''----------------------------------------------------------------------------- +Public Class ExifReader + Implements IDisposable + + Private Image As System.Drawing.Bitmap + + '''----------------------------------------------------------------------------- + ''' + ''' Contains possible values of EXIF tag names (ID) + ''' + ''' See GdiPlusImaging.h + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum TagNames + ExifIFD = &H8769 + GpsIFD = &H8825 + NewSubfileType = &HFE + SubfileType = &HFF + ImageWidth = &H100 + ImageHeight = &H101 + BitsPerSample = &H102 + Compression = &H103 + PhotometricInterp = &H106 + ThreshHolding = &H107 + CellWidth = &H108 + CellHeight = &H109 + FillOrder = &H10A + DocumentName = &H10D + ImageDescription = &H10E + EquipMake = &H10F + EquipModel = &H110 + StripOffsets = &H111 + Orientation = &H112 + SamplesPerPixel = &H115 + RowsPerStrip = &H116 + StripBytesCount = &H117 + MinSampleValue = &H118 + MaxSampleValue = &H119 + XResolution = &H11A + YResolution = &H11B + PlanarConfig = &H11C + PageName = &H11D + XPosition = &H11E + YPosition = &H11F + FreeOffset = &H120 + FreeByteCounts = &H121 + GrayResponseUnit = &H122 + GrayResponseCurve = &H123 + T4Option = &H124 + T6Option = &H125 + ResolutionUnit = &H128 + PageNumber = &H129 + TransferFuncition = &H12D + SoftwareUsed = &H131 + DateTime = &H132 + Artist = &H13B + HostComputer = &H13C + Predictor = &H13D + WhitePoint = &H13E + PrimaryChromaticities = &H13F + ColorMap = &H140 + HalftoneHints = &H141 + TileWidth = &H142 + TileLength = &H143 + TileOffset = &H144 + TileByteCounts = &H145 + InkSet = &H14C + InkNames = &H14D + NumberOfInks = &H14E + DotRange = &H150 + TargetPrinter = &H151 + ExtraSamples = &H152 + SampleFormat = &H153 + SMinSampleValue = &H154 + SMaxSampleValue = &H155 + TransferRange = &H156 + JPEGProc = &H200 + JPEGInterFormat = &H201 + JPEGInterLength = &H202 + JPEGRestartInterval = &H203 + JPEGLosslessPredictors = &H205 + JPEGPointTransforms = &H206 + JPEGQTables = &H207 + JPEGDCTables = &H208 + JPEGACTables = &H209 + YCbCrCoefficients = &H211 + YCbCrSubsampling = &H212 + YCbCrPositioning = &H213 + REFBlackWhite = &H214 + ICCProfile = &H8773 + Gamma = &H301 + ICCProfileDescriptor = &H302 + SRGBRenderingIntent = &H303 + ImageTitle = &H320 + Copyright = &H8298 + ResolutionXUnit = &H5001 + ResolutionYUnit = &H5002 + ResolutionXLengthUnit = &H5003 + ResolutionYLengthUnit = &H5004 + PrintFlags = &H5005 + PrintFlagsVersion = &H5006 + PrintFlagsCrop = &H5007 + PrintFlagsBleedWidth = &H5008 + PrintFlagsBleedWidthScale = &H5009 + HalftoneLPI = &H500A + HalftoneLPIUnit = &H500B + HalftoneDegree = &H500C + HalftoneShape = &H500D + HalftoneMisc = &H500E + HalftoneScreen = &H500F + JPEGQuality = &H5010 + GridSize = &H5011 + ThumbnailFormat = &H5012 + ThumbnailWidth = &H5013 + ThumbnailHeight = &H5014 + ThumbnailColorDepth = &H5015 + ThumbnailPlanes = &H5016 + ThumbnailRawBytes = &H5017 + ThumbnailSize = &H5018 + ThumbnailCompressedSize = &H5019 + ColorTransferFunction = &H501A + ThumbnailData = &H501B + ThumbnailImageWidth = &H5020 + ThumbnailImageHeight = &H502 + ThumbnailBitsPerSample = &H5022 + ThumbnailCompression = &H5023 + ThumbnailPhotometricInterp = &H5024 + ThumbnailImageDescription = &H5025 + ThumbnailEquipMake = &H5026 + ThumbnailEquipModel = &H5027 + ThumbnailStripOffsets = &H5028 + ThumbnailOrientation = &H5029 + ThumbnailSamplesPerPixel = &H502A + ThumbnailRowsPerStrip = &H502B + ThumbnailStripBytesCount = &H502C + ThumbnailResolutionX = &H502D + ThumbnailResolutionY = &H502E + ThumbnailPlanarConfig = &H502F + ThumbnailResolutionUnit = &H5030 + ThumbnailTransferFunction = &H5031 + ThumbnailSoftwareUsed = &H5032 + ThumbnailDateTime = &H5033 + ThumbnailArtist = &H5034 + ThumbnailWhitePoint = &H5035 + ThumbnailPrimaryChromaticities = &H5036 + ThumbnailYCbCrCoefficients = &H5037 + ThumbnailYCbCrSubsampling = &H5038 + ThumbnailYCbCrPositioning = &H5039 + ThumbnailRefBlackWhite = &H503A + ThumbnailCopyRight = &H503B + LuminanceTable = &H5090 + ChrominanceTable = &H5091 + FrameDelay = &H5100 + LoopCount = &H5101 + PixelUnit = &H5110 + PixelPerUnitX = &H5111 + PixelPerUnitY = &H5112 + PaletteHistogram = &H5113 + ExifExposureTime = &H829A + ExifFNumber = &H829D + ExifExposureProg = &H8822 + ExifSpectralSense = &H8824 + ExifISOSpeed = &H8827 + ExifOECF = &H8828 + ExifVer = &H9000 + ExifDTOrig = &H9003 + ExifDTDigitized = &H9004 + ExifCompConfig = &H9101 + ExifCompBPP = &H9102 + ExifShutterSpeed = &H9201 + ExifAperture = &H9202 + ExifBrightness = &H9203 + ExifExposureBias = &H9204 + ExifMaxAperture = &H9205 + ExifSubjectDist = &H9206 + ExifMeteringMode = &H9207 + ExifLightSource = &H9208 + ExifFlash = &H9209 + ExifFocalLength = &H920A + ExifMakerNote = &H927C + ExifUserComment = &H9286 + ExifDTSubsec = &H9290 + ExifDTOrigSS = &H9291 + ExifDTDigSS = &H9292 + ExifFPXVer = &HA000 + ExifColorSpace = &HA001 + ExifPixXDim = &HA002 + ExifPixYDim = &HA003 + ExifRelatedWav = &HA004 + ExifInterop = &HA005 + ExifFlashEnergy = &HA20B + ExifSpatialFR = &HA20C + ExifFocalXRes = &HA20E + ExifFocalYRes = &HA20F + ExifFocalResUnit = &HA210 + ExifSubjectLoc = &HA214 + ExifExposureIndex = &HA215 + ExifSensingMethod = &HA217 + ExifFileSource = &HA300 + ExifSceneType = &HA301 + ExifCfaPattern = &HA302 + GpsVer = &H0 + GpsLatitudeRef = &H1 + GpsLatitude = &H2 + GpsLongitudeRef = &H3 + GpsLongitude = &H4 + GpsAltitudeRef = &H5 + GpsAltitude = &H6 + GpsGpsTime = &H7 + GpsGpsSatellites = &H8 + GpsGpsStatus = &H9 + GpsGpsMeasureMode = &HA + GpsGpsDop = &HB + GpsSpeedRef = &HC + GpsSpeed = &HD + GpsTrackRef = &HE + GpsTrack = &HF + GpsImgDirRef = &H10 + GpsImgDir = &H11 + GpsMapDatum = &H12 + GpsDestLatRef = &H13 + GpsDestLat = &H14 + GpsDestLongRef = &H15 + GpsDestLong = &H16 + GpsDestBearRef = &H17 + GpsDestBear = &H18 + GpsDestDistRef = &H19 + GpsDestDist = &H1A + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Real position of 0th row and column of picture + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum Orientations + TopLeft = 1 + TopRight = 2 + BottomRight = 3 + BottomLeft = 4 + LeftTop = 5 + RightTop = 6 + RightBottom = 7 + LftBottom = 8 + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Exposure programs + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum ExposurePrograms + Manual = 1 + Normal = 2 + AperturePriority = 3 + ShutterPriority = 4 + Creative = 5 + Action = 6 + Portrait = 7 + Landscape = 8 + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Exposure metering modes + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum ExposureMeteringModes + Unknown = 0 + Average = 1 + CenterWeightedAverage = 2 + Spot = 3 + MultiSpot = 4 + MultiSegment = 5 + [Partial] = 6 + Other = 255 + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Flash activity modes + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum FlashModes + NotFired = 0 + Fired = 1 + FiredButNoStrobeReturned = 5 + FiredAndStrobeReturned = 7 + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Possible light sources (white balance) + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Enum LightSources + Unknown = 0 + Daylight = 1 + Fluorescent = 2 + Tungsten = 3 + Flash = 10 + StandardLightA = 17 + StandardLightB = 18 + StandardLightC = 19 + D55 = 20 + D65 = 21 + D75 = 22 + Other = 255 + End Enum + + '''----------------------------------------------------------------------------- + ''' + ''' Represents rational which is type of some Exif properties + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Structure Rational + Dim Numerator As Int32 + Dim Denominator As Int32 + + '''----------------------------------------------------------------------------- + ''' + ''' Converts rational to string representation + ''' + ''' Optional, default "/". String to be used as delimiter of components. + ''' String representation of the rational. + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Shadows Function ToString(Optional ByVal Delimiter As String = "/") As String + Return Numerator & Delimiter & Denominator + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Converts rational to double precision real number + ''' + ''' The rational as double precision real number. + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Function ToDouble() As Double + Return Numerator / Denominator + End Function + End Structure + + '''----------------------------------------------------------------------------- + ''' + ''' Initializes new instance of this class. + ''' + ''' Bitmap to read exif information from + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Sub New(ByVal Bitmap As System.Drawing.Bitmap) + If Bitmap Is Nothing Then Throw New ArgumentNullException("Bitmap") + Me.Image = Bitmap + End Sub + + '''----------------------------------------------------------------------------- + ''' + ''' Returns all available data in formatted string form + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Overrides Function ToString() As String + Dim SB As New System.Text.StringBuilder + + SB.Append("Image:") + SB.Append("\n\tDimensions: " & Me.Width & " x " & Me.Height & " px") + SB.Append("\n\tResolution: " & Me.ResolutionX & " x " & Me.ResolutionY & " dpi") + SB.Append("\n\tOrientation: " & [Enum].GetName(GetType(Orientations), Me.Orientation)) + SB.Append("\n\tTitle: " & Me.Title) + SB.Append("\n\tDescription: " & Me.Description) + SB.Append("\n\tCopyright: " & Me.Copyright) + SB.Append("\nEquipment:") + SB.Append("\n\tMaker: " & Me.EquipmentMaker) + SB.Append("\n\tModel: " & Me.EquipmentModel) + SB.Append("\n\tSoftware: " & Me.Software) + SB.Append("\nDate and time:") + SB.Append("\n\tGeneral: " & Me.DateTimeLastModified.ToString()) + SB.Append("\n\tOriginal: " & Me.DateTimeOriginal.ToString()) + SB.Append("\n\tDigitized: " & Me.DateTimeDigitized.ToString()) + SB.Append("\nShooting conditions:") + SB.Append("\n\tExposure time: " & Me.ExposureTime.ToString("N4") & " s") + SB.Append("\n\tExposure program: " & [Enum].GetName(GetType(ExposurePrograms), Me.ExposureProgram)) + SB.Append("\n\tExposure mode: " & [Enum].GetName(GetType(ExposureMeteringModes), Me.ExposureMeteringMode)) + SB.Append("\n\tAperture: F" & Me.Aperture.ToString("N2")) + SB.Append("\n\tISO sensitivity: " & Me.ISO) + SB.Append("\n\tSubject distance: " & Me.SubjectDistance.ToString("N2") & " m") + SB.Append("\n\tFocal length: " & Me.FocalLength) + SB.Append("\n\tFlash: " & [Enum].GetName(GetType(FlashModes), Me.FlashMode)) + SB.Append("\n\tLight source (WB): " & [Enum].GetName(GetType(LightSources), Me.LightSource)) + SB.Append("\n\nCopyright (c) Michal A. Valasek - Altair Communications, 2003") + SB.Append("\nhttp://software.altaircom.net * support@altaircom.net") + + SB.Replace("\n", vbCrLf) + SB.Replace("\t", vbTab) + Return SB.ToString() + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Brand of equipment (EXIF EquipMake) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property EquipmentMaker() As String + Get + Return Me.GetPropertyString(TagNames.EquipMake) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Model of equipment (EXIF EquipModel) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property EquipmentModel() As String + Get + Return Me.GetPropertyString(TagNames.EquipModel) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Software used for processing (EXIF Software) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Software() As String + Get + Return Me.GetPropertyString(TagNames.SoftwareUsed) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Orientation of image (position of row 0, column 0) (EXIF Orientation) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Orientation() As Orientations + Get + Dim X As Int32 = Me.GetPropertyInt16(TagNames.Orientation) + + If Not [Enum].IsDefined(GetType(Orientations), X) Then + Return Orientations.TopLeft + Else + Return CType([Enum].Parse(GetType(Orientations), [Enum].GetName(GetType(Orientations), X)), Orientations) + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Time when image was last modified (EXIF DateTime). + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property DateTimeLastModified() As DateTime + Get + Try + Return DateTime.ParseExact(Me.GetPropertyString(TagNames.DateTime), "yyyy\:MM\:dd HH\:mm\:ss", Nothing) + Catch ex As Exception + Return DateTime.MinValue + End Try + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Time when image was taken (EXIF DateTimeOriginal). + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property DateTimeOriginal() As DateTime + Get + Try + Return DateTime.ParseExact(Me.GetPropertyString(TagNames.ExifDTOrig), "yyyy\:MM\:dd HH\:mm\:ss", Nothing) + Catch ex As Exception + Return DateTime.MinValue + End Try + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Time when image was digitized (EXIF DateTimeDigitized). + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property DateTimeDigitized() As DateTime + Get + Try + Return DateTime.ParseExact(Me.GetPropertyString(TagNames.ExifDTDigitized), "yyyy\:MM\:dd HH\:mm\:ss", Nothing) + Catch ex As Exception + Return DateTime.MinValue + End Try + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Image width + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Width() As Int16 + Get + Return Me.GetPropertyInt16(TagNames.ImageWidth) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Image height + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Height() As Int16 + Get + Return Me.GetPropertyInt16(TagNames.ImageHeight) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' X resolution in dpi (EXIF XResolution/ResolutionUnit) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ResolutionX() As Double + Get + Dim R As Double = Me.GetPropertyRational(TagNames.XResolution).ToDouble() + + If Me.GetPropertyInt16(TagNames.ResolutionUnit) = 3 Then + '-- resolution is in points/cm + Return R * 2.54 + Else + '-- resolution is in points/inch + Return R + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Y resolution in dpi (EXIF YResolution/ResolutionUnit) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ResolutionY() As Double + Get + Dim R As Double = Me.GetPropertyRational(TagNames.YResolution).ToDouble() + + If Me.GetPropertyInt16(TagNames.ResolutionUnit) = 3 Then + '-- resolution is in points/cm + Return R * 2.54 + Else + '-- resolution is in points/inch + Return R + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Image title (EXIF ImageTitle) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Title() As String + Get + Return Me.GetPropertyString(TagNames.ImageTitle) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Image description (EXIF ImageDescription) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Description() As String + Get + Return Me.GetPropertyString(TagNames.ImageDescription) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Image copyright (EXIF Copyright) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Copyright() As String + Get + Return Me.GetPropertyString(TagNames.Copyright) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Exposure time in seconds (EXIF ExifExposureTime/ExifShutterSpeed) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ExposureTime() As Double + Get + If Me.IsPropertyDefined(TagNames.ExifExposureTime) Then + '-- Exposure time is explicitly specified + Return Me.GetPropertyRational(TagNames.ExifExposureTime).ToDouble + ElseIf Me.IsPropertyDefined(TagNames.ExifShutterSpeed) Then + '-- Compute exposure time from shutter speed + Return 1 / (2 ^ Me.GetPropertyRational(TagNames.ExifShutterSpeed).ToDouble) + Else + '-- Can't figure out + Return 0 + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Aperture value as F number (EXIF ExifFNumber/ExifApertureValue) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property Aperture() As Double + Get + If Me.IsPropertyDefined(TagNames.ExifFNumber) Then + Return Me.GetPropertyRational(TagNames.ExifFNumber).ToDouble() + ElseIf Me.IsPropertyDefined(TagNames.ExifAperture) Then + Return System.Math.Sqrt(2) ^ Me.GetPropertyRational(TagNames.ExifAperture).ToDouble() + Else + Return 0 + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Exposure program used (EXIF ExifExposureProg) + ''' + ''' + ''' If not specified, returns Normal (2) + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ExposureProgram() As ExposurePrograms + Get + Dim X As Int32 = Me.GetPropertyInt16(TagNames.ExifExposureProg) + + If [Enum].IsDefined(GetType(ExposurePrograms), X) Then + Return CType([Enum].Parse(GetType(ExposurePrograms), [Enum].GetName(GetType(ExposurePrograms), X)), ExposurePrograms) + Else + Return ExposurePrograms.Normal + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' ISO sensitivity + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ISO() As Int16 + Get + Return Me.GetPropertyInt16(TagNames.ExifISOSpeed) + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Subject distance in meters (EXIF SubjectDistance) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property SubjectDistance() As Double + Get + Return Me.GetPropertyRational(TagNames.ExifSubjectDist).ToDouble() + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Exposure method metering mode used (EXIF MeteringMode) + ''' + ''' + ''' If not specified, returns Unknown (0) + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property ExposureMeteringMode() As ExposureMeteringModes + Get + Dim X As Int32 = Me.GetPropertyInt16(TagNames.ExifMeteringMode) + + If [Enum].IsDefined(GetType(ExposureMeteringModes), X) Then + Return CType([Enum].Parse(GetType(ExposureMeteringModes), [Enum].GetName(GetType(ExposureMeteringModes), X)), ExposureMeteringModes) + Else + Return ExposureMeteringModes.Unknown + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Focal length of lenses in mm (EXIF FocalLength) + ''' + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property FocalLength() As Double + Get + Return Me.GetPropertyRational(TagNames.ExifFocalLength).ToDouble + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Flash mode (EXIF Flash) + ''' + ''' + ''' If not present, value NotFired (0) is returned + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property FlashMode() As FlashModes + Get + Dim X As Int32 = Me.GetPropertyInt16(TagNames.ExifFlash) + + If [Enum].IsDefined(GetType(FlashModes), X) Then + Return CType([Enum].Parse(GetType(FlashModes), [Enum].GetName(GetType(FlashModes), X)), FlashModes) + Else + Return FlashModes.NotFired + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Light source / white balance (EXIF LightSource) + ''' + ''' + ''' If not specified, returns Unknown (0). + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public ReadOnly Property LightSource() As LightSources + Get + Dim X As Int32 = Me.GetPropertyInt16(TagNames.ExifLightSource) + + If [Enum].IsDefined(GetType(LightSources), X) Then + Return CType([Enum].Parse(GetType(LightSources), [Enum].GetName(GetType(LightSources), X)), LightSources) + Else + Return LightSources.Unknown + End If + End Get + End Property + + '''----------------------------------------------------------------------------- + ''' + ''' Checks if current image has specified certain property + ''' + ''' + ''' True if image has specified property, False otherwise. + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Function IsPropertyDefined(ByVal PID As Int32) As Boolean + Return CBool([Array].IndexOf(Me.Image.PropertyIdList, PID) > -1) + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Gets specified Int32 property + ''' + ''' Property ID + ''' Optional, default 0. Default value returned if property is not present. + ''' Value of property or DefaultValue if property is not present. + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Function GetPropertyInt32(ByVal PID As Int32, Optional ByVal DefaultValue As Int32 = 0) As Int32 + If Me.IsPropertyDefined(PID) Then + Return GetInt32(Me.Image.GetPropertyItem(PID).Value) + Else + Return DefaultValue + End If + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Gets specified Int16 property + ''' + ''' Property ID + ''' Optional, default 0. Default value returned if property is not present. + ''' Value of property or DefaultValue if property is not present. + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Function GetPropertyInt16(ByVal PID As Int32, Optional ByVal DefaultValue As Int16 = 0) As Int16 + If Me.IsPropertyDefined(PID) Then + Return GetInt16(Me.Image.GetPropertyItem(PID).Value) + Else + Return DefaultValue + End If + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Gets specified string property + ''' + ''' Property ID + ''' Optional, default String.Empty. Default value returned if property is not present. + ''' + ''' Value of property or DefaultValue if property is not present. + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Function GetPropertyString(ByVal PID As Int32, Optional ByVal DefaultValue As String = "") As String + If Me.IsPropertyDefined(PID) Then + Return GetString(Me.Image.GetPropertyItem(PID).Value) + Else + Return DefaultValue + End If + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Gets specified rational property + ''' + ''' Property ID + ''' + ''' Value of property or 0/1 if not present. + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Function GetPropertyRational(ByVal PID As Int32) As Rational + If Me.IsPropertyDefined(PID) Then + Return GetRational(Me.Image.GetPropertyItem(PID).Value) + Else + Dim R As Rational + R.Numerator = 0 + R.Denominator = 1 + Return R + End If + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Reads Int32 from EXIF bytearray. + ''' + ''' EXIF bytearray to process + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Shared Function GetInt32(ByVal B As Byte()) As Int32 + If B.Length < 4 Then Throw New ArgumentException("Data too short (4 bytes expected)", "B") + Return B(3) << 24 Or B(2) << 16 Or B(1) << 8 Or B(0) + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Reads Int16 from EXIF bytearray. + ''' + ''' EXIF bytearray to process + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Shared Function GetInt16(ByVal B As Byte()) As Int16 + If B.Length < 2 Then Throw New ArgumentException("Data too short (2 bytes expected)", "B") + Return B(1) << 8 Or B(0) + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Reads string from EXIF bytearray. + ''' + ''' EXIF bytearray to process + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Shared Function GetString(ByVal B As Byte()) As String + Dim R As String = System.Text.Encoding.ASCII.GetString(B) + If R.EndsWith(vbNullChar) Then R = R.Substring(0, R.Length - 1) + Return R + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Reads rational from EXIF bytearray. + ''' + ''' EXIF bytearray to process + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Shared Function GetRational(ByVal B As Byte()) As Rational + Dim R As New Rational, N(3), D(3) As Byte + Array.Copy(B, 0, N, 0, 4) + Array.Copy(B, 4, D, 0, 4) + R.Denominator = GetInt32(D) + R.Numerator = GetInt32(N) + Return R + End Function + + '''----------------------------------------------------------------------------- + ''' + ''' Disposes unmanaged resources of this class + ''' + ''' + ''' + ''' [altair] 10.9.2003 Created + ''' + '''----------------------------------------------------------------------------- + Public Sub Dispose() Implements System.IDisposable.Dispose + Me.Image.Dispose() + End Sub +End Class diff --git a/imagecatalog.backup/FileHelper.cs b/imagecatalog.backup/FileHelper.cs new file mode 100644 index 0000000..f0da2d6 --- /dev/null +++ b/imagecatalog.backup/FileHelper.cs @@ -0,0 +1,261 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; + +namespace ImageCatalog +{ + public class FileHelper + { + // Private dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) + private int filesPerFolder; + private string suffix; + private int counterSize; + private int numerationType; + private string filter; + private bool separateFiles; + private string extensions = "*.jpg,*.png,*.gif"; + + public enum numerazione + { + Progressiva, + Files + } + /// + /// Preparazione per la separazione + /// + /// + /// + /// + /// + /// + public FileHelper(int filesPerFolder, string suffix, int counterSize, int numerationType) + { + this.filesPerFolder = filesPerFolder; + this.suffix = suffix; + this.counterSize = counterSize; + this.numerationType = numerationType; + separateFiles = true; + } + + /// + /// nessuna separazione + /// + /// + public FileHelper() + { + separateFiles = false; + } + + public Dictionary GetFilesRecursive(DirectoryInfo root, DirectoryInfo destRoot, string filter) + { + var dirSourceDest = new Dictionary(); + var result = new List(); + + // Dim stack As New Stack(Of DirectoryInfo) + var stack = new Stack>(); + this.filter = filter; + var pair = new KeyValuePair(); + + + // stack.Push(root) + stack.Push(new KeyValuePair(root, destRoot)); + while (stack.Count > 0) + { + var curDirKV = stack.Pop(); + // curDirKP = stack.Pop() + var dir = curDirKV.Key; + var dDir = curDirKV.Value; + try + { + // result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly)) + // dividere file qui + if (filesPerFolder > 0 & separateFiles) + { + appendDictionary(dirSourceDest, dividiFilesInDir(dir, dDir)); + } + else + { + appendDictionary(dirSourceDest, getAllFilesInDir(dir, dDir)); + } + + foreach (DirectoryInfo subDirectory in dir.GetDirectories()) + stack.Push(new KeyValuePair(subDirectory, new DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name)))); + } + catch (Exception ex) + { + var e = ex.Demystify(); + Console.WriteLine(e); + Console.WriteLine(e.Message); + Console.WriteLine(e.StackTrace); + } + } + + return dirSourceDest; + } + + // Public Class FileData + // Public File As FileInfo + // Public Directory As DirectoryInfo + // Public Sub New(newFile As FileInfo, newDirectory As DirectoryInfo) + // File = newFile + // Directory = newDirectory + // End Sub + // End Class + + // Public Function GetFilesRecursiveParallel(ByVal root As DirectoryInfo, ByVal destRoot As DirectoryInfo, ByVal filter As String) As List(Of FileData) + + + // Dim dirSourceDest As New ConcurrentDictionary(Of FileInfo, DirectoryInfo) + // Dim result As New List(Of FileInfo) + + // 'Dim stack As New Stack(Of DirectoryInfo) + // Dim stack As New Stack(Of KeyValuePair(Of DirectoryInfo, DirectoryInfo)) + + + // Me.filter = filter + // Dim pair As New KeyValuePair(Of DirectoryInfo, DirectoryInfo) + + + // 'stack.Push(root) + // stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(root, destRoot)) + + // Do While (stack.Count > 0) + // Dim curDirKV As KeyValuePair(Of DirectoryInfo, DirectoryInfo) = stack.Pop + // 'curDirKP = stack.Pop() + // Dim dir As DirectoryInfo = curDirKV.Key + // Dim dDir As DirectoryInfo = curDirKV.Value + // Try + // 'result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly)) + // ' dividere file qui + // If filesPerFolder > 0 And separateFiles Then + // AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir)) + // Else + // AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir)) + // End If + + // For Each subDirectory As DirectoryInfo In dir.GetDirectories + // stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(subDirectory, New DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name)))) + + // Next + // Catch ex As Exception + // ' TODO: FARE QUALCOSA + // End Try + // Loop + + // Dim resultData As New List(Of FileData) + // resultData.AddRange(From p In dirSourceDest Select New FileData(p.Key, p.Value)) + // Return resultData + // 'Return dirSourceDest + // End Function + + public Dictionary appendDictionary(Dictionary dictA, Dictionary dictB) + { + foreach (KeyValuePair pair in dictB) + dictA.Add(pair.Key, pair.Value); + return dictA; + } + + // Public Function AppendDictionaryConcurrent(ByVal dictA As ConcurrentDictionary(Of FileInfo, DirectoryInfo), ByVal dictB As ConcurrentDictionary(Of FileInfo, DirectoryInfo)) As ConcurrentDictionary(Of FileInfo, DirectoryInfo) + // For Each pair As KeyValuePair(Of FileInfo, DirectoryInfo) In dictB + // dictA.TryAdd(pair.Key, pair.Value) + // 'dictA.Add(pair.Key, pair.Value) + // Next + // Return dictA + // End Function + + public Dictionary getAllFilesInDir(DirectoryInfo dir, DirectoryInfo dirDest) + { + var dict = new Dictionary(); + foreach (FileInfo File in dir.GetFiles(filter)) + dict.Add(File, new DirectoryInfo(Path.Combine(dirDest.FullName, File.Name))); + return dict; + } + + private Dictionary dividiFilesInDir(DirectoryInfo dir, DirectoryInfo dirDest) + { + int filesCount = dir.GetFiles(filter).Count(); + int contaFilePerDir = 0; + int contaDirPerDir = 0; + string tempText = string.Empty; + var foldersDict = new Dictionary(); + DirectoryInfo destDir; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName)); + foreach (FileInfo file in dir.GetFiles(filter)) + { + contaFilePerDir += 1; + if (contaFilePerDir == contaDirPerDir * filesPerFolder + 1) + { + contaDirPerDir += 1; + if (numerationType == (int)numerazione.Progressiva) + { + tempText = contaDirPerDir.ToString(); + } + else + { + tempText = (contaDirPerDir * filesPerFolder).ToString(); + } + + int i; + var loopTo = counterSize - tempText.Length; + for (i = 1; i <= loopTo; i++) + tempText = "0" + tempText; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText)); + } + + if (!destDir.Exists) + { + destDir.Create(); + } + + foldersDict.Add(file, destDir); + } + + return foldersDict; + } + + private ConcurrentDictionary DividiFilesInDirConcurrent(DirectoryInfo dir, DirectoryInfo dirDest) + { + int filesCount = dir.GetFiles(filter).Count(); + int contaFilePerDir = 0; + int contaDirPerDir = 0; + string tempText = string.Empty; + var foldersDict = new ConcurrentDictionary(); + DirectoryInfo destDir; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName)); + foreach (FileInfo file in dir.GetFiles(filter)) + { + contaFilePerDir += 1; + if (contaFilePerDir == contaDirPerDir * filesPerFolder + 1) + { + contaDirPerDir += 1; + if (numerationType == (int)numerazione.Progressiva) + { + tempText = contaDirPerDir.ToString(); + } + else + { + tempText = (contaDirPerDir * filesPerFolder).ToString(); + } + + int i; + var loopTo = counterSize - tempText.Length; + for (i = 1; i <= loopTo; i++) + tempText = "0" + tempText; + destDir = new DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText)); + } + + if (!destDir.Exists) + { + destDir.Create(); + } + + foldersDict.TryAdd(file, destDir); + } + + return foldersDict; + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/FileHelper.vb b/imagecatalog.backup/FileHelper.vb new file mode 100644 index 0000000..d8b9f3d --- /dev/null +++ b/imagecatalog.backup/FileHelper.vb @@ -0,0 +1,252 @@ +Imports System.Collections.Concurrent +Imports System.IO +Imports System.Collections.Generic +Imports MaddoShared + +Public Class FileHelper + 'Private dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) + Private filesPerFolder As Integer + Private suffix As String + Private counterSize As Integer + Private numerationType As Integer + Private filter As String + Private separateFiles As Boolean + Private extensions As String = "*.jpg,*.png,*.gif" + + + Public Enum numerazione + Progressiva + Files + End Enum + ''' + ''' Preparazione per la separazione + ''' + ''' + ''' + ''' + ''' + ''' + Public Sub New(ByVal filesPerFolder As Integer, ByVal suffix As String, ByVal counterSize As Integer, ByVal numerationType As Integer) + Me.filesPerFolder = filesPerFolder + Me.suffix = suffix + Me.counterSize = counterSize + Me.numerationType = numerationType + Me.separateFiles = True + End Sub + + ''' + ''' nessuna separazione + ''' + ''' + Public Sub New() + Me.separateFiles = False + End Sub + + + Public Function GetFilesRecursive(ByVal root As DirectoryInfo, ByVal destRoot As DirectoryInfo, ByVal filter As String) As Dictionary(Of FileInfo, DirectoryInfo) + Dim dirSourceDest As New Dictionary(Of FileInfo, DirectoryInfo) + Dim result As New List(Of FileInfo) + + 'Dim stack As New Stack(Of DirectoryInfo) + Dim stack As New Stack(Of KeyValuePair(Of DirectoryInfo, DirectoryInfo)) + + + Me.filter = filter + Dim pair As New KeyValuePair(Of DirectoryInfo, DirectoryInfo) + + + 'stack.Push(root) + stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(root, destRoot)) + + Do While (stack.Count > 0) + Dim curDirKV As KeyValuePair(Of DirectoryInfo, DirectoryInfo) = stack.Pop + 'curDirKP = stack.Pop() + Dim dir As DirectoryInfo = curDirKV.Key + Dim dDir As DirectoryInfo = curDirKV.Value + Try + 'result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly)) + ' dividere file qui + If filesPerFolder > 0 And separateFiles Then + appendDictionary(dirSourceDest, dividiFilesInDir(dir, dDir)) + Else + appendDictionary(dirSourceDest, getAllFilesInDir(dir, dDir)) + End If + + + + For Each subDirectory As DirectoryInfo In dir.GetDirectories + stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(subDirectory, New DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name)))) + + Next + Catch ex As Exception + Dim e As Exception = ex.Demystify() + Console.WriteLine(e) + Console.WriteLine(e.Message) + Console.WriteLine(e.StackTrace) + End Try + Loop + + Return dirSourceDest + End Function + + 'Public Class FileData + ' Public File As FileInfo + ' Public Directory As DirectoryInfo + ' Public Sub New(newFile As FileInfo, newDirectory As DirectoryInfo) + ' File = newFile + ' Directory = newDirectory + ' End Sub + 'End Class + + 'Public Function GetFilesRecursiveParallel(ByVal root As DirectoryInfo, ByVal destRoot As DirectoryInfo, ByVal filter As String) As List(Of FileData) + + + ' Dim dirSourceDest As New ConcurrentDictionary(Of FileInfo, DirectoryInfo) + ' Dim result As New List(Of FileInfo) + + ' 'Dim stack As New Stack(Of DirectoryInfo) + ' Dim stack As New Stack(Of KeyValuePair(Of DirectoryInfo, DirectoryInfo)) + + + ' Me.filter = filter + ' Dim pair As New KeyValuePair(Of DirectoryInfo, DirectoryInfo) + + + ' 'stack.Push(root) + ' stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(root, destRoot)) + + ' Do While (stack.Count > 0) + ' Dim curDirKV As KeyValuePair(Of DirectoryInfo, DirectoryInfo) = stack.Pop + ' 'curDirKP = stack.Pop() + ' Dim dir As DirectoryInfo = curDirKV.Key + ' Dim dDir As DirectoryInfo = curDirKV.Value + ' Try + ' 'result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly)) + ' ' dividere file qui + ' If filesPerFolder > 0 And separateFiles Then + ' AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir)) + ' Else + ' AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir)) + ' End If + + ' For Each subDirectory As DirectoryInfo In dir.GetDirectories + ' stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(subDirectory, New DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name)))) + + ' Next + ' Catch ex As Exception + ' ' TODO: FARE QUALCOSA + ' End Try + ' Loop + + ' Dim resultData As New List(Of FileData) + ' resultData.AddRange(From p In dirSourceDest Select New FileData(p.Key, p.Value)) + ' Return resultData + ' 'Return dirSourceDest + 'End Function + + Public Function appendDictionary(ByVal dictA As Dictionary(Of FileInfo, DirectoryInfo), ByVal dictB As Dictionary(Of FileInfo, DirectoryInfo)) As Dictionary(Of FileInfo, DirectoryInfo) + For Each pair As KeyValuePair(Of FileInfo, DirectoryInfo) In dictB + dictA.Add(pair.Key, pair.Value) + Next + Return dictA + End Function + + 'Public Function AppendDictionaryConcurrent(ByVal dictA As ConcurrentDictionary(Of FileInfo, DirectoryInfo), ByVal dictB As ConcurrentDictionary(Of FileInfo, DirectoryInfo)) As ConcurrentDictionary(Of FileInfo, DirectoryInfo) + ' For Each pair As KeyValuePair(Of FileInfo, DirectoryInfo) In dictB + ' dictA.TryAdd(pair.Key, pair.Value) + ' 'dictA.Add(pair.Key, pair.Value) + ' Next + ' Return dictA + 'End Function + + Public Function getAllFilesInDir(dir As DirectoryInfo, dirDest As DirectoryInfo) As Dictionary(Of FileInfo, DirectoryInfo) + Dim dict As New Dictionary(Of FileInfo, DirectoryInfo) + For Each File As FileInfo In dir.GetFiles(filter) + dict.Add(File, New DirectoryInfo(Path.Combine(dirDest.FullName, File.Name))) + + Next + Return dict + End Function + + Private Function dividiFilesInDir(dir As DirectoryInfo, dirDest As DirectoryInfo) As Dictionary(Of FileInfo, DirectoryInfo) + Dim filesCount As Integer = dir.GetFiles(filter).Count + Dim contaFilePerDir As Integer = 0 + Dim contaDirPerDir As Integer = 0 + Dim tempText As String = String.Empty + Dim foldersDict As New Dictionary(Of FileInfo, DirectoryInfo) + + Dim destDir As DirectoryInfo + destDir = New DirectoryInfo(Path.Combine(dirDest.FullName)) + For Each file As FileInfo In dir.GetFiles(filter) + + contaFilePerDir += 1 + + If contaFilePerDir = (contaDirPerDir * filesPerFolder) + 1 Then + contaDirPerDir += 1 + + If numerationType = numerazione.Progressiva Then + tempText = contaDirPerDir.ToString + Else + tempText = (contaDirPerDir * filesPerFolder).ToString + End If + Dim i As Integer + For i = 1 To (counterSize - tempText.Length) + tempText = "0" & tempText + Next + destDir = New DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText)) + + + + End If + + If Not destDir.Exists Then + destDir.Create() + End If + + foldersDict.Add(file, destDir) + Next + + Return foldersDict + End Function + + Private Function DividiFilesInDirConcurrent(dir As DirectoryInfo, dirDest As DirectoryInfo) As ConcurrentDictionary(Of FileInfo, DirectoryInfo) + Dim filesCount As Integer = dir.GetFiles(filter).Count + Dim contaFilePerDir As Integer = 0 + Dim contaDirPerDir As Integer = 0 + Dim tempText As String = String.Empty + Dim foldersDict As New ConcurrentDictionary(Of FileInfo, DirectoryInfo) + + Dim destDir As DirectoryInfo + destDir = New DirectoryInfo(Path.Combine(dirDest.FullName)) + For Each file As FileInfo In dir.GetFiles(filter) + + contaFilePerDir += 1 + + If contaFilePerDir = (contaDirPerDir * filesPerFolder) + 1 Then + contaDirPerDir += 1 + + If numerationType = numerazione.Progressiva Then + tempText = contaDirPerDir.ToString + Else + tempText = (contaDirPerDir * filesPerFolder).ToString + End If + Dim i As Integer + For i = 1 To (counterSize - tempText.Length) + tempText = "0" & tempText + Next + destDir = New DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText)) + + + + End If + + If Not destDir.Exists Then + destDir.Create() + End If + + foldersDict.TryAdd(file, destDir) + Next + + Return foldersDict + End Function +End Class diff --git a/imagecatalog.backup/FodyWeavers.xml b/imagecatalog.backup/FodyWeavers.xml new file mode 100644 index 0000000..a5dcf04 --- /dev/null +++ b/imagecatalog.backup/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/imagecatalog.backup/FodyWeavers.xsd b/imagecatalog.backup/FodyWeavers.xsd new file mode 100644 index 0000000..44a5374 --- /dev/null +++ b/imagecatalog.backup/FodyWeavers.xsd @@ -0,0 +1,111 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/imagecatalog.backup/Form1.cs b/imagecatalog.backup/Form1.cs new file mode 100644 index 0000000..1f86a2d --- /dev/null +++ b/imagecatalog.backup/Form1.cs @@ -0,0 +1,3281 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Windows.Forms; +using CatalogVbLib; +using Microsoft.VisualBasic; +using Microsoft.VisualBasic.CompilerServices; + +namespace ImageCatalog +{ + public delegate void XyThreadAddold(string Info); + + public class Form1 : Form + { + + /* TODO ERROR: Skipped RegionDirectiveTrivia */ + public Form1() : base() + { + base.Load += Form1_Load; + + // This call is required by the Windows Form Designer. + InitializeComponent(); + + // Add any initialization after the InitializeComponent() call + + } + + // Form overrides dispose to clean up the component list. + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components is object) + { + components.Dispose(); + } + } + + base.Dispose(disposing); + } + + // Required by the Windows Form Designer + private System.ComponentModel.IContainer components; + + // NOTE: The following procedure is required by the Windows Form Designer + // It can be modified using the Windows Form Designer. + // Do not modify it using the code editor. + private Button _Button1; + + internal Button Button1 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button1; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button1 != null) + { + _Button1.Click -= btnCreaCatalogo_Click; + } + + _Button1 = value; + if (_Button1 != null) + { + _Button1.Click += btnCreaCatalogo_Click; + } + } + } + + internal Label Label10; + internal Label Label17; + internal Label Label18; + internal Label Label19; + internal Label Label20; + private Button _Button6; + + internal Button Button6 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button6; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button6 != null) + { + _Button6.Click -= Button6_Click; + } + + _Button6 = value; + if (_Button6 != null) + { + _Button6.Click += Button6_Click; + } + } + } + + private Button _Button5; + + internal Button Button5 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button5; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button5 != null) + { + _Button5.Click -= Button5_Click; + } + + _Button5 = value; + if (_Button5 != null) + { + _Button5.Click += Button5_Click; + } + } + } + + private Button _Button7; + + internal Button Button7 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button7; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button7 != null) + { + _Button7.Click -= Button7_Click; + } + + _Button7 = value; + if (_Button7 != null) + { + _Button7.Click += Button7_Click; + } + } + } + + internal Label Label27; + internal TextBox TextBox13; + internal Label Label16; + internal Label Label7; + internal TextBox TextBox7; + internal Label Label8; + internal TextBox TextBox8; + internal CheckBox CheckBox2; + internal Label Label43; + internal CheckBox CheckBox22; + internal TabPage TabPage4; + internal GroupBox GroupBox6; + internal PictureBox PictureBox2; + private PictureBox _PictureBox1; + + internal PictureBox PictureBox1 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _PictureBox1; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_PictureBox1 != null) + { + _PictureBox1.MouseMove -= PictureBox1_MouseMove; + _PictureBox1.MouseUp -= PictureBox1_MouseUp; + } + + _PictureBox1 = value; + if (_PictureBox1 != null) + { + _PictureBox1.MouseMove += PictureBox1_MouseMove; + _PictureBox1.MouseUp += PictureBox1_MouseUp; + } + } + } + + internal ComboBox ComboBox5; + internal ComboBox ComboBox4; + internal TextBox TextBox19; + internal Label Label28; + internal CheckBox CheckBox5; + internal TextBox TextBox15; + internal TextBox TextBox14; + internal Label Label25; + internal TextBox TextBox16; + internal Label Label24; + internal Label Label22; + internal Label Label23; + private Button _Button4; + + internal Button Button4 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button4; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button4 != null) + { + _Button4.Click -= Button4_Click; + } + + _Button4 = value; + if (_Button4 != null) + { + _Button4.Click += Button4_Click; + } + } + } + + internal TextBox TextBox10; + internal Label Label29; + internal Label Label30; + internal PictureBox PictureBox3; + internal TabPage TabPage1; + internal GroupBox GroupBox1; + internal Panel Panel2; + internal RadioButton RadioButton3; + internal RadioButton RadioButton7; + internal RadioButton RadioButton4; + internal RadioButton RadioButton6; + internal RadioButton RadioButton5; + internal Label Label5; + internal TextBox TextBox5; + internal Label Label6; + internal TextBox TextBox6; + internal Label Label3; + internal TextBox TextBox3; + internal CheckBox CheckBox1; + internal TabPage TabPage2; + internal GroupBox GroupBox2; + internal TextBox TextBox26; + internal Label Label37; + internal Label Label38; + internal TextBox TextBox27; + internal Label Label39; + internal TextBox TextBox28; + internal CheckBox CheckBox15; + internal TabPage TabPage3; + internal GroupBox GroupBox10; + internal Label Label42; + internal Label Label41; + internal TextBox TextBox31; + internal TextBox TextBox30; + internal GroupBox GroupBox9; + internal CheckBox CheckBox17; + internal CheckBox CheckBox16; + internal GroupBox GroupBox5; + private Button _Button8; + + internal Button Button8 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button8; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button8 != null) + { + _Button8.Click -= Button8_Click; + } + + _Button8 = value; + if (_Button8 != null) + { + _Button8.Click += Button8_Click; + } + } + } + + internal Label Label36; + internal TextBox TextBox25; + internal Label Label35; + internal ComboBox ComboBox3; + internal TextBox TextBox11; + internal Label Label12; + internal Label Label11; + internal CheckBox CheckBox3; + internal GroupBox GroupBox4; + internal Label Label40; + internal TextBox TextBox29; + internal TextBox TextBox18; + internal Label Label26; + internal DateTimePicker DateTimePicker1; + internal CheckBox CheckBox8; + internal TextBox TextBox9; + internal CheckBox CheckBox7; + internal Label Label4; + internal TextBox TextBox4; + internal Label Label9; + internal Label Label13; + internal ComboBox ComboBox1; + internal ComboBox ComboBox2; + internal Label Label14; + internal TextBox TextBox12; + internal Label Label15; + internal TabPage TabPage5; + internal GroupBox GroupBox3; + internal CheckBox CheckBox6; + private Button _Button3; + + internal Button Button3 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button3; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button3 != null) + { + _Button3.Click -= Button3_Click; + } + + _Button3 = value; + if (_Button3 != null) + { + _Button3.Click += Button3_Click; + } + } + } + + private Button _Button2; + + internal Button Button2 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button2; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button2 != null) + { + _Button2.Click -= Button2_Click; + } + + _Button2 = value; + if (_Button2 != null) + { + _Button2.Click += Button2_Click; + } + } + } + + internal Label Label1; + internal Label Label2; + internal TextBox TextBox1; + internal TextBox TextBox2; + internal GroupBox GroupBox8; + internal RadioButton RadioButton2; + internal RadioButton RadioButton1; + internal TextBox TextBox21; + internal Label Label34; + internal TextBox TextBox20; + internal Label Label33; + internal Label Label31; + internal CheckBox CheckBox11; + internal TextBox TextBox17; + internal Label Label32; + internal GroupBox GroupBox7; + internal CheckBox CheckBox10; + internal CheckBox CheckBox9; + internal TabControl TabControl1; + internal Label Label45; + internal TextBox TextBox32; + internal TextBox TextBox33; + internal TextBox TextBox34; + internal Label Label46; + internal ProgressBar ProgressBar1; + internal Panel Panel1; + private CheckBox _CheckBox18; + + internal CheckBox CheckBox18 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox18; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox18 != null) + { + _CheckBox18.CheckedChanged -= CheckBox18_CheckedChanged; + } + + _CheckBox18 = value; + if (_CheckBox18 != null) + { + _CheckBox18.CheckedChanged += CheckBox18_CheckedChanged; + } + } + } + + private CheckBox _CheckBox4; + + internal CheckBox CheckBox4 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox4; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox4 != null) + { + _CheckBox4.CheckedChanged -= CheckBox4_CheckedChanged; + } + + _CheckBox4 = value; + if (_CheckBox4 != null) + { + _CheckBox4.CheckedChanged += CheckBox4_CheckedChanged; + } + } + } + + private CheckBox _CheckBox12; + + internal CheckBox CheckBox12 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox12; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox12 != null) + { + _CheckBox12.CheckedChanged -= CheckBox12_CheckedChanged; + } + + _CheckBox12 = value; + if (_CheckBox12 != null) + { + _CheckBox12.CheckedChanged += CheckBox12_CheckedChanged; + } + } + } + + internal Label Label44; + + [DebuggerStepThrough()] + private void InitializeComponent() + { + _Button1 = new Button(); + _Button1.Click += new EventHandler(btnCreaCatalogo_Click); + Label10 = new Label(); + Label17 = new Label(); + Label18 = new Label(); + Label19 = new Label(); + Label20 = new Label(); + _Button6 = new Button(); + _Button6.Click += new EventHandler(Button6_Click); + _Button5 = new Button(); + _Button5.Click += new EventHandler(Button5_Click); + _Button7 = new Button(); + _Button7.Click += new EventHandler(Button7_Click); + Label27 = new Label(); + TextBox13 = new TextBox(); + Label16 = new Label(); + Label7 = new Label(); + TextBox7 = new TextBox(); + Label8 = new Label(); + TextBox8 = new TextBox(); + CheckBox2 = new CheckBox(); + Label43 = new Label(); + CheckBox22 = new CheckBox(); + Label44 = new Label(); + TabPage4 = new TabPage(); + GroupBox6 = new GroupBox(); + PictureBox2 = new PictureBox(); + _PictureBox1 = new PictureBox(); + _PictureBox1.MouseMove += new MouseEventHandler(PictureBox1_MouseMove); + _PictureBox1.MouseUp += new MouseEventHandler(PictureBox1_MouseUp); + ComboBox5 = new ComboBox(); + ComboBox4 = new ComboBox(); + TextBox19 = new TextBox(); + Label28 = new Label(); + CheckBox5 = new CheckBox(); + TextBox15 = new TextBox(); + TextBox14 = new TextBox(); + Label25 = new Label(); + TextBox16 = new TextBox(); + Label24 = new Label(); + Label22 = new Label(); + Label23 = new Label(); + _Button4 = new Button(); + _Button4.Click += new EventHandler(Button4_Click); + TextBox10 = new TextBox(); + Label29 = new Label(); + Label30 = new Label(); + PictureBox3 = new PictureBox(); + TabPage1 = new TabPage(); + GroupBox1 = new GroupBox(); + Label46 = new Label(); + TextBox33 = new TextBox(); + Panel2 = new Panel(); + RadioButton3 = new RadioButton(); + RadioButton7 = new RadioButton(); + RadioButton4 = new RadioButton(); + RadioButton6 = new RadioButton(); + RadioButton5 = new RadioButton(); + Label5 = new Label(); + TextBox5 = new TextBox(); + Label6 = new Label(); + TextBox6 = new TextBox(); + Label3 = new Label(); + TextBox3 = new TextBox(); + CheckBox1 = new CheckBox(); + TabPage2 = new TabPage(); + GroupBox2 = new GroupBox(); + Label45 = new Label(); + TextBox32 = new TextBox(); + TextBox26 = new TextBox(); + Label37 = new Label(); + Label38 = new Label(); + TextBox27 = new TextBox(); + Label39 = new Label(); + TextBox28 = new TextBox(); + CheckBox15 = new CheckBox(); + TabPage3 = new TabPage(); + GroupBox10 = new GroupBox(); + Label42 = new Label(); + Label41 = new Label(); + TextBox31 = new TextBox(); + TextBox30 = new TextBox(); + GroupBox9 = new GroupBox(); + CheckBox17 = new CheckBox(); + CheckBox16 = new CheckBox(); + GroupBox5 = new GroupBox(); + TextBox34 = new TextBox(); + _Button8 = new Button(); + _Button8.Click += new EventHandler(Button8_Click); + Label36 = new Label(); + TextBox25 = new TextBox(); + Label35 = new Label(); + ComboBox3 = new ComboBox(); + TextBox11 = new TextBox(); + Label12 = new Label(); + Label11 = new Label(); + CheckBox3 = new CheckBox(); + GroupBox4 = new GroupBox(); + Label40 = new Label(); + TextBox29 = new TextBox(); + TextBox18 = new TextBox(); + Label26 = new Label(); + DateTimePicker1 = new DateTimePicker(); + CheckBox8 = new CheckBox(); + TextBox9 = new TextBox(); + CheckBox7 = new CheckBox(); + Label4 = new Label(); + TextBox4 = new TextBox(); + Label9 = new Label(); + Label13 = new Label(); + ComboBox1 = new ComboBox(); + ComboBox2 = new ComboBox(); + Label14 = new Label(); + TextBox12 = new TextBox(); + Label15 = new Label(); + TabPage5 = new TabPage(); + GroupBox3 = new GroupBox(); + CheckBox6 = new CheckBox(); + _Button3 = new Button(); + _Button3.Click += new EventHandler(Button3_Click); + _Button2 = new Button(); + _Button2.Click += new EventHandler(Button2_Click); + Label1 = new Label(); + Label2 = new Label(); + TextBox1 = new TextBox(); + TextBox2 = new TextBox(); + GroupBox8 = new GroupBox(); + RadioButton2 = new RadioButton(); + RadioButton1 = new RadioButton(); + TextBox21 = new TextBox(); + Label34 = new Label(); + TextBox20 = new TextBox(); + Label33 = new Label(); + Label31 = new Label(); + CheckBox11 = new CheckBox(); + TextBox17 = new TextBox(); + Label32 = new Label(); + GroupBox7 = new GroupBox(); + CheckBox10 = new CheckBox(); + CheckBox9 = new CheckBox(); + TabControl1 = new TabControl(); + ProgressBar1 = new ProgressBar(); + _CheckBox12 = new CheckBox(); + _CheckBox12.CheckedChanged += new EventHandler(CheckBox12_CheckedChanged); + _CheckBox4 = new CheckBox(); + _CheckBox4.CheckedChanged += new EventHandler(CheckBox4_CheckedChanged); + _CheckBox18 = new CheckBox(); + _CheckBox18.CheckedChanged += new EventHandler(CheckBox18_CheckedChanged); + Panel1 = new Panel(); + TabPage4.SuspendLayout(); + GroupBox6.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)PictureBox2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)_PictureBox1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)PictureBox3).BeginInit(); + TabPage1.SuspendLayout(); + GroupBox1.SuspendLayout(); + Panel2.SuspendLayout(); + TabPage2.SuspendLayout(); + GroupBox2.SuspendLayout(); + TabPage3.SuspendLayout(); + GroupBox10.SuspendLayout(); + GroupBox9.SuspendLayout(); + GroupBox5.SuspendLayout(); + GroupBox4.SuspendLayout(); + TabPage5.SuspendLayout(); + GroupBox3.SuspendLayout(); + GroupBox8.SuspendLayout(); + GroupBox7.SuspendLayout(); + TabControl1.SuspendLayout(); + Panel1.SuspendLayout(); + SuspendLayout(); + // + // Button1 + // + _Button1.Font = new Font("Microsoft Sans Serif", 12.0f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + _Button1.Location = new Point(539, 77); + _Button1.Name = "_Button1"; + _Button1.Size = new Size(192, 39); + _Button1.TabIndex = 2; + _Button1.Text = "crea catalogo"; + // + // Label10 + // + Label10.Font = new Font("Microsoft Sans Serif", 14.25f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + Label10.Location = new Point(539, 163); + Label10.Name = "Label10"; + Label10.Size = new Size(192, 72); + Label10.TabIndex = 21; + Label10.Text = "file"; + // + // Label17 + // + Label17.AutoSize = true; + Label17.Font = new Font("Microsoft Sans Serif", 12.0f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + Label17.Location = new Point(643, 243); + Label17.Name = "Label17"; + Label17.Size = new Size(19, 20); + Label17.TabIndex = 38; + Label17.Text = "0"; + // + // Label18 + // + Label18.AutoSize = true; + Label18.Font = new Font("Microsoft Sans Serif", 12.0f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + Label18.Location = new Point(643, 262); + Label18.Name = "Label18"; + Label18.Size = new Size(19, 20); + Label18.TabIndex = 39; + Label18.Text = "0"; + // + // Label19 + // + Label19.AutoSize = true; + Label19.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + Label19.Location = new Point(539, 243); + Label19.Name = "Label19"; + Label19.Size = new Size(80, 16); + Label19.TabIndex = 40; + Label19.Text = "foto totali: "; + // + // Label20 + // + Label20.AutoSize = true; + Label20.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + Label20.Location = new Point(539, 262); + Label20.Name = "Label20"; + Label20.Size = new Size(104, 16); + Label20.TabIndex = 41; + Label20.Text = "foto generate:"; + // + // Button6 + // + _Button6.Font = new Font("Microsoft Sans Serif", 11.0f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + _Button6.Location = new Point(539, 12); + _Button6.Name = "_Button6"; + _Button6.Size = new Size(192, 32); + _Button6.TabIndex = 12; + _Button6.Text = "Carica impostazioni"; + // + // Button5 + // + _Button5.Font = new Font("Microsoft Sans Serif", 11.0f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); + _Button5.Location = new Point(539, 43); + _Button5.Name = "_Button5"; + _Button5.Size = new Size(192, 32); + _Button5.TabIndex = 43; + _Button5.Text = "Salva impostazioni"; + // + // Button7 + // + _Button7.Font = new Font("Microsoft Sans Serif", 14.25f, FontStyle.Regular, GraphicsUnit.Point, Conversions.ToByte(0)); + _Button7.Location = new Point(539, 120); + _Button7.Name = "_Button7"; + _Button7.Size = new Size(192, 40); + _Button7.TabIndex = 44; + _Button7.Text = "stop creazione"; + // + // Label27 + // + Label27.Location = new Point(591, 346); + Label27.Name = "Label27"; + Label27.Size = new Size(140, 20); + Label27.TabIndex = 46; + Label27.Text = "Versione 2.0 BETA 1"; + Label27.TextAlign = ContentAlignment.MiddleRight; + // + // TextBox13 + // + TextBox13.Location = new Point(224, 48); + TextBox13.Name = "TextBox13"; + TextBox13.Size = new Size(56, 20); + TextBox13.TabIndex = 20; + TextBox13.Text = "TextBox13"; + // + // Label16 + // + Label16.ForeColor = Color.Black; + Label16.Location = new Point(168, 48); + Label16.Name = "Label16"; + Label16.Size = new Size(48, 16); + Label16.TabIndex = 19; + Label16.Text = "Suffisso"; + Label16.TextAlign = ContentAlignment.MiddleRight; + // + // Label7 + // + Label7.AutoSize = true; + Label7.ForeColor = Color.Black; + Label7.Location = new Point(24, 24); + Label7.Name = "Label7"; + Label7.Size = new Size(41, 13); + Label7.TabIndex = 16; + Label7.Text = "Altezza"; + // + // TextBox7 + // + TextBox7.Location = new Point(72, 24); + TextBox7.Name = "TextBox7"; + TextBox7.Size = new Size(72, 20); + TextBox7.TabIndex = 14; + TextBox7.Text = "TextBox7"; + // + // Label8 + // + Label8.AutoSize = true; + Label8.ForeColor = Color.Black; + Label8.Location = new Point(8, 48); + Label8.Name = "Label8"; + Label8.Size = new Size(56, 13); + Label8.TabIndex = 17; + Label8.Text = "Larghezza"; + // + // TextBox8 + // + TextBox8.Location = new Point(72, 48); + TextBox8.Name = "TextBox8"; + TextBox8.Size = new Size(72, 20); + TextBox8.TabIndex = 15; + TextBox8.Text = "TextBox8"; + // + // CheckBox2 + // + CheckBox2.Checked = true; + CheckBox2.CheckState = CheckState.Checked; + CheckBox2.ForeColor = Color.Black; + CheckBox2.Location = new Point(168, 16); + CheckBox2.Name = "CheckBox2"; + CheckBox2.Size = new Size(120, 32); + CheckBox2.TabIndex = 18; + CheckBox2.Text = "Mantieni dimensioni originali"; + // + // Label43 + // + Label43.AutoSize = true; + Label43.Location = new Point(651, 303); + Label43.Name = "Label43"; + Label43.Size = new Size(25, 13); + Label43.TabIndex = 49; + Label43.Text = "000"; + // + // CheckBox22 + // + CheckBox22.AutoSize = true; + CheckBox22.Location = new Point(539, 326); + CheckBox22.Name = "CheckBox22"; + CheckBox22.Size = new Size(104, 17); + CheckBox22.TabIndex = 50; + CheckBox22.Text = "Arresta il sistema"; + CheckBox22.UseVisualStyleBackColor = true; + // + // Label44 + // + Label44.AutoSize = true; + Label44.Location = new Point(539, 303); + Label44.Name = "Label44"; + Label44.Size = new Size(106, 13); + Label44.TabIndex = 51; + Label44.Text = "Tempo elaborazione:"; + // + // TabPage4 + // + TabPage4.Controls.Add(GroupBox6); + TabPage4.Location = new Point(4, 22); + TabPage4.Name = "TabPage4"; + TabPage4.Padding = new Padding(3); + TabPage4.Size = new Size(513, 326); + TabPage4.TabIndex = 3; + TabPage4.Text = "Logo"; + TabPage4.UseVisualStyleBackColor = true; + // + // GroupBox6 + // + GroupBox6.Controls.Add(PictureBox2); + GroupBox6.Controls.Add(_PictureBox1); + GroupBox6.Controls.Add(ComboBox5); + GroupBox6.Controls.Add(ComboBox4); + GroupBox6.Controls.Add(TextBox19); + GroupBox6.Controls.Add(Label28); + GroupBox6.Controls.Add(CheckBox5); + GroupBox6.Controls.Add(TextBox15); + GroupBox6.Controls.Add(TextBox14); + GroupBox6.Controls.Add(Label25); + GroupBox6.Controls.Add(TextBox16); + GroupBox6.Controls.Add(Label24); + GroupBox6.Controls.Add(Label22); + GroupBox6.Controls.Add(Label23); + GroupBox6.Controls.Add(_Button4); + GroupBox6.Controls.Add(TextBox10); + GroupBox6.Controls.Add(Label29); + GroupBox6.Controls.Add(Label30); + GroupBox6.Controls.Add(PictureBox3); + GroupBox6.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox6.Location = new Point(6, 6); + GroupBox6.Name = "GroupBox6"; + GroupBox6.Size = new Size(496, 224); + GroupBox6.TabIndex = 42; + GroupBox6.TabStop = false; + GroupBox6.Text = "Logo"; + // + // PictureBox2 + // + PictureBox2.BorderStyle = BorderStyle.FixedSingle; + PictureBox2.Location = new Point(144, 192); + PictureBox2.Name = "PictureBox2"; + PictureBox2.Size = new Size(24, 24); + PictureBox2.TabIndex = 44; + PictureBox2.TabStop = false; + PictureBox2.Visible = false; + // + // PictureBox1 + // + _PictureBox1.Cursor = Cursors.Cross; + _PictureBox1.Location = new Point(256, 56); + _PictureBox1.Name = "_PictureBox1"; + _PictureBox1.Size = new Size(224, 160); + _PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; + _PictureBox1.TabIndex = 43; + _PictureBox1.TabStop = false; + // + // ComboBox5 + // + ComboBox5.Location = new Point(144, 168); + ComboBox5.Name = "ComboBox5"; + ComboBox5.Size = new Size(96, 21); + ComboBox5.TabIndex = 42; + ComboBox5.Text = "ComboBox5"; + // + // ComboBox4 + // + ComboBox4.Location = new Point(144, 144); + ComboBox4.Name = "ComboBox4"; + ComboBox4.Size = new Size(96, 21); + ComboBox4.TabIndex = 41; + ComboBox4.Text = "ComboBox4"; + // + // TextBox19 + // + TextBox19.Location = new Point(144, 96); + TextBox19.Name = "TextBox19"; + TextBox19.Size = new Size(96, 20); + TextBox19.TabIndex = 40; + TextBox19.Text = "TextBox19"; + // + // Label28 + // + Label28.ForeColor = Color.Black; + Label28.Location = new Point(17, 97); + Label28.Name = "Label28"; + Label28.Size = new Size(120, 16); + Label28.TabIndex = 39; + Label28.Text = "Trasparenza (0-100%)"; + Label28.TextAlign = ContentAlignment.MiddleLeft; + // + // CheckBox5 + // + CheckBox5.ForeColor = Color.Black; + CheckBox5.Location = new Point(0, 26); + CheckBox5.Name = "CheckBox5"; + CheckBox5.Size = new Size(72, 20); + CheckBox5.TabIndex = 38; + CheckBox5.Text = "Aggiungi"; + // + // TextBox15 + // + TextBox15.Location = new Point(144, 72); + TextBox15.Name = "TextBox15"; + TextBox15.Size = new Size(96, 20); + TextBox15.TabIndex = 19; + TextBox15.Text = "TextBox15"; + // + // TextBox14 + // + TextBox14.Location = new Point(144, 48); + TextBox14.Name = "TextBox14"; + TextBox14.Size = new Size(96, 20); + TextBox14.TabIndex = 18; + TextBox14.Text = "TextBox14"; + // + // Label25 + // + Label25.AutoSize = true; + Label25.ForeColor = Color.Black; + Label25.Location = new Point(17, 168); + Label25.Name = "Label25"; + Label25.Size = new Size(95, 13); + Label25.TabIndex = 36; + Label25.Text = "Posizione verticale"; + Label25.TextAlign = ContentAlignment.MiddleLeft; + // + // TextBox16 + // + TextBox16.Location = new Point(144, 120); + TextBox16.Name = "TextBox16"; + TextBox16.Size = new Size(96, 20); + TextBox16.TabIndex = 35; + TextBox16.Text = "TextBox16"; + // + // Label24 + // + Label24.AutoSize = true; + Label24.ForeColor = Color.Black; + Label24.Location = new Point(19, 123); + Label24.Name = "Label24"; + Label24.Size = new Size(88, 13); + Label24.TabIndex = 34; + Label24.Text = "Margine (pixel/%)"; + Label24.TextAlign = ContentAlignment.MiddleLeft; + // + // Label22 + // + Label22.AutoSize = true; + Label22.ForeColor = Color.Black; + Label22.Location = new Point(19, 51); + Label22.Name = "Label22"; + Label22.Size = new Size(41, 13); + Label22.TabIndex = 20; + Label22.Text = "Altezza"; + Label22.TextAlign = ContentAlignment.MiddleLeft; + // + // Label23 + // + Label23.AutoSize = true; + Label23.ForeColor = Color.Black; + Label23.Location = new Point(19, 75); + Label23.Name = "Label23"; + Label23.Size = new Size(56, 13); + Label23.TabIndex = 21; + Label23.Text = "Larghezza"; + Label23.TextAlign = ContentAlignment.MiddleLeft; + // + // Button4 + // + _Button4.Location = new Point(464, 24); + _Button4.Name = "_Button4"; + _Button4.Size = new Size(24, 20); + _Button4.TabIndex = 8; + _Button4.Text = "..."; + // + // TextBox10 + // + TextBox10.Location = new Point(144, 24); + TextBox10.Name = "TextBox10"; + TextBox10.Size = new Size(312, 20); + TextBox10.TabIndex = 6; + TextBox10.Text = "TextBox10"; + // + // Label29 + // + Label29.AutoSize = true; + Label29.ForeColor = Color.Black; + Label29.Location = new Point(17, 147); + Label29.Name = "Label29"; + Label29.Size = new Size(105, 13); + Label29.TabIndex = 36; + Label29.Text = "Posizione orizzontale"; + Label29.TextAlign = ContentAlignment.MiddleLeft; + // + // Label30 + // + Label30.AutoSize = true; + Label30.ForeColor = Color.Black; + Label30.Location = new Point(19, 203); + Label30.Name = "Label30"; + Label30.Size = new Size(93, 13); + Label30.TabIndex = 36; + Label30.Text = "Colore trasparente"; + Label30.TextAlign = ContentAlignment.MiddleLeft; + Label30.Visible = false; + // + // PictureBox3 + // + PictureBox3.BorderStyle = BorderStyle.FixedSingle; + PictureBox3.Location = new Point(216, 192); + PictureBox3.Name = "PictureBox3"; + PictureBox3.Size = new Size(24, 24); + PictureBox3.TabIndex = 44; + PictureBox3.TabStop = false; + PictureBox3.Visible = false; + // + // TabPage1 + // + TabPage1.Controls.Add(Panel1); + TabPage1.Controls.Add(GroupBox1); + TabPage1.Location = new Point(4, 22); + TabPage1.Name = "TabPage1"; + TabPage1.Padding = new Padding(3); + TabPage1.Size = new Size(513, 326); + TabPage1.TabIndex = 0; + TabPage1.Text = "Miniature"; + TabPage1.UseVisualStyleBackColor = true; + // + // GroupBox1 + // + GroupBox1.Controls.Add(Label46); + GroupBox1.Controls.Add(TextBox33); + GroupBox1.Controls.Add(Panel2); + GroupBox1.Controls.Add(Label5); + GroupBox1.Controls.Add(TextBox5); + GroupBox1.Controls.Add(Label6); + GroupBox1.Controls.Add(TextBox6); + GroupBox1.Controls.Add(Label3); + GroupBox1.Controls.Add(TextBox3); + GroupBox1.Controls.Add(CheckBox1); + GroupBox1.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox1.Location = new Point(6, 5); + GroupBox1.Name = "GroupBox1"; + GroupBox1.Size = new Size(350, 210); + GroupBox1.TabIndex = 25; + GroupBox1.TabStop = false; + GroupBox1.Text = "Miniature"; + // + // Label46 + // + Label46.AutoSize = true; + Label46.Location = new Point(198, 43); + Label46.Name = "Label46"; + Label46.Size = new Size(40, 13); + Label46.TabIndex = 21; + Label46.Text = "Qualità"; + // + // TextBox33 + // + TextBox33.Location = new Point(244, 40); + TextBox33.Name = "TextBox33"; + TextBox33.Size = new Size(100, 20); + TextBox33.TabIndex = 20; + // + // Panel2 + // + Panel2.Controls.Add(RadioButton3); + Panel2.Controls.Add(RadioButton7); + Panel2.Controls.Add(RadioButton4); + Panel2.Controls.Add(RadioButton6); + Panel2.Controls.Add(RadioButton5); + Panel2.Location = new Point(56, 114); + Panel2.Name = "Panel2"; + Panel2.Size = new Size(235, 90); + Panel2.TabIndex = 19; + // + // RadioButton3 + // + RadioButton3.AutoSize = true; + RadioButton3.Location = new Point(15, 16); + RadioButton3.Name = "RadioButton3"; + RadioButton3.Size = new Size(99, 17); + RadioButton3.TabIndex = 14; + RadioButton3.TabStop = true; + RadioButton3.Text = "Aggiungi Scritta"; + RadioButton3.UseVisualStyleBackColor = true; + // + // RadioButton7 + // + RadioButton7.AutoSize = true; + RadioButton7.Location = new Point(129, 40); + RadioButton7.Name = "RadioButton7"; + RadioButton7.Size = new Size(95, 17); + RadioButton7.TabIndex = 18; + RadioButton7.TabStop = true; + RadioButton7.Text = "numero+tempo"; + RadioButton7.UseVisualStyleBackColor = true; + // + // RadioButton4 + // + RadioButton4.AutoSize = true; + RadioButton4.Location = new Point(15, 40); + RadioButton4.Name = "RadioButton4"; + RadioButton4.Size = new Size(95, 17); + RadioButton4.TabIndex = 15; + RadioButton4.TabStop = true; + RadioButton4.Text = "Aggiungi orario"; + RadioButton4.UseVisualStyleBackColor = true; + // + // RadioButton6 + // + RadioButton6.AutoSize = true; + RadioButton6.Location = new Point(129, 16); + RadioButton6.Name = "RadioButton6"; + RadioButton6.Size = new Size(83, 17); + RadioButton6.TabIndex = 17; + RadioButton6.TabStop = true; + RadioButton6.Text = "Numero foto"; + RadioButton6.UseVisualStyleBackColor = true; + // + // RadioButton5 + // + RadioButton5.AutoSize = true; + RadioButton5.Location = new Point(15, 65); + RadioButton5.Name = "RadioButton5"; + RadioButton5.Size = new Size(84, 17); + RadioButton5.TabIndex = 16; + RadioButton5.TabStop = true; + RadioButton5.Text = "Tempo Gara"; + RadioButton5.UseVisualStyleBackColor = true; + // + // Label5 + // + Label5.AutoSize = true; + Label5.ForeColor = Color.Black; + Label5.Location = new Point(24, 88); + Label5.Name = "Label5"; + Label5.Size = new Size(41, 13); + Label5.TabIndex = 12; + Label5.Text = "Altezza"; + // + // TextBox5 + // + TextBox5.Location = new Point(72, 64); + TextBox5.Name = "TextBox5"; + TextBox5.Size = new Size(88, 20); + TextBox5.TabIndex = 10; + TextBox5.Text = "TextBox5"; + // + // Label6 + // + Label6.AutoSize = true; + Label6.ForeColor = Color.Black; + Label6.Location = new Point(8, 64); + Label6.Name = "Label6"; + Label6.Size = new Size(56, 13); + Label6.TabIndex = 13; + Label6.Text = "Larghezza"; + // + // TextBox6 + // + TextBox6.Location = new Point(72, 88); + TextBox6.Name = "TextBox6"; + TextBox6.Size = new Size(88, 20); + TextBox6.TabIndex = 11; + TextBox6.Text = "TextBox6"; + // + // Label3 + // + Label3.AutoSize = true; + Label3.ForeColor = Color.Black; + Label3.Location = new Point(24, 40); + Label3.Name = "Label3"; + Label3.Size = new Size(44, 13); + Label3.TabIndex = 7; + Label3.Text = "Suffisso"; + // + // TextBox3 + // + TextBox3.Location = new Point(72, 40); + TextBox3.Name = "TextBox3"; + TextBox3.Size = new Size(88, 20); + TextBox3.TabIndex = 6; + TextBox3.Text = "TextBox3"; + // + // CheckBox1 + // + CheckBox1.ForeColor = Color.Black; + CheckBox1.Location = new Point(72, 16); + CheckBox1.Name = "CheckBox1"; + CheckBox1.Size = new Size(104, 24); + CheckBox1.TabIndex = 5; + CheckBox1.Text = "Crea miniature"; + // + // TabPage2 + // + TabPage2.Controls.Add(GroupBox2); + TabPage2.Location = new Point(4, 22); + TabPage2.Name = "TabPage2"; + TabPage2.Padding = new Padding(3); + TabPage2.Size = new Size(513, 326); + TabPage2.TabIndex = 5; + TabPage2.Text = "Foto"; + TabPage2.UseVisualStyleBackColor = true; + // + // GroupBox2 + // + GroupBox2.Controls.Add(Label45); + GroupBox2.Controls.Add(TextBox32); + GroupBox2.Controls.Add(TextBox26); + GroupBox2.Controls.Add(Label37); + GroupBox2.Controls.Add(Label38); + GroupBox2.Controls.Add(TextBox27); + GroupBox2.Controls.Add(Label39); + GroupBox2.Controls.Add(TextBox28); + GroupBox2.Controls.Add(CheckBox15); + GroupBox2.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox2.Location = new Point(3, 6); + GroupBox2.Name = "GroupBox2"; + GroupBox2.Size = new Size(304, 156); + GroupBox2.TabIndex = 36; + GroupBox2.TabStop = false; + GroupBox2.Text = "Foto grande"; + // + // Label45 + // + Label45.AutoSize = true; + Label45.Location = new Point(11, 86); + Label45.Name = "Label45"; + Label45.Size = new Size(40, 13); + Label45.TabIndex = 22; + Label45.Text = "Qualità"; + // + // TextBox32 + // + TextBox32.Location = new Point(72, 80); + TextBox32.Name = "TextBox32"; + TextBox32.Size = new Size(72, 20); + TextBox32.TabIndex = 21; + TextBox32.Text = "100"; + // + // TextBox26 + // + TextBox26.Location = new Point(224, 48); + TextBox26.Name = "TextBox26"; + TextBox26.Size = new Size(56, 20); + TextBox26.TabIndex = 20; + TextBox26.Text = "TextBox26"; + // + // Label37 + // + Label37.ForeColor = Color.Black; + Label37.Location = new Point(168, 48); + Label37.Name = "Label37"; + Label37.Size = new Size(48, 16); + Label37.TabIndex = 19; + Label37.Text = "Suffisso"; + Label37.TextAlign = ContentAlignment.MiddleRight; + // + // Label38 + // + Label38.AutoSize = true; + Label38.ForeColor = Color.Black; + Label38.Location = new Point(24, 24); + Label38.Name = "Label38"; + Label38.Size = new Size(41, 13); + Label38.TabIndex = 16; + Label38.Text = "Altezza"; + // + // TextBox27 + // + TextBox27.Location = new Point(72, 24); + TextBox27.Name = "TextBox27"; + TextBox27.Size = new Size(72, 20); + TextBox27.TabIndex = 14; + TextBox27.Text = "TextBox27"; + // + // Label39 + // + Label39.AutoSize = true; + Label39.ForeColor = Color.Black; + Label39.Location = new Point(8, 48); + Label39.Name = "Label39"; + Label39.Size = new Size(56, 13); + Label39.TabIndex = 17; + Label39.Text = "Larghezza"; + // + // TextBox28 + // + TextBox28.Location = new Point(72, 48); + TextBox28.Name = "TextBox28"; + TextBox28.Size = new Size(72, 20); + TextBox28.TabIndex = 15; + TextBox28.Text = "TextBox28"; + // + // CheckBox15 + // + CheckBox15.Checked = true; + CheckBox15.CheckState = CheckState.Checked; + CheckBox15.ForeColor = Color.Black; + CheckBox15.Location = new Point(168, 16); + CheckBox15.Name = "CheckBox15"; + CheckBox15.Size = new Size(120, 32); + CheckBox15.TabIndex = 18; + CheckBox15.Text = "Mantieni dimensioni originali"; + // + // TabPage3 + // + TabPage3.Controls.Add(GroupBox10); + TabPage3.Controls.Add(GroupBox9); + TabPage3.Controls.Add(GroupBox5); + TabPage3.Controls.Add(GroupBox4); + TabPage3.Location = new Point(4, 22); + TabPage3.Name = "TabPage3"; + TabPage3.Padding = new Padding(3); + TabPage3.Size = new Size(513, 326); + TabPage3.TabIndex = 2; + TabPage3.Text = "Testo"; + TabPage3.UseVisualStyleBackColor = true; + // + // GroupBox10 + // + GroupBox10.Controls.Add(Label42); + GroupBox10.Controls.Add(Label41); + GroupBox10.Controls.Add(TextBox31); + GroupBox10.Controls.Add(TextBox30); + GroupBox10.Location = new Point(316, 53); + GroupBox10.Name = "GroupBox10"; + GroupBox10.Size = new Size(186, 73); + GroupBox10.TabIndex = 39; + GroupBox10.TabStop = false; + GroupBox10.Text = "Testo foto verticali"; + // + // Label42 + // + Label42.AutoSize = true; + Label42.Location = new Point(7, 46); + Label42.Name = "Label42"; + Label42.Size = new Size(45, 13); + Label42.TabIndex = 3; + Label42.Text = "Margine"; + // + // Label41 + // + Label41.AutoSize = true; + Label41.Location = new Point(7, 25); + Label41.Name = "Label41"; + Label41.Size = new Size(108, 13); + Label41.TabIndex = 2; + Label41.Text = "Dimensione Carattere"; + // + // TextBox31 + // + TextBox31.Location = new Point(131, 46); + TextBox31.Name = "TextBox31"; + TextBox31.Size = new Size(39, 20); + TextBox31.TabIndex = 1; + // + // TextBox30 + // + TextBox30.Location = new Point(131, 22); + TextBox30.Name = "TextBox30"; + TextBox30.Size = new Size(39, 20); + TextBox30.TabIndex = 0; + // + // GroupBox9 + // + GroupBox9.Controls.Add(CheckBox17); + GroupBox9.Controls.Add(CheckBox16); + GroupBox9.Location = new Point(316, 6); + GroupBox9.Name = "GroupBox9"; + GroupBox9.Size = new Size(186, 45); + GroupBox9.TabIndex = 38; + GroupBox9.TabStop = false; + GroupBox9.Text = "Slide show"; + // + // CheckBox17 + // + CheckBox17.AutoSize = true; + CheckBox17.Location = new Point(96, 18); + CheckBox17.Name = "CheckBox17"; + CheckBox17.Size = new Size(84, 17); + CheckBox17.TabIndex = 1; + CheckBox17.Text = "Numero foto"; + CheckBox17.UseVisualStyleBackColor = true; + // + // CheckBox16 + // + CheckBox16.AutoSize = true; + CheckBox16.Location = new Point(6, 19); + CheckBox16.Name = "CheckBox16"; + CheckBox16.Size = new Size(49, 17); + CheckBox16.TabIndex = 0; + CheckBox16.Text = "Data"; + CheckBox16.UseVisualStyleBackColor = true; + // + // GroupBox5 + // + GroupBox5.Controls.Add(TextBox34); + GroupBox5.Controls.Add(_Button8); + GroupBox5.Controls.Add(Label36); + GroupBox5.Controls.Add(TextBox25); + GroupBox5.Controls.Add(Label35); + GroupBox5.Controls.Add(ComboBox3); + GroupBox5.Controls.Add(TextBox11); + GroupBox5.Controls.Add(Label12); + GroupBox5.Controls.Add(Label11); + GroupBox5.Controls.Add(CheckBox3); + GroupBox5.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox5.Location = new Point(6, 6); + GroupBox5.Name = "GroupBox5"; + GroupBox5.Size = new Size(304, 120); + GroupBox5.TabIndex = 37; + GroupBox5.TabStop = false; + GroupBox5.Text = "Carattere"; + // + // TextBox34 + // + TextBox34.Location = new Point(160, 91); + TextBox34.Name = "TextBox34"; + TextBox34.Size = new Size(56, 20); + TextBox34.TabIndex = 36; + TextBox34.TextAlign = HorizontalAlignment.Right; + // + // Button8 + // + _Button8.ForeColor = Color.Black; + _Button8.Location = new Point(222, 89); + _Button8.Name = "_Button8"; + _Button8.Size = new Size(74, 24); + _Button8.TabIndex = 35; + _Button8.Text = "Scegli..."; + // + // Label36 + // + Label36.ForeColor = Color.Black; + Label36.Location = new Point(8, 60); + Label36.Name = "Label36"; + Label36.Size = new Size(120, 19); + Label36.TabIndex = 34; + Label36.Text = "Dimensione miniatura"; + Label36.TextAlign = ContentAlignment.MiddleLeft; + // + // TextBox25 + // + TextBox25.Location = new Point(160, 59); + TextBox25.Name = "TextBox25"; + TextBox25.Size = new Size(56, 20); + TextBox25.TabIndex = 33; + TextBox25.Text = "TextBox25"; + // + // Label35 + // + Label35.ForeColor = Color.Black; + Label35.Location = new Point(8, 93); + Label35.Name = "Label35"; + Label35.Size = new Size(72, 16); + Label35.TabIndex = 32; + Label35.Text = "Colore RGB"; + Label35.TextAlign = ContentAlignment.MiddleLeft; + // + // ComboBox3 + // + ComboBox3.Location = new Point(96, 8); + ComboBox3.Name = "ComboBox3"; + ComboBox3.Size = new Size(120, 21); + ComboBox3.TabIndex = 28; + ComboBox3.Text = "ComboBox3"; + // + // TextBox11 + // + TextBox11.Location = new Point(160, 35); + TextBox11.Name = "TextBox11"; + TextBox11.Size = new Size(56, 20); + TextBox11.TabIndex = 27; + TextBox11.Text = "TextBox11"; + // + // Label12 + // + Label12.AutoSize = true; + Label12.ForeColor = Color.Black; + Label12.Location = new Point(8, 38); + Label12.Name = "Label12"; + Label12.Size = new Size(62, 13); + Label12.TabIndex = 26; + Label12.Text = "Dimensione"; + Label12.TextAlign = ContentAlignment.MiddleLeft; + // + // Label11 + // + Label11.AutoSize = true; + Label11.ForeColor = Color.Black; + Label11.Location = new Point(56, 8); + Label11.Name = "Label11"; + Label11.Size = new Size(28, 13); + Label11.TabIndex = 22; + Label11.Text = "Font"; + // + // CheckBox3 + // + CheckBox3.ForeColor = Color.Black; + CheckBox3.Location = new Point(224, 8); + CheckBox3.Name = "CheckBox3"; + CheckBox3.Size = new Size(72, 24); + CheckBox3.TabIndex = 24; + CheckBox3.Text = "Grassetto"; + // + // GroupBox4 + // + GroupBox4.Controls.Add(Label40); + GroupBox4.Controls.Add(TextBox29); + GroupBox4.Controls.Add(TextBox18); + GroupBox4.Controls.Add(Label26); + GroupBox4.Controls.Add(DateTimePicker1); + GroupBox4.Controls.Add(CheckBox8); + GroupBox4.Controls.Add(TextBox9); + GroupBox4.Controls.Add(CheckBox7); + GroupBox4.Controls.Add(Label4); + GroupBox4.Controls.Add(TextBox4); + GroupBox4.Controls.Add(Label9); + GroupBox4.Controls.Add(Label13); + GroupBox4.Controls.Add(ComboBox1); + GroupBox4.Controls.Add(ComboBox2); + GroupBox4.Controls.Add(Label14); + GroupBox4.Controls.Add(TextBox12); + GroupBox4.Controls.Add(Label15); + GroupBox4.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox4.Location = new Point(6, 132); + GroupBox4.Name = "GroupBox4"; + GroupBox4.Size = new Size(496, 186); + GroupBox4.TabIndex = 36; + GroupBox4.TabStop = false; + GroupBox4.Text = "Testo da applicare"; + // + // Label40 + // + Label40.AutoSize = true; + Label40.Location = new Point(8, 52); + Label40.Name = "Label40"; + Label40.Size = new Size(48, 13); + Label40.TabIndex = 40; + Label40.Text = "Verticale"; + // + // TextBox29 + // + TextBox29.Location = new Point(72, 49); + TextBox29.Multiline = true; + TextBox29.Name = "TextBox29"; + TextBox29.Size = new Size(408, 44); + TextBox29.TabIndex = 39; + // + // TextBox18 + // + TextBox18.Location = new Point(232, 156); + TextBox18.Name = "TextBox18"; + TextBox18.Size = new Size(100, 20); + TextBox18.TabIndex = 38; + // + // Label26 + // + Label26.AutoSize = true; + Label26.ForeColor = Color.Black; + Label26.Location = new Point(344, 156); + Label26.Name = "Label26"; + Label26.Size = new Size(48, 13); + Label26.TabIndex = 37; + Label26.Text = "partenza"; + // + // DateTimePicker1 + // + DateTimePicker1.Format = DateTimePickerFormat.Time; + DateTimePicker1.Location = new Point(392, 156); + DateTimePicker1.Name = "DateTimePicker1"; + DateTimePicker1.Size = new Size(88, 20); + DateTimePicker1.TabIndex = 36; + // + // CheckBox8 + // + CheckBox8.ForeColor = Color.Black; + CheckBox8.Location = new Point(72, 156); + CheckBox8.Name = "CheckBox8"; + CheckBox8.Size = new Size(56, 16); + CheckBox8.TabIndex = 35; + CheckBox8.Text = "Orario"; + // + // TextBox9 + // + TextBox9.Location = new Point(120, 108); + TextBox9.Name = "TextBox9"; + TextBox9.Size = new Size(56, 20); + TextBox9.TabIndex = 20; + TextBox9.Text = "TextBox9"; + // + // CheckBox7 + // + CheckBox7.ForeColor = Color.Black; + CheckBox7.Location = new Point(136, 156); + CheckBox7.Name = "CheckBox7"; + CheckBox7.Size = new Size(88, 16); + CheckBox7.TabIndex = 34; + CheckBox7.Text = "Tempo gara"; + // + // Label4 + // + Label4.AutoSize = true; + Label4.ForeColor = Color.Black; + Label4.Location = new Point(8, 24); + Label4.Name = "Label4"; + Label4.Size = new Size(59, 13); + Label4.TabIndex = 9; + Label4.Text = "Orizzontale"; + // + // TextBox4 + // + TextBox4.Location = new Point(72, 24); + TextBox4.Name = "TextBox4"; + TextBox4.Size = new Size(408, 20); + TextBox4.TabIndex = 8; + TextBox4.Text = "TextBox4"; + // + // Label9 + // + Label9.AutoSize = true; + Label9.ForeColor = Color.Black; + Label9.Location = new Point(8, 108); + Label9.Name = "Label9"; + Label9.Size = new Size(110, 13); + Label9.TabIndex = 19; + Label9.Text = "Trasparenza (0-100%)"; + // + // Label13 + // + Label13.AutoSize = true; + Label13.ForeColor = Color.Black; + Label13.Location = new Point(16, 132); + Label13.Name = "Label13"; + Label13.Size = new Size(52, 13); + Label13.TabIndex = 29; + Label13.Text = "Posizione"; + // + // ComboBox1 + // + ComboBox1.Location = new Point(72, 132); + ComboBox1.Name = "ComboBox1"; + ComboBox1.Size = new Size(104, 21); + ComboBox1.TabIndex = 28; + ComboBox1.Text = "ComboBox1"; + // + // ComboBox2 + // + ComboBox2.Location = new Point(376, 132); + ComboBox2.Name = "ComboBox2"; + ComboBox2.Size = new Size(104, 21); + ComboBox2.TabIndex = 31; + ComboBox2.Text = "ComboBox2"; + // + // Label14 + // + Label14.AutoSize = true; + Label14.ForeColor = Color.Black; + Label14.Location = new Point(304, 132); + Label14.Name = "Label14"; + Label14.Size = new Size(67, 13); + Label14.TabIndex = 30; + Label14.Text = "Allineamento"; + // + // TextBox12 + // + TextBox12.Location = new Point(376, 108); + TextBox12.Name = "TextBox12"; + TextBox12.Size = new Size(104, 20); + TextBox12.TabIndex = 33; + TextBox12.Text = "TextBox12"; + // + // Label15 + // + Label15.AutoSize = true; + Label15.ForeColor = Color.Black; + Label15.Location = new Point(296, 108); + Label15.Name = "Label15"; + Label15.Size = new Size(75, 13); + Label15.TabIndex = 32; + Label15.Text = "Margine (pixel)"; + // + // TabPage5 + // + TabPage5.Controls.Add(GroupBox3); + TabPage5.Controls.Add(GroupBox8); + TabPage5.Controls.Add(GroupBox7); + TabPage5.Location = new Point(4, 22); + TabPage5.Name = "TabPage5"; + TabPage5.Padding = new Padding(3); + TabPage5.Size = new Size(513, 326); + TabPage5.TabIndex = 4; + TabPage5.Text = "Generale"; + TabPage5.UseVisualStyleBackColor = true; + // + // GroupBox3 + // + GroupBox3.Controls.Add(CheckBox6); + GroupBox3.Controls.Add(_Button3); + GroupBox3.Controls.Add(_Button2); + GroupBox3.Controls.Add(Label1); + GroupBox3.Controls.Add(Label2); + GroupBox3.Controls.Add(TextBox1); + GroupBox3.Controls.Add(TextBox2); + GroupBox3.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox3.Location = new Point(6, 6); + GroupBox3.Name = "GroupBox3"; + GroupBox3.Size = new Size(496, 101); + GroupBox3.TabIndex = 35; + GroupBox3.TabStop = false; + GroupBox3.Text = "Directory"; + // + // CheckBox6 + // + CheckBox6.ForeColor = Color.Black; + CheckBox6.Location = new Point(80, 64); + CheckBox6.Name = "CheckBox6"; + CheckBox6.Size = new Size(152, 24); + CheckBox6.TabIndex = 25; + CheckBox6.Text = "aggiorna le sottodirectory"; + // + // Button3 + // + _Button3.Location = new Point(462, 40); + _Button3.Name = "_Button3"; + _Button3.Size = new Size(24, 20); + _Button3.TabIndex = 6; + _Button3.Text = "..."; + // + // Button2 + // + _Button2.Location = new Point(462, 16); + _Button2.Name = "_Button2"; + _Button2.Size = new Size(24, 20); + _Button2.TabIndex = 5; + _Button2.Text = "..."; + // + // Label1 + // + Label1.AutoSize = true; + Label1.ForeColor = Color.Black; + Label1.Location = new Point(6, 19); + Label1.Name = "Label1"; + Label1.Size = new Size(50, 13); + Label1.TabIndex = 3; + Label1.Text = "Sorgente"; + // + // Label2 + // + Label2.AutoSize = true; + Label2.ForeColor = Color.Black; + Label2.Location = new Point(6, 43); + Label2.Name = "Label2"; + Label2.Size = new Size(68, 13); + Label2.TabIndex = 4; + Label2.Text = "Destinazione"; + // + // TextBox1 + // + TextBox1.Location = new Point(80, 16); + TextBox1.Name = "TextBox1"; + TextBox1.Size = new Size(376, 20); + TextBox1.TabIndex = 0; + TextBox1.Text = "TextBox1"; + // + // TextBox2 + // + TextBox2.Location = new Point(80, 40); + TextBox2.Name = "TextBox2"; + TextBox2.Size = new Size(376, 20); + TextBox2.TabIndex = 1; + TextBox2.Text = "TextBox2"; + // + // GroupBox8 + // + GroupBox8.Controls.Add(RadioButton2); + GroupBox8.Controls.Add(RadioButton1); + GroupBox8.Controls.Add(TextBox21); + GroupBox8.Controls.Add(Label34); + GroupBox8.Controls.Add(TextBox20); + GroupBox8.Controls.Add(Label33); + GroupBox8.Controls.Add(Label31); + GroupBox8.Controls.Add(CheckBox11); + GroupBox8.Controls.Add(TextBox17); + GroupBox8.Controls.Add(Label32); + GroupBox8.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox8.Location = new Point(204, 113); + GroupBox8.Name = "GroupBox8"; + GroupBox8.Size = new Size(192, 152); + GroupBox8.TabIndex = 47; + GroupBox8.TabStop = false; + GroupBox8.Text = "Sottocartelle"; + // + // RadioButton2 + // + RadioButton2.ForeColor = Color.Black; + RadioButton2.Location = new Point(32, 128); + RadioButton2.Name = "RadioButton2"; + RadioButton2.Size = new Size(136, 16); + RadioButton2.TabIndex = 38; + RadioButton2.Text = "Numerazione files"; + // + // RadioButton1 + // + RadioButton1.Checked = true; + RadioButton1.ForeColor = Color.Black; + RadioButton1.Location = new Point(32, 112); + RadioButton1.Name = "RadioButton1"; + RadioButton1.Size = new Size(152, 16); + RadioButton1.TabIndex = 37; + RadioButton1.TabStop = true; + RadioButton1.Text = "Numerazione progressiva"; + // + // TextBox21 + // + TextBox21.Location = new Point(128, 88); + TextBox21.Name = "TextBox21"; + TextBox21.Size = new Size(56, 20); + TextBox21.TabIndex = 34; + TextBox21.Text = "4"; + // + // Label34 + // + Label34.ForeColor = Color.Black; + Label34.Location = new Point(8, 88); + Label34.Name = "Label34"; + Label34.Size = new Size(112, 16); + Label34.TabIndex = 33; + Label34.Text = "Num. cifre contatore"; + Label34.TextAlign = ContentAlignment.MiddleRight; + // + // TextBox20 + // + TextBox20.Location = new Point(56, 64); + TextBox20.Name = "TextBox20"; + TextBox20.Size = new Size(128, 20); + TextBox20.TabIndex = 32; + TextBox20.Text = "TextBox20"; + // + // Label33 + // + Label33.ForeColor = Color.Black; + Label33.Location = new Point(6, 67); + Label33.Name = "Label33"; + Label33.Size = new Size(48, 16); + Label33.TabIndex = 31; + Label33.Text = "Suffisso"; + // + // Label31 + // + Label31.ForeColor = Color.Black; + Label31.Location = new Point(24, 40); + Label31.Name = "Label31"; + Label31.Size = new Size(32, 16); + Label31.TabIndex = 30; + Label31.Text = "ogni"; + // + // CheckBox11 + // + CheckBox11.ForeColor = Color.Black; + CheckBox11.Location = new Point(56, 16); + CheckBox11.Name = "CheckBox11"; + CheckBox11.Size = new Size(112, 16); + CheckBox11.TabIndex = 29; + CheckBox11.Text = "crea sottocartelle"; + // + // TextBox17 + // + TextBox17.Location = new Point(56, 40); + TextBox17.Name = "TextBox17"; + TextBox17.Size = new Size(64, 20); + TextBox17.TabIndex = 27; + TextBox17.Text = "99"; + // + // Label32 + // + Label32.ForeColor = Color.Black; + Label32.Location = new Point(128, 40); + Label32.Name = "Label32"; + Label32.Size = new Size(24, 16); + Label32.TabIndex = 28; + Label32.Text = "file"; + // + // GroupBox7 + // + GroupBox7.Controls.Add(CheckBox10); + GroupBox7.Controls.Add(CheckBox9); + GroupBox7.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(192))); + GroupBox7.Location = new Point(6, 113); + GroupBox7.Name = "GroupBox7"; + GroupBox7.Size = new Size(192, 88); + GroupBox7.TabIndex = 45; + GroupBox7.TabStop = false; + GroupBox7.Text = "Generale"; + // + // CheckBox10 + // + CheckBox10.ForeColor = Color.Black; + CheckBox10.Location = new Point(16, 37); + CheckBox10.Name = "CheckBox10"; + CheckBox10.Size = new Size(136, 16); + CheckBox10.TabIndex = 1; + CheckBox10.Text = "Rotazione automatica"; + // + // CheckBox9 + // + CheckBox9.Checked = true; + CheckBox9.CheckState = CheckState.Checked; + CheckBox9.ForeColor = Color.Black; + CheckBox9.Location = new Point(16, 18); + CheckBox9.Name = "CheckBox9"; + CheckBox9.Size = new Size(80, 16); + CheckBox9.TabIndex = 0; + CheckBox9.Text = "Forza Jpg"; + // + // TabControl1 + // + TabControl1.Controls.Add(TabPage5); + TabControl1.Controls.Add(TabPage3); + TabControl1.Controls.Add(TabPage2); + TabControl1.Controls.Add(TabPage1); + TabControl1.Controls.Add(TabPage4); + TabControl1.Location = new Point(12, 12); + TabControl1.Name = "TabControl1"; + TabControl1.SelectedIndex = 0; + TabControl1.Size = new Size(521, 352); + TabControl1.TabIndex = 48; + // + // ProgressBar1 + // + ProgressBar1.Location = new Point(539, 211); + ProgressBar1.Name = "ProgressBar1"; + ProgressBar1.Size = new Size(192, 23); + ProgressBar1.TabIndex = 52; + // + // CheckBox12 + // + _CheckBox12.ForeColor = Color.Black; + _CheckBox12.Location = new Point(10, 19); + _CheckBox12.Name = "_CheckBox12"; + _CheckBox12.Size = new Size(104, 21); + _CheckBox12.TabIndex = 35; + _CheckBox12.Text = "Aggiungi orario"; + // + // CheckBox4 + // + _CheckBox4.ForeColor = Color.Black; + _CheckBox4.Location = new Point(10, 3); + _CheckBox4.Name = "_CheckBox4"; + _CheckBox4.Size = new Size(104, 17); + _CheckBox4.TabIndex = 34; + _CheckBox4.Text = "Aggiungi scritta"; + // + // CheckBox18 + // + _CheckBox18.AutoSize = true; + _CheckBox18.Location = new Point(140, 3); + _CheckBox18.Name = "_CheckBox18"; + _CheckBox18.Size = new Size(84, 17); + _CheckBox18.TabIndex = 36; + _CheckBox18.Text = "Numero foto"; + _CheckBox18.UseVisualStyleBackColor = true; + // + // Panel1 + // + Panel1.Controls.Add(_CheckBox18); + Panel1.Controls.Add(_CheckBox4); + Panel1.Controls.Add(_CheckBox12); + Panel1.Location = new Point(52, 236); + Panel1.Name = "Panel1"; + Panel1.Size = new Size(304, 73); + Panel1.TabIndex = 26; + Panel1.Visible = false; + // + // Form1 + // + AutoScaleBaseSize = new Size(5, 13); + ClientSize = new Size(740, 375); + Controls.Add(ProgressBar1); + Controls.Add(Label44); + Controls.Add(CheckBox22); + Controls.Add(Label43); + Controls.Add(TabControl1); + Controls.Add(Label27); + Controls.Add(_Button7); + Controls.Add(_Button5); + Controls.Add(Label20); + Controls.Add(Label19); + Controls.Add(Label18); + Controls.Add(Label17); + Controls.Add(Label10); + Controls.Add(_Button1); + Controls.Add(_Button6); + MaximizeBox = false; + MaximumSize = new Size(756, 414); + MinimumSize = new Size(756, 414); + Name = "Form1"; + Text = "Image Catalog"; + TabPage4.ResumeLayout(false); + GroupBox6.ResumeLayout(false); + GroupBox6.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)PictureBox2).EndInit(); + ((System.ComponentModel.ISupportInitialize)_PictureBox1).EndInit(); + ((System.ComponentModel.ISupportInitialize)PictureBox3).EndInit(); + TabPage1.ResumeLayout(false); + GroupBox1.ResumeLayout(false); + GroupBox1.PerformLayout(); + Panel2.ResumeLayout(false); + Panel2.PerformLayout(); + TabPage2.ResumeLayout(false); + GroupBox2.ResumeLayout(false); + GroupBox2.PerformLayout(); + TabPage3.ResumeLayout(false); + GroupBox10.ResumeLayout(false); + GroupBox10.PerformLayout(); + GroupBox9.ResumeLayout(false); + GroupBox9.PerformLayout(); + GroupBox5.ResumeLayout(false); + GroupBox5.PerformLayout(); + GroupBox4.ResumeLayout(false); + GroupBox4.PerformLayout(); + TabPage5.ResumeLayout(false); + GroupBox3.ResumeLayout(false); + GroupBox3.PerformLayout(); + GroupBox8.ResumeLayout(false); + GroupBox8.PerformLayout(); + GroupBox7.ResumeLayout(false); + TabControl1.ResumeLayout(false); + Panel1.ResumeLayout(false); + Panel1.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } + + /* TODO ERROR: Skipped EndRegionDirectiveTrivia */ + /* TODO ERROR: Skipped DefineDirectiveTrivia */ + private bool StopAttivo; + private bool WaterSelectColor = false; + private int ContaFotoCuori; + private PicInfo[] TaskCuori; + private XYThreadPool MyPool = new XYThreadPool(); + private int ContaImmaginiThread; + private const int maxThreads = 15; + + private void setDefaults() + { + TextBox1.Text = ""; + TextBox2.Text = ""; + TextBox3.Text = ""; + TextBox4.Text = ""; + TextBox5.Text = ""; + TextBox6.Text = ""; + TextBox27.Text = ""; + TextBox28.Text = ""; + TextBox9.Text = ""; + TextBox11.Text = ""; + TextBox12.Text = ""; + TextBox13.Text = ""; + TextBox10.Text = ""; + TextBox14.Text = ""; + TextBox15.Text = ""; + TextBox16.Text = ""; + TextBox17.Text = ""; + TextBox19.Text = ""; + TextBox20.Text = ""; + TextBox21.Text = ""; + TextBox25.Text = ""; + TextBox26.Text = ""; + ComboBox1.Items.Add("Alto"); + ComboBox1.Items.Add("Basso"); + ComboBox1.SelectedIndex = 1; + ComboBox2.Items.Add("Sinistra"); + ComboBox2.Items.Add("Centro"); + ComboBox2.Items.Add("Destra"); + ComboBox2.SelectedIndex = 1; + ComboBox3.Items.Add("Arial"); + ComboBox3.Items.Add("Arial Black"); + ComboBox3.Items.Add("Arial Narrow"); + ComboBox3.Items.Add("Comic Sans MS"); + ComboBox3.Items.Add("Courier New"); + ComboBox3.Items.Add("System"); + ComboBox3.Items.Add("Times New Roman"); + ComboBox3.Items.Add("Verdana"); + ComboBox3.Items.Add("Wingdings"); + ComboBox3.SelectedIndex = 7; + ComboBox4.Items.Add("Sinistra"); + ComboBox4.Items.Add("Centro"); + ComboBox4.Items.Add("Destra"); + ComboBox4.SelectedIndex = 2; + ComboBox5.Items.Add("Alto"); + ComboBox5.Items.Add("Centro"); + ComboBox5.Items.Add("Basso"); + ComboBox5.SelectedIndex = 2; + } + + private void Form1_Load(object sender, EventArgs e) + { + Application.EnableVisualStyles(); + setDefaults(); + } + + private void FixPaths() + { + if (TextBox1.Text.EndsWith(@"\") == false) + { + TextBox1.Text += @"\"; + } + + if (TextBox2.Text.EndsWith(@"\") == false) + { + TextBox2.Text += @"\"; + } + } + + private void lockUI() + { + TabControl1.Enabled = false; + Button5.Enabled = false; + Button6.Enabled = false; + Button1.Enabled = false; + } + + private void unlockUI() + { + TabControl1.Enabled = true; + Button5.Enabled = true; + Button6.Enabled = true; + Button1.Enabled = true; + } + + private void btnCreaCatalogo_Click(object sender, EventArgs e) + { + lockUI(); + DateTime timeStart; + DateTime timeStop; + timeStart = DateAndTime.TimeOfDay; + FixPaths(); + Label10.Text = ""; + Label17.Text = "0"; + Label18.Text = "0"; + setPicSettings(TextBox1.Text, TextBox2.Text); + /* TODO ERROR: Skipped IfDirectiveTrivia */ + ProgressBar1.Minimum = 0; + ProgressBar1.Step = 1; + ProgressBar1.Value = 0; + var t1 = new Thread(creaCatalogoThread); + t1.IsBackground = true; + t1.Start(); + + /* TODO ERROR: Skipped ElseDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ + + + + } + + private void creaCatalogoThread() + { + var timeStart = DateAndTime.TimeOfDay; + MyPool.StopThreadPool(); + MyPool.StartThreadPool(0, maxThreads); + ContaImmaginiThread = 0; + creaImmaginiWithThreadMod(TextBox1.Text, TextBox2.Text); + ThreadPoolWorkItem ThAttivo = null; + int i = 0; + while (i != ContaImmaginiThread) + { + Thread.Sleep(100); + ThAttivo = MyPool.ExtractWorkItem(); + if (ThAttivo is object) + { + i += 1; + // stepProgressBar() + setLabel10Text("File: " + ThAttivo.m_sName); + + // setLabel18Text(ContaImmaginiThread.ToString) + // setLabel18Text(i.ToString) + + + // Label10.Text = "File: " & ThAttivo.m_sName + // Label18.Text = ContaImmaginiThread.ToString + } + } + + MyPool.StopThreadPool(); + var timeStop = DateAndTime.TimeOfDay; + setLabel10Text("Finito"); + setLabel43Text(CalcTime(timeStart, timeStop)); + } + + private void creaCatalogo(DateTime timeStart, DateTime timeStop) + { + // asdfg + MyPool.StopThreadPool(); + MyPool.StartThreadPool(0, maxThreads); + ContaImmaginiThread = 0; + creaImmaginiWithThreadMod(TextBox1.Text, TextBox2.Text); + ThreadPoolWorkItem ThAttivo = null; + int i = 0; + while (i != ContaImmaginiThread) + { + Thread.Sleep(100); + ThAttivo = MyPool.ExtractWorkItem(); + if (ThAttivo is object) + { + i += 1; + Label10.Text = "File: " + ThAttivo.m_sName; + Label18.Text = ContaImmaginiThread.ToString(); + } + } + + MyPool.StopThreadPool(); + timeStop = DateAndTime.TimeOfDay; + CalcTime(timeStart, timeStop); + Label10.Text = "Finito"; + if (CheckBox22.Checked == true) + { + Interaction.Shell(@"%windir%\System32\shutdown.exe"); + } + } + + private string CalcTime(DateTime timeStart, DateTime timeStop) + { + long timediffH, timediffS; + long timediffM; + timediffM = DateAndTime.DateDiff(DateInterval.Minute, timeStart, timeStop); + timediffS = DateAndTime.DateDiff(DateInterval.Second, timeStart, timeStop); + timediffH = DateAndTime.DateDiff(DateInterval.Hour, timeStart, timeStop); + // dim s As String = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + string s = "S:" + timediffS.ToString(); + // Label43.Text = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + return s; + } + + private void Button2_Click(object sender, EventArgs e) + { + var DirSearch = new FolderBrowserDialog(); + DirSearch.SelectedPath = TextBox1.Text; + if (DialogResult.OK == DirSearch.ShowDialog()) + { + string DirectoryScelta = DirSearch.SelectedPath; + if (DirectoryScelta.EndsWith(@"\") == false) + { + DirectoryScelta += @"\"; + } + + TextBox1.Text = DirectoryScelta; + } + } + + private void Button3_Click(object sender, EventArgs e) + { + var DirSearch = new FolderBrowserDialog(); + DirSearch.SelectedPath = TextBox2.Text; + if (DialogResult.OK == DirSearch.ShowDialog()) + { + string DirectoryScelta = DirSearch.SelectedPath; + if (DirectoryScelta.EndsWith(@"\") == false) + { + DirectoryScelta += @"\"; + } + + TextBox2.Text = DirectoryScelta; + } + + // Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + // Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + // openFileDialog.InitialDirectory = TextBox1.Text + // openFileDialog.Filter = "Bitmap files (*.bmp)|*.bmp|Jpeg files (*.jpg)|*.jpg|All valid files (*.*)|*.*" + // openFileDialog.FilterIndex = 2 + // openFileDialog.RestoreDirectory = True + + // If DialogResult.OK = openFileDialog.ShowDialog() Then + // Dim IlNome As String = openFileDialog.FileName + // Dim NomeFine As String = "" + // Dim i As Integer + + // Dim Elenco As String() + // Elenco = IlNome.Split(New Char() {"\"c}) + // For i = 0 To Elenco.Length - 1 + // NomeFine &= Elenco(i) & "\" + // Next + + // TextBox1.Text = NomeFine + // End If + } + + private void Button5_Click(object sender, EventArgs e) + { + var SaveFileDlg = new SaveFileDialog(); + + // SaveFileDlg.InitialDirectory = "c:\" + SaveFileDlg.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*"; + SaveFileDlg.FilterIndex = 0; + SaveFileDlg.RestoreDirectory = true; + if (DialogResult.OK == SaveFileDlg.ShowDialog()) + { + string IlNome = SaveFileDlg.FileName; + Module1.SetupIni.NomeFileSetup = IlNome; + Module1.SetupIni.AggiornaParametro("DirSorgente", TextBox1.Text); + Module1.SetupIni.AggiornaParametro("DirDestinazione", TextBox2.Text); + Module1.SetupIni.AggiornaParametro("DirSottoDirectory", CheckBox6.Checked); + Module1.SetupIni.AggiornaParametro("DirDividiDestinazione", CheckBox11.Checked); + Module1.SetupIni.AggiornaParametro("DirDividiNumFile", TextBox17.Text); + Module1.SetupIni.AggiornaParametro("DirDividiSuffisso", TextBox20.Text); + Module1.SetupIni.AggiornaParametro("DirDividiNumCifre", TextBox21.Text); + if (RadioButton1.Checked == true) + { + Module1.SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Progressiva"); + } + else + { + Module1.SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Files"); + } + + Module1.SetupIni.AggiornaParametro("MiniatureCrea", CheckBox1.Checked); + Module1.SetupIni.AggiornaParametro("MiniatureSuffisso", TextBox3.Text); + Module1.SetupIni.AggiornaParametro("MiniatureAltezza", TextBox5.Text); + Module1.SetupIni.AggiornaParametro("MiniatureLarghezza", TextBox6.Text); + Module1.SetupIni.AggiornaParametro("MiniatureAddScritta", RadioButton3.Checked); + Module1.SetupIni.AggiornaParametro("MiniatureAddOrario", RadioButton4.Checked); + Module1.SetupIni.AggiornaParametro("FotoAltezza", TextBox27.Text); + Module1.SetupIni.AggiornaParametro("FotoLarghezza", TextBox28.Text); + Module1.SetupIni.AggiornaParametro("FotoCodice", TextBox13.Text); + Module1.SetupIni.AggiornaParametro("FotoDimOriginali", CheckBox2.Checked); + Module1.SetupIni.AggiornaParametro("FontDimensione", TextBox11.Text); + Module1.SetupIni.AggiornaParametro("FontDimensioneMiniatura", TextBox25.Text); + Module1.SetupIni.AggiornaParametro("FontBold", CheckBox3.Checked); + Module1.SetupIni.AggiornaParametro("FontNome", ComboBox3.Text); + Module1.SetupIni.AggiornaParametro("TestoTesto", TextBox4.Text); + Module1.SetupIni.AggiornaParametro("TestoTrasparente", TextBox9.Text); + Module1.SetupIni.AggiornaParametro("TestoMargine", TextBox12.Text); + Module1.SetupIni.AggiornaParametro("TestoPosizione", ComboBox1.Text); + Module1.SetupIni.AggiornaParametro("TestoAllineamento", ComboBox2.Text); + Module1.SetupIni.AggiornaParametro("MarchioFile", TextBox10.Text); + Module1.SetupIni.AggiornaParametro("MarchioAltezza", TextBox14.Text); + Module1.SetupIni.AggiornaParametro("MarchioLarghezza", TextBox15.Text); + Module1.SetupIni.AggiornaParametro("MarchioMargine", TextBox16.Text); + Module1.SetupIni.AggiornaParametro("MarchioAllOrizzontale", ComboBox4.Text); + Module1.SetupIni.AggiornaParametro("MarchioAllVerticale", ComboBox5.Text); + Module1.SetupIni.AggiornaParametro("MarchioTrasparenza", TextBox19.Text); + Module1.SetupIni.AggiornaParametro("MarchioAggiungi", CheckBox5.Checked); + Module1.SetupIni.AggiornaParametro("TempoGara", CheckBox7.Checked); + Module1.SetupIni.AggiornaParametro("Orario", CheckBox8.Checked); + Module1.SetupIni.AggiornaParametro("EtichettaOrario", TextBox18.Text); + Module1.SetupIni.AggiornaParametro("GeneraleForzaJpg", CheckBox9.Checked); + Module1.SetupIni.AggiornaParametro("GeneraleRotazioneAutomatica", CheckBox10.Checked); + Module1.SetupIni.AggiornaParametro("GrandezzaVerticale", TextBox30.Text); + Module1.SetupIni.AggiornaParametro("MargineVerticale", TextBox31.Text); + Module1.SetupIni.AggiornaParametro("DimensioniOriginali", CheckBox15.Checked); + Module1.SetupIni.AggiornaParametro("TestoVerticale", TextBox29.Text); + Module1.SetupIni.AggiornaParametro("NomeMiniatura", RadioButton6.Checked); + Module1.SetupIni.AggiornaParametro("DataFoto", CheckBox16.Checked); + Module1.SetupIni.AggiornaParametro("NumeroFoto", CheckBox17.Checked); + Module1.SetupIni.AggiornaParametro("ColoreTestoRGB", TextBox34.Text); + Module1.SetupIni.AggiornaParametro("TempoSmall", RadioButton5.Checked); + Module1.SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked); + Module1.SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text); + Module1.SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text); + Module1.SetupIni.SalvaParametriSetup(); + Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome); + } + } + + private void Button6_Click(object sender, EventArgs e) + { + var openFileDialog = new OpenFileDialog(); + + // openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*"; + openFileDialog.FilterIndex = 0; + openFileDialog.RestoreDirectory = true; + if (DialogResult.OK == openFileDialog.ShowDialog()) + { + string IlNome = openFileDialog.FileName; + Module1.SetupIni.NomeFileSetup = IlNome; + Module1.SetupIni.CaricaParametriSetup(); + TextBox1.Text = Module1.SetupIni.LeggiParametroString("DirSorgente"); + TextBox2.Text = Module1.SetupIni.LeggiParametroString("DirDestinazione"); + CheckBox6.Checked = Module1.SetupIni.LeggiParametroBoolean("DirSottoDirectory"); + CheckBox11.Checked = Module1.SetupIni.LeggiParametroBoolean("DirDividiDestinazione"); + TextBox17.Text = Module1.SetupIni.LeggiParametroString("DirDividiNumFile"); + TextBox20.Text = Module1.SetupIni.LeggiParametroString("DirDividiSuffisso"); + TextBox21.Text = Module1.SetupIni.LeggiParametroString("DirDividiNumCifre"); + string TestoTemp = Module1.SetupIni.LeggiParametroString("DirDividiTipoNumerazione"); + if (TestoTemp.ToUpper() == "PROGRESSIVA") + { + RadioButton1.Checked = true; + } + else + { + RadioButton2.Checked = true; + } + + CheckBox1.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureCrea"); + TextBox3.Text = Module1.SetupIni.LeggiParametroString("MiniatureSuffisso"); + TextBox5.Text = Module1.SetupIni.LeggiParametroString("MiniatureAltezza"); + TextBox6.Text = Module1.SetupIni.LeggiParametroString("MiniatureLarghezza"); + RadioButton3.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureAddScritta"); + RadioButton4.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureAddOrario"); + TextBox27.Text = Module1.SetupIni.LeggiParametroString("FotoAltezza"); + TextBox28.Text = Module1.SetupIni.LeggiParametroString("FotoLarghezza"); + TextBox13.Text = Module1.SetupIni.LeggiParametroString("FotoCodice"); + CheckBox2.Checked = Module1.SetupIni.LeggiParametroBoolean("FotoDimOriginali"); + TextBox11.Text = Module1.SetupIni.LeggiParametroString("FontDimensione"); + TextBox25.Text = Module1.SetupIni.LeggiParametroString("FontDimensioneMiniatura"); + CheckBox3.Checked = Module1.SetupIni.LeggiParametroBoolean("FontBold"); + ComboBox3.Text = Module1.SetupIni.LeggiParametroString("FontNome"); + if (string.IsNullOrEmpty(TextBox25.Text)) + { + TextBox25.Text = "0"; + } + + TextBox4.Text = Module1.SetupIni.LeggiParametroString("TestoTesto"); + TextBox9.Text = Module1.SetupIni.LeggiParametroString("TestoTrasparente"); + TextBox12.Text = Module1.SetupIni.LeggiParametroString("TestoMargine"); + ComboBox1.Text = Module1.SetupIni.LeggiParametroString("TestoPosizione"); + ComboBox2.Text = Module1.SetupIni.LeggiParametroString("TestoAllineamento"); + TextBox10.Text = Module1.SetupIni.LeggiParametroString("MarchioFile"); + TextBox14.Text = Module1.SetupIni.LeggiParametroString("MarchioAltezza"); + TextBox15.Text = Module1.SetupIni.LeggiParametroString("MarchioLarghezza"); + TextBox16.Text = Module1.SetupIni.LeggiParametroString("MarchioMargine"); + ComboBox4.Text = Module1.SetupIni.LeggiParametroString("MarchioAllOrizzontale"); + ComboBox5.Text = Module1.SetupIni.LeggiParametroString("MarchioAllVerticale"); + TextBox19.Text = Module1.SetupIni.LeggiParametroString("MarchioTrasparenza"); + CheckBox5.Checked = Module1.SetupIni.LeggiParametroBoolean("MarchioAggiungi"); + CheckBox7.Checked = Module1.SetupIni.LeggiParametroBoolean("TempoGara"); + CheckBox8.Checked = Module1.SetupIni.LeggiParametroBoolean("Orario"); + TextBox18.Text = Module1.SetupIni.LeggiParametroString("EtichettaOrario"); + CheckBox9.Checked = Module1.SetupIni.LeggiParametroBoolean("GeneraleForzaJpg"); + CheckBox10.Checked = Module1.SetupIni.LeggiParametroBoolean("GeneraleRotazioneAutomatica"); + TextBox30.Text = Module1.SetupIni.LeggiParametroString("GrandezzaVerticale"); + TextBox31.Text = Module1.SetupIni.LeggiParametroString("MargineVerticale"); + CheckBox15.Checked = Module1.SetupIni.LeggiParametroBoolean("DimensioniOriginali"); + TextBox29.Text = Module1.SetupIni.LeggiParametroString("TestoVerticale"); + RadioButton6.Checked = Module1.SetupIni.LeggiParametroBoolean("NomeMiniatura"); + CheckBox16.Checked = Module1.SetupIni.LeggiParametroBoolean("DataFoto"); + CheckBox17.Checked = Module1.SetupIni.LeggiParametroBoolean("NumeroFoto"); + RadioButton5.Checked = Module1.SetupIni.LeggiParametroBoolean("TempoSmall"); + RadioButton7.Checked = Module1.SetupIni.LeggiParametroBoolean("NumTempoSmall"); + TextBox32.Text = Module1.SetupIni.LeggiParametroString("CompressioneJpeg"); + TextBox33.Text = Module1.SetupIni.LeggiParametroString("CompressioneJpegMiniatura"); + TextBox34.Text = Module1.SetupIni.LeggiParametroString("ColoreTestoRGB"); + if (File.Exists(TextBox10.Text)) + { + PictureBox1.Image = Image.FromFile(TextBox10.Text); + if (PictureBox1.Image.Height >= PictureBox1.Image.Width) + { + PictureBox1.Height = 160; + PictureBox1.Width = Conversions.ToInteger(160 * PictureBox1.Image.Width / (double)PictureBox1.Image.Height); + } + else + { + PictureBox1.Width = 224; + PictureBox1.Height = Conversions.ToInteger(224 * PictureBox1.Image.Height / (double)PictureBox1.Image.Width); + } + } + + Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome); + } + } + + private void setPicSettings(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + PicSettings.DirectorySorgente = TextBox1.Text; + PicSettings.DirectoryDestinazione = TextBox2.Text; + + // PicSettings.DestDir = DestDir + // PicSettings.SourceDir = SourceDir + // PicSettings.DestDirStart = DestDirStart + + PicSettings.DimStandard = Conversions.ToInteger(TextBox11.Text); + PicSettings.DimStandardMiniatura = Conversions.ToInteger(TextBox25.Text); + PicSettings.UsaOrarioMiniatura = CheckBox12.Checked; + PicSettings.UsaOrarioTestoApplicare = CheckBox8.Checked; + PicSettings.UsaTempoGaraTestoApplicare = CheckBox7.Checked; + PicSettings.UsaRotazioneAutomatica = CheckBox10.Checked; + PicSettings.UsaForzaJpg = CheckBox9.Checked; + if (CheckBox17.Checked) + { + PicSettings.TestoNome = true; + } + else + { + PicSettings.TestoNome = false; + } + + if (CheckBox16.Checked) + { + PicSettings.NomeData = true; + } + else + { + PicSettings.NomeData = false; + } + + PicSettings.TestoFirmaStart = TextBox4.Text; + PicSettings.TestoFirmaStartV = TextBox29.Text; + PicSettings.DataPartenza = DateTimePicker1.Value; + PicSettings.TestoOrario = TextBox18.Text; + PicSettings.AltezzaSmall = Conversions.ToInteger(TextBox5.Text); + PicSettings.LarghezzaSmall = Conversions.ToInteger(TextBox5.Text); + PicSettings.CreaMiniature = CheckBox1.Checked; + PicSettings.AggiungiScritteMiniature = RadioButton3.Checked; + PicSettings.AggTempoGaraMin = RadioButton5.Checked; + PicSettings.AggNumTempMin = RadioButton7.Checked; + PicSettings.DimVert = Conversions.ToInteger(TextBox30.Text); + PicSettings.MargVert = Conversions.ToInteger(TextBox31.Text); + + // PicSettings.NomeFileChild = childFile.Name + PicSettings.Suffisso = TextBox3.Text; + PicSettings.Codice = TextBox13.Text; + PicSettings.Trasparenza = Conversions.ToInteger(TextBox9.Text); + PicSettings.IlFont = ComboBox3.SelectedItem.ToString(); + PicSettings.Grassetto = CheckBox3.Checked; + PicSettings.Posizione = ComboBox1.SelectedItem.ToString(); + PicSettings.Allineamento = ComboBox2.SelectedItem.ToString(); + PicSettings.Margine = Conversions.ToInteger(TextBox12.Text); + PicSettings.LogoAltezza = Conversions.ToInteger(TextBox14.Text); + PicSettings.LogoLarghezza = Conversions.ToInteger(TextBox15.Text); + PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text); + PicSettings.LogoAggiungi = CheckBox5.Checked; + PicSettings.LogoNomeFile = TextBox10.Text; + PicSettings.LogoTrasparenza = TextBox19.Text; + PicSettings.LogoMargine = TextBox16.Text; + PicSettings.LogoPosizioneH = ComboBox4.Text; + PicSettings.LogoPosizioneV = ComboBox5.Text; + PicSettings.FotoGrandeDimOrigina = CheckBox15.Checked; + PicSettings.AltezzaBig = Conversions.ToInteger(TextBox27.Text); + PicSettings.LarghezzaBig = Conversions.ToInteger(TextBox28.Text); + PicSettings.DimMin = Conversions.ToInteger(TextBox25.Text); + PicSettings.TestoMin = RadioButton6.Checked; + PicSettings.jpegQuality = Conversions.ToLong(TextBox32.Text); + PicSettings.jpegQualityMin = Conversions.ToLong(TextBox33.Text); + + // PicSettings.mainForm = Me + + + } + + private List> makeFilesList(string SourcePath) + { + var SourceDir = new DirectoryInfo(SourcePath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(TextBox17.Text); + string SuffixDir = TextBox20.Text; + int NumCifreDir = Conversions.ToInteger(TextBox21.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + var picList = new List(); + var dirList = new List>(); + + + // controlla directory principale + // Dim childFile As FileInfo + // For Each childFile In SourceDir.GetFiles("*.jpg") + // picList.Add(childFile) + // Next + + picList = getFiles(SourceDir); + dirList.Add(picList); + + // controlla sottodirectory + if (CheckBox6.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + { + var filesList = new List(); + filesList = getFiles(subDir); + dirList.Add(filesList); + } + } + + return dirList; + } + + private List getFiles(DirectoryInfo sourceDir) + { + var picList = new List(); + foreach (var childFile in sourceDir.GetFiles("*.jpg")) + picList.Add(childFile); + return picList; + } + + private List> dividiLista(string SourcePath, List> lista) + { + var SourceDir = new DirectoryInfo(SourcePath); + int NumFileXDir = Conversions.ToInteger(TextBox17.Text); + string SuffixDir = TextBox20.Text; + int NumCifreDir = Conversions.ToInteger(TextBox21.Text); + bool DividiFile = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + if (NumFileXDir > 0 & CheckBox11.Checked == true) + { + if (FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + } + } + + return default; + } + + private void setLabel17Text(string text) + { + if (Label17.InvokeRequired) + { + Label17.Invoke(new Action(setLabel17Text), text); + } + else + { + Label17.Text = text; + } + } + + public void stepProgressBar() + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new MethodInvoker(ProgressBar1.PerformStep)); + } + else + { + ProgressBar1.PerformStep(); + } + + setLabel18Text(ProgressBar1.Value.ToString()); + } + + private void setLabel10Text(string text) + { + if (Label10.InvokeRequired) + { + Label10.Invoke(new Action(setLabel10Text), text); + } + else + { + Label10.Text = text; + } + } + + private void setProgressBarMaximum(int value) + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new Action(setProgressBarMaximum), (object)value); + } + else + { + ProgressBar1.Maximum = value; + } + } + + private void setProgressBarValue(int value) + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new Action(setProgressBarValue), (object)value); + } + else + { + ProgressBar1.Value = value; + } + } + + private void setLabel18Text(string text) + { + if (Label18.InvokeRequired) + { + Label18.Invoke(new Action(setLabel18Text), text); + } + else + { + Label18.Text = text; + } + } + + private void setLabel43Text(string text) + { + if (Label43.InvokeRequired) + { + Label43.Invoke(new Action(setLabel43Text), text); + } + else + { + Label43.Text = text; + } + } + + private void creaImmaginiWithThreadMod(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(TextBox17.Text); + string SuffixDir = TextBox20.Text; + int NumCifreDir = Conversions.ToInteger(TextBox21.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + if (SourceDir.Exists) + { + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0); + // Label17.Text = (CType(Label17.Text, Integer) + FileConta).ToString + string a = (Conversions.ToInteger(Label17.Text) + FileConta).ToString(); + setLabel17Text(a); + setProgressBarMaximum(Conversions.ToInteger(a)); + if (NumFileXDir > 0 & CheckBox11.Checked == true) + { + if (FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + + foreach (var childFile in SourceDir.GetFiles("*.jpg")) + { + if (StopAttivo == true) + { + break; + } + + setLabel10Text("File: " + childFile.Name); + string b = (Conversions.ToInteger(Label18.Text) + 1).ToString(); + // setLabel18Text(b) + // setProgressBarValue(CInt(b)) + // Label10.Text = "File: " & childFile.Name + // Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + // Application.DoEvents() + + ContaFileXDir += 1; + if (DividiFile == true) + { + if (ContaFileXDir == ContaDirXDir * NumFileXDir + 1) + { + ContaDirXDir += 1; + if (RadioButton1.Checked == true) + { + TestoTemp = ContaDirXDir.ToString(); + } + else + { + TestoTemp = (ContaDirXDir * NumFileXDir).ToString(); + } + + var loopTo = NumCifreDir - TestoTemp.Length; + for (ContaTemp = 1; ContaTemp <= loopTo; ContaTemp++) + TestoTemp = "0" + TestoTemp; + if (DestDirStart.FullName.EndsWith(@"\")) + { + DestDir = new DirectoryInfo(DestDirStart.FullName + SuffixDir + TestoTemp); + } + else + { + DestDir = new DirectoryInfo(DestDirStart.FullName + @"\" + SuffixDir + TestoTemp); + } + + if (!DestDir.Exists) + { + DestDir.Create(); + } + } + } + + // Application.DoEvents() + + + + var ClsCreaImmagine = new ImageCreator(); + ClsCreaImmagine.NomeFileChild = childFile.Name; + ClsCreaImmagine.DestDir = DestDir; + ClsCreaImmagine.SourceDir = SourceDir; + ClsCreaImmagine.DestDirStart = DestDirStart; + ContaImmaginiThread += 1; + MyPool.InsertWorkItem(childFile.Name, new XyThreadAdd(ClsCreaImmagine.CreaImmagineThread), new object[1] { childFile.Name }, true); + } + // copy all the sub-directories by recursively calling this same routine + if (CheckBox6.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + creaImmaginiWithThreadMod(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)); + } + } + } + + // il posto giusto dove fare modifiche + private void CreaImmaginiWithThread(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(TextBox17.Text); + string SuffixDir = TextBox20.Text; + int NumCifreDir = Conversions.ToInteger(TextBox21.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + if (SourceDir.Exists) + { + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0); + Label17.Text = (Conversions.ToInteger(Label17.Text) + FileConta).ToString(); + if (NumFileXDir > 0 & CheckBox11.Checked == true) + { + if (FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + + foreach (var childFile in SourceDir.GetFiles("*.jpg")) + { + if (StopAttivo == true) + { + break; + } + // Label10.Text = "File: " & childFile.Name + // Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + // Application.DoEvents() + + ContaFileXDir += 1; + if (DividiFile == true) + { + if (ContaFileXDir == ContaDirXDir * NumFileXDir + 1) + { + ContaDirXDir += 1; + if (RadioButton1.Checked == true) + { + TestoTemp = ContaDirXDir.ToString(); + } + else + { + TestoTemp = (ContaDirXDir * NumFileXDir).ToString(); + } + + var loopTo = NumCifreDir - TestoTemp.Length; + for (ContaTemp = 1; ContaTemp <= loopTo; ContaTemp++) + TestoTemp = "0" + TestoTemp; + if (DestDirStart.FullName.EndsWith(@"\")) + { + DestDir = new DirectoryInfo(DestDirStart.FullName + SuffixDir + TestoTemp); + } + else + { + DestDir = new DirectoryInfo(DestDirStart.FullName + @"\" + SuffixDir + TestoTemp); + } + + if (!DestDir.Exists) + { + DestDir.Create(); + } + } + } + + Application.DoEvents(); + var ClsCreaImmagine = new CreaImmagineSeparateThread(); + ClsCreaImmagine.DirectorySorgente = TextBox1.Text; + ClsCreaImmagine.DirectoryDestinazione = TextBox2.Text; + ClsCreaImmagine.DestDir = DestDir; + ClsCreaImmagine.SourceDir = SourceDir; + ClsCreaImmagine.DestDirStart = DestDirStart; + ClsCreaImmagine.DimStandard = Conversions.ToInteger(TextBox11.Text); + ClsCreaImmagine.DimStandardMiniatura = Conversions.ToInteger(TextBox25.Text); + ClsCreaImmagine.UsaOrarioMiniatura = CheckBox12.Checked; + ClsCreaImmagine.UsaOrarioTestoApplicare = CheckBox8.Checked; + ClsCreaImmagine.UsaTempoGaraTestoApplicare = CheckBox7.Checked; + ClsCreaImmagine.UsaRotazioneAutomatica = CheckBox10.Checked; + ClsCreaImmagine.UsaForzaJpg = CheckBox9.Checked; + if (CheckBox17.Checked) + { + ClsCreaImmagine.TestoNome = true; + } + else + { + ClsCreaImmagine.TestoNome = false; + } + + if (CheckBox16.Checked) + { + ClsCreaImmagine.NomeData = true; + } + else + { + ClsCreaImmagine.NomeData = false; + } + + ClsCreaImmagine.TestoFirmaStart = TextBox4.Text; + ClsCreaImmagine.TestoFirmaStartV = TextBox29.Text; + ClsCreaImmagine.DataPartenza = DateTimePicker1.Value; + ClsCreaImmagine.TestoOrario = TextBox18.Text; + ClsCreaImmagine.AltezzaSmall = Conversions.ToInteger(TextBox5.Text); + ClsCreaImmagine.LarghezzaSmall = Conversions.ToInteger(TextBox5.Text); + ClsCreaImmagine.CreaMiniature = CheckBox1.Checked; + ClsCreaImmagine.AggiungiScritteMiniature = RadioButton3.Checked; + ClsCreaImmagine.AggTempoGaraMin = RadioButton5.Checked; + ClsCreaImmagine.AggNumTempMin = RadioButton7.Checked; + ClsCreaImmagine.DimVert = Conversions.ToInteger(TextBox30.Text); + ClsCreaImmagine.MargVert = Conversions.ToInteger(TextBox31.Text); + ClsCreaImmagine.NomeFileChild = childFile.Name; + ClsCreaImmagine.Suffisso = TextBox3.Text; + ClsCreaImmagine.Codice = TextBox13.Text; + ClsCreaImmagine.Trasparenza = Conversions.ToInteger(TextBox9.Text); + ClsCreaImmagine.IlFont = ComboBox3.SelectedItem.ToString(); + ClsCreaImmagine.Grassetto = CheckBox3.Checked; + ClsCreaImmagine.Posizione = ComboBox1.SelectedItem.ToString(); + ClsCreaImmagine.Allineamento = ComboBox2.SelectedItem.ToString(); + ClsCreaImmagine.Margine = Conversions.ToInteger(TextBox12.Text); + ClsCreaImmagine.LogoAltezza = Conversions.ToInteger(TextBox14.Text); + ClsCreaImmagine.LogoLarghezza = Conversions.ToInteger(TextBox15.Text); + + // ClsCreaImmagine.FontColoreR = CType(TextBox22.Text, Integer) + // ClsCreaImmagine.FontColoreG = CType(TextBox23.Text, Integer) + // ClsCreaImmagine.FontColoreB = CType(TextBox24.Text, Integer) + ClsCreaImmagine.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text); + ClsCreaImmagine.LogoAggiungi = CheckBox5.Checked; + ClsCreaImmagine.LogoNomeFile = TextBox10.Text; + ClsCreaImmagine.LogoTrasparenza = TextBox19.Text; + ClsCreaImmagine.LogoMargine = TextBox16.Text; + ClsCreaImmagine.LogoPosizioneH = ComboBox4.Text; + ClsCreaImmagine.LogoPosizioneV = ComboBox5.Text; + ClsCreaImmagine.FotoGrandeDimOrigina = CheckBox15.Checked; + ClsCreaImmagine.AltezzaBig = Conversions.ToInteger(TextBox27.Text); + ClsCreaImmagine.LarghezzaBig = Conversions.ToInteger(TextBox28.Text); + ClsCreaImmagine.DimMin = Conversions.ToInteger(TextBox25.Text); + ClsCreaImmagine.TestoMin = RadioButton6.Checked; + ClsCreaImmagine.jpegQuality = Conversions.ToLong(TextBox32.Text); + ClsCreaImmagine.jpegQuality = Conversions.ToLong(TextBox33.Text); + ContaImmaginiThread += 1; + MyPool.InsertWorkItem(childFile.Name, new XyThreadAdd(ClsCreaImmagine.CreaImmagineThread), new object[1] { childFile.Name }, true); + } + // copy all the sub-directories by recursively calling this same routine + if (CheckBox6.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + CreaImmaginiWithThread(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)); + } + } + } + + private void CopyDirectoryFile(string SourcePath, string DestPath, bool OverWrite = false) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDir = new DirectoryInfo(DestPath); + if (SourceDir.Exists) + { + if (!DestDir.Exists) + { + DestDir.Create(); + // copy all the files of the current directory + } + + foreach (var childFile in SourceDir.GetFiles()) + { + if (OverWrite) + { + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), true); + } + // if overwrite = false, copy the file only if it does not exist + // this is done to avoid an IOException if a file already exists + // this way the other files can be copied anyway... + else if (!File.Exists(Path.Combine(DestDir.FullName, childFile.Name))) + { + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), false); + } + // copy all the sub-directories by recursively calling this same routine + } + + foreach (var subDir in SourceDir.GetDirectories()) + CopyDirectoryFile(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name), OverWrite); + } + } + + public Size NewthumbSize(int currentwidth, int currentheight, int MaxPixel, string TipoSize) + { + // Calculate the Size of the New image + // *** Larghezza, Altezza, Auto + + double tempMultiplier; + if ((TipoSize.ToUpper() ?? "") == ("Larghezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + else if ((TipoSize.ToUpper() ?? "") == ("Altezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else if (currentheight > currentwidth) // portrait + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + + var NewSize = new Size((int)Math.Round(currentwidth * tempMultiplier), (int)Math.Round(currentheight * tempMultiplier)); + return NewSize; + } + + private void Button7_Click(object sender, EventArgs e) + { + StopAttivo = true; + MyPool.StopThreadPool(); + unlockUI(); + } + + private void Button4_Click(object sender, EventArgs e) + { + var openFileDialog = new OpenFileDialog(); + + // openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Immagini jpg (*.jpg)|*.jpg|Immagini gif (*.gif)|*.gif|Tutti i file (*.*)|*.*"; + if (TextBox10.Text.Length > 0) + { + openFileDialog.FileName = TextBox10.Text; + } + + openFileDialog.FilterIndex = 0; + openFileDialog.RestoreDirectory = true; + if (DialogResult.OK == openFileDialog.ShowDialog()) + { + TextBox10.Text = openFileDialog.FileName; + PictureBox1.Image = Image.FromFile(TextBox10.Text); + if (PictureBox1.Image.Height >= PictureBox1.Image.Width) + { + PictureBox1.Height = 160; + PictureBox1.Width = Conversions.ToInteger(160 * PictureBox1.Image.Width / (double)PictureBox1.Image.Height); + } + else + { + PictureBox1.Width = 224; + PictureBox1.Height = Conversions.ToInteger(224 * PictureBox1.Image.Height / (double)PictureBox1.Image.Width); + } + } + } + + private string LeggiSoloNomeFile(string FileName) + { + string Testo = FileName; + string Risposta = ""; + var Nomi = Testo.Split(new char[] { '\\' }); + if (Nomi.Length > 1) + { + Risposta = Nomi[Nomi.Length - 1]; + } + + return Risposta; + } + + private void PictureBox1_MouseMove(object sender, MouseEventArgs e) + { + // GetColor() + // GetPixelColor(PictureBox1.PointToScreen(e.Location)).ToArgb.ToString("X8") + + } + + private void PictureBox1_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + WaterSelectColor = true; + } + else + { + WaterSelectColor = false; + } + } + + + // Private Declare Function CreateDC Lib "gdi32.dll" (ByVal strDriver As String, ByVal strDevice As String, ByVal strOutput As String, ByVal pData As IntPtr) As IntPtr + // Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hdc As IntPtr) As Boolean + // Private Declare Function GetPixel Lib "gdi32.dll" (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer) As Integer + // Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As Point) As Boolean + + + // ''' + // ''' Get the color relative to mouse position + // ''' + // Private Sub GetColor() + // Dim hdcScreen As IntPtr = CreateDC("Display", Nothing, Nothing, IntPtr.Zero) + // Dim pt As Point = New Point + // GetCursorPos(pt) + // Dim cr As Integer = GetPixel(hdcScreen, pt.X, pt.Y) + // DeleteDC(hdcScreen) + // Dim clr As Color = Color.FromArgb((cr And &HFF), (cr And &HFF00) >> 8, (cr And &HFF0000) >> 16) + // PictureBox3.BackColor = clr + // If WaterSelectColor = True Then + // PictureBox2.BackColor = clr + // End If + // WaterSelectColor = False + // End Sub + + + private Color[] GetPixelColor(Point screenLocation) + { + // Dim bm As New Bitmap(1, 1, Imaging.PixelFormat.Format24bppRgb) + // Dim g As Graphics = Graphics.FromImage(bm) + // g.CopyFromScreen(screenLocation, New Point(0, 0), New Size(1, 1)) + // Dim result As Color = bm.GetPixel(0, 0) + // g.Dispose() + // bm.Dispose() + // Return result + return null; + } + + private void Button8_Click(object sender, EventArgs e) + { + var MyDialog = new ColorDialog(); + MyDialog.AllowFullOpen = true; + // If TextBox22.Text.Length > 0 And TextBox23.Text.Length > 0 And TextBox24.Text.Length > 0 Then + // If CType(TextBox22.Text, Integer) >= 0 And CType(TextBox23.Text, Integer) >= 0 And CType(TextBox24.Text, Integer) >= 0 Then + // MyDialog.Color = Color.FromArgb(0, CType(TextBox22.Text, Integer), CType(TextBox23.Text, Integer), CType(TextBox24.Text, Integer)) + // End If + // End If + + if (MyDialog.ShowDialog() == DialogResult.OK) + { + // TextBox22.Text = MyDialog.Color.R.ToString + // TextBox23.Text = MyDialog.Color.G.ToString + // TextBox24.Text = MyDialog.Color.B.ToString + TextBox34.Text = ColorTranslator.ToHtml(MyDialog.Color); + TextBox34.BackColor = MyDialog.Color; + } + } + + private void TextBox27_TextChanged(object sender, EventArgs e) + { + } + + private void CheckBox18_CheckedChanged(object sender, EventArgs e) + { + CheckBox4.Checked = false; + CheckBox12.Checked = false; + } + + private void CheckBox4_CheckedChanged(object sender, EventArgs e) + { + CheckBox18.Checked = false; + } + + private void CheckBox12_CheckedChanged(object sender, EventArgs e) + { + CheckBox18.Checked = false; + } + } + + public class PicInfoold + { + public DirectoryInfo DirSource, DirDest, DirDestStart; + public string NomeImmagine; + + public PicInfoold(DirectoryInfo Dir_Source, DirectoryInfo Dir_Dest, DirectoryInfo Dir_DestStart, string Nome_Immagine) + { + DirSource = Dir_Source; + DirDest = Dir_Dest; + DirDestStart = Dir_DestStart; + NomeImmagine = Nome_Immagine; + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/Form1.resx b/imagecatalog.backup/Form1.resx new file mode 100644 index 0000000..d58980a --- /dev/null +++ b/imagecatalog.backup/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/imagecatalog.backup/Form1.vb b/imagecatalog.backup/Form1.vb new file mode 100644 index 0000000..5c4aae6 --- /dev/null +++ b/imagecatalog.backup/Form1.vb @@ -0,0 +1,2946 @@ +Imports System.IO +Imports System.Drawing.Drawing2D +Imports System.Drawing.Imaging +Imports System.Threading +Imports System.Collections.Generic +Imports CatalogVbLib + +Public Delegate Sub XyThreadAddold(ByVal Info As String) + +Public Class Form1 + Inherits System.Windows.Forms.Form + +#Region " Windows Form Designer generated code " + + Public Sub New() + MyBase.New() + + 'This call is required by the Windows Form Designer. + InitializeComponent() + + 'Add any initialization after the InitializeComponent() call + + End Sub + + 'Form overrides dispose to clean up the component list. + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + Friend WithEvents Button1 As System.Windows.Forms.Button + Friend WithEvents Label10 As System.Windows.Forms.Label + Friend WithEvents Label17 As System.Windows.Forms.Label + Friend WithEvents Label18 As System.Windows.Forms.Label + Friend WithEvents Label19 As System.Windows.Forms.Label + Friend WithEvents Label20 As System.Windows.Forms.Label + Friend WithEvents Button6 As System.Windows.Forms.Button + Friend WithEvents Button5 As System.Windows.Forms.Button + Friend WithEvents Button7 As System.Windows.Forms.Button + Friend WithEvents Label27 As System.Windows.Forms.Label + Friend WithEvents TextBox13 As System.Windows.Forms.TextBox + Friend WithEvents Label16 As System.Windows.Forms.Label + Friend WithEvents Label7 As System.Windows.Forms.Label + Friend WithEvents TextBox7 As System.Windows.Forms.TextBox + Friend WithEvents Label8 As System.Windows.Forms.Label + Friend WithEvents TextBox8 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox + Friend WithEvents Label43 As System.Windows.Forms.Label + Friend WithEvents CheckBox22 As System.Windows.Forms.CheckBox + Friend WithEvents TabPage4 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox + Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox + Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox + Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox + Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox + Friend WithEvents TextBox19 As System.Windows.Forms.TextBox + Friend WithEvents Label28 As System.Windows.Forms.Label + Friend WithEvents CheckBox5 As System.Windows.Forms.CheckBox + Friend WithEvents TextBox15 As System.Windows.Forms.TextBox + Friend WithEvents TextBox14 As System.Windows.Forms.TextBox + Friend WithEvents Label25 As System.Windows.Forms.Label + Friend WithEvents TextBox16 As System.Windows.Forms.TextBox + Friend WithEvents Label24 As System.Windows.Forms.Label + Friend WithEvents Label22 As System.Windows.Forms.Label + Friend WithEvents Label23 As System.Windows.Forms.Label + Friend WithEvents Button4 As System.Windows.Forms.Button + Friend WithEvents TextBox10 As System.Windows.Forms.TextBox + Friend WithEvents Label29 As System.Windows.Forms.Label + Friend WithEvents Label30 As System.Windows.Forms.Label + Friend WithEvents PictureBox3 As System.Windows.Forms.PictureBox + Friend WithEvents TabPage1 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents Panel2 As System.Windows.Forms.Panel + Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton7 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton6 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents TextBox5 As System.Windows.Forms.TextBox + Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents TextBox6 As System.Windows.Forms.TextBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents TextBox3 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox + Friend WithEvents TabPage2 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox + Friend WithEvents TextBox26 As System.Windows.Forms.TextBox + Friend WithEvents Label37 As System.Windows.Forms.Label + Friend WithEvents Label38 As System.Windows.Forms.Label + Friend WithEvents TextBox27 As System.Windows.Forms.TextBox + Friend WithEvents Label39 As System.Windows.Forms.Label + Friend WithEvents TextBox28 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox15 As System.Windows.Forms.CheckBox + Friend WithEvents TabPage3 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox10 As System.Windows.Forms.GroupBox + Friend WithEvents Label42 As System.Windows.Forms.Label + Friend WithEvents Label41 As System.Windows.Forms.Label + Friend WithEvents TextBox31 As System.Windows.Forms.TextBox + Friend WithEvents TextBox30 As System.Windows.Forms.TextBox + Friend WithEvents GroupBox9 As System.Windows.Forms.GroupBox + Friend WithEvents CheckBox17 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox16 As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox + Friend WithEvents Button8 As System.Windows.Forms.Button + Friend WithEvents Label36 As System.Windows.Forms.Label + Friend WithEvents TextBox25 As System.Windows.Forms.TextBox + Friend WithEvents Label35 As System.Windows.Forms.Label + Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox + Friend WithEvents TextBox11 As System.Windows.Forms.TextBox + Friend WithEvents Label12 As System.Windows.Forms.Label + Friend WithEvents Label11 As System.Windows.Forms.Label + Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox + Friend WithEvents Label40 As System.Windows.Forms.Label + Friend WithEvents TextBox29 As System.Windows.Forms.TextBox + Friend WithEvents TextBox18 As System.Windows.Forms.TextBox + Friend WithEvents Label26 As System.Windows.Forms.Label + Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker + Friend WithEvents CheckBox8 As System.Windows.Forms.CheckBox + Friend WithEvents TextBox9 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox7 As System.Windows.Forms.CheckBox + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents TextBox4 As System.Windows.Forms.TextBox + Friend WithEvents Label9 As System.Windows.Forms.Label + Friend WithEvents Label13 As System.Windows.Forms.Label + Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox + Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox + Friend WithEvents Label14 As System.Windows.Forms.Label + Friend WithEvents TextBox12 As System.Windows.Forms.TextBox + Friend WithEvents Label15 As System.Windows.Forms.Label + Friend WithEvents TabPage5 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox + Friend WithEvents CheckBox6 As System.Windows.Forms.CheckBox + Friend WithEvents Button3 As System.Windows.Forms.Button + Friend WithEvents Button2 As System.Windows.Forms.Button + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents TextBox1 As System.Windows.Forms.TextBox + Friend WithEvents TextBox2 As System.Windows.Forms.TextBox + Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox + Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton + Friend WithEvents TextBox21 As System.Windows.Forms.TextBox + Friend WithEvents Label34 As System.Windows.Forms.Label + Friend WithEvents TextBox20 As System.Windows.Forms.TextBox + Friend WithEvents Label33 As System.Windows.Forms.Label + Friend WithEvents Label31 As System.Windows.Forms.Label + Friend WithEvents CheckBox11 As System.Windows.Forms.CheckBox + Friend WithEvents TextBox17 As System.Windows.Forms.TextBox + Friend WithEvents Label32 As System.Windows.Forms.Label + Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox + Friend WithEvents CheckBox10 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox9 As System.Windows.Forms.CheckBox + Friend WithEvents TabControl1 As System.Windows.Forms.TabControl + Friend WithEvents Label45 As System.Windows.Forms.Label + Friend WithEvents TextBox32 As System.Windows.Forms.TextBox + Friend WithEvents TextBox33 As System.Windows.Forms.TextBox + Friend WithEvents TextBox34 As System.Windows.Forms.TextBox + Friend WithEvents Label46 As System.Windows.Forms.Label + Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar + Friend WithEvents Panel1 As System.Windows.Forms.Panel + Friend WithEvents CheckBox18 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox4 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox12 As System.Windows.Forms.CheckBox + Friend WithEvents Label44 As System.Windows.Forms.Label + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.Label10 = New System.Windows.Forms.Label() + Me.Label17 = New System.Windows.Forms.Label() + Me.Label18 = New System.Windows.Forms.Label() + Me.Label19 = New System.Windows.Forms.Label() + Me.Label20 = New System.Windows.Forms.Label() + Me.Button6 = New System.Windows.Forms.Button() + Me.Button5 = New System.Windows.Forms.Button() + Me.Button7 = New System.Windows.Forms.Button() + Me.Label27 = New System.Windows.Forms.Label() + Me.TextBox13 = New System.Windows.Forms.TextBox() + Me.Label16 = New System.Windows.Forms.Label() + Me.Label7 = New System.Windows.Forms.Label() + Me.TextBox7 = New System.Windows.Forms.TextBox() + Me.Label8 = New System.Windows.Forms.Label() + Me.TextBox8 = New System.Windows.Forms.TextBox() + Me.CheckBox2 = New System.Windows.Forms.CheckBox() + Me.Label43 = New System.Windows.Forms.Label() + Me.CheckBox22 = New System.Windows.Forms.CheckBox() + Me.Label44 = New System.Windows.Forms.Label() + Me.TabPage4 = New System.Windows.Forms.TabPage() + Me.GroupBox6 = New System.Windows.Forms.GroupBox() + Me.PictureBox2 = New System.Windows.Forms.PictureBox() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.ComboBox5 = New System.Windows.Forms.ComboBox() + Me.ComboBox4 = New System.Windows.Forms.ComboBox() + Me.TextBox19 = New System.Windows.Forms.TextBox() + Me.Label28 = New System.Windows.Forms.Label() + Me.CheckBox5 = New System.Windows.Forms.CheckBox() + Me.TextBox15 = New System.Windows.Forms.TextBox() + Me.TextBox14 = New System.Windows.Forms.TextBox() + Me.Label25 = New System.Windows.Forms.Label() + Me.TextBox16 = New System.Windows.Forms.TextBox() + Me.Label24 = New System.Windows.Forms.Label() + Me.Label22 = New System.Windows.Forms.Label() + Me.Label23 = New System.Windows.Forms.Label() + Me.Button4 = New System.Windows.Forms.Button() + Me.TextBox10 = New System.Windows.Forms.TextBox() + Me.Label29 = New System.Windows.Forms.Label() + Me.Label30 = New System.Windows.Forms.Label() + Me.PictureBox3 = New System.Windows.Forms.PictureBox() + Me.TabPage1 = New System.Windows.Forms.TabPage() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.Label46 = New System.Windows.Forms.Label() + Me.TextBox33 = New System.Windows.Forms.TextBox() + Me.Panel2 = New System.Windows.Forms.Panel() + Me.RadioButton3 = New System.Windows.Forms.RadioButton() + Me.RadioButton7 = New System.Windows.Forms.RadioButton() + Me.RadioButton4 = New System.Windows.Forms.RadioButton() + Me.RadioButton6 = New System.Windows.Forms.RadioButton() + Me.RadioButton5 = New System.Windows.Forms.RadioButton() + Me.Label5 = New System.Windows.Forms.Label() + Me.TextBox5 = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.TextBox6 = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.TextBox3 = New System.Windows.Forms.TextBox() + Me.CheckBox1 = New System.Windows.Forms.CheckBox() + Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.Label45 = New System.Windows.Forms.Label() + Me.TextBox32 = New System.Windows.Forms.TextBox() + Me.TextBox26 = New System.Windows.Forms.TextBox() + Me.Label37 = New System.Windows.Forms.Label() + Me.Label38 = New System.Windows.Forms.Label() + Me.TextBox27 = New System.Windows.Forms.TextBox() + Me.Label39 = New System.Windows.Forms.Label() + Me.TextBox28 = New System.Windows.Forms.TextBox() + Me.CheckBox15 = New System.Windows.Forms.CheckBox() + Me.TabPage3 = New System.Windows.Forms.TabPage() + Me.GroupBox10 = New System.Windows.Forms.GroupBox() + Me.Label42 = New System.Windows.Forms.Label() + Me.Label41 = New System.Windows.Forms.Label() + Me.TextBox31 = New System.Windows.Forms.TextBox() + Me.TextBox30 = New System.Windows.Forms.TextBox() + Me.GroupBox9 = New System.Windows.Forms.GroupBox() + Me.CheckBox17 = New System.Windows.Forms.CheckBox() + Me.CheckBox16 = New System.Windows.Forms.CheckBox() + Me.GroupBox5 = New System.Windows.Forms.GroupBox() + Me.TextBox34 = New System.Windows.Forms.TextBox() + Me.Button8 = New System.Windows.Forms.Button() + Me.Label36 = New System.Windows.Forms.Label() + Me.TextBox25 = New System.Windows.Forms.TextBox() + Me.Label35 = New System.Windows.Forms.Label() + Me.ComboBox3 = New System.Windows.Forms.ComboBox() + Me.TextBox11 = New System.Windows.Forms.TextBox() + Me.Label12 = New System.Windows.Forms.Label() + Me.Label11 = New System.Windows.Forms.Label() + Me.CheckBox3 = New System.Windows.Forms.CheckBox() + Me.GroupBox4 = New System.Windows.Forms.GroupBox() + Me.Label40 = New System.Windows.Forms.Label() + Me.TextBox29 = New System.Windows.Forms.TextBox() + Me.TextBox18 = New System.Windows.Forms.TextBox() + Me.Label26 = New System.Windows.Forms.Label() + Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker() + Me.CheckBox8 = New System.Windows.Forms.CheckBox() + Me.TextBox9 = New System.Windows.Forms.TextBox() + Me.CheckBox7 = New System.Windows.Forms.CheckBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.TextBox4 = New System.Windows.Forms.TextBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.Label13 = New System.Windows.Forms.Label() + Me.ComboBox1 = New System.Windows.Forms.ComboBox() + Me.ComboBox2 = New System.Windows.Forms.ComboBox() + Me.Label14 = New System.Windows.Forms.Label() + Me.TextBox12 = New System.Windows.Forms.TextBox() + Me.Label15 = New System.Windows.Forms.Label() + Me.TabPage5 = New System.Windows.Forms.TabPage() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.CheckBox6 = New System.Windows.Forms.CheckBox() + Me.Button3 = New System.Windows.Forms.Button() + Me.Button2 = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.TextBox2 = New System.Windows.Forms.TextBox() + Me.GroupBox8 = New System.Windows.Forms.GroupBox() + Me.RadioButton2 = New System.Windows.Forms.RadioButton() + Me.RadioButton1 = New System.Windows.Forms.RadioButton() + Me.TextBox21 = New System.Windows.Forms.TextBox() + Me.Label34 = New System.Windows.Forms.Label() + Me.TextBox20 = New System.Windows.Forms.TextBox() + Me.Label33 = New System.Windows.Forms.Label() + Me.Label31 = New System.Windows.Forms.Label() + Me.CheckBox11 = New System.Windows.Forms.CheckBox() + Me.TextBox17 = New System.Windows.Forms.TextBox() + Me.Label32 = New System.Windows.Forms.Label() + Me.GroupBox7 = New System.Windows.Forms.GroupBox() + Me.CheckBox10 = New System.Windows.Forms.CheckBox() + Me.CheckBox9 = New System.Windows.Forms.CheckBox() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.ProgressBar1 = New System.Windows.Forms.ProgressBar() + Me.CheckBox12 = New System.Windows.Forms.CheckBox() + Me.CheckBox4 = New System.Windows.Forms.CheckBox() + Me.CheckBox18 = New System.Windows.Forms.CheckBox() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.TabPage4.SuspendLayout() + Me.GroupBox6.SuspendLayout() + CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit() + Me.TabPage1.SuspendLayout() + Me.GroupBox1.SuspendLayout() + Me.Panel2.SuspendLayout() + Me.TabPage2.SuspendLayout() + Me.GroupBox2.SuspendLayout() + Me.TabPage3.SuspendLayout() + Me.GroupBox10.SuspendLayout() + Me.GroupBox9.SuspendLayout() + Me.GroupBox5.SuspendLayout() + Me.GroupBox4.SuspendLayout() + Me.TabPage5.SuspendLayout() + Me.GroupBox3.SuspendLayout() + Me.GroupBox8.SuspendLayout() + Me.GroupBox7.SuspendLayout() + Me.TabControl1.SuspendLayout() + Me.Panel1.SuspendLayout() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button1.Location = New System.Drawing.Point(539, 77) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(192, 39) + Me.Button1.TabIndex = 2 + Me.Button1.Text = "crea catalogo" + ' + 'Label10 + ' + Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label10.Location = New System.Drawing.Point(539, 163) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(192, 72) + Me.Label10.TabIndex = 21 + Me.Label10.Text = "file" + ' + 'Label17 + ' + Me.Label17.AutoSize = True + Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label17.Location = New System.Drawing.Point(643, 243) + Me.Label17.Name = "Label17" + Me.Label17.Size = New System.Drawing.Size(19, 20) + Me.Label17.TabIndex = 38 + Me.Label17.Text = "0" + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label18.Location = New System.Drawing.Point(643, 262) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(19, 20) + Me.Label18.TabIndex = 39 + Me.Label18.Text = "0" + ' + 'Label19 + ' + Me.Label19.AutoSize = True + Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label19.Location = New System.Drawing.Point(539, 243) + Me.Label19.Name = "Label19" + Me.Label19.Size = New System.Drawing.Size(80, 16) + Me.Label19.TabIndex = 40 + Me.Label19.Text = "foto totali: " + ' + 'Label20 + ' + Me.Label20.AutoSize = True + Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label20.Location = New System.Drawing.Point(539, 262) + Me.Label20.Name = "Label20" + Me.Label20.Size = New System.Drawing.Size(104, 16) + Me.Label20.TabIndex = 41 + Me.Label20.Text = "foto generate:" + ' + 'Button6 + ' + Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button6.Location = New System.Drawing.Point(539, 12) + Me.Button6.Name = "Button6" + Me.Button6.Size = New System.Drawing.Size(192, 32) + Me.Button6.TabIndex = 12 + Me.Button6.Text = "Carica impostazioni" + ' + 'Button5 + ' + Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button5.Location = New System.Drawing.Point(539, 43) + Me.Button5.Name = "Button5" + Me.Button5.Size = New System.Drawing.Size(192, 32) + Me.Button5.TabIndex = 43 + Me.Button5.Text = "Salva impostazioni" + ' + 'Button7 + ' + Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button7.Location = New System.Drawing.Point(539, 120) + Me.Button7.Name = "Button7" + Me.Button7.Size = New System.Drawing.Size(192, 40) + Me.Button7.TabIndex = 44 + Me.Button7.Text = "stop creazione" + ' + 'Label27 + ' + Me.Label27.Location = New System.Drawing.Point(591, 346) + Me.Label27.Name = "Label27" + Me.Label27.Size = New System.Drawing.Size(140, 20) + Me.Label27.TabIndex = 46 + Me.Label27.Text = "Versione 2.0 BETA 1" + Me.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'TextBox13 + ' + Me.TextBox13.Location = New System.Drawing.Point(224, 48) + Me.TextBox13.Name = "TextBox13" + Me.TextBox13.Size = New System.Drawing.Size(56, 20) + Me.TextBox13.TabIndex = 20 + Me.TextBox13.Text = "TextBox13" + ' + 'Label16 + ' + Me.Label16.ForeColor = System.Drawing.Color.Black + Me.Label16.Location = New System.Drawing.Point(168, 48) + Me.Label16.Name = "Label16" + Me.Label16.Size = New System.Drawing.Size(48, 16) + Me.Label16.TabIndex = 19 + Me.Label16.Text = "Suffisso" + Me.Label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'Label7 + ' + Me.Label7.AutoSize = True + Me.Label7.ForeColor = System.Drawing.Color.Black + Me.Label7.Location = New System.Drawing.Point(24, 24) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(41, 13) + Me.Label7.TabIndex = 16 + Me.Label7.Text = "Altezza" + ' + 'TextBox7 + ' + Me.TextBox7.Location = New System.Drawing.Point(72, 24) + Me.TextBox7.Name = "TextBox7" + Me.TextBox7.Size = New System.Drawing.Size(72, 20) + Me.TextBox7.TabIndex = 14 + Me.TextBox7.Text = "TextBox7" + ' + 'Label8 + ' + Me.Label8.AutoSize = True + Me.Label8.ForeColor = System.Drawing.Color.Black + Me.Label8.Location = New System.Drawing.Point(8, 48) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(56, 13) + Me.Label8.TabIndex = 17 + Me.Label8.Text = "Larghezza" + ' + 'TextBox8 + ' + Me.TextBox8.Location = New System.Drawing.Point(72, 48) + Me.TextBox8.Name = "TextBox8" + Me.TextBox8.Size = New System.Drawing.Size(72, 20) + Me.TextBox8.TabIndex = 15 + Me.TextBox8.Text = "TextBox8" + ' + 'CheckBox2 + ' + Me.CheckBox2.Checked = True + Me.CheckBox2.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox2.ForeColor = System.Drawing.Color.Black + Me.CheckBox2.Location = New System.Drawing.Point(168, 16) + Me.CheckBox2.Name = "CheckBox2" + Me.CheckBox2.Size = New System.Drawing.Size(120, 32) + Me.CheckBox2.TabIndex = 18 + Me.CheckBox2.Text = "Mantieni dimensioni originali" + ' + 'Label43 + ' + Me.Label43.AutoSize = True + Me.Label43.Location = New System.Drawing.Point(651, 303) + Me.Label43.Name = "Label43" + Me.Label43.Size = New System.Drawing.Size(25, 13) + Me.Label43.TabIndex = 49 + Me.Label43.Text = "000" + ' + 'CheckBox22 + ' + Me.CheckBox22.AutoSize = True + Me.CheckBox22.Location = New System.Drawing.Point(539, 326) + Me.CheckBox22.Name = "CheckBox22" + Me.CheckBox22.Size = New System.Drawing.Size(104, 17) + Me.CheckBox22.TabIndex = 50 + Me.CheckBox22.Text = "Arresta il sistema" + Me.CheckBox22.UseVisualStyleBackColor = True + ' + 'Label44 + ' + Me.Label44.AutoSize = True + Me.Label44.Location = New System.Drawing.Point(539, 303) + Me.Label44.Name = "Label44" + Me.Label44.Size = New System.Drawing.Size(106, 13) + Me.Label44.TabIndex = 51 + Me.Label44.Text = "Tempo elaborazione:" + ' + 'TabPage4 + ' + Me.TabPage4.Controls.Add(Me.GroupBox6) + Me.TabPage4.Location = New System.Drawing.Point(4, 22) + Me.TabPage4.Name = "TabPage4" + Me.TabPage4.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage4.Size = New System.Drawing.Size(513, 326) + Me.TabPage4.TabIndex = 3 + Me.TabPage4.Text = "Logo" + Me.TabPage4.UseVisualStyleBackColor = True + ' + 'GroupBox6 + ' + Me.GroupBox6.Controls.Add(Me.PictureBox2) + Me.GroupBox6.Controls.Add(Me.PictureBox1) + Me.GroupBox6.Controls.Add(Me.ComboBox5) + Me.GroupBox6.Controls.Add(Me.ComboBox4) + Me.GroupBox6.Controls.Add(Me.TextBox19) + Me.GroupBox6.Controls.Add(Me.Label28) + Me.GroupBox6.Controls.Add(Me.CheckBox5) + Me.GroupBox6.Controls.Add(Me.TextBox15) + Me.GroupBox6.Controls.Add(Me.TextBox14) + Me.GroupBox6.Controls.Add(Me.Label25) + Me.GroupBox6.Controls.Add(Me.TextBox16) + Me.GroupBox6.Controls.Add(Me.Label24) + Me.GroupBox6.Controls.Add(Me.Label22) + Me.GroupBox6.Controls.Add(Me.Label23) + Me.GroupBox6.Controls.Add(Me.Button4) + Me.GroupBox6.Controls.Add(Me.TextBox10) + Me.GroupBox6.Controls.Add(Me.Label29) + Me.GroupBox6.Controls.Add(Me.Label30) + Me.GroupBox6.Controls.Add(Me.PictureBox3) + Me.GroupBox6.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox6.Location = New System.Drawing.Point(6, 6) + Me.GroupBox6.Name = "GroupBox6" + Me.GroupBox6.Size = New System.Drawing.Size(496, 224) + Me.GroupBox6.TabIndex = 42 + Me.GroupBox6.TabStop = False + Me.GroupBox6.Text = "Logo" + ' + 'PictureBox2 + ' + Me.PictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PictureBox2.Location = New System.Drawing.Point(144, 192) + Me.PictureBox2.Name = "PictureBox2" + Me.PictureBox2.Size = New System.Drawing.Size(24, 24) + Me.PictureBox2.TabIndex = 44 + Me.PictureBox2.TabStop = False + Me.PictureBox2.Visible = False + ' + 'PictureBox1 + ' + Me.PictureBox1.Cursor = System.Windows.Forms.Cursors.Cross + Me.PictureBox1.Location = New System.Drawing.Point(256, 56) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(224, 160) + Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.PictureBox1.TabIndex = 43 + Me.PictureBox1.TabStop = False + ' + 'ComboBox5 + ' + Me.ComboBox5.Location = New System.Drawing.Point(144, 168) + Me.ComboBox5.Name = "ComboBox5" + Me.ComboBox5.Size = New System.Drawing.Size(96, 21) + Me.ComboBox5.TabIndex = 42 + Me.ComboBox5.Text = "ComboBox5" + ' + 'ComboBox4 + ' + Me.ComboBox4.Location = New System.Drawing.Point(144, 144) + Me.ComboBox4.Name = "ComboBox4" + Me.ComboBox4.Size = New System.Drawing.Size(96, 21) + Me.ComboBox4.TabIndex = 41 + Me.ComboBox4.Text = "ComboBox4" + ' + 'TextBox19 + ' + Me.TextBox19.Location = New System.Drawing.Point(144, 96) + Me.TextBox19.Name = "TextBox19" + Me.TextBox19.Size = New System.Drawing.Size(96, 20) + Me.TextBox19.TabIndex = 40 + Me.TextBox19.Text = "TextBox19" + ' + 'Label28 + ' + Me.Label28.ForeColor = System.Drawing.Color.Black + Me.Label28.Location = New System.Drawing.Point(17, 97) + Me.Label28.Name = "Label28" + Me.Label28.Size = New System.Drawing.Size(120, 16) + Me.Label28.TabIndex = 39 + Me.Label28.Text = "Trasparenza (0-100%)" + Me.Label28.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'CheckBox5 + ' + Me.CheckBox5.ForeColor = System.Drawing.Color.Black + Me.CheckBox5.Location = New System.Drawing.Point(0, 26) + Me.CheckBox5.Name = "CheckBox5" + Me.CheckBox5.Size = New System.Drawing.Size(72, 20) + Me.CheckBox5.TabIndex = 38 + Me.CheckBox5.Text = "Aggiungi" + ' + 'TextBox15 + ' + Me.TextBox15.Location = New System.Drawing.Point(144, 72) + Me.TextBox15.Name = "TextBox15" + Me.TextBox15.Size = New System.Drawing.Size(96, 20) + Me.TextBox15.TabIndex = 19 + Me.TextBox15.Text = "TextBox15" + ' + 'TextBox14 + ' + Me.TextBox14.Location = New System.Drawing.Point(144, 48) + Me.TextBox14.Name = "TextBox14" + Me.TextBox14.Size = New System.Drawing.Size(96, 20) + Me.TextBox14.TabIndex = 18 + Me.TextBox14.Text = "TextBox14" + ' + 'Label25 + ' + Me.Label25.AutoSize = True + Me.Label25.ForeColor = System.Drawing.Color.Black + Me.Label25.Location = New System.Drawing.Point(17, 168) + Me.Label25.Name = "Label25" + Me.Label25.Size = New System.Drawing.Size(95, 13) + Me.Label25.TabIndex = 36 + Me.Label25.Text = "Posizione verticale" + Me.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'TextBox16 + ' + Me.TextBox16.Location = New System.Drawing.Point(144, 120) + Me.TextBox16.Name = "TextBox16" + Me.TextBox16.Size = New System.Drawing.Size(96, 20) + Me.TextBox16.TabIndex = 35 + Me.TextBox16.Text = "TextBox16" + ' + 'Label24 + ' + Me.Label24.AutoSize = True + Me.Label24.ForeColor = System.Drawing.Color.Black + Me.Label24.Location = New System.Drawing.Point(19, 123) + Me.Label24.Name = "Label24" + Me.Label24.Size = New System.Drawing.Size(88, 13) + Me.Label24.TabIndex = 34 + Me.Label24.Text = "Margine (pixel/%)" + Me.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label22 + ' + Me.Label22.AutoSize = True + Me.Label22.ForeColor = System.Drawing.Color.Black + Me.Label22.Location = New System.Drawing.Point(19, 51) + Me.Label22.Name = "Label22" + Me.Label22.Size = New System.Drawing.Size(41, 13) + Me.Label22.TabIndex = 20 + Me.Label22.Text = "Altezza" + Me.Label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label23 + ' + Me.Label23.AutoSize = True + Me.Label23.ForeColor = System.Drawing.Color.Black + Me.Label23.Location = New System.Drawing.Point(19, 75) + Me.Label23.Name = "Label23" + Me.Label23.Size = New System.Drawing.Size(56, 13) + Me.Label23.TabIndex = 21 + Me.Label23.Text = "Larghezza" + Me.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Button4 + ' + Me.Button4.Location = New System.Drawing.Point(464, 24) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(24, 20) + Me.Button4.TabIndex = 8 + Me.Button4.Text = "..." + ' + 'TextBox10 + ' + Me.TextBox10.Location = New System.Drawing.Point(144, 24) + Me.TextBox10.Name = "TextBox10" + Me.TextBox10.Size = New System.Drawing.Size(312, 20) + Me.TextBox10.TabIndex = 6 + Me.TextBox10.Text = "TextBox10" + ' + 'Label29 + ' + Me.Label29.AutoSize = True + Me.Label29.ForeColor = System.Drawing.Color.Black + Me.Label29.Location = New System.Drawing.Point(17, 147) + Me.Label29.Name = "Label29" + Me.Label29.Size = New System.Drawing.Size(105, 13) + Me.Label29.TabIndex = 36 + Me.Label29.Text = "Posizione orizzontale" + Me.Label29.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label30 + ' + Me.Label30.AutoSize = True + Me.Label30.ForeColor = System.Drawing.Color.Black + Me.Label30.Location = New System.Drawing.Point(19, 203) + Me.Label30.Name = "Label30" + Me.Label30.Size = New System.Drawing.Size(93, 13) + Me.Label30.TabIndex = 36 + Me.Label30.Text = "Colore trasparente" + Me.Label30.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Label30.Visible = False + ' + 'PictureBox3 + ' + Me.PictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PictureBox3.Location = New System.Drawing.Point(216, 192) + Me.PictureBox3.Name = "PictureBox3" + Me.PictureBox3.Size = New System.Drawing.Size(24, 24) + Me.PictureBox3.TabIndex = 44 + Me.PictureBox3.TabStop = False + Me.PictureBox3.Visible = False + ' + 'TabPage1 + ' + Me.TabPage1.Controls.Add(Me.Panel1) + Me.TabPage1.Controls.Add(Me.GroupBox1) + Me.TabPage1.Location = New System.Drawing.Point(4, 22) + Me.TabPage1.Name = "TabPage1" + Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage1.Size = New System.Drawing.Size(513, 326) + Me.TabPage1.TabIndex = 0 + Me.TabPage1.Text = "Miniature" + Me.TabPage1.UseVisualStyleBackColor = True + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.Label46) + Me.GroupBox1.Controls.Add(Me.TextBox33) + Me.GroupBox1.Controls.Add(Me.Panel2) + Me.GroupBox1.Controls.Add(Me.Label5) + Me.GroupBox1.Controls.Add(Me.TextBox5) + Me.GroupBox1.Controls.Add(Me.Label6) + Me.GroupBox1.Controls.Add(Me.TextBox6) + Me.GroupBox1.Controls.Add(Me.Label3) + Me.GroupBox1.Controls.Add(Me.TextBox3) + Me.GroupBox1.Controls.Add(Me.CheckBox1) + Me.GroupBox1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox1.Location = New System.Drawing.Point(6, 5) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(350, 210) + Me.GroupBox1.TabIndex = 25 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Miniature" + ' + 'Label46 + ' + Me.Label46.AutoSize = True + Me.Label46.Location = New System.Drawing.Point(198, 43) + Me.Label46.Name = "Label46" + Me.Label46.Size = New System.Drawing.Size(40, 13) + Me.Label46.TabIndex = 21 + Me.Label46.Text = "Qualità" + ' + 'TextBox33 + ' + Me.TextBox33.Location = New System.Drawing.Point(244, 40) + Me.TextBox33.Name = "TextBox33" + Me.TextBox33.Size = New System.Drawing.Size(100, 20) + Me.TextBox33.TabIndex = 20 + ' + 'Panel2 + ' + Me.Panel2.Controls.Add(Me.RadioButton3) + Me.Panel2.Controls.Add(Me.RadioButton7) + Me.Panel2.Controls.Add(Me.RadioButton4) + Me.Panel2.Controls.Add(Me.RadioButton6) + Me.Panel2.Controls.Add(Me.RadioButton5) + Me.Panel2.Location = New System.Drawing.Point(56, 114) + Me.Panel2.Name = "Panel2" + Me.Panel2.Size = New System.Drawing.Size(235, 90) + Me.Panel2.TabIndex = 19 + ' + 'RadioButton3 + ' + Me.RadioButton3.AutoSize = True + Me.RadioButton3.Location = New System.Drawing.Point(15, 16) + Me.RadioButton3.Name = "RadioButton3" + Me.RadioButton3.Size = New System.Drawing.Size(99, 17) + Me.RadioButton3.TabIndex = 14 + Me.RadioButton3.TabStop = True + Me.RadioButton3.Text = "Aggiungi Scritta" + Me.RadioButton3.UseVisualStyleBackColor = True + ' + 'RadioButton7 + ' + Me.RadioButton7.AutoSize = True + Me.RadioButton7.Location = New System.Drawing.Point(129, 40) + Me.RadioButton7.Name = "RadioButton7" + Me.RadioButton7.Size = New System.Drawing.Size(95, 17) + Me.RadioButton7.TabIndex = 18 + Me.RadioButton7.TabStop = True + Me.RadioButton7.Text = "numero+tempo" + Me.RadioButton7.UseVisualStyleBackColor = True + ' + 'RadioButton4 + ' + Me.RadioButton4.AutoSize = True + Me.RadioButton4.Location = New System.Drawing.Point(15, 40) + Me.RadioButton4.Name = "RadioButton4" + Me.RadioButton4.Size = New System.Drawing.Size(95, 17) + Me.RadioButton4.TabIndex = 15 + Me.RadioButton4.TabStop = True + Me.RadioButton4.Text = "Aggiungi orario" + Me.RadioButton4.UseVisualStyleBackColor = True + ' + 'RadioButton6 + ' + Me.RadioButton6.AutoSize = True + Me.RadioButton6.Location = New System.Drawing.Point(129, 16) + Me.RadioButton6.Name = "RadioButton6" + Me.RadioButton6.Size = New System.Drawing.Size(83, 17) + Me.RadioButton6.TabIndex = 17 + Me.RadioButton6.TabStop = True + Me.RadioButton6.Text = "Numero foto" + Me.RadioButton6.UseVisualStyleBackColor = True + ' + 'RadioButton5 + ' + Me.RadioButton5.AutoSize = True + Me.RadioButton5.Location = New System.Drawing.Point(15, 65) + Me.RadioButton5.Name = "RadioButton5" + Me.RadioButton5.Size = New System.Drawing.Size(84, 17) + Me.RadioButton5.TabIndex = 16 + Me.RadioButton5.TabStop = True + Me.RadioButton5.Text = "Tempo Gara" + Me.RadioButton5.UseVisualStyleBackColor = True + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.ForeColor = System.Drawing.Color.Black + Me.Label5.Location = New System.Drawing.Point(24, 88) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(41, 13) + Me.Label5.TabIndex = 12 + Me.Label5.Text = "Altezza" + ' + 'TextBox5 + ' + Me.TextBox5.Location = New System.Drawing.Point(72, 64) + Me.TextBox5.Name = "TextBox5" + Me.TextBox5.Size = New System.Drawing.Size(88, 20) + Me.TextBox5.TabIndex = 10 + Me.TextBox5.Text = "TextBox5" + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.ForeColor = System.Drawing.Color.Black + Me.Label6.Location = New System.Drawing.Point(8, 64) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(56, 13) + Me.Label6.TabIndex = 13 + Me.Label6.Text = "Larghezza" + ' + 'TextBox6 + ' + Me.TextBox6.Location = New System.Drawing.Point(72, 88) + Me.TextBox6.Name = "TextBox6" + Me.TextBox6.Size = New System.Drawing.Size(88, 20) + Me.TextBox6.TabIndex = 11 + Me.TextBox6.Text = "TextBox6" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.ForeColor = System.Drawing.Color.Black + Me.Label3.Location = New System.Drawing.Point(24, 40) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(44, 13) + Me.Label3.TabIndex = 7 + Me.Label3.Text = "Suffisso" + ' + 'TextBox3 + ' + Me.TextBox3.Location = New System.Drawing.Point(72, 40) + Me.TextBox3.Name = "TextBox3" + Me.TextBox3.Size = New System.Drawing.Size(88, 20) + Me.TextBox3.TabIndex = 6 + Me.TextBox3.Text = "TextBox3" + ' + 'CheckBox1 + ' + Me.CheckBox1.ForeColor = System.Drawing.Color.Black + Me.CheckBox1.Location = New System.Drawing.Point(72, 16) + Me.CheckBox1.Name = "CheckBox1" + Me.CheckBox1.Size = New System.Drawing.Size(104, 24) + Me.CheckBox1.TabIndex = 5 + Me.CheckBox1.Text = "Crea miniature" + ' + 'TabPage2 + ' + Me.TabPage2.Controls.Add(Me.GroupBox2) + Me.TabPage2.Location = New System.Drawing.Point(4, 22) + Me.TabPage2.Name = "TabPage2" + Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage2.Size = New System.Drawing.Size(513, 326) + Me.TabPage2.TabIndex = 5 + Me.TabPage2.Text = "Foto" + Me.TabPage2.UseVisualStyleBackColor = True + ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.Label45) + Me.GroupBox2.Controls.Add(Me.TextBox32) + Me.GroupBox2.Controls.Add(Me.TextBox26) + Me.GroupBox2.Controls.Add(Me.Label37) + Me.GroupBox2.Controls.Add(Me.Label38) + Me.GroupBox2.Controls.Add(Me.TextBox27) + Me.GroupBox2.Controls.Add(Me.Label39) + Me.GroupBox2.Controls.Add(Me.TextBox28) + Me.GroupBox2.Controls.Add(Me.CheckBox15) + Me.GroupBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox2.Location = New System.Drawing.Point(3, 6) + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.Size = New System.Drawing.Size(304, 156) + Me.GroupBox2.TabIndex = 36 + Me.GroupBox2.TabStop = False + Me.GroupBox2.Text = "Foto grande" + ' + 'Label45 + ' + Me.Label45.AutoSize = True + Me.Label45.Location = New System.Drawing.Point(11, 86) + Me.Label45.Name = "Label45" + Me.Label45.Size = New System.Drawing.Size(40, 13) + Me.Label45.TabIndex = 22 + Me.Label45.Text = "Qualità" + ' + 'TextBox32 + ' + Me.TextBox32.Location = New System.Drawing.Point(72, 80) + Me.TextBox32.Name = "TextBox32" + Me.TextBox32.Size = New System.Drawing.Size(72, 20) + Me.TextBox32.TabIndex = 21 + Me.TextBox32.Text = "100" + ' + 'TextBox26 + ' + Me.TextBox26.Location = New System.Drawing.Point(224, 48) + Me.TextBox26.Name = "TextBox26" + Me.TextBox26.Size = New System.Drawing.Size(56, 20) + Me.TextBox26.TabIndex = 20 + Me.TextBox26.Text = "TextBox26" + ' + 'Label37 + ' + Me.Label37.ForeColor = System.Drawing.Color.Black + Me.Label37.Location = New System.Drawing.Point(168, 48) + Me.Label37.Name = "Label37" + Me.Label37.Size = New System.Drawing.Size(48, 16) + Me.Label37.TabIndex = 19 + Me.Label37.Text = "Suffisso" + Me.Label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'Label38 + ' + Me.Label38.AutoSize = True + Me.Label38.ForeColor = System.Drawing.Color.Black + Me.Label38.Location = New System.Drawing.Point(24, 24) + Me.Label38.Name = "Label38" + Me.Label38.Size = New System.Drawing.Size(41, 13) + Me.Label38.TabIndex = 16 + Me.Label38.Text = "Altezza" + ' + 'TextBox27 + ' + Me.TextBox27.Location = New System.Drawing.Point(72, 24) + Me.TextBox27.Name = "TextBox27" + Me.TextBox27.Size = New System.Drawing.Size(72, 20) + Me.TextBox27.TabIndex = 14 + Me.TextBox27.Text = "TextBox27" + ' + 'Label39 + ' + Me.Label39.AutoSize = True + Me.Label39.ForeColor = System.Drawing.Color.Black + Me.Label39.Location = New System.Drawing.Point(8, 48) + Me.Label39.Name = "Label39" + Me.Label39.Size = New System.Drawing.Size(56, 13) + Me.Label39.TabIndex = 17 + Me.Label39.Text = "Larghezza" + ' + 'TextBox28 + ' + Me.TextBox28.Location = New System.Drawing.Point(72, 48) + Me.TextBox28.Name = "TextBox28" + Me.TextBox28.Size = New System.Drawing.Size(72, 20) + Me.TextBox28.TabIndex = 15 + Me.TextBox28.Text = "TextBox28" + ' + 'CheckBox15 + ' + Me.CheckBox15.Checked = True + Me.CheckBox15.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox15.ForeColor = System.Drawing.Color.Black + Me.CheckBox15.Location = New System.Drawing.Point(168, 16) + Me.CheckBox15.Name = "CheckBox15" + Me.CheckBox15.Size = New System.Drawing.Size(120, 32) + Me.CheckBox15.TabIndex = 18 + Me.CheckBox15.Text = "Mantieni dimensioni originali" + ' + 'TabPage3 + ' + Me.TabPage3.Controls.Add(Me.GroupBox10) + Me.TabPage3.Controls.Add(Me.GroupBox9) + Me.TabPage3.Controls.Add(Me.GroupBox5) + Me.TabPage3.Controls.Add(Me.GroupBox4) + Me.TabPage3.Location = New System.Drawing.Point(4, 22) + Me.TabPage3.Name = "TabPage3" + Me.TabPage3.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage3.Size = New System.Drawing.Size(513, 326) + Me.TabPage3.TabIndex = 2 + Me.TabPage3.Text = "Testo" + Me.TabPage3.UseVisualStyleBackColor = True + ' + 'GroupBox10 + ' + Me.GroupBox10.Controls.Add(Me.Label42) + Me.GroupBox10.Controls.Add(Me.Label41) + Me.GroupBox10.Controls.Add(Me.TextBox31) + Me.GroupBox10.Controls.Add(Me.TextBox30) + Me.GroupBox10.Location = New System.Drawing.Point(316, 53) + Me.GroupBox10.Name = "GroupBox10" + Me.GroupBox10.Size = New System.Drawing.Size(186, 73) + Me.GroupBox10.TabIndex = 39 + Me.GroupBox10.TabStop = False + Me.GroupBox10.Text = "Testo foto verticali" + ' + 'Label42 + ' + Me.Label42.AutoSize = True + Me.Label42.Location = New System.Drawing.Point(7, 46) + Me.Label42.Name = "Label42" + Me.Label42.Size = New System.Drawing.Size(45, 13) + Me.Label42.TabIndex = 3 + Me.Label42.Text = "Margine" + ' + 'Label41 + ' + Me.Label41.AutoSize = True + Me.Label41.Location = New System.Drawing.Point(7, 25) + Me.Label41.Name = "Label41" + Me.Label41.Size = New System.Drawing.Size(108, 13) + Me.Label41.TabIndex = 2 + Me.Label41.Text = "Dimensione Carattere" + ' + 'TextBox31 + ' + Me.TextBox31.Location = New System.Drawing.Point(131, 46) + Me.TextBox31.Name = "TextBox31" + Me.TextBox31.Size = New System.Drawing.Size(39, 20) + Me.TextBox31.TabIndex = 1 + ' + 'TextBox30 + ' + Me.TextBox30.Location = New System.Drawing.Point(131, 22) + Me.TextBox30.Name = "TextBox30" + Me.TextBox30.Size = New System.Drawing.Size(39, 20) + Me.TextBox30.TabIndex = 0 + ' + 'GroupBox9 + ' + Me.GroupBox9.Controls.Add(Me.CheckBox17) + Me.GroupBox9.Controls.Add(Me.CheckBox16) + Me.GroupBox9.Location = New System.Drawing.Point(316, 6) + Me.GroupBox9.Name = "GroupBox9" + Me.GroupBox9.Size = New System.Drawing.Size(186, 45) + Me.GroupBox9.TabIndex = 38 + Me.GroupBox9.TabStop = False + Me.GroupBox9.Text = "Slide show" + ' + 'CheckBox17 + ' + Me.CheckBox17.AutoSize = True + Me.CheckBox17.Location = New System.Drawing.Point(96, 18) + Me.CheckBox17.Name = "CheckBox17" + Me.CheckBox17.Size = New System.Drawing.Size(84, 17) + Me.CheckBox17.TabIndex = 1 + Me.CheckBox17.Text = "Numero foto" + Me.CheckBox17.UseVisualStyleBackColor = True + ' + 'CheckBox16 + ' + Me.CheckBox16.AutoSize = True + Me.CheckBox16.Location = New System.Drawing.Point(6, 19) + Me.CheckBox16.Name = "CheckBox16" + Me.CheckBox16.Size = New System.Drawing.Size(49, 17) + Me.CheckBox16.TabIndex = 0 + Me.CheckBox16.Text = "Data" + Me.CheckBox16.UseVisualStyleBackColor = True + ' + 'GroupBox5 + ' + Me.GroupBox5.Controls.Add(Me.TextBox34) + Me.GroupBox5.Controls.Add(Me.Button8) + Me.GroupBox5.Controls.Add(Me.Label36) + Me.GroupBox5.Controls.Add(Me.TextBox25) + Me.GroupBox5.Controls.Add(Me.Label35) + Me.GroupBox5.Controls.Add(Me.ComboBox3) + Me.GroupBox5.Controls.Add(Me.TextBox11) + Me.GroupBox5.Controls.Add(Me.Label12) + Me.GroupBox5.Controls.Add(Me.Label11) + Me.GroupBox5.Controls.Add(Me.CheckBox3) + Me.GroupBox5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox5.Location = New System.Drawing.Point(6, 6) + Me.GroupBox5.Name = "GroupBox5" + Me.GroupBox5.Size = New System.Drawing.Size(304, 120) + Me.GroupBox5.TabIndex = 37 + Me.GroupBox5.TabStop = False + Me.GroupBox5.Text = "Carattere" + ' + 'TextBox34 + ' + Me.TextBox34.Location = New System.Drawing.Point(160, 91) + Me.TextBox34.Name = "TextBox34" + Me.TextBox34.Size = New System.Drawing.Size(56, 20) + Me.TextBox34.TabIndex = 36 + Me.TextBox34.TextAlign = System.Windows.Forms.HorizontalAlignment.Right + ' + 'Button8 + ' + Me.Button8.ForeColor = System.Drawing.Color.Black + Me.Button8.Location = New System.Drawing.Point(222, 89) + Me.Button8.Name = "Button8" + Me.Button8.Size = New System.Drawing.Size(74, 24) + Me.Button8.TabIndex = 35 + Me.Button8.Text = "Scegli..." + ' + 'Label36 + ' + Me.Label36.ForeColor = System.Drawing.Color.Black + Me.Label36.Location = New System.Drawing.Point(8, 60) + Me.Label36.Name = "Label36" + Me.Label36.Size = New System.Drawing.Size(120, 19) + Me.Label36.TabIndex = 34 + Me.Label36.Text = "Dimensione miniatura" + Me.Label36.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'TextBox25 + ' + Me.TextBox25.Location = New System.Drawing.Point(160, 59) + Me.TextBox25.Name = "TextBox25" + Me.TextBox25.Size = New System.Drawing.Size(56, 20) + Me.TextBox25.TabIndex = 33 + Me.TextBox25.Text = "TextBox25" + ' + 'Label35 + ' + Me.Label35.ForeColor = System.Drawing.Color.Black + Me.Label35.Location = New System.Drawing.Point(8, 93) + Me.Label35.Name = "Label35" + Me.Label35.Size = New System.Drawing.Size(72, 16) + Me.Label35.TabIndex = 32 + Me.Label35.Text = "Colore RGB" + Me.Label35.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'ComboBox3 + ' + Me.ComboBox3.Location = New System.Drawing.Point(96, 8) + Me.ComboBox3.Name = "ComboBox3" + Me.ComboBox3.Size = New System.Drawing.Size(120, 21) + Me.ComboBox3.TabIndex = 28 + Me.ComboBox3.Text = "ComboBox3" + ' + 'TextBox11 + ' + Me.TextBox11.Location = New System.Drawing.Point(160, 35) + Me.TextBox11.Name = "TextBox11" + Me.TextBox11.Size = New System.Drawing.Size(56, 20) + Me.TextBox11.TabIndex = 27 + Me.TextBox11.Text = "TextBox11" + ' + 'Label12 + ' + Me.Label12.AutoSize = True + Me.Label12.ForeColor = System.Drawing.Color.Black + Me.Label12.Location = New System.Drawing.Point(8, 38) + Me.Label12.Name = "Label12" + Me.Label12.Size = New System.Drawing.Size(62, 13) + Me.Label12.TabIndex = 26 + Me.Label12.Text = "Dimensione" + Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label11 + ' + Me.Label11.AutoSize = True + Me.Label11.ForeColor = System.Drawing.Color.Black + Me.Label11.Location = New System.Drawing.Point(56, 8) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(28, 13) + Me.Label11.TabIndex = 22 + Me.Label11.Text = "Font" + ' + 'CheckBox3 + ' + Me.CheckBox3.ForeColor = System.Drawing.Color.Black + Me.CheckBox3.Location = New System.Drawing.Point(224, 8) + Me.CheckBox3.Name = "CheckBox3" + Me.CheckBox3.Size = New System.Drawing.Size(72, 24) + Me.CheckBox3.TabIndex = 24 + Me.CheckBox3.Text = "Grassetto" + ' + 'GroupBox4 + ' + Me.GroupBox4.Controls.Add(Me.Label40) + Me.GroupBox4.Controls.Add(Me.TextBox29) + Me.GroupBox4.Controls.Add(Me.TextBox18) + Me.GroupBox4.Controls.Add(Me.Label26) + Me.GroupBox4.Controls.Add(Me.DateTimePicker1) + Me.GroupBox4.Controls.Add(Me.CheckBox8) + Me.GroupBox4.Controls.Add(Me.TextBox9) + Me.GroupBox4.Controls.Add(Me.CheckBox7) + Me.GroupBox4.Controls.Add(Me.Label4) + Me.GroupBox4.Controls.Add(Me.TextBox4) + Me.GroupBox4.Controls.Add(Me.Label9) + Me.GroupBox4.Controls.Add(Me.Label13) + Me.GroupBox4.Controls.Add(Me.ComboBox1) + Me.GroupBox4.Controls.Add(Me.ComboBox2) + Me.GroupBox4.Controls.Add(Me.Label14) + Me.GroupBox4.Controls.Add(Me.TextBox12) + Me.GroupBox4.Controls.Add(Me.Label15) + Me.GroupBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox4.Location = New System.Drawing.Point(6, 132) + Me.GroupBox4.Name = "GroupBox4" + Me.GroupBox4.Size = New System.Drawing.Size(496, 186) + Me.GroupBox4.TabIndex = 36 + Me.GroupBox4.TabStop = False + Me.GroupBox4.Text = "Testo da applicare" + ' + 'Label40 + ' + Me.Label40.AutoSize = True + Me.Label40.Location = New System.Drawing.Point(8, 52) + Me.Label40.Name = "Label40" + Me.Label40.Size = New System.Drawing.Size(48, 13) + Me.Label40.TabIndex = 40 + Me.Label40.Text = "Verticale" + ' + 'TextBox29 + ' + Me.TextBox29.Location = New System.Drawing.Point(72, 49) + Me.TextBox29.Multiline = True + Me.TextBox29.Name = "TextBox29" + Me.TextBox29.Size = New System.Drawing.Size(408, 44) + Me.TextBox29.TabIndex = 39 + ' + 'TextBox18 + ' + Me.TextBox18.Location = New System.Drawing.Point(232, 156) + Me.TextBox18.Name = "TextBox18" + Me.TextBox18.Size = New System.Drawing.Size(100, 20) + Me.TextBox18.TabIndex = 38 + ' + 'Label26 + ' + Me.Label26.AutoSize = True + Me.Label26.ForeColor = System.Drawing.Color.Black + Me.Label26.Location = New System.Drawing.Point(344, 156) + Me.Label26.Name = "Label26" + Me.Label26.Size = New System.Drawing.Size(48, 13) + Me.Label26.TabIndex = 37 + Me.Label26.Text = "partenza" + ' + 'DateTimePicker1 + ' + Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Time + Me.DateTimePicker1.Location = New System.Drawing.Point(392, 156) + Me.DateTimePicker1.Name = "DateTimePicker1" + Me.DateTimePicker1.Size = New System.Drawing.Size(88, 20) + Me.DateTimePicker1.TabIndex = 36 + ' + 'CheckBox8 + ' + Me.CheckBox8.ForeColor = System.Drawing.Color.Black + Me.CheckBox8.Location = New System.Drawing.Point(72, 156) + Me.CheckBox8.Name = "CheckBox8" + Me.CheckBox8.Size = New System.Drawing.Size(56, 16) + Me.CheckBox8.TabIndex = 35 + Me.CheckBox8.Text = "Orario" + ' + 'TextBox9 + ' + Me.TextBox9.Location = New System.Drawing.Point(120, 108) + Me.TextBox9.Name = "TextBox9" + Me.TextBox9.Size = New System.Drawing.Size(56, 20) + Me.TextBox9.TabIndex = 20 + Me.TextBox9.Text = "TextBox9" + ' + 'CheckBox7 + ' + Me.CheckBox7.ForeColor = System.Drawing.Color.Black + Me.CheckBox7.Location = New System.Drawing.Point(136, 156) + Me.CheckBox7.Name = "CheckBox7" + Me.CheckBox7.Size = New System.Drawing.Size(88, 16) + Me.CheckBox7.TabIndex = 34 + Me.CheckBox7.Text = "Tempo gara" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.ForeColor = System.Drawing.Color.Black + Me.Label4.Location = New System.Drawing.Point(8, 24) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(59, 13) + Me.Label4.TabIndex = 9 + Me.Label4.Text = "Orizzontale" + ' + 'TextBox4 + ' + Me.TextBox4.Location = New System.Drawing.Point(72, 24) + Me.TextBox4.Name = "TextBox4" + Me.TextBox4.Size = New System.Drawing.Size(408, 20) + Me.TextBox4.TabIndex = 8 + Me.TextBox4.Text = "TextBox4" + ' + 'Label9 + ' + Me.Label9.AutoSize = True + Me.Label9.ForeColor = System.Drawing.Color.Black + Me.Label9.Location = New System.Drawing.Point(8, 108) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(110, 13) + Me.Label9.TabIndex = 19 + Me.Label9.Text = "Trasparenza (0-100%)" + ' + 'Label13 + ' + Me.Label13.AutoSize = True + Me.Label13.ForeColor = System.Drawing.Color.Black + Me.Label13.Location = New System.Drawing.Point(16, 132) + Me.Label13.Name = "Label13" + Me.Label13.Size = New System.Drawing.Size(52, 13) + Me.Label13.TabIndex = 29 + Me.Label13.Text = "Posizione" + ' + 'ComboBox1 + ' + Me.ComboBox1.Location = New System.Drawing.Point(72, 132) + Me.ComboBox1.Name = "ComboBox1" + Me.ComboBox1.Size = New System.Drawing.Size(104, 21) + Me.ComboBox1.TabIndex = 28 + Me.ComboBox1.Text = "ComboBox1" + ' + 'ComboBox2 + ' + Me.ComboBox2.Location = New System.Drawing.Point(376, 132) + Me.ComboBox2.Name = "ComboBox2" + Me.ComboBox2.Size = New System.Drawing.Size(104, 21) + Me.ComboBox2.TabIndex = 31 + Me.ComboBox2.Text = "ComboBox2" + ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.ForeColor = System.Drawing.Color.Black + Me.Label14.Location = New System.Drawing.Point(304, 132) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(67, 13) + Me.Label14.TabIndex = 30 + Me.Label14.Text = "Allineamento" + ' + 'TextBox12 + ' + Me.TextBox12.Location = New System.Drawing.Point(376, 108) + Me.TextBox12.Name = "TextBox12" + Me.TextBox12.Size = New System.Drawing.Size(104, 20) + Me.TextBox12.TabIndex = 33 + Me.TextBox12.Text = "TextBox12" + ' + 'Label15 + ' + Me.Label15.AutoSize = True + Me.Label15.ForeColor = System.Drawing.Color.Black + Me.Label15.Location = New System.Drawing.Point(296, 108) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(75, 13) + Me.Label15.TabIndex = 32 + Me.Label15.Text = "Margine (pixel)" + ' + 'TabPage5 + ' + Me.TabPage5.Controls.Add(Me.GroupBox3) + Me.TabPage5.Controls.Add(Me.GroupBox8) + Me.TabPage5.Controls.Add(Me.GroupBox7) + Me.TabPage5.Location = New System.Drawing.Point(4, 22) + Me.TabPage5.Name = "TabPage5" + Me.TabPage5.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage5.Size = New System.Drawing.Size(513, 326) + Me.TabPage5.TabIndex = 4 + Me.TabPage5.Text = "Generale" + Me.TabPage5.UseVisualStyleBackColor = True + ' + 'GroupBox3 + ' + Me.GroupBox3.Controls.Add(Me.CheckBox6) + Me.GroupBox3.Controls.Add(Me.Button3) + Me.GroupBox3.Controls.Add(Me.Button2) + Me.GroupBox3.Controls.Add(Me.Label1) + Me.GroupBox3.Controls.Add(Me.Label2) + Me.GroupBox3.Controls.Add(Me.TextBox1) + Me.GroupBox3.Controls.Add(Me.TextBox2) + Me.GroupBox3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox3.Location = New System.Drawing.Point(6, 6) + Me.GroupBox3.Name = "GroupBox3" + Me.GroupBox3.Size = New System.Drawing.Size(496, 101) + Me.GroupBox3.TabIndex = 35 + Me.GroupBox3.TabStop = False + Me.GroupBox3.Text = "Directory" + ' + 'CheckBox6 + ' + Me.CheckBox6.ForeColor = System.Drawing.Color.Black + Me.CheckBox6.Location = New System.Drawing.Point(80, 64) + Me.CheckBox6.Name = "CheckBox6" + Me.CheckBox6.Size = New System.Drawing.Size(152, 24) + Me.CheckBox6.TabIndex = 25 + Me.CheckBox6.Text = "aggiorna le sottodirectory" + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(462, 40) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(24, 20) + Me.Button3.TabIndex = 6 + Me.Button3.Text = "..." + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(462, 16) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(24, 20) + Me.Button2.TabIndex = 5 + Me.Button2.Text = "..." + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.ForeColor = System.Drawing.Color.Black + Me.Label1.Location = New System.Drawing.Point(6, 19) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(50, 13) + Me.Label1.TabIndex = 3 + Me.Label1.Text = "Sorgente" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.ForeColor = System.Drawing.Color.Black + Me.Label2.Location = New System.Drawing.Point(6, 43) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(68, 13) + Me.Label2.TabIndex = 4 + Me.Label2.Text = "Destinazione" + ' + 'TextBox1 + ' + Me.TextBox1.Location = New System.Drawing.Point(80, 16) + Me.TextBox1.Name = "TextBox1" + Me.TextBox1.Size = New System.Drawing.Size(376, 20) + Me.TextBox1.TabIndex = 0 + Me.TextBox1.Text = "TextBox1" + ' + 'TextBox2 + ' + Me.TextBox2.Location = New System.Drawing.Point(80, 40) + Me.TextBox2.Name = "TextBox2" + Me.TextBox2.Size = New System.Drawing.Size(376, 20) + Me.TextBox2.TabIndex = 1 + Me.TextBox2.Text = "TextBox2" + ' + 'GroupBox8 + ' + Me.GroupBox8.Controls.Add(Me.RadioButton2) + Me.GroupBox8.Controls.Add(Me.RadioButton1) + Me.GroupBox8.Controls.Add(Me.TextBox21) + Me.GroupBox8.Controls.Add(Me.Label34) + Me.GroupBox8.Controls.Add(Me.TextBox20) + Me.GroupBox8.Controls.Add(Me.Label33) + Me.GroupBox8.Controls.Add(Me.Label31) + Me.GroupBox8.Controls.Add(Me.CheckBox11) + Me.GroupBox8.Controls.Add(Me.TextBox17) + Me.GroupBox8.Controls.Add(Me.Label32) + Me.GroupBox8.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox8.Location = New System.Drawing.Point(204, 113) + Me.GroupBox8.Name = "GroupBox8" + Me.GroupBox8.Size = New System.Drawing.Size(192, 152) + Me.GroupBox8.TabIndex = 47 + Me.GroupBox8.TabStop = False + Me.GroupBox8.Text = "Sottocartelle" + ' + 'RadioButton2 + ' + Me.RadioButton2.ForeColor = System.Drawing.Color.Black + Me.RadioButton2.Location = New System.Drawing.Point(32, 128) + Me.RadioButton2.Name = "RadioButton2" + Me.RadioButton2.Size = New System.Drawing.Size(136, 16) + Me.RadioButton2.TabIndex = 38 + Me.RadioButton2.Text = "Numerazione files" + ' + 'RadioButton1 + ' + Me.RadioButton1.Checked = True + Me.RadioButton1.ForeColor = System.Drawing.Color.Black + Me.RadioButton1.Location = New System.Drawing.Point(32, 112) + Me.RadioButton1.Name = "RadioButton1" + Me.RadioButton1.Size = New System.Drawing.Size(152, 16) + Me.RadioButton1.TabIndex = 37 + Me.RadioButton1.TabStop = True + Me.RadioButton1.Text = "Numerazione progressiva" + ' + 'TextBox21 + ' + Me.TextBox21.Location = New System.Drawing.Point(128, 88) + Me.TextBox21.Name = "TextBox21" + Me.TextBox21.Size = New System.Drawing.Size(56, 20) + Me.TextBox21.TabIndex = 34 + Me.TextBox21.Text = "4" + ' + 'Label34 + ' + Me.Label34.ForeColor = System.Drawing.Color.Black + Me.Label34.Location = New System.Drawing.Point(8, 88) + Me.Label34.Name = "Label34" + Me.Label34.Size = New System.Drawing.Size(112, 16) + Me.Label34.TabIndex = 33 + Me.Label34.Text = "Num. cifre contatore" + Me.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'TextBox20 + ' + Me.TextBox20.Location = New System.Drawing.Point(56, 64) + Me.TextBox20.Name = "TextBox20" + Me.TextBox20.Size = New System.Drawing.Size(128, 20) + Me.TextBox20.TabIndex = 32 + Me.TextBox20.Text = "TextBox20" + ' + 'Label33 + ' + Me.Label33.ForeColor = System.Drawing.Color.Black + Me.Label33.Location = New System.Drawing.Point(6, 67) + Me.Label33.Name = "Label33" + Me.Label33.Size = New System.Drawing.Size(48, 16) + Me.Label33.TabIndex = 31 + Me.Label33.Text = "Suffisso" + ' + 'Label31 + ' + Me.Label31.ForeColor = System.Drawing.Color.Black + Me.Label31.Location = New System.Drawing.Point(24, 40) + Me.Label31.Name = "Label31" + Me.Label31.Size = New System.Drawing.Size(32, 16) + Me.Label31.TabIndex = 30 + Me.Label31.Text = "ogni" + ' + 'CheckBox11 + ' + Me.CheckBox11.ForeColor = System.Drawing.Color.Black + Me.CheckBox11.Location = New System.Drawing.Point(56, 16) + Me.CheckBox11.Name = "CheckBox11" + Me.CheckBox11.Size = New System.Drawing.Size(112, 16) + Me.CheckBox11.TabIndex = 29 + Me.CheckBox11.Text = "crea sottocartelle" + ' + 'TextBox17 + ' + Me.TextBox17.Location = New System.Drawing.Point(56, 40) + Me.TextBox17.Name = "TextBox17" + Me.TextBox17.Size = New System.Drawing.Size(64, 20) + Me.TextBox17.TabIndex = 27 + Me.TextBox17.Text = "99" + ' + 'Label32 + ' + Me.Label32.ForeColor = System.Drawing.Color.Black + Me.Label32.Location = New System.Drawing.Point(128, 40) + Me.Label32.Name = "Label32" + Me.Label32.Size = New System.Drawing.Size(24, 16) + Me.Label32.TabIndex = 28 + Me.Label32.Text = "file" + ' + 'GroupBox7 + ' + Me.GroupBox7.Controls.Add(Me.CheckBox10) + Me.GroupBox7.Controls.Add(Me.CheckBox9) + Me.GroupBox7.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox7.Location = New System.Drawing.Point(6, 113) + Me.GroupBox7.Name = "GroupBox7" + Me.GroupBox7.Size = New System.Drawing.Size(192, 88) + Me.GroupBox7.TabIndex = 45 + Me.GroupBox7.TabStop = False + Me.GroupBox7.Text = "Generale" + ' + 'CheckBox10 + ' + Me.CheckBox10.ForeColor = System.Drawing.Color.Black + Me.CheckBox10.Location = New System.Drawing.Point(16, 37) + Me.CheckBox10.Name = "CheckBox10" + Me.CheckBox10.Size = New System.Drawing.Size(136, 16) + Me.CheckBox10.TabIndex = 1 + Me.CheckBox10.Text = "Rotazione automatica" + ' + 'CheckBox9 + ' + Me.CheckBox9.Checked = True + Me.CheckBox9.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox9.ForeColor = System.Drawing.Color.Black + Me.CheckBox9.Location = New System.Drawing.Point(16, 18) + Me.CheckBox9.Name = "CheckBox9" + Me.CheckBox9.Size = New System.Drawing.Size(80, 16) + Me.CheckBox9.TabIndex = 0 + Me.CheckBox9.Text = "Forza Jpg" + ' + 'TabControl1 + ' + Me.TabControl1.Controls.Add(Me.TabPage5) + Me.TabControl1.Controls.Add(Me.TabPage3) + Me.TabControl1.Controls.Add(Me.TabPage2) + Me.TabControl1.Controls.Add(Me.TabPage1) + Me.TabControl1.Controls.Add(Me.TabPage4) + Me.TabControl1.Location = New System.Drawing.Point(12, 12) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(521, 352) + Me.TabControl1.TabIndex = 48 + ' + 'ProgressBar1 + ' + Me.ProgressBar1.Location = New System.Drawing.Point(539, 211) + Me.ProgressBar1.Name = "ProgressBar1" + Me.ProgressBar1.Size = New System.Drawing.Size(192, 23) + Me.ProgressBar1.TabIndex = 52 + ' + 'CheckBox12 + ' + Me.CheckBox12.ForeColor = System.Drawing.Color.Black + Me.CheckBox12.Location = New System.Drawing.Point(10, 19) + Me.CheckBox12.Name = "CheckBox12" + Me.CheckBox12.Size = New System.Drawing.Size(104, 21) + Me.CheckBox12.TabIndex = 35 + Me.CheckBox12.Text = "Aggiungi orario" + ' + 'CheckBox4 + ' + Me.CheckBox4.ForeColor = System.Drawing.Color.Black + Me.CheckBox4.Location = New System.Drawing.Point(10, 3) + Me.CheckBox4.Name = "CheckBox4" + Me.CheckBox4.Size = New System.Drawing.Size(104, 17) + Me.CheckBox4.TabIndex = 34 + Me.CheckBox4.Text = "Aggiungi scritta" + ' + 'CheckBox18 + ' + Me.CheckBox18.AutoSize = True + Me.CheckBox18.Location = New System.Drawing.Point(140, 3) + Me.CheckBox18.Name = "CheckBox18" + Me.CheckBox18.Size = New System.Drawing.Size(84, 17) + Me.CheckBox18.TabIndex = 36 + Me.CheckBox18.Text = "Numero foto" + Me.CheckBox18.UseVisualStyleBackColor = True + ' + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.CheckBox18) + Me.Panel1.Controls.Add(Me.CheckBox4) + Me.Panel1.Controls.Add(Me.CheckBox12) + Me.Panel1.Location = New System.Drawing.Point(52, 236) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(304, 73) + Me.Panel1.TabIndex = 26 + Me.Panel1.Visible = False + ' + 'Form1 + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) + Me.ClientSize = New System.Drawing.Size(740, 375) + Me.Controls.Add(Me.ProgressBar1) + Me.Controls.Add(Me.Label44) + Me.Controls.Add(Me.CheckBox22) + Me.Controls.Add(Me.Label43) + Me.Controls.Add(Me.TabControl1) + Me.Controls.Add(Me.Label27) + Me.Controls.Add(Me.Button7) + Me.Controls.Add(Me.Button5) + Me.Controls.Add(Me.Label20) + Me.Controls.Add(Me.Label19) + Me.Controls.Add(Me.Label18) + Me.Controls.Add(Me.Label17) + Me.Controls.Add(Me.Label10) + Me.Controls.Add(Me.Button1) + Me.Controls.Add(Me.Button6) + Me.MaximizeBox = False + Me.MaximumSize = New System.Drawing.Size(756, 414) + Me.MinimumSize = New System.Drawing.Size(756, 414) + Me.Name = "Form1" + Me.Text = "Image Catalog" + Me.TabPage4.ResumeLayout(False) + Me.GroupBox6.ResumeLayout(False) + Me.GroupBox6.PerformLayout() + CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit() + Me.TabPage1.ResumeLayout(False) + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.Panel2.ResumeLayout(False) + Me.Panel2.PerformLayout() + Me.TabPage2.ResumeLayout(False) + Me.GroupBox2.ResumeLayout(False) + Me.GroupBox2.PerformLayout() + Me.TabPage3.ResumeLayout(False) + Me.GroupBox10.ResumeLayout(False) + Me.GroupBox10.PerformLayout() + Me.GroupBox9.ResumeLayout(False) + Me.GroupBox9.PerformLayout() + Me.GroupBox5.ResumeLayout(False) + Me.GroupBox5.PerformLayout() + Me.GroupBox4.ResumeLayout(False) + Me.GroupBox4.PerformLayout() + Me.TabPage5.ResumeLayout(False) + Me.GroupBox3.ResumeLayout(False) + Me.GroupBox3.PerformLayout() + Me.GroupBox8.ResumeLayout(False) + Me.GroupBox8.PerformLayout() + Me.GroupBox7.ResumeLayout(False) + Me.TabControl1.ResumeLayout(False) + Me.Panel1.ResumeLayout(False) + Me.Panel1.PerformLayout() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + +#End Region + +#Const MULTI_THREADED = True + + Private StopAttivo As Boolean + Private WaterSelectColor As Boolean = False + + Private ContaFotoCuori As Integer + Private TaskCuori() As PicInfo + + Private MyPool As XYThreadPool = New XYThreadPool + Private ContaImmaginiThread As Integer + + Private Const maxThreads As Integer = 15 + + Private Sub setDefaults() + TextBox1.Text = "" + TextBox2.Text = "" + TextBox3.Text = "" + TextBox4.Text = "" + TextBox5.Text = "" + TextBox6.Text = "" + TextBox27.Text = "" + TextBox28.Text = "" + TextBox9.Text = "" + TextBox11.Text = "" + TextBox12.Text = "" + TextBox13.Text = "" + TextBox10.Text = "" + TextBox14.Text = "" + TextBox15.Text = "" + TextBox16.Text = "" + TextBox17.Text = "" + TextBox19.Text = "" + TextBox20.Text = "" + TextBox21.Text = "" + TextBox25.Text = "" + TextBox26.Text = "" + + ComboBox1.Items.Add("Alto") + ComboBox1.Items.Add("Basso") + ComboBox1.SelectedIndex = 1 + + ComboBox2.Items.Add("Sinistra") + ComboBox2.Items.Add("Centro") + ComboBox2.Items.Add("Destra") + ComboBox2.SelectedIndex = 1 + + ComboBox3.Items.Add("Arial") + ComboBox3.Items.Add("Arial Black") + ComboBox3.Items.Add("Arial Narrow") + ComboBox3.Items.Add("Comic Sans MS") + ComboBox3.Items.Add("Courier New") + ComboBox3.Items.Add("System") + ComboBox3.Items.Add("Times New Roman") + ComboBox3.Items.Add("Verdana") + ComboBox3.Items.Add("Wingdings") + ComboBox3.SelectedIndex = 7 + + ComboBox4.Items.Add("Sinistra") + ComboBox4.Items.Add("Centro") + ComboBox4.Items.Add("Destra") + ComboBox4.SelectedIndex = 2 + + ComboBox5.Items.Add("Alto") + ComboBox5.Items.Add("Centro") + ComboBox5.Items.Add("Basso") + ComboBox5.SelectedIndex = 2 + End Sub + + Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + Application.EnableVisualStyles() + + setDefaults() + + End Sub + + Private Sub FixPaths() + If TextBox1.Text.EndsWith("\") = False Then + TextBox1.Text &= "\" + End If + If TextBox2.Text.EndsWith("\") = False Then + TextBox2.Text &= "\" + End If + End Sub + + Private Sub lockUI() + TabControl1.Enabled = False + Button5.Enabled = False + Button6.Enabled = False + Button1.Enabled = False + + End Sub + + Private Sub unlockUI() + TabControl1.Enabled = True + Button5.Enabled = True + Button6.Enabled = True + Button1.Enabled = True + End Sub + + Private Sub btnCreaCatalogo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click + lockUI() + Dim timeStart As Date + Dim timeStop As Date + + timeStart = TimeOfDay + FixPaths() + + Label10.Text = "" + Label17.Text = "0" + Label18.Text = "0" + setPicSettings(TextBox1.Text, TextBox2.Text) +#If MULTI_THREADED Then + ProgressBar1.Minimum = 0 + ProgressBar1.Step = 1 + ProgressBar1.Value = 0 + + Dim t1 As New Threading.Thread(AddressOf creaCatalogoThread) + t1.IsBackground = True + t1.Start() + +#Else + creaCatalogo(timeStart, timeStop) + unlockUI() +#End If + + + + + End Sub + + Private Sub creaCatalogoThread() + Dim timeStart As Date = TimeOfDay + MyPool.StopThreadPool() + MyPool.StartThreadPool(0, maxThreads) + ContaImmaginiThread = 0 + + creaImmaginiWithThreadMod(TextBox1.Text, TextBox2.Text) + + Dim ThAttivo As ThreadPoolWorkItem = Nothing + Dim i As Integer = 0 + + Do Until i = ContaImmaginiThread + Thread.Sleep(100) + ThAttivo = MyPool.ExtractWorkItem() + If ThAttivo IsNot Nothing Then + i += 1 + 'stepProgressBar() + setLabel10Text("File: " & ThAttivo.m_sName) + + 'setLabel18Text(ContaImmaginiThread.ToString) + 'setLabel18Text(i.ToString) + + + 'Label10.Text = "File: " & ThAttivo.m_sName + 'Label18.Text = ContaImmaginiThread.ToString + End If + Loop + MyPool.StopThreadPool() + Dim timeStop As Date = TimeOfDay + + setLabel10Text("Finito") + setLabel43Text(CalcTime(timeStart, timeStop)) + + End Sub + + Private Sub creaCatalogo(timeStart As Date, timeStop As Date) + 'asdfg + MyPool.StopThreadPool() + MyPool.StartThreadPool(0, maxThreads) + ContaImmaginiThread = 0 + + creaImmaginiWithThreadMod(TextBox1.Text, TextBox2.Text) + + Dim ThAttivo As ThreadPoolWorkItem = Nothing + Dim i As Integer = 0 + + Do Until i = ContaImmaginiThread + Thread.Sleep(100) + ThAttivo = MyPool.ExtractWorkItem() + If ThAttivo IsNot Nothing Then + i += 1 + Label10.Text = "File: " & ThAttivo.m_sName + Label18.Text = ContaImmaginiThread.ToString + + End If + Loop + MyPool.StopThreadPool() + timeStop = TimeOfDay + + CalcTime(timeStart, timeStop) + Label10.Text = "Finito" + If CheckBox22.Checked = True Then + Shell("%windir%\System32\shutdown.exe") + End If + End Sub + + Private Function CalcTime(ByVal timeStart As Date, ByVal timeStop As Date) As String + Dim timediffH, timediffS As Long + Dim timediffM As Long + timediffM = DateAndTime.DateDiff(DateInterval.Minute, timeStart, timeStop) + timediffS = DateAndTime.DateDiff(DateInterval.Second, timeStart, timeStop) + timediffH = DateAndTime.DateDiff(DateInterval.Hour, timeStart, timeStop) + 'dim s As String = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + Dim s As String = "S:" + timediffS.ToString + 'Label43.Text = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + Return s + End Function + Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click + Dim DirSearch As FolderBrowserDialog = New FolderBrowserDialog + DirSearch.SelectedPath = TextBox1.Text + If DialogResult.OK = DirSearch.ShowDialog() Then + Dim DirectoryScelta As String = DirSearch.SelectedPath + If DirectoryScelta.EndsWith("\") = False Then + DirectoryScelta &= "\" + End If + + TextBox1.Text = DirectoryScelta + End If + End Sub + + Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click + Dim DirSearch As FolderBrowserDialog = New FolderBrowserDialog + DirSearch.SelectedPath = TextBox2.Text + If DialogResult.OK = DirSearch.ShowDialog() Then + Dim DirectoryScelta As String = DirSearch.SelectedPath + If DirectoryScelta.EndsWith("\") = False Then + DirectoryScelta &= "\" + End If + + TextBox2.Text = DirectoryScelta + End If + + 'Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + 'openFileDialog.Filter = "Bitmap files (*.bmp)|*.bmp|Jpeg files (*.jpg)|*.jpg|All valid files (*.*)|*.*" + 'openFileDialog.FilterIndex = 2 + 'openFileDialog.RestoreDirectory = True + + 'If DialogResult.OK = openFileDialog.ShowDialog() Then + ' Dim IlNome As String = openFileDialog.FileName + ' Dim NomeFine As String = "" + ' Dim i As Integer + + ' Dim Elenco As String() + ' Elenco = IlNome.Split(New Char() {"\"c}) + ' For i = 0 To Elenco.Length - 1 + ' NomeFine &= Elenco(i) & "\" + ' Next + + ' TextBox1.Text = NomeFine + 'End If + End Sub + + Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click + Dim SaveFileDlg As SaveFileDialog = New SaveFileDialog + + 'SaveFileDlg.InitialDirectory = "c:\" + SaveFileDlg.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*" + SaveFileDlg.FilterIndex = 0 + SaveFileDlg.RestoreDirectory = True + + If DialogResult.OK = SaveFileDlg.ShowDialog Then + Dim IlNome As String = SaveFileDlg.FileName + + SetupIni.NomeFileSetup = IlNome + + SetupIni.AggiornaParametro("DirSorgente", TextBox1.Text) + SetupIni.AggiornaParametro("DirDestinazione", TextBox2.Text) + SetupIni.AggiornaParametro("DirSottoDirectory", CheckBox6.Checked) + + SetupIni.AggiornaParametro("DirDividiDestinazione", CheckBox11.Checked) + SetupIni.AggiornaParametro("DirDividiNumFile", TextBox17.Text) + SetupIni.AggiornaParametro("DirDividiSuffisso", TextBox20.Text) + SetupIni.AggiornaParametro("DirDividiNumCifre", TextBox21.Text) + If RadioButton1.Checked = True Then + SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Progressiva") + Else + SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Files") + End If + + SetupIni.AggiornaParametro("MiniatureCrea", CheckBox1.Checked) + SetupIni.AggiornaParametro("MiniatureSuffisso", TextBox3.Text) + SetupIni.AggiornaParametro("MiniatureAltezza", TextBox5.Text) + SetupIni.AggiornaParametro("MiniatureLarghezza", TextBox6.Text) + SetupIni.AggiornaParametro("MiniatureAddScritta", RadioButton3.Checked) + SetupIni.AggiornaParametro("MiniatureAddOrario", RadioButton4.Checked) + + SetupIni.AggiornaParametro("FotoAltezza", TextBox27.Text) + SetupIni.AggiornaParametro("FotoLarghezza", TextBox28.Text) + SetupIni.AggiornaParametro("FotoCodice", TextBox13.Text) + SetupIni.AggiornaParametro("FotoDimOriginali", CheckBox2.Checked) + + SetupIni.AggiornaParametro("FontDimensione", TextBox11.Text) + SetupIni.AggiornaParametro("FontDimensioneMiniatura", TextBox25.Text) + SetupIni.AggiornaParametro("FontBold", CheckBox3.Checked) + SetupIni.AggiornaParametro("FontNome", ComboBox3.Text) + + + SetupIni.AggiornaParametro("TestoTesto", TextBox4.Text) + SetupIni.AggiornaParametro("TestoTrasparente", TextBox9.Text) + SetupIni.AggiornaParametro("TestoMargine", TextBox12.Text) + SetupIni.AggiornaParametro("TestoPosizione", ComboBox1.Text) + SetupIni.AggiornaParametro("TestoAllineamento", ComboBox2.Text) + + SetupIni.AggiornaParametro("MarchioFile", TextBox10.Text) + SetupIni.AggiornaParametro("MarchioAltezza", TextBox14.Text) + SetupIni.AggiornaParametro("MarchioLarghezza", TextBox15.Text) + SetupIni.AggiornaParametro("MarchioMargine", TextBox16.Text) + SetupIni.AggiornaParametro("MarchioAllOrizzontale", ComboBox4.Text) + SetupIni.AggiornaParametro("MarchioAllVerticale", ComboBox5.Text) + SetupIni.AggiornaParametro("MarchioTrasparenza", TextBox19.Text) + SetupIni.AggiornaParametro("MarchioAggiungi", CheckBox5.Checked) + + SetupIni.AggiornaParametro("TempoGara", CheckBox7.Checked) + SetupIni.AggiornaParametro("Orario", CheckBox8.Checked) + SetupIni.AggiornaParametro("EtichettaOrario", TextBox18.Text) + + SetupIni.AggiornaParametro("GeneraleForzaJpg", CheckBox9.Checked) + SetupIni.AggiornaParametro("GeneraleRotazioneAutomatica", CheckBox10.Checked) + SetupIni.AggiornaParametro("GrandezzaVerticale", TextBox30.Text) + SetupIni.AggiornaParametro("MargineVerticale", TextBox31.Text) + SetupIni.AggiornaParametro("DimensioniOriginali", CheckBox15.Checked) + SetupIni.AggiornaParametro("TestoVerticale", TextBox29.Text) + SetupIni.AggiornaParametro("NomeMiniatura", RadioButton6.Checked) + SetupIni.AggiornaParametro("DataFoto", CheckBox16.Checked) + SetupIni.AggiornaParametro("NumeroFoto", CheckBox17.Checked) + + SetupIni.AggiornaParametro("ColoreTestoRGB", TextBox34.Text) + + SetupIni.AggiornaParametro("TempoSmall", RadioButton5.Checked) + SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked) + + SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text) + SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text) + SetupIni.SalvaParametriSetup() + Me.Text = "Image Catalog - " & LeggiSoloNomeFile(IlNome) + End If + End Sub + + Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click + Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*" + openFileDialog.FilterIndex = 0 + openFileDialog.RestoreDirectory = True + + If DialogResult.OK = openFileDialog.ShowDialog() Then + Dim IlNome As String = openFileDialog.FileName + + SetupIni.NomeFileSetup = IlNome + SetupIni.CaricaParametriSetup() + + TextBox1.Text = SetupIni.LeggiParametroString("DirSorgente") + TextBox2.Text = SetupIni.LeggiParametroString("DirDestinazione") + CheckBox6.Checked = SetupIni.LeggiParametroBoolean("DirSottoDirectory") + + CheckBox11.Checked = SetupIni.LeggiParametroBoolean("DirDividiDestinazione") + TextBox17.Text = SetupIni.LeggiParametroString("DirDividiNumFile") + TextBox20.Text = SetupIni.LeggiParametroString("DirDividiSuffisso") + TextBox21.Text = SetupIni.LeggiParametroString("DirDividiNumCifre") + + Dim TestoTemp As String = SetupIni.LeggiParametroString("DirDividiTipoNumerazione") + If TestoTemp.ToUpper = "PROGRESSIVA" Then + RadioButton1.Checked = True + Else + RadioButton2.Checked = True + End If + + CheckBox1.Checked = SetupIni.LeggiParametroBoolean("MiniatureCrea") + TextBox3.Text = SetupIni.LeggiParametroString("MiniatureSuffisso") + TextBox5.Text = SetupIni.LeggiParametroString("MiniatureAltezza") + TextBox6.Text = SetupIni.LeggiParametroString("MiniatureLarghezza") + RadioButton3.Checked = SetupIni.LeggiParametroBoolean("MiniatureAddScritta") + RadioButton4.Checked = SetupIni.LeggiParametroBoolean("MiniatureAddOrario") + + TextBox27.Text = SetupIni.LeggiParametroString("FotoAltezza") + TextBox28.Text = SetupIni.LeggiParametroString("FotoLarghezza") + TextBox13.Text = SetupIni.LeggiParametroString("FotoCodice") + CheckBox2.Checked = SetupIni.LeggiParametroBoolean("FotoDimOriginali") + + TextBox11.Text = SetupIni.LeggiParametroString("FontDimensione") + TextBox25.Text = SetupIni.LeggiParametroString("FontDimensioneMiniatura") + CheckBox3.Checked = SetupIni.LeggiParametroBoolean("FontBold") + ComboBox3.Text = SetupIni.LeggiParametroString("FontNome") + + If TextBox25.Text = "" Then + TextBox25.Text = "0" + End If + + TextBox4.Text = SetupIni.LeggiParametroString("TestoTesto") + TextBox9.Text = SetupIni.LeggiParametroString("TestoTrasparente") + TextBox12.Text = SetupIni.LeggiParametroString("TestoMargine") + ComboBox1.Text = SetupIni.LeggiParametroString("TestoPosizione") + ComboBox2.Text = SetupIni.LeggiParametroString("TestoAllineamento") + + TextBox10.Text = SetupIni.LeggiParametroString("MarchioFile") + TextBox14.Text = SetupIni.LeggiParametroString("MarchioAltezza") + TextBox15.Text = SetupIni.LeggiParametroString("MarchioLarghezza") + TextBox16.Text = SetupIni.LeggiParametroString("MarchioMargine") + ComboBox4.Text = SetupIni.LeggiParametroString("MarchioAllOrizzontale") + ComboBox5.Text = SetupIni.LeggiParametroString("MarchioAllVerticale") + TextBox19.Text = SetupIni.LeggiParametroString("MarchioTrasparenza") + CheckBox5.Checked = SetupIni.LeggiParametroBoolean("MarchioAggiungi") + + CheckBox7.Checked = SetupIni.LeggiParametroBoolean("TempoGara") + CheckBox8.Checked = SetupIni.LeggiParametroBoolean("Orario") + TextBox18.Text = SetupIni.LeggiParametroString("EtichettaOrario") + + CheckBox9.Checked = SetupIni.LeggiParametroBoolean("GeneraleForzaJpg") + CheckBox10.Checked = SetupIni.LeggiParametroBoolean("GeneraleRotazioneAutomatica") + + TextBox30.Text = SetupIni.LeggiParametroString("GrandezzaVerticale") + TextBox31.Text = SetupIni.LeggiParametroString("MargineVerticale") + CheckBox15.Checked = SetupIni.LeggiParametroBoolean("DimensioniOriginali") + TextBox29.Text = SetupIni.LeggiParametroString("TestoVerticale") + RadioButton6.Checked = SetupIni.LeggiParametroBoolean("NomeMiniatura") + CheckBox16.Checked = SetupIni.LeggiParametroBoolean("DataFoto") + CheckBox17.Checked = SetupIni.LeggiParametroBoolean("NumeroFoto") + + + RadioButton5.Checked = SetupIni.LeggiParametroBoolean("TempoSmall") + RadioButton7.Checked = SetupIni.LeggiParametroBoolean("NumTempoSmall") + + TextBox32.Text = SetupIni.LeggiParametroString("CompressioneJpeg") + TextBox33.Text = SetupIni.LeggiParametroString("CompressioneJpegMiniatura") + + TextBox34.Text = SetupIni.LeggiParametroString("ColoreTestoRGB") + If File.Exists(TextBox10.Text) Then + + + PictureBox1.Image = Image.FromFile(TextBox10.Text) + If PictureBox1.Image.Height >= PictureBox1.Image.Width Then + PictureBox1.Height = 160 + PictureBox1.Width = CType(160 * PictureBox1.Image.Width / PictureBox1.Image.Height, Integer) + Else + PictureBox1.Width = 224 + PictureBox1.Height = CType(224 * PictureBox1.Image.Height / PictureBox1.Image.Width, Integer) + End If + End If + Me.Text = "Image Catalog - " & LeggiSoloNomeFile(IlNome) + End If + End Sub + + Private Sub setPicSettings(ByVal SourcePath As String, ByVal DestPath As String) + + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + + + + PicSettings.DirectorySorgente = TextBox1.Text + PicSettings.DirectoryDestinazione = TextBox2.Text + + 'PicSettings.DestDir = DestDir + 'PicSettings.SourceDir = SourceDir + 'PicSettings.DestDirStart = DestDirStart + + PicSettings.DimStandard = CType(TextBox11.Text, Integer) + PicSettings.DimStandardMiniatura = CType(TextBox25.Text, Integer) + + PicSettings.UsaOrarioMiniatura = CheckBox12.Checked + PicSettings.UsaOrarioTestoApplicare = CheckBox8.Checked + PicSettings.UsaTempoGaraTestoApplicare = CheckBox7.Checked + + PicSettings.UsaRotazioneAutomatica = CheckBox10.Checked + PicSettings.UsaForzaJpg = CheckBox9.Checked + + If CheckBox17.Checked Then + PicSettings.TestoNome = True + Else + PicSettings.TestoNome = False + + End If + + If CheckBox16.Checked Then + PicSettings.NomeData = True + Else + PicSettings.NomeData = False + End If + PicSettings.TestoFirmaStart = TextBox4.Text + PicSettings.TestoFirmaStartV = TextBox29.Text + + PicSettings.DataPartenza = DateTimePicker1.Value + PicSettings.TestoOrario = TextBox18.Text + + PicSettings.AltezzaSmall = CType(TextBox5.Text, Integer) + PicSettings.LarghezzaSmall = CType(TextBox5.Text, Integer) + + PicSettings.CreaMiniature = CheckBox1.Checked + PicSettings.AggiungiScritteMiniature = RadioButton3.Checked + PicSettings.AggTempoGaraMin = RadioButton5.Checked + PicSettings.AggNumTempMin = RadioButton7.Checked + + + PicSettings.DimVert = CType(TextBox30.Text, Integer) + PicSettings.MargVert = CType(TextBox31.Text, Integer) + + 'PicSettings.NomeFileChild = childFile.Name + PicSettings.Suffisso = TextBox3.Text + PicSettings.Codice = TextBox13.Text + + PicSettings.Trasparenza = CType(TextBox9.Text, Integer) + PicSettings.IlFont = ComboBox3.SelectedItem.ToString + PicSettings.Grassetto = CheckBox3.Checked + + PicSettings.Posizione = ComboBox1.SelectedItem.ToString + PicSettings.Allineamento = ComboBox2.SelectedItem.ToString + PicSettings.Margine = CType(TextBox12.Text, Integer) + + PicSettings.LogoAltezza = CType(TextBox14.Text, Integer) + PicSettings.LogoLarghezza = CType(TextBox15.Text, Integer) + + PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text) + + PicSettings.LogoAggiungi = CheckBox5.Checked + PicSettings.LogoNomeFile = TextBox10.Text + PicSettings.LogoTrasparenza = TextBox19.Text + PicSettings.LogoMargine = TextBox16.Text + PicSettings.LogoPosizioneH = ComboBox4.Text + PicSettings.LogoPosizioneV = ComboBox5.Text + + PicSettings.FotoGrandeDimOrigina = CheckBox15.Checked + PicSettings.AltezzaBig = CType(TextBox27.Text, Integer) + PicSettings.LarghezzaBig = CType(TextBox28.Text, Integer) + PicSettings.DimMin = CType(TextBox25.Text, Integer) + + PicSettings.TestoMin = RadioButton6.Checked + + PicSettings.jpegQuality = CLng(TextBox32.Text) + PicSettings.jpegQualityMin = CLng(TextBox33.Text) + + 'PicSettings.mainForm = Me + + + End Sub + + Private Function makeFilesList(ByVal SourcePath As String) As List(Of List(Of FileInfo)) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(TextBox17.Text, Integer) + Dim SuffixDir As String = TextBox20.Text + Dim NumCifreDir As Integer = CType(TextBox21.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + Dim picList As New List(Of FileInfo) + Dim dirList As New List(Of List(Of FileInfo)) + + + 'controlla directory principale + 'Dim childFile As FileInfo + 'For Each childFile In SourceDir.GetFiles("*.jpg") + ' picList.Add(childFile) + 'Next + + picList = getFiles(SourceDir) + + dirList.Add(picList) + + 'controlla sottodirectory + If CheckBox6.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + Dim filesList As New List(Of FileInfo) + filesList = getFiles(subDir) + dirList.Add(filesList) + Next + End If + + Return dirList + End Function + + Private Function getFiles(sourceDir As DirectoryInfo) As List(Of FileInfo) + Dim picList As New List(Of FileInfo) + Dim childFile As FileInfo + For Each childFile In sourceDir.GetFiles("*.jpg") + picList.Add(childFile) + Next + Return picList + End Function + + Private Function dividiLista(SourcePath As String, lista As List(Of List(Of FileInfo))) As List(Of List(Of FileInfo)) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + + Dim NumFileXDir As Integer = CType(TextBox17.Text, Integer) + Dim SuffixDir As String = TextBox20.Text + Dim NumCifreDir As Integer = CType(TextBox21.Text, Integer) + Dim DividiFile As Boolean = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + If NumFileXDir > 0 And CheckBox11.Checked = True Then + If FileConta > NumFileXDir Then + DividiFile = True + Else + + End If + + End If + + End Function + + Private Sub setLabel17Text(ByVal text As String) + If Label17.InvokeRequired Then + Label17.Invoke(New Action(Of String)(AddressOf setLabel17Text), text) + Else + Label17.Text = text + + End If + End Sub + Public Sub stepProgressBar() + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New MethodInvoker(AddressOf ProgressBar1.PerformStep)) + Else + ProgressBar1.PerformStep() + End If + setLabel18Text(ProgressBar1.Value.ToString) + End Sub + Private Sub setLabel10Text(ByVal text As String) + If Label10.InvokeRequired Then + Label10.Invoke(New Action(Of String)(AddressOf setLabel10Text), text) + Else + Label10.Text = text + + End If + End Sub + + Private Sub setProgressBarMaximum(ByVal value As Integer) + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New Action(Of Integer)(AddressOf setProgressBarMaximum), value) + Else + ProgressBar1.Maximum = value + + End If + End Sub + + Private Sub setProgressBarValue(ByVal value As Integer) + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New Action(Of Integer)(AddressOf setProgressBarValue), value) + Else + ProgressBar1.Value = value + + End If + End Sub + + Private Sub setLabel18Text(ByVal text As String) + If Label18.InvokeRequired Then + Label18.Invoke(New Action(Of String)(AddressOf setLabel18Text), text) + Else + Label18.Text = text + + End If + End Sub + + Private Sub setLabel43Text(ByVal text As String) + If Label43.InvokeRequired Then + Label43.Invoke(New Action(Of String)(AddressOf setLabel43Text), text) + Else + Label43.Text = text + + End If + End Sub + + Private Sub creaImmaginiWithThreadMod(ByVal SourcePath As String, ByVal DestPath As String) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(TextBox17.Text, Integer) + Dim SuffixDir As String = TextBox20.Text + Dim NumCifreDir As Integer = CType(TextBox21.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + + + If SourceDir.Exists Then + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0) + 'Label17.Text = (CType(Label17.Text, Integer) + FileConta).ToString + Dim a As String = (CType(Label17.Text, Integer) + FileConta).ToString + setLabel17Text(a) + + setProgressBarMaximum(CInt(a)) + + If NumFileXDir > 0 And CheckBox11.Checked = True Then + If FileConta > NumFileXDir Then + DividiFile = True + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles("*.jpg") + If StopAttivo = True Then + Exit For + End If + setLabel10Text("File: " & childFile.Name) + Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + 'setLabel18Text(b) + 'setProgressBarValue(CInt(b)) + 'Label10.Text = "File: " & childFile.Name + 'Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + 'Application.DoEvents() + + ContaFileXDir += 1 + + If DividiFile = True Then + If ContaFileXDir = (ContaDirXDir * NumFileXDir) + 1 Then + ContaDirXDir += 1 + + If RadioButton1.Checked = True Then + TestoTemp = ContaDirXDir.ToString + Else + TestoTemp = (ContaDirXDir * NumFileXDir).ToString + End If + For ContaTemp = 1 To (NumCifreDir - TestoTemp.Length) + TestoTemp = "0" & TestoTemp + Next + + If DestDirStart.FullName.EndsWith("\") Then + DestDir = New DirectoryInfo(DestDirStart.FullName & SuffixDir & TestoTemp) + Else + DestDir = New DirectoryInfo(DestDirStart.FullName & "\" & SuffixDir & TestoTemp) + End If + + If Not DestDir.Exists Then + DestDir.Create() + End If + End If + End If + + 'Application.DoEvents() + + + + Dim ClsCreaImmagine As New ImageCreator + ClsCreaImmagine.NomeFileChild = childFile.Name + ClsCreaImmagine.DestDir = DestDir + ClsCreaImmagine.SourceDir = SourceDir + ClsCreaImmagine.DestDirStart = DestDirStart + + ContaImmaginiThread += 1 + MyPool.InsertWorkItem(childFile.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {childFile.Name}, True) + Next + ' copy all the sub-directories by recursively calling this same routine + If CheckBox6.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + creaImmaginiWithThreadMod(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)) + Next + End If + End If + End Sub + + 'il posto giusto dove fare modifiche + Private Sub CreaImmaginiWithThread(ByVal SourcePath As String, ByVal DestPath As String) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(TextBox17.Text, Integer) + Dim SuffixDir As String = TextBox20.Text + Dim NumCifreDir As Integer = CType(TextBox21.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + + + If SourceDir.Exists Then + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0) + Label17.Text = (CType(Label17.Text, Integer) + FileConta).ToString + + If NumFileXDir > 0 And CheckBox11.Checked = True Then + If FileConta > NumFileXDir Then + DividiFile = True + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles("*.jpg") + If StopAttivo = True Then + Exit For + End If + 'Label10.Text = "File: " & childFile.Name + 'Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + 'Application.DoEvents() + + ContaFileXDir += 1 + + If DividiFile = True Then + If ContaFileXDir = (ContaDirXDir * NumFileXDir) + 1 Then + ContaDirXDir += 1 + + If RadioButton1.Checked = True Then + TestoTemp = ContaDirXDir.ToString + Else + TestoTemp = (ContaDirXDir * NumFileXDir).ToString + End If + For ContaTemp = 1 To (NumCifreDir - TestoTemp.Length) + TestoTemp = "0" & TestoTemp + Next + + If DestDirStart.FullName.EndsWith("\") Then + DestDir = New DirectoryInfo(DestDirStart.FullName & SuffixDir & TestoTemp) + Else + DestDir = New DirectoryInfo(DestDirStart.FullName & "\" & SuffixDir & TestoTemp) + End If + + If Not DestDir.Exists Then + DestDir.Create() + End If + End If + End If + + Application.DoEvents() + Dim ClsCreaImmagine As New CreaImmagineSeparateThread + + ClsCreaImmagine.DirectorySorgente = TextBox1.Text + ClsCreaImmagine.DirectoryDestinazione = TextBox2.Text + + ClsCreaImmagine.DestDir = DestDir + ClsCreaImmagine.SourceDir = SourceDir + ClsCreaImmagine.DestDirStart = DestDirStart + + ClsCreaImmagine.DimStandard = CType(TextBox11.Text, Integer) + ClsCreaImmagine.DimStandardMiniatura = CType(TextBox25.Text, Integer) + + ClsCreaImmagine.UsaOrarioMiniatura = CheckBox12.Checked + ClsCreaImmagine.UsaOrarioTestoApplicare = CheckBox8.Checked + ClsCreaImmagine.UsaTempoGaraTestoApplicare = CheckBox7.Checked + + ClsCreaImmagine.UsaRotazioneAutomatica = CheckBox10.Checked + ClsCreaImmagine.UsaForzaJpg = CheckBox9.Checked + + If CheckBox17.Checked Then + ClsCreaImmagine.TestoNome = True + Else + ClsCreaImmagine.TestoNome = False + + End If + + If CheckBox16.Checked Then + ClsCreaImmagine.NomeData = True + Else + ClsCreaImmagine.NomeData = False + End If + ClsCreaImmagine.TestoFirmaStart = TextBox4.Text + ClsCreaImmagine.TestoFirmaStartV = TextBox29.Text + + ClsCreaImmagine.DataPartenza = DateTimePicker1.Value + ClsCreaImmagine.TestoOrario = TextBox18.Text + + ClsCreaImmagine.AltezzaSmall = CType(TextBox5.Text, Integer) + ClsCreaImmagine.LarghezzaSmall = CType(TextBox5.Text, Integer) + + ClsCreaImmagine.CreaMiniature = CheckBox1.Checked + ClsCreaImmagine.AggiungiScritteMiniature = RadioButton3.Checked + ClsCreaImmagine.AggTempoGaraMin = RadioButton5.Checked + ClsCreaImmagine.AggNumTempMin = RadioButton7.Checked + + + ClsCreaImmagine.DimVert = CType(TextBox30.Text, Integer) + ClsCreaImmagine.MargVert = CType(TextBox31.Text, Integer) + + ClsCreaImmagine.NomeFileChild = childFile.Name + ClsCreaImmagine.Suffisso = TextBox3.Text + ClsCreaImmagine.Codice = TextBox13.Text + + ClsCreaImmagine.Trasparenza = CType(TextBox9.Text, Integer) + ClsCreaImmagine.IlFont = ComboBox3.SelectedItem.ToString + ClsCreaImmagine.Grassetto = CheckBox3.Checked + + ClsCreaImmagine.Posizione = ComboBox1.SelectedItem.ToString + ClsCreaImmagine.Allineamento = ComboBox2.SelectedItem.ToString + ClsCreaImmagine.Margine = CType(TextBox12.Text, Integer) + + ClsCreaImmagine.LogoAltezza = CType(TextBox14.Text, Integer) + ClsCreaImmagine.LogoLarghezza = CType(TextBox15.Text, Integer) + + 'ClsCreaImmagine.FontColoreR = CType(TextBox22.Text, Integer) + 'ClsCreaImmagine.FontColoreG = CType(TextBox23.Text, Integer) + 'ClsCreaImmagine.FontColoreB = CType(TextBox24.Text, Integer) + ClsCreaImmagine.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text) + + ClsCreaImmagine.LogoAggiungi = CheckBox5.Checked + ClsCreaImmagine.LogoNomeFile = TextBox10.Text + ClsCreaImmagine.LogoTrasparenza = TextBox19.Text + ClsCreaImmagine.LogoMargine = TextBox16.Text + ClsCreaImmagine.LogoPosizioneH = ComboBox4.Text + ClsCreaImmagine.LogoPosizioneV = ComboBox5.Text + + ClsCreaImmagine.FotoGrandeDimOrigina = CheckBox15.Checked + ClsCreaImmagine.AltezzaBig = CType(TextBox27.Text, Integer) + ClsCreaImmagine.LarghezzaBig = CType(TextBox28.Text, Integer) + ClsCreaImmagine.DimMin = CType(TextBox25.Text, Integer) + + ClsCreaImmagine.TestoMin = RadioButton6.Checked + + ClsCreaImmagine.jpegQuality = CLng(TextBox32.Text) + ClsCreaImmagine.jpegQuality = CLng(TextBox33.Text) + + ContaImmaginiThread += 1 + MyPool.InsertWorkItem(childFile.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {childFile.Name}, True) + Next + ' copy all the sub-directories by recursively calling this same routine + If CheckBox6.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + CreaImmaginiWithThread(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)) + Next + End If + End If + End Sub + + Private Sub CopyDirectoryFile(ByVal SourcePath As String, ByVal DestPath As String, Optional ByVal OverWrite As Boolean = False) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDir As DirectoryInfo = New DirectoryInfo(DestPath) + + If SourceDir.Exists Then + If Not DestDir.Exists Then + DestDir.Create() + End If + ' copy all the files of the current directory + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles() + If OverWrite Then + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), True) + Else + ' if overwrite = false, copy the file only if it does not exist + ' this is done to avoid an IOException if a file already exists + ' this way the other files can be copied anyway... + If Not File.Exists(Path.Combine(DestDir.FullName, childFile.Name)) Then + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), False) + End If + End If + Next + ' copy all the sub-directories by recursively calling this same routine + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + CopyDirectoryFile(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name), OverWrite) + Next + End If + End Sub + + + + + + Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size + ' Calculate the Size of the New image + '*** Larghezza, Altezza, Auto + + Dim tempMultiplier As Double + + If TipoSize.ToUpper = "Larghezza".ToUpper Then + tempMultiplier = MaxPixel / currentwidth + ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then + tempMultiplier = MaxPixel / currentheight + Else + If currentheight > currentwidth Then ' portrait + tempMultiplier = MaxPixel / currentheight + Else + tempMultiplier = MaxPixel / currentwidth + End If + End If + + Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier)) + + Return NewSize + End Function + + + + Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click + StopAttivo = True + + MyPool.StopThreadPool() + unlockUI() + + End Sub + + Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click + Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Immagini jpg (*.jpg)|*.jpg|Immagini gif (*.gif)|*.gif|Tutti i file (*.*)|*.*" + If TextBox10.Text.Length > 0 Then + openFileDialog.FileName = TextBox10.Text + End If + openFileDialog.FilterIndex = 0 + openFileDialog.RestoreDirectory = True + + If DialogResult.OK = openFileDialog.ShowDialog() Then + TextBox10.Text = openFileDialog.FileName + PictureBox1.Image = Image.FromFile(TextBox10.Text) + If PictureBox1.Image.Height >= PictureBox1.Image.Width Then + PictureBox1.Height = 160 + PictureBox1.Width = CType(160 * PictureBox1.Image.Width / PictureBox1.Image.Height, Integer) + Else + PictureBox1.Width = 224 + PictureBox1.Height = CType(224 * PictureBox1.Image.Height / PictureBox1.Image.Width, Integer) + End If + End If + End Sub + + Private Function LeggiSoloNomeFile(ByVal FileName As String) As String + Dim Testo As String = FileName + Dim Risposta As String = "" + + Dim Nomi() As String = Testo.Split(New Char() {"\"c}) + If Nomi.Length > 1 Then + Risposta = Nomi(Nomi.Length - 1) + End If + + Return Risposta + End Function + + + Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove + 'GetColor() + 'GetPixelColor(PictureBox1.PointToScreen(e.Location)).ToArgb.ToString("X8") + + End Sub + + Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp + If e.Button = MouseButtons.Left Then + WaterSelectColor = True + Else + WaterSelectColor = False + End If + End Sub + + + 'Private Declare Function CreateDC Lib "gdi32.dll" (ByVal strDriver As String, ByVal strDevice As String, ByVal strOutput As String, ByVal pData As IntPtr) As IntPtr + 'Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hdc As IntPtr) As Boolean + 'Private Declare Function GetPixel Lib "gdi32.dll" (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer) As Integer + 'Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As Point) As Boolean + + + '''' + '''' Get the color relative to mouse position + '''' + 'Private Sub GetColor() + ' Dim hdcScreen As IntPtr = CreateDC("Display", Nothing, Nothing, IntPtr.Zero) + ' Dim pt As Point = New Point + ' GetCursorPos(pt) + ' Dim cr As Integer = GetPixel(hdcScreen, pt.X, pt.Y) + ' DeleteDC(hdcScreen) + ' Dim clr As Color = Color.FromArgb((cr And &HFF), (cr And &HFF00) >> 8, (cr And &HFF0000) >> 16) + ' PictureBox3.BackColor = clr + ' If WaterSelectColor = True Then + ' PictureBox2.BackColor = clr + ' End If + ' WaterSelectColor = False + 'End Sub + + + Private Function GetPixelColor(ByVal screenLocation As Point) As Color() + 'Dim bm As New Bitmap(1, 1, Imaging.PixelFormat.Format24bppRgb) + 'Dim g As Graphics = Graphics.FromImage(bm) + 'g.CopyFromScreen(screenLocation, New Point(0, 0), New Size(1, 1)) + 'Dim result As Color = bm.GetPixel(0, 0) + 'g.Dispose() + 'bm.Dispose() + 'Return result + Return Nothing + End Function + + Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click + Dim MyDialog As New ColorDialog + MyDialog.AllowFullOpen = True + 'If TextBox22.Text.Length > 0 And TextBox23.Text.Length > 0 And TextBox24.Text.Length > 0 Then + ' If CType(TextBox22.Text, Integer) >= 0 And CType(TextBox23.Text, Integer) >= 0 And CType(TextBox24.Text, Integer) >= 0 Then + ' MyDialog.Color = Color.FromArgb(0, CType(TextBox22.Text, Integer), CType(TextBox23.Text, Integer), CType(TextBox24.Text, Integer)) + ' End If + 'End If + + If (MyDialog.ShowDialog() = Windows.Forms.DialogResult.OK) Then + 'TextBox22.Text = MyDialog.Color.R.ToString + 'TextBox23.Text = MyDialog.Color.G.ToString + 'TextBox24.Text = MyDialog.Color.B.ToString + TextBox34.Text = ColorTranslator.ToHtml(MyDialog.Color) + TextBox34.BackColor = MyDialog.Color + + End If + End Sub + + + + + + + + Private Sub TextBox27_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) + + End Sub + + + + + Private Sub CheckBox18_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox18.CheckedChanged + CheckBox4.Checked = False + CheckBox12.Checked = False + + End Sub + + Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged + CheckBox18.Checked = False + End Sub + + Private Sub CheckBox12_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox12.CheckedChanged + CheckBox18.Checked = False + End Sub + + +End Class + +Public Class PicInfoold + Public DirSource, DirDest, DirDestStart As DirectoryInfo + Public NomeImmagine As String + + Public Sub New(ByVal Dir_Source As DirectoryInfo, ByVal Dir_Dest As DirectoryInfo, ByVal Dir_DestStart As DirectoryInfo, ByVal Nome_Immagine As String) + DirSource = Dir_Source + DirDest = Dir_Dest + DirDestStart = Dir_DestStart + NomeImmagine = Nome_Immagine + End Sub +End Class \ No newline at end of file diff --git a/imagecatalog.backup/ImageCatalog 2.csproj b/imagecatalog.backup/ImageCatalog 2.csproj new file mode 100644 index 0000000..6acc065 --- /dev/null +++ b/imagecatalog.backup/ImageCatalog 2.csproj @@ -0,0 +1,371 @@ + + + + Local + 9.0.30729 + 2.0 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C} + Debug + AnyCPU + + + + + ImageCatalog + + + None + JScript + Grid + IE50 + false + WinExe + Binary + On + On + ImageCatalog + ImageCatalog.My.MyApplication + + + WindowsForms + 3.5 + + + v4.8 + false + My Project\app.manifest + + + SAK + SAK + SAK + SAK + + + $(DefaultItemExcludes);$(ProjectDir)**\*.vb + latest + \\casa-storage\Foto\catolg\parallel2.0\ + true + Unc + true + Foreground + 7 + Days + false + false + true + true + publish.htm + 1 + 1.8.0.%2a + false + true + true + + + bin\ + bin\ImageCatalog.xml + 285212672 + + + + + true + true + true + false + false + false + false + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + AnyCPU + AllRules.ruleset + false + + + bin\ + bin\ImageCatalog.xml + 285212672 + + + + + false + true + false + true + false + false + false + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + none + AnyCPU + AllRules.ruleset + false + + + true + true + true + bin\x64\Debug\ + 285212672 + bin\x64\Debug\ImageCatalog.xml + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + x64 + AllRules.ruleset + false + + + true + bin\x64\Release\ + 285212672 + bin\x64\Release\ImageCatalog.xml + true + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + x64 + AllRules.ruleset + false + + + true + true + true + bin\x86\Debug\ + 285212672 + bin\x86\Debug\ImageCatalog.xml + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + x86 + bin\ImageCatalog.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + AllRules.ruleset + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + false + false + + + true + bin\x86\Release\ + 285212672 + bin\x86\Release\ImageCatalog.xml + true + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + x86 + bin\ImageCatalog.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + AllRules.ruleset + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + false + + + 6BFA075A69837045D051A6F7B6CAD4961D53335E + + + ImageCatalog 2_TemporaryKey.pfx + + + true + + + true + + + + + ..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll + + + + ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll + + + ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll + + + ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll + + + System + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll + + + 3.5 + True + + + System.Data + True + + + System.Drawing + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + System.Windows.Forms + + + System.XML + + + + + + + + + + + + + + + + + Code + + + + + + Code + + + Form + + + + MainForm.cs + + + Form + + + + True + Application.myapp + + + True + True + Settings.settings + + + + + Code + + + Code + + + Form1.cs + Designer + + + MainForm.cs + + + + MyApplicationCodeGenerator + Application.Designer.cs + + + + + + ImageCatalog.My + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + false + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + + + {44465926-240d-473f-90b8-786ba4384406} + CatalogVbLib + + + {aebfe9e3-277c-4a7b-8448-145d1b11998b} + MaddoShared + + + + + + + + + + \ No newline at end of file diff --git a/imagecatalog.backup/ImageCatalog 2.vbproj b/imagecatalog.backup/ImageCatalog 2.vbproj new file mode 100644 index 0000000..d254204 --- /dev/null +++ b/imagecatalog.backup/ImageCatalog 2.vbproj @@ -0,0 +1,341 @@ + + + + Local + 9.0.30729 + 2.0 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C} + Debug + AnyCPU + + + + + ImageCatalog + + + None + JScript + Grid + IE50 + false + WinExe + Binary + On + On + ImageCatalog + ImageCatalog.My.MyApplication + + + WindowsForms + 3.5 + + + v4.7.2 + true + My Project\app.manifest + + + SAK + SAK + SAK + SAK + + + http://localhost/ImageCatalog/ + true + Web + true + Foreground + 7 + Days + false + false + true + 0 + 1.8.0.%2a + false + true + + + bin\ + ImageCatalog.xml + 285212672 + + + + + true + true + true + false + false + false + false + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + AnyCPU + AllRules.ruleset + false + + + bin\ + ImageCatalog.xml + 285212672 + + + + + false + true + false + true + false + false + false + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + none + AnyCPU + AllRules.ruleset + false + + + true + true + true + bin\x64\Debug\ + 285212672 + ImageCatalog.xml + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + x64 + AllRules.ruleset + false + + + true + bin\x64\Release\ + 285212672 + ImageCatalog.xml + true + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + x64 + AllRules.ruleset + false + + + true + true + true + bin\x86\Debug\ + 285212672 + ImageCatalog.xml + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + full + x86 + bin\ImageCatalog.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.vb + AllRules.ruleset + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + false + false + + + true + bin\x86\Release\ + 285212672 + ImageCatalog.xml + true + 1 + 42016,42017,42018,42019,42032,42353,42354,42355 + x86 + bin\ImageCatalog.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.vb + AllRules.ruleset + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + false + + + + ..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll + + + + System + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll + + + 3.5 + True + + + System.Data + True + + + System.Drawing + True + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + System.Windows.Forms + + + System.XML + + + + + + + + + + + + + + + Code + + + + + + Code + + + Form + + + + MainForm.vb + + + Form + + + + True + Application.myapp + + + True + True + Settings.settings + + + + + Code + + + Code + + + Form1.vb + Designer + + + MainForm.vb + + + MyApplicationCodeGenerator + Application.Designer.vb + + + + + + My + SettingsSingleFileGenerator + Settings.Designer.vb + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + false + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + + + {44465926-240d-473f-90b8-786ba4384406} + CatalogVbLib + + + {aebfe9e3-277c-4a7b-8448-145d1b11998b} + MaddoShared + + + + + + + + + + \ No newline at end of file diff --git a/imagecatalog.backup/LoadBuffer.cs b/imagecatalog.backup/LoadBuffer.cs new file mode 100644 index 0000000..f116be3 --- /dev/null +++ b/imagecatalog.backup/LoadBuffer.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using System.Drawing; +using System.IO; + +namespace ImageCatalog +{ + public class LoadBuffer + { + public List imageList = new List(); + public List picSourceList = new List(); + public List> dirSourceList = new List>(); + } +} \ No newline at end of file diff --git a/imagecatalog.backup/LoadBuffer.vb b/imagecatalog.backup/LoadBuffer.vb new file mode 100644 index 0000000..b59cf11 --- /dev/null +++ b/imagecatalog.backup/LoadBuffer.vb @@ -0,0 +1,9 @@ +Imports System.Collections.Generic +Imports System.IO + +Public Class LoadBuffer + Public imageList As New List(Of System.Drawing.Image) + Public picSourceList As New List(Of FileInfo) + Public dirSourceList As New List(Of List(Of FileInfo)) + +End Class diff --git a/imagecatalog.backup/MainForm.Designer.cs b/imagecatalog.backup/MainForm.Designer.cs new file mode 100644 index 0000000..644be9b --- /dev/null +++ b/imagecatalog.backup/MainForm.Designer.cs @@ -0,0 +1,2159 @@ +using System; +using System.Diagnostics; +using System.Drawing; +using System.Runtime.CompilerServices; +using System.Windows.Forms; +using Microsoft.VisualBasic.CompilerServices; + +namespace ImageCatalog +{ + [DesignerGenerated()] + public partial class MainForm : Form + { + + // Form overrides dispose to clean up the component list. + [DebuggerNonUserCode()] + protected override void Dispose(bool disposing) + { + try + { + if (disposing && components is object) + { + components.Dispose(); + } + } + finally + { + base.Dispose(disposing); + } + } + + // Required by the Windows Form Designer + private System.ComponentModel.IContainer components; + + // NOTE: The following procedure is required by the Windows Form Designer + // It can be modified using the Windows Form Designer. + // Do not modify it using the code editor. + [DebuggerStepThrough()] + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.ProgressBar1 = new System.Windows.Forms.ProgressBar(); + this.CheckBox22 = new System.Windows.Forms.CheckBox(); + this.Label43 = new System.Windows.Forms.Label(); + this.TabControl1 = new System.Windows.Forms.TabControl(); + this.TabPage5 = new System.Windows.Forms.TabPage(); + this.GroupBox11 = new System.Windows.Forms.GroupBox(); + this.Panel3 = new System.Windows.Forms.Panel(); + this.rdbNuovoMetodo = new System.Windows.Forms.RadioButton(); + this.rdbVecchioMetodo = new System.Windows.Forms.RadioButton(); + this.Label8 = new System.Windows.Forms.Label(); + this.TextBox8 = new System.Windows.Forms.TextBox(); + this.Label7 = new System.Windows.Forms.Label(); + this.TextBox7 = new System.Windows.Forms.TextBox(); + this.GroupBox3 = new System.Windows.Forms.GroupBox(); + this.chkAggiornaSottodirectory = new System.Windows.Forms.CheckBox(); + this._Button3 = new System.Windows.Forms.Button(); + this._Button2 = new System.Windows.Forms.Button(); + this.Label1 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.txtSorgente = new System.Windows.Forms.TextBox(); + this.txtDestinazione = new System.Windows.Forms.TextBox(); + this.GroupBox8 = new System.Windows.Forms.GroupBox(); + this.rdbNumFiles = new System.Windows.Forms.RadioButton(); + this.rdbNumProgressiva = new System.Windows.Forms.RadioButton(); + this.txtCifreContatore = new System.Windows.Forms.TextBox(); + this.Label34 = new System.Windows.Forms.Label(); + this.txtSuffissoCartelle = new System.Windows.Forms.TextBox(); + this.Label33 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.chkCreaSottocartelle = new System.Windows.Forms.CheckBox(); + this.txtFilePerCartella = new System.Windows.Forms.TextBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.GroupBox7 = new System.Windows.Forms.GroupBox(); + this.chkSovrascriviFile = new System.Windows.Forms.CheckBox(); + this.chkRotazioneAutomatica = new System.Windows.Forms.CheckBox(); + this.chkForzaJpg = new System.Windows.Forms.CheckBox(); + this.TabPage3 = new System.Windows.Forms.TabPage(); + this.GroupBox10 = new System.Windows.Forms.GroupBox(); + this.Label42 = new System.Windows.Forms.Label(); + this.Label41 = new System.Windows.Forms.Label(); + this.TextBox31 = new System.Windows.Forms.TextBox(); + this.TextBox30 = new System.Windows.Forms.TextBox(); + this.GroupBox9 = new System.Windows.Forms.GroupBox(); + this.CheckBox17 = new System.Windows.Forms.CheckBox(); + this.CheckBox16 = new System.Windows.Forms.CheckBox(); + this.GroupBox5 = new System.Windows.Forms.GroupBox(); + this.TextBox34 = new System.Windows.Forms.TextBox(); + this._Button8 = new System.Windows.Forms.Button(); + this.Label36 = new System.Windows.Forms.Label(); + this.TextBox25 = new System.Windows.Forms.TextBox(); + this.Label35 = new System.Windows.Forms.Label(); + this.ComboBox3 = new System.Windows.Forms.ComboBox(); + this.TextBox11 = new System.Windows.Forms.TextBox(); + this.Label12 = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.CheckBox3 = new System.Windows.Forms.CheckBox(); + this.GroupBox4 = new System.Windows.Forms.GroupBox(); + this.Label40 = new System.Windows.Forms.Label(); + this.TextBox29 = new System.Windows.Forms.TextBox(); + this.TextBox18 = new System.Windows.Forms.TextBox(); + this.Label26 = new System.Windows.Forms.Label(); + this.DateTimePicker1 = new System.Windows.Forms.DateTimePicker(); + this.CheckBox8 = new System.Windows.Forms.CheckBox(); + this.TextBox9 = new System.Windows.Forms.TextBox(); + this.CheckBox7 = new System.Windows.Forms.CheckBox(); + this.Label4 = new System.Windows.Forms.Label(); + this.TextBox4 = new System.Windows.Forms.TextBox(); + this.Label9 = new System.Windows.Forms.Label(); + this.Label13 = new System.Windows.Forms.Label(); + this.ComboBox1 = new System.Windows.Forms.ComboBox(); + this.ComboBox2 = new System.Windows.Forms.ComboBox(); + this.Label14 = new System.Windows.Forms.Label(); + this.TextBox12 = new System.Windows.Forms.TextBox(); + this.Label15 = new System.Windows.Forms.Label(); + this.TabPage2 = new System.Windows.Forms.TabPage(); + this.GroupBox2 = new System.Windows.Forms.GroupBox(); + this.Label45 = new System.Windows.Forms.Label(); + this.TextBox32 = new System.Windows.Forms.TextBox(); + this.TextBox26 = new System.Windows.Forms.TextBox(); + this.Label37 = new System.Windows.Forms.Label(); + this.Label38 = new System.Windows.Forms.Label(); + this.TextBox27 = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.TextBox28 = new System.Windows.Forms.TextBox(); + this.CheckBox15 = new System.Windows.Forms.CheckBox(); + this.TabPage1 = new System.Windows.Forms.TabPage(); + this.Panel1 = new System.Windows.Forms.Panel(); + this._CheckBox18 = new System.Windows.Forms.CheckBox(); + this._CheckBox4 = new System.Windows.Forms.CheckBox(); + this._CheckBox12 = new System.Windows.Forms.CheckBox(); + this.GroupBox1 = new System.Windows.Forms.GroupBox(); + this.Label46 = new System.Windows.Forms.Label(); + this.TextBox33 = new System.Windows.Forms.TextBox(); + this.Panel2 = new System.Windows.Forms.Panel(); + this.RadioButton3 = new System.Windows.Forms.RadioButton(); + this.RadioButton7 = new System.Windows.Forms.RadioButton(); + this.RadioButton4 = new System.Windows.Forms.RadioButton(); + this.RadioButton6 = new System.Windows.Forms.RadioButton(); + this.RadioButton5 = new System.Windows.Forms.RadioButton(); + this.Label5 = new System.Windows.Forms.Label(); + this.TextBox5 = new System.Windows.Forms.TextBox(); + this.Label6 = new System.Windows.Forms.Label(); + this.TextBox6 = new System.Windows.Forms.TextBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.TextBox3 = new System.Windows.Forms.TextBox(); + this.CheckBox1 = new System.Windows.Forms.CheckBox(); + this.TabPage4 = new System.Windows.Forms.TabPage(); + this.GroupBox6 = new System.Windows.Forms.GroupBox(); + this.PictureBox2 = new System.Windows.Forms.PictureBox(); + this._PictureBox1 = new System.Windows.Forms.PictureBox(); + this.ComboBox5 = new System.Windows.Forms.ComboBox(); + this.ComboBox4 = new System.Windows.Forms.ComboBox(); + this.TextBox19 = new System.Windows.Forms.TextBox(); + this.Label28 = new System.Windows.Forms.Label(); + this.CheckBox5 = new System.Windows.Forms.CheckBox(); + this.TextBox15 = new System.Windows.Forms.TextBox(); + this.TextBox14 = new System.Windows.Forms.TextBox(); + this.Label25 = new System.Windows.Forms.Label(); + this.TextBox16 = new System.Windows.Forms.TextBox(); + this.Label24 = new System.Windows.Forms.Label(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + this._Button4 = new System.Windows.Forms.Button(); + this.TextBox10 = new System.Windows.Forms.TextBox(); + this.Label29 = new System.Windows.Forms.Label(); + this.Label30 = new System.Windows.Forms.Label(); + this.PictureBox3 = new System.Windows.Forms.PictureBox(); + this._Label27 = new System.Windows.Forms.Label(); + this._Button7 = new System.Windows.Forms.Button(); + this._Button5 = new System.Windows.Forms.Button(); + this.Label20 = new System.Windows.Forms.Label(); + this.Label19 = new System.Windows.Forms.Label(); + this.Label18 = new System.Windows.Forms.Label(); + this.lblFotoTotaliNum = new System.Windows.Forms.Label(); + this.Label10 = new System.Windows.Forms.Label(); + this._Button6 = new System.Windows.Forms.Button(); + this._btnCreaCatalogoAsync = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.TabControl1.SuspendLayout(); + this.TabPage5.SuspendLayout(); + this.GroupBox11.SuspendLayout(); + this.Panel3.SuspendLayout(); + this.GroupBox3.SuspendLayout(); + this.GroupBox8.SuspendLayout(); + this.GroupBox7.SuspendLayout(); + this.TabPage3.SuspendLayout(); + this.GroupBox10.SuspendLayout(); + this.GroupBox9.SuspendLayout(); + this.GroupBox5.SuspendLayout(); + this.GroupBox4.SuspendLayout(); + this.TabPage2.SuspendLayout(); + this.GroupBox2.SuspendLayout(); + this.TabPage1.SuspendLayout(); + this.Panel1.SuspendLayout(); + this.GroupBox1.SuspendLayout(); + this.Panel2.SuspendLayout(); + this.TabPage4.SuspendLayout(); + this.GroupBox6.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this._PictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).BeginInit(); + this.SuspendLayout(); + // + // ProgressBar1 + // + this.ProgressBar1.Location = new System.Drawing.Point(539, 243); + this.ProgressBar1.Name = "ProgressBar1"; + this.ProgressBar1.Size = new System.Drawing.Size(192, 23); + this.ProgressBar1.TabIndex = 67; + // + // CheckBox22 + // + this.CheckBox22.AutoSize = true; + this.CheckBox22.Location = new System.Drawing.Point(539, 358); + this.CheckBox22.Name = "CheckBox22"; + this.CheckBox22.Size = new System.Drawing.Size(104, 17); + this.CheckBox22.TabIndex = 65; + this.CheckBox22.Text = "Arresta il sistema"; + this.CheckBox22.UseVisualStyleBackColor = true; + // + // Label43 + // + this.Label43.AutoSize = true; + this.Label43.Location = new System.Drawing.Point(536, 342); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(25, 13); + this.Label43.TabIndex = 64; + this.Label43.Text = "000"; + this.Label43.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TabControl1 + // + this.TabControl1.Controls.Add(this.TabPage5); + this.TabControl1.Controls.Add(this.TabPage3); + this.TabControl1.Controls.Add(this.TabPage2); + this.TabControl1.Controls.Add(this.TabPage1); + this.TabControl1.Controls.Add(this.TabPage4); + this.TabControl1.Location = new System.Drawing.Point(12, 12); + this.TabControl1.Name = "TabControl1"; + this.TabControl1.SelectedIndex = 0; + this.TabControl1.Size = new System.Drawing.Size(521, 377); + this.TabControl1.TabIndex = 63; + // + // TabPage5 + // + this.TabPage5.Controls.Add(this.GroupBox11); + this.TabPage5.Controls.Add(this.GroupBox3); + this.TabPage5.Controls.Add(this.GroupBox8); + this.TabPage5.Controls.Add(this.GroupBox7); + this.TabPage5.Location = new System.Drawing.Point(4, 22); + this.TabPage5.Name = "TabPage5"; + this.TabPage5.Padding = new System.Windows.Forms.Padding(3); + this.TabPage5.Size = new System.Drawing.Size(513, 351); + this.TabPage5.TabIndex = 4; + this.TabPage5.Text = "Generale"; + this.TabPage5.UseVisualStyleBackColor = true; + // + // GroupBox11 + // + this.GroupBox11.Controls.Add(this.Panel3); + this.GroupBox11.Controls.Add(this.Label8); + this.GroupBox11.Controls.Add(this.TextBox8); + this.GroupBox11.Controls.Add(this.Label7); + this.GroupBox11.Controls.Add(this.TextBox7); + this.GroupBox11.Location = new System.Drawing.Point(7, 209); + this.GroupBox11.Name = "GroupBox11"; + this.GroupBox11.Size = new System.Drawing.Size(191, 132); + this.GroupBox11.TabIndex = 48; + this.GroupBox11.TabStop = false; + this.GroupBox11.Text = "Avanzate (ATTENZIONE)"; + // + // Panel3 + // + this.Panel3.Controls.Add(this.rdbNuovoMetodo); + this.Panel3.Controls.Add(this.rdbVecchioMetodo); + this.Panel3.Location = new System.Drawing.Point(7, 73); + this.Panel3.Name = "Panel3"; + this.Panel3.Size = new System.Drawing.Size(178, 53); + this.Panel3.TabIndex = 4; + // + // rdbNuovoMetodo + // + this.rdbNuovoMetodo.AutoSize = true; + this.rdbNuovoMetodo.Checked = true; + this.rdbNuovoMetodo.Location = new System.Drawing.Point(8, 28); + this.rdbNuovoMetodo.Name = "rdbNuovoMetodo"; + this.rdbNuovoMetodo.Size = new System.Drawing.Size(65, 17); + this.rdbNuovoMetodo.TabIndex = 1; + this.rdbNuovoMetodo.TabStop = true; + this.rdbNuovoMetodo.Text = "Parallelo"; + this.rdbNuovoMetodo.UseVisualStyleBackColor = true; + // + // rdbVecchioMetodo + // + this.rdbVecchioMetodo.AutoSize = true; + this.rdbVecchioMetodo.Location = new System.Drawing.Point(8, 4); + this.rdbVecchioMetodo.Name = "rdbVecchioMetodo"; + this.rdbVecchioMetodo.Size = new System.Drawing.Size(60, 17); + this.rdbVecchioMetodo.TabIndex = 0; + this.rdbVecchioMetodo.Text = "Lineare"; + this.rdbVecchioMetodo.UseVisualStyleBackColor = true; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Location = new System.Drawing.Point(64, 26); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(111, 13); + this.Label8.TabIndex = 3; + this.Label8.Text = "Chunk Size (0 = MAX)"; + // + // TextBox8 + // + this.TextBox8.Location = new System.Drawing.Point(7, 20); + this.TextBox8.Name = "TextBox8"; + this.TextBox8.Size = new System.Drawing.Size(47, 20); + this.TextBox8.TabIndex = 2; + this.TextBox8.Text = "0"; + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Location = new System.Drawing.Point(61, 48); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(108, 13); + this.Label7.TabIndex = 1; + this.Label7.Text = "Threads (0 = CPU *2)"; + // + // TextBox7 + // + this.TextBox7.Location = new System.Drawing.Point(7, 46); + this.TextBox7.Name = "TextBox7"; + this.TextBox7.Size = new System.Drawing.Size(47, 20); + this.TextBox7.TabIndex = 0; + this.TextBox7.Text = "0"; + // + // GroupBox3 + // + this.GroupBox3.Controls.Add(this.chkAggiornaSottodirectory); + this.GroupBox3.Controls.Add(this._Button3); + this.GroupBox3.Controls.Add(this._Button2); + this.GroupBox3.Controls.Add(this.Label1); + this.GroupBox3.Controls.Add(this.Label2); + this.GroupBox3.Controls.Add(this.txtSorgente); + this.GroupBox3.Controls.Add(this.txtDestinazione); + this.GroupBox3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox3.Location = new System.Drawing.Point(6, 6); + this.GroupBox3.Name = "GroupBox3"; + this.GroupBox3.Size = new System.Drawing.Size(496, 101); + this.GroupBox3.TabIndex = 35; + this.GroupBox3.TabStop = false; + this.GroupBox3.Text = "Directory"; + // + // chkAggiornaSottodirectory + // + this.chkAggiornaSottodirectory.ForeColor = System.Drawing.Color.Black; + this.chkAggiornaSottodirectory.Location = new System.Drawing.Point(80, 64); + this.chkAggiornaSottodirectory.Name = "chkAggiornaSottodirectory"; + this.chkAggiornaSottodirectory.Size = new System.Drawing.Size(152, 24); + this.chkAggiornaSottodirectory.TabIndex = 25; + this.chkAggiornaSottodirectory.Text = "aggiorna le sottodirectory"; + // + // _Button3 + // + this._Button3.Location = new System.Drawing.Point(462, 40); + this._Button3.Name = "_Button3"; + this._Button3.Size = new System.Drawing.Size(24, 20); + this._Button3.TabIndex = 6; + this._Button3.Text = "..."; + this._Button3.Click += new System.EventHandler(this.Button3_Click); + // + // _Button2 + // + this._Button2.Location = new System.Drawing.Point(462, 16); + this._Button2.Name = "_Button2"; + this._Button2.Size = new System.Drawing.Size(24, 20); + this._Button2.TabIndex = 5; + this._Button2.Text = "..."; + this._Button2.Click += new System.EventHandler(this.Button2_Click); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.ForeColor = System.Drawing.Color.Black; + this.Label1.Location = new System.Drawing.Point(6, 19); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(50, 13); + this.Label1.TabIndex = 3; + this.Label1.Text = "Sorgente"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.ForeColor = System.Drawing.Color.Black; + this.Label2.Location = new System.Drawing.Point(6, 43); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(68, 13); + this.Label2.TabIndex = 4; + this.Label2.Text = "Destinazione"; + // + // txtSorgente + // + this.txtSorgente.Location = new System.Drawing.Point(80, 16); + this.txtSorgente.Name = "txtSorgente"; + this.txtSorgente.Size = new System.Drawing.Size(376, 20); + this.txtSorgente.TabIndex = 0; + this.txtSorgente.Text = "TextBox1"; + // + // txtDestinazione + // + this.txtDestinazione.Location = new System.Drawing.Point(80, 40); + this.txtDestinazione.Name = "txtDestinazione"; + this.txtDestinazione.Size = new System.Drawing.Size(376, 20); + this.txtDestinazione.TabIndex = 1; + this.txtDestinazione.Text = "TextBox2"; + // + // GroupBox8 + // + this.GroupBox8.Controls.Add(this.rdbNumFiles); + this.GroupBox8.Controls.Add(this.rdbNumProgressiva); + this.GroupBox8.Controls.Add(this.txtCifreContatore); + this.GroupBox8.Controls.Add(this.Label34); + this.GroupBox8.Controls.Add(this.txtSuffissoCartelle); + this.GroupBox8.Controls.Add(this.Label33); + this.GroupBox8.Controls.Add(this.Label31); + this.GroupBox8.Controls.Add(this.chkCreaSottocartelle); + this.GroupBox8.Controls.Add(this.txtFilePerCartella); + this.GroupBox8.Controls.Add(this.Label32); + this.GroupBox8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox8.Location = new System.Drawing.Point(204, 113); + this.GroupBox8.Name = "GroupBox8"; + this.GroupBox8.Size = new System.Drawing.Size(192, 152); + this.GroupBox8.TabIndex = 47; + this.GroupBox8.TabStop = false; + this.GroupBox8.Text = "Sottocartelle"; + // + // rdbNumFiles + // + this.rdbNumFiles.ForeColor = System.Drawing.Color.Black; + this.rdbNumFiles.Location = new System.Drawing.Point(32, 128); + this.rdbNumFiles.Name = "rdbNumFiles"; + this.rdbNumFiles.Size = new System.Drawing.Size(136, 16); + this.rdbNumFiles.TabIndex = 38; + this.rdbNumFiles.Text = "Numerazione files"; + // + // rdbNumProgressiva + // + this.rdbNumProgressiva.Checked = true; + this.rdbNumProgressiva.ForeColor = System.Drawing.Color.Black; + this.rdbNumProgressiva.Location = new System.Drawing.Point(32, 112); + this.rdbNumProgressiva.Name = "rdbNumProgressiva"; + this.rdbNumProgressiva.Size = new System.Drawing.Size(152, 16); + this.rdbNumProgressiva.TabIndex = 37; + this.rdbNumProgressiva.TabStop = true; + this.rdbNumProgressiva.Text = "Numerazione progressiva"; + // + // txtCifreContatore + // + this.txtCifreContatore.Location = new System.Drawing.Point(128, 88); + this.txtCifreContatore.Name = "txtCifreContatore"; + this.txtCifreContatore.Size = new System.Drawing.Size(56, 20); + this.txtCifreContatore.TabIndex = 34; + this.txtCifreContatore.Text = "4"; + // + // Label34 + // + this.Label34.ForeColor = System.Drawing.Color.Black; + this.Label34.Location = new System.Drawing.Point(8, 88); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(112, 16); + this.Label34.TabIndex = 33; + this.Label34.Text = "Num. cifre contatore"; + this.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // txtSuffissoCartelle + // + this.txtSuffissoCartelle.Location = new System.Drawing.Point(56, 64); + this.txtSuffissoCartelle.Name = "txtSuffissoCartelle"; + this.txtSuffissoCartelle.Size = new System.Drawing.Size(128, 20); + this.txtSuffissoCartelle.TabIndex = 32; + this.txtSuffissoCartelle.Text = "TextBox20"; + // + // Label33 + // + this.Label33.ForeColor = System.Drawing.Color.Black; + this.Label33.Location = new System.Drawing.Point(6, 67); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(48, 16); + this.Label33.TabIndex = 31; + this.Label33.Text = "Suffisso"; + // + // Label31 + // + this.Label31.ForeColor = System.Drawing.Color.Black; + this.Label31.Location = new System.Drawing.Point(24, 40); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(32, 16); + this.Label31.TabIndex = 30; + this.Label31.Text = "ogni"; + // + // chkCreaSottocartelle + // + this.chkCreaSottocartelle.ForeColor = System.Drawing.Color.Black; + this.chkCreaSottocartelle.Location = new System.Drawing.Point(56, 16); + this.chkCreaSottocartelle.Name = "chkCreaSottocartelle"; + this.chkCreaSottocartelle.Size = new System.Drawing.Size(112, 16); + this.chkCreaSottocartelle.TabIndex = 29; + this.chkCreaSottocartelle.Text = "crea sottocartelle"; + // + // txtFilePerCartella + // + this.txtFilePerCartella.Location = new System.Drawing.Point(56, 40); + this.txtFilePerCartella.Name = "txtFilePerCartella"; + this.txtFilePerCartella.Size = new System.Drawing.Size(64, 20); + this.txtFilePerCartella.TabIndex = 27; + this.txtFilePerCartella.Text = "99"; + // + // Label32 + // + this.Label32.ForeColor = System.Drawing.Color.Black; + this.Label32.Location = new System.Drawing.Point(128, 40); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(24, 16); + this.Label32.TabIndex = 28; + this.Label32.Text = "file"; + // + // GroupBox7 + // + this.GroupBox7.Controls.Add(this.chkSovrascriviFile); + this.GroupBox7.Controls.Add(this.chkRotazioneAutomatica); + this.GroupBox7.Controls.Add(this.chkForzaJpg); + this.GroupBox7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox7.Location = new System.Drawing.Point(6, 113); + this.GroupBox7.Name = "GroupBox7"; + this.GroupBox7.Size = new System.Drawing.Size(192, 88); + this.GroupBox7.TabIndex = 45; + this.GroupBox7.TabStop = false; + this.GroupBox7.Text = "Generale"; + // + // chkSovrascriviFile + // + this.chkSovrascriviFile.AutoSize = true; + this.chkSovrascriviFile.Location = new System.Drawing.Point(16, 61); + this.chkSovrascriviFile.Name = "chkSovrascriviFile"; + this.chkSovrascriviFile.Size = new System.Drawing.Size(94, 17); + this.chkSovrascriviFile.TabIndex = 2; + this.chkSovrascriviFile.Text = "Sovrascrivi file"; + this.chkSovrascriviFile.UseVisualStyleBackColor = true; + // + // chkRotazioneAutomatica + // + this.chkRotazioneAutomatica.ForeColor = System.Drawing.Color.Black; + this.chkRotazioneAutomatica.Location = new System.Drawing.Point(16, 39); + this.chkRotazioneAutomatica.Name = "chkRotazioneAutomatica"; + this.chkRotazioneAutomatica.Size = new System.Drawing.Size(136, 16); + this.chkRotazioneAutomatica.TabIndex = 1; + this.chkRotazioneAutomatica.Text = "Rotazione automatica"; + // + // chkForzaJpg + // + this.chkForzaJpg.Checked = true; + this.chkForzaJpg.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkForzaJpg.ForeColor = System.Drawing.Color.Black; + this.chkForzaJpg.Location = new System.Drawing.Point(16, 18); + this.chkForzaJpg.Name = "chkForzaJpg"; + this.chkForzaJpg.Size = new System.Drawing.Size(80, 16); + this.chkForzaJpg.TabIndex = 0; + this.chkForzaJpg.Text = "Forza Jpg"; + // + // TabPage3 + // + this.TabPage3.Controls.Add(this.GroupBox10); + this.TabPage3.Controls.Add(this.GroupBox9); + this.TabPage3.Controls.Add(this.GroupBox5); + this.TabPage3.Controls.Add(this.GroupBox4); + this.TabPage3.Location = new System.Drawing.Point(4, 22); + this.TabPage3.Name = "TabPage3"; + this.TabPage3.Padding = new System.Windows.Forms.Padding(3); + this.TabPage3.Size = new System.Drawing.Size(513, 351); + this.TabPage3.TabIndex = 2; + this.TabPage3.Text = "Testo"; + this.TabPage3.UseVisualStyleBackColor = true; + // + // GroupBox10 + // + this.GroupBox10.Controls.Add(this.Label42); + this.GroupBox10.Controls.Add(this.Label41); + this.GroupBox10.Controls.Add(this.TextBox31); + this.GroupBox10.Controls.Add(this.TextBox30); + this.GroupBox10.Location = new System.Drawing.Point(316, 78); + this.GroupBox10.Name = "GroupBox10"; + this.GroupBox10.Size = new System.Drawing.Size(186, 73); + this.GroupBox10.TabIndex = 39; + this.GroupBox10.TabStop = false; + this.GroupBox10.Text = "Testo foto verticali"; + // + // Label42 + // + this.Label42.AutoSize = true; + this.Label42.Location = new System.Drawing.Point(7, 46); + this.Label42.Name = "Label42"; + this.Label42.Size = new System.Drawing.Size(45, 13); + this.Label42.TabIndex = 3; + this.Label42.Text = "Margine"; + // + // Label41 + // + this.Label41.AutoSize = true; + this.Label41.Location = new System.Drawing.Point(7, 25); + this.Label41.Name = "Label41"; + this.Label41.Size = new System.Drawing.Size(108, 13); + this.Label41.TabIndex = 2; + this.Label41.Text = "Dimensione Carattere"; + // + // TextBox31 + // + this.TextBox31.Location = new System.Drawing.Point(131, 46); + this.TextBox31.Name = "TextBox31"; + this.TextBox31.Size = new System.Drawing.Size(39, 20); + this.TextBox31.TabIndex = 1; + // + // TextBox30 + // + this.TextBox30.Location = new System.Drawing.Point(131, 22); + this.TextBox30.Name = "TextBox30"; + this.TextBox30.Size = new System.Drawing.Size(39, 20); + this.TextBox30.TabIndex = 0; + // + // GroupBox9 + // + this.GroupBox9.Controls.Add(this.CheckBox17); + this.GroupBox9.Controls.Add(this.CheckBox16); + this.GroupBox9.Location = new System.Drawing.Point(316, 31); + this.GroupBox9.Name = "GroupBox9"; + this.GroupBox9.Size = new System.Drawing.Size(186, 45); + this.GroupBox9.TabIndex = 38; + this.GroupBox9.TabStop = false; + this.GroupBox9.Text = "Slide show"; + // + // CheckBox17 + // + this.CheckBox17.AutoSize = true; + this.CheckBox17.Location = new System.Drawing.Point(96, 18); + this.CheckBox17.Name = "CheckBox17"; + this.CheckBox17.Size = new System.Drawing.Size(84, 17); + this.CheckBox17.TabIndex = 1; + this.CheckBox17.Text = "Numero foto"; + this.CheckBox17.UseVisualStyleBackColor = true; + // + // CheckBox16 + // + this.CheckBox16.AutoSize = true; + this.CheckBox16.Location = new System.Drawing.Point(6, 19); + this.CheckBox16.Name = "CheckBox16"; + this.CheckBox16.Size = new System.Drawing.Size(49, 17); + this.CheckBox16.TabIndex = 0; + this.CheckBox16.Text = "Data"; + this.CheckBox16.UseVisualStyleBackColor = true; + // + // GroupBox5 + // + this.GroupBox5.Controls.Add(this.TextBox34); + this.GroupBox5.Controls.Add(this._Button8); + this.GroupBox5.Controls.Add(this.Label36); + this.GroupBox5.Controls.Add(this.TextBox25); + this.GroupBox5.Controls.Add(this.Label35); + this.GroupBox5.Controls.Add(this.ComboBox3); + this.GroupBox5.Controls.Add(this.TextBox11); + this.GroupBox5.Controls.Add(this.Label12); + this.GroupBox5.Controls.Add(this.Label11); + this.GroupBox5.Controls.Add(this.CheckBox3); + this.GroupBox5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox5.Location = new System.Drawing.Point(6, 31); + this.GroupBox5.Name = "GroupBox5"; + this.GroupBox5.Size = new System.Drawing.Size(304, 120); + this.GroupBox5.TabIndex = 37; + this.GroupBox5.TabStop = false; + this.GroupBox5.Text = "Carattere"; + // + // TextBox34 + // + this.TextBox34.Location = new System.Drawing.Point(160, 91); + this.TextBox34.Name = "TextBox34"; + this.TextBox34.Size = new System.Drawing.Size(56, 20); + this.TextBox34.TabIndex = 36; + this.TextBox34.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // _Button8 + // + this._Button8.ForeColor = System.Drawing.Color.Black; + this._Button8.Location = new System.Drawing.Point(222, 89); + this._Button8.Name = "_Button8"; + this._Button8.Size = new System.Drawing.Size(74, 24); + this._Button8.TabIndex = 35; + this._Button8.Text = "Scegli..."; + this._Button8.Click += new System.EventHandler(this.Button8_Click); + // + // Label36 + // + this.Label36.ForeColor = System.Drawing.Color.Black; + this.Label36.Location = new System.Drawing.Point(8, 60); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(120, 19); + this.Label36.TabIndex = 34; + this.Label36.Text = "Dimensione miniatura"; + this.Label36.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TextBox25 + // + this.TextBox25.Location = new System.Drawing.Point(160, 59); + this.TextBox25.Name = "TextBox25"; + this.TextBox25.Size = new System.Drawing.Size(56, 20); + this.TextBox25.TabIndex = 33; + this.TextBox25.Text = "TextBox25"; + // + // Label35 + // + this.Label35.ForeColor = System.Drawing.Color.Black; + this.Label35.Location = new System.Drawing.Point(8, 93); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(72, 16); + this.Label35.TabIndex = 32; + this.Label35.Text = "Colore RGB"; + this.Label35.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ComboBox3 + // + this.ComboBox3.Location = new System.Drawing.Point(96, 8); + this.ComboBox3.Name = "ComboBox3"; + this.ComboBox3.Size = new System.Drawing.Size(120, 21); + this.ComboBox3.TabIndex = 28; + this.ComboBox3.Text = "ComboBox3"; + // + // TextBox11 + // + this.TextBox11.Location = new System.Drawing.Point(160, 35); + this.TextBox11.Name = "TextBox11"; + this.TextBox11.Size = new System.Drawing.Size(56, 20); + this.TextBox11.TabIndex = 27; + this.TextBox11.Text = "TextBox11"; + // + // Label12 + // + this.Label12.AutoSize = true; + this.Label12.ForeColor = System.Drawing.Color.Black; + this.Label12.Location = new System.Drawing.Point(8, 38); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(62, 13); + this.Label12.TabIndex = 26; + this.Label12.Text = "Dimensione"; + this.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.ForeColor = System.Drawing.Color.Black; + this.Label11.Location = new System.Drawing.Point(56, 8); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(28, 13); + this.Label11.TabIndex = 22; + this.Label11.Text = "Font"; + // + // CheckBox3 + // + this.CheckBox3.ForeColor = System.Drawing.Color.Black; + this.CheckBox3.Location = new System.Drawing.Point(224, 8); + this.CheckBox3.Name = "CheckBox3"; + this.CheckBox3.Size = new System.Drawing.Size(72, 24); + this.CheckBox3.TabIndex = 24; + this.CheckBox3.Text = "Grassetto"; + // + // GroupBox4 + // + this.GroupBox4.Controls.Add(this.Label40); + this.GroupBox4.Controls.Add(this.TextBox29); + this.GroupBox4.Controls.Add(this.TextBox18); + this.GroupBox4.Controls.Add(this.Label26); + this.GroupBox4.Controls.Add(this.DateTimePicker1); + this.GroupBox4.Controls.Add(this.CheckBox8); + this.GroupBox4.Controls.Add(this.TextBox9); + this.GroupBox4.Controls.Add(this.CheckBox7); + this.GroupBox4.Controls.Add(this.Label4); + this.GroupBox4.Controls.Add(this.TextBox4); + this.GroupBox4.Controls.Add(this.Label9); + this.GroupBox4.Controls.Add(this.Label13); + this.GroupBox4.Controls.Add(this.ComboBox1); + this.GroupBox4.Controls.Add(this.ComboBox2); + this.GroupBox4.Controls.Add(this.Label14); + this.GroupBox4.Controls.Add(this.TextBox12); + this.GroupBox4.Controls.Add(this.Label15); + this.GroupBox4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox4.Location = new System.Drawing.Point(6, 157); + this.GroupBox4.Name = "GroupBox4"; + this.GroupBox4.Size = new System.Drawing.Size(496, 186); + this.GroupBox4.TabIndex = 36; + this.GroupBox4.TabStop = false; + this.GroupBox4.Text = "Testo da applicare"; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.Location = new System.Drawing.Point(8, 52); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(48, 13); + this.Label40.TabIndex = 40; + this.Label40.Text = "Verticale"; + // + // TextBox29 + // + this.TextBox29.Location = new System.Drawing.Point(72, 49); + this.TextBox29.Multiline = true; + this.TextBox29.Name = "TextBox29"; + this.TextBox29.Size = new System.Drawing.Size(408, 44); + this.TextBox29.TabIndex = 39; + // + // TextBox18 + // + this.TextBox18.Location = new System.Drawing.Point(232, 156); + this.TextBox18.Name = "TextBox18"; + this.TextBox18.Size = new System.Drawing.Size(100, 20); + this.TextBox18.TabIndex = 38; + // + // Label26 + // + this.Label26.AutoSize = true; + this.Label26.ForeColor = System.Drawing.Color.Black; + this.Label26.Location = new System.Drawing.Point(344, 156); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(48, 13); + this.Label26.TabIndex = 37; + this.Label26.Text = "partenza"; + // + // DateTimePicker1 + // + this.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Time; + this.DateTimePicker1.Location = new System.Drawing.Point(392, 156); + this.DateTimePicker1.Name = "DateTimePicker1"; + this.DateTimePicker1.Size = new System.Drawing.Size(88, 20); + this.DateTimePicker1.TabIndex = 36; + // + // CheckBox8 + // + this.CheckBox8.ForeColor = System.Drawing.Color.Black; + this.CheckBox8.Location = new System.Drawing.Point(72, 156); + this.CheckBox8.Name = "CheckBox8"; + this.CheckBox8.Size = new System.Drawing.Size(56, 16); + this.CheckBox8.TabIndex = 35; + this.CheckBox8.Text = "Orario"; + // + // TextBox9 + // + this.TextBox9.Location = new System.Drawing.Point(120, 108); + this.TextBox9.Name = "TextBox9"; + this.TextBox9.Size = new System.Drawing.Size(56, 20); + this.TextBox9.TabIndex = 20; + this.TextBox9.Text = "TextBox9"; + // + // CheckBox7 + // + this.CheckBox7.ForeColor = System.Drawing.Color.Black; + this.CheckBox7.Location = new System.Drawing.Point(136, 156); + this.CheckBox7.Name = "CheckBox7"; + this.CheckBox7.Size = new System.Drawing.Size(88, 16); + this.CheckBox7.TabIndex = 34; + this.CheckBox7.Text = "Tempo gara"; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.ForeColor = System.Drawing.Color.Black; + this.Label4.Location = new System.Drawing.Point(8, 24); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(59, 13); + this.Label4.TabIndex = 9; + this.Label4.Text = "Orizzontale"; + // + // TextBox4 + // + this.TextBox4.Location = new System.Drawing.Point(72, 24); + this.TextBox4.Name = "TextBox4"; + this.TextBox4.Size = new System.Drawing.Size(408, 20); + this.TextBox4.TabIndex = 8; + this.TextBox4.Text = "TextBox4"; + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.ForeColor = System.Drawing.Color.Black; + this.Label9.Location = new System.Drawing.Point(8, 108); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(110, 13); + this.Label9.TabIndex = 19; + this.Label9.Text = "Trasparenza (0-100%)"; + // + // Label13 + // + this.Label13.AutoSize = true; + this.Label13.ForeColor = System.Drawing.Color.Black; + this.Label13.Location = new System.Drawing.Point(16, 132); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(52, 13); + this.Label13.TabIndex = 29; + this.Label13.Text = "Posizione"; + // + // ComboBox1 + // + this.ComboBox1.Location = new System.Drawing.Point(72, 132); + this.ComboBox1.Name = "ComboBox1"; + this.ComboBox1.Size = new System.Drawing.Size(104, 21); + this.ComboBox1.TabIndex = 28; + this.ComboBox1.Text = "ComboBox1"; + // + // ComboBox2 + // + this.ComboBox2.Location = new System.Drawing.Point(376, 132); + this.ComboBox2.Name = "ComboBox2"; + this.ComboBox2.Size = new System.Drawing.Size(104, 21); + this.ComboBox2.TabIndex = 31; + this.ComboBox2.Text = "ComboBox2"; + // + // Label14 + // + this.Label14.AutoSize = true; + this.Label14.ForeColor = System.Drawing.Color.Black; + this.Label14.Location = new System.Drawing.Point(304, 132); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(67, 13); + this.Label14.TabIndex = 30; + this.Label14.Text = "Allineamento"; + // + // TextBox12 + // + this.TextBox12.Location = new System.Drawing.Point(376, 108); + this.TextBox12.Name = "TextBox12"; + this.TextBox12.Size = new System.Drawing.Size(104, 20); + this.TextBox12.TabIndex = 33; + this.TextBox12.Text = "TextBox12"; + // + // Label15 + // + this.Label15.AutoSize = true; + this.Label15.ForeColor = System.Drawing.Color.Black; + this.Label15.Location = new System.Drawing.Point(296, 108); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(75, 13); + this.Label15.TabIndex = 32; + this.Label15.Text = "Margine (pixel)"; + // + // TabPage2 + // + this.TabPage2.Controls.Add(this.GroupBox2); + this.TabPage2.Location = new System.Drawing.Point(4, 22); + this.TabPage2.Name = "TabPage2"; + this.TabPage2.Padding = new System.Windows.Forms.Padding(3); + this.TabPage2.Size = new System.Drawing.Size(513, 351); + this.TabPage2.TabIndex = 5; + this.TabPage2.Text = "Foto"; + this.TabPage2.UseVisualStyleBackColor = true; + // + // GroupBox2 + // + this.GroupBox2.Controls.Add(this.Label45); + this.GroupBox2.Controls.Add(this.TextBox32); + this.GroupBox2.Controls.Add(this.TextBox26); + this.GroupBox2.Controls.Add(this.Label37); + this.GroupBox2.Controls.Add(this.Label38); + this.GroupBox2.Controls.Add(this.TextBox27); + this.GroupBox2.Controls.Add(this.Label39); + this.GroupBox2.Controls.Add(this.TextBox28); + this.GroupBox2.Controls.Add(this.CheckBox15); + this.GroupBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox2.Location = new System.Drawing.Point(3, 6); + this.GroupBox2.Name = "GroupBox2"; + this.GroupBox2.Size = new System.Drawing.Size(304, 156); + this.GroupBox2.TabIndex = 36; + this.GroupBox2.TabStop = false; + this.GroupBox2.Text = "Foto grande"; + // + // Label45 + // + this.Label45.AutoSize = true; + this.Label45.Location = new System.Drawing.Point(11, 86); + this.Label45.Name = "Label45"; + this.Label45.Size = new System.Drawing.Size(40, 13); + this.Label45.TabIndex = 22; + this.Label45.Text = "Qualità"; + // + // TextBox32 + // + this.TextBox32.Location = new System.Drawing.Point(72, 80); + this.TextBox32.Name = "TextBox32"; + this.TextBox32.Size = new System.Drawing.Size(72, 20); + this.TextBox32.TabIndex = 21; + this.TextBox32.Text = "100"; + // + // TextBox26 + // + this.TextBox26.Location = new System.Drawing.Point(224, 48); + this.TextBox26.Name = "TextBox26"; + this.TextBox26.Size = new System.Drawing.Size(56, 20); + this.TextBox26.TabIndex = 20; + this.TextBox26.Text = "TextBox26"; + // + // Label37 + // + this.Label37.ForeColor = System.Drawing.Color.Black; + this.Label37.Location = new System.Drawing.Point(168, 48); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(48, 16); + this.Label37.TabIndex = 19; + this.Label37.Text = "Suffisso"; + this.Label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.ForeColor = System.Drawing.Color.Black; + this.Label38.Location = new System.Drawing.Point(24, 24); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(41, 13); + this.Label38.TabIndex = 16; + this.Label38.Text = "Altezza"; + // + // TextBox27 + // + this.TextBox27.Location = new System.Drawing.Point(72, 24); + this.TextBox27.Name = "TextBox27"; + this.TextBox27.Size = new System.Drawing.Size(72, 20); + this.TextBox27.TabIndex = 14; + this.TextBox27.Text = "TextBox27"; + // + // Label39 + // + this.Label39.AutoSize = true; + this.Label39.ForeColor = System.Drawing.Color.Black; + this.Label39.Location = new System.Drawing.Point(8, 48); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(56, 13); + this.Label39.TabIndex = 17; + this.Label39.Text = "Larghezza"; + // + // TextBox28 + // + this.TextBox28.Location = new System.Drawing.Point(72, 48); + this.TextBox28.Name = "TextBox28"; + this.TextBox28.Size = new System.Drawing.Size(72, 20); + this.TextBox28.TabIndex = 15; + this.TextBox28.Text = "TextBox28"; + // + // CheckBox15 + // + this.CheckBox15.Checked = true; + this.CheckBox15.CheckState = System.Windows.Forms.CheckState.Checked; + this.CheckBox15.ForeColor = System.Drawing.Color.Black; + this.CheckBox15.Location = new System.Drawing.Point(168, 16); + this.CheckBox15.Name = "CheckBox15"; + this.CheckBox15.Size = new System.Drawing.Size(120, 32); + this.CheckBox15.TabIndex = 18; + this.CheckBox15.Text = "Mantieni dimensioni originali"; + // + // TabPage1 + // + this.TabPage1.Controls.Add(this.Panel1); + this.TabPage1.Controls.Add(this.GroupBox1); + this.TabPage1.Location = new System.Drawing.Point(4, 22); + this.TabPage1.Name = "TabPage1"; + this.TabPage1.Padding = new System.Windows.Forms.Padding(3); + this.TabPage1.Size = new System.Drawing.Size(513, 351); + this.TabPage1.TabIndex = 0; + this.TabPage1.Text = "Miniature"; + this.TabPage1.UseVisualStyleBackColor = true; + // + // Panel1 + // + this.Panel1.Controls.Add(this._CheckBox18); + this.Panel1.Controls.Add(this._CheckBox4); + this.Panel1.Controls.Add(this._CheckBox12); + this.Panel1.Location = new System.Drawing.Point(52, 236); + this.Panel1.Name = "Panel1"; + this.Panel1.Size = new System.Drawing.Size(304, 73); + this.Panel1.TabIndex = 26; + this.Panel1.Visible = false; + // + // _CheckBox18 + // + this._CheckBox18.AutoSize = true; + this._CheckBox18.Location = new System.Drawing.Point(140, 3); + this._CheckBox18.Name = "_CheckBox18"; + this._CheckBox18.Size = new System.Drawing.Size(84, 17); + this._CheckBox18.TabIndex = 36; + this._CheckBox18.Text = "Numero foto"; + this._CheckBox18.UseVisualStyleBackColor = true; + this._CheckBox18.CheckedChanged += new System.EventHandler(this.CheckBox18_CheckedChanged); + // + // _CheckBox4 + // + this._CheckBox4.ForeColor = System.Drawing.Color.Black; + this._CheckBox4.Location = new System.Drawing.Point(10, 3); + this._CheckBox4.Name = "_CheckBox4"; + this._CheckBox4.Size = new System.Drawing.Size(104, 17); + this._CheckBox4.TabIndex = 34; + this._CheckBox4.Text = "Aggiungi scritta"; + this._CheckBox4.CheckedChanged += new System.EventHandler(this.CheckBox4_CheckedChanged); + // + // _CheckBox12 + // + this._CheckBox12.ForeColor = System.Drawing.Color.Black; + this._CheckBox12.Location = new System.Drawing.Point(10, 19); + this._CheckBox12.Name = "_CheckBox12"; + this._CheckBox12.Size = new System.Drawing.Size(104, 21); + this._CheckBox12.TabIndex = 35; + this._CheckBox12.Text = "Aggiungi orario"; + this._CheckBox12.CheckedChanged += new System.EventHandler(this.CheckBox12_CheckedChanged); + // + // GroupBox1 + // + this.GroupBox1.Controls.Add(this.Label46); + this.GroupBox1.Controls.Add(this.TextBox33); + this.GroupBox1.Controls.Add(this.Panel2); + this.GroupBox1.Controls.Add(this.Label5); + this.GroupBox1.Controls.Add(this.TextBox5); + this.GroupBox1.Controls.Add(this.Label6); + this.GroupBox1.Controls.Add(this.TextBox6); + this.GroupBox1.Controls.Add(this.Label3); + this.GroupBox1.Controls.Add(this.TextBox3); + this.GroupBox1.Controls.Add(this.CheckBox1); + this.GroupBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox1.Location = new System.Drawing.Point(6, 5); + this.GroupBox1.Name = "GroupBox1"; + this.GroupBox1.Size = new System.Drawing.Size(350, 210); + this.GroupBox1.TabIndex = 25; + this.GroupBox1.TabStop = false; + this.GroupBox1.Text = "Miniature"; + // + // Label46 + // + this.Label46.AutoSize = true; + this.Label46.Location = new System.Drawing.Point(198, 43); + this.Label46.Name = "Label46"; + this.Label46.Size = new System.Drawing.Size(40, 13); + this.Label46.TabIndex = 21; + this.Label46.Text = "Qualità"; + // + // TextBox33 + // + this.TextBox33.Location = new System.Drawing.Point(244, 40); + this.TextBox33.Name = "TextBox33"; + this.TextBox33.Size = new System.Drawing.Size(100, 20); + this.TextBox33.TabIndex = 20; + // + // Panel2 + // + this.Panel2.Controls.Add(this.RadioButton3); + this.Panel2.Controls.Add(this.RadioButton7); + this.Panel2.Controls.Add(this.RadioButton4); + this.Panel2.Controls.Add(this.RadioButton6); + this.Panel2.Controls.Add(this.RadioButton5); + this.Panel2.Location = new System.Drawing.Point(56, 114); + this.Panel2.Name = "Panel2"; + this.Panel2.Size = new System.Drawing.Size(235, 90); + this.Panel2.TabIndex = 19; + // + // RadioButton3 + // + this.RadioButton3.AutoSize = true; + this.RadioButton3.Location = new System.Drawing.Point(15, 16); + this.RadioButton3.Name = "RadioButton3"; + this.RadioButton3.Size = new System.Drawing.Size(99, 17); + this.RadioButton3.TabIndex = 14; + this.RadioButton3.TabStop = true; + this.RadioButton3.Text = "Aggiungi Scritta"; + this.RadioButton3.UseVisualStyleBackColor = true; + // + // RadioButton7 + // + this.RadioButton7.AutoSize = true; + this.RadioButton7.Location = new System.Drawing.Point(129, 40); + this.RadioButton7.Name = "RadioButton7"; + this.RadioButton7.Size = new System.Drawing.Size(95, 17); + this.RadioButton7.TabIndex = 18; + this.RadioButton7.TabStop = true; + this.RadioButton7.Text = "numero+tempo"; + this.RadioButton7.UseVisualStyleBackColor = true; + // + // RadioButton4 + // + this.RadioButton4.AutoSize = true; + this.RadioButton4.Location = new System.Drawing.Point(15, 40); + this.RadioButton4.Name = "RadioButton4"; + this.RadioButton4.Size = new System.Drawing.Size(95, 17); + this.RadioButton4.TabIndex = 15; + this.RadioButton4.TabStop = true; + this.RadioButton4.Text = "Aggiungi orario"; + this.RadioButton4.UseVisualStyleBackColor = true; + // + // RadioButton6 + // + this.RadioButton6.AutoSize = true; + this.RadioButton6.Location = new System.Drawing.Point(129, 16); + this.RadioButton6.Name = "RadioButton6"; + this.RadioButton6.Size = new System.Drawing.Size(83, 17); + this.RadioButton6.TabIndex = 17; + this.RadioButton6.TabStop = true; + this.RadioButton6.Text = "Numero foto"; + this.RadioButton6.UseVisualStyleBackColor = true; + // + // RadioButton5 + // + this.RadioButton5.AutoSize = true; + this.RadioButton5.Location = new System.Drawing.Point(15, 65); + this.RadioButton5.Name = "RadioButton5"; + this.RadioButton5.Size = new System.Drawing.Size(84, 17); + this.RadioButton5.TabIndex = 16; + this.RadioButton5.TabStop = true; + this.RadioButton5.Text = "Tempo Gara"; + this.RadioButton5.UseVisualStyleBackColor = true; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.ForeColor = System.Drawing.Color.Black; + this.Label5.Location = new System.Drawing.Point(24, 88); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(41, 13); + this.Label5.TabIndex = 12; + this.Label5.Text = "Altezza"; + // + // TextBox5 + // + this.TextBox5.Location = new System.Drawing.Point(72, 64); + this.TextBox5.Name = "TextBox5"; + this.TextBox5.Size = new System.Drawing.Size(88, 20); + this.TextBox5.TabIndex = 10; + this.TextBox5.Text = "TextBox5"; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.ForeColor = System.Drawing.Color.Black; + this.Label6.Location = new System.Drawing.Point(8, 64); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(56, 13); + this.Label6.TabIndex = 13; + this.Label6.Text = "Larghezza"; + // + // TextBox6 + // + this.TextBox6.Location = new System.Drawing.Point(72, 88); + this.TextBox6.Name = "TextBox6"; + this.TextBox6.Size = new System.Drawing.Size(88, 20); + this.TextBox6.TabIndex = 11; + this.TextBox6.Text = "TextBox6"; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.ForeColor = System.Drawing.Color.Black; + this.Label3.Location = new System.Drawing.Point(24, 40); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(44, 13); + this.Label3.TabIndex = 7; + this.Label3.Text = "Suffisso"; + // + // TextBox3 + // + this.TextBox3.Location = new System.Drawing.Point(72, 40); + this.TextBox3.Name = "TextBox3"; + this.TextBox3.Size = new System.Drawing.Size(88, 20); + this.TextBox3.TabIndex = 6; + this.TextBox3.Text = "TextBox3"; + // + // CheckBox1 + // + this.CheckBox1.ForeColor = System.Drawing.Color.Black; + this.CheckBox1.Location = new System.Drawing.Point(72, 16); + this.CheckBox1.Name = "CheckBox1"; + this.CheckBox1.Size = new System.Drawing.Size(104, 24); + this.CheckBox1.TabIndex = 5; + this.CheckBox1.Text = "Crea miniature"; + // + // TabPage4 + // + this.TabPage4.Controls.Add(this.GroupBox6); + this.TabPage4.Location = new System.Drawing.Point(4, 22); + this.TabPage4.Name = "TabPage4"; + this.TabPage4.Padding = new System.Windows.Forms.Padding(3); + this.TabPage4.Size = new System.Drawing.Size(513, 351); + this.TabPage4.TabIndex = 3; + this.TabPage4.Text = "Logo"; + this.TabPage4.UseVisualStyleBackColor = true; + // + // GroupBox6 + // + this.GroupBox6.Controls.Add(this.PictureBox2); + this.GroupBox6.Controls.Add(this._PictureBox1); + this.GroupBox6.Controls.Add(this.ComboBox5); + this.GroupBox6.Controls.Add(this.ComboBox4); + this.GroupBox6.Controls.Add(this.TextBox19); + this.GroupBox6.Controls.Add(this.Label28); + this.GroupBox6.Controls.Add(this.CheckBox5); + this.GroupBox6.Controls.Add(this.TextBox15); + this.GroupBox6.Controls.Add(this.TextBox14); + this.GroupBox6.Controls.Add(this.Label25); + this.GroupBox6.Controls.Add(this.TextBox16); + this.GroupBox6.Controls.Add(this.Label24); + this.GroupBox6.Controls.Add(this.Label22); + this.GroupBox6.Controls.Add(this.Label23); + this.GroupBox6.Controls.Add(this._Button4); + this.GroupBox6.Controls.Add(this.TextBox10); + this.GroupBox6.Controls.Add(this.Label29); + this.GroupBox6.Controls.Add(this.Label30); + this.GroupBox6.Controls.Add(this.PictureBox3); + this.GroupBox6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); + this.GroupBox6.Location = new System.Drawing.Point(6, 6); + this.GroupBox6.Name = "GroupBox6"; + this.GroupBox6.Size = new System.Drawing.Size(496, 224); + this.GroupBox6.TabIndex = 42; + this.GroupBox6.TabStop = false; + this.GroupBox6.Text = "Logo"; + // + // PictureBox2 + // + this.PictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.PictureBox2.Location = new System.Drawing.Point(144, 192); + this.PictureBox2.Name = "PictureBox2"; + this.PictureBox2.Size = new System.Drawing.Size(24, 24); + this.PictureBox2.TabIndex = 44; + this.PictureBox2.TabStop = false; + this.PictureBox2.Visible = false; + // + // _PictureBox1 + // + this._PictureBox1.Cursor = System.Windows.Forms.Cursors.Cross; + this._PictureBox1.Location = new System.Drawing.Point(256, 56); + this._PictureBox1.Name = "_PictureBox1"; + this._PictureBox1.Size = new System.Drawing.Size(224, 160); + this._PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this._PictureBox1.TabIndex = 43; + this._PictureBox1.TabStop = false; + this._PictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PictureBox1_MouseMove); + this._PictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.PictureBox1_MouseUp); + // + // ComboBox5 + // + this.ComboBox5.Location = new System.Drawing.Point(144, 168); + this.ComboBox5.Name = "ComboBox5"; + this.ComboBox5.Size = new System.Drawing.Size(96, 21); + this.ComboBox5.TabIndex = 42; + this.ComboBox5.Text = "ComboBox5"; + // + // ComboBox4 + // + this.ComboBox4.Location = new System.Drawing.Point(144, 144); + this.ComboBox4.Name = "ComboBox4"; + this.ComboBox4.Size = new System.Drawing.Size(96, 21); + this.ComboBox4.TabIndex = 41; + this.ComboBox4.Text = "ComboBox4"; + // + // TextBox19 + // + this.TextBox19.Location = new System.Drawing.Point(144, 96); + this.TextBox19.Name = "TextBox19"; + this.TextBox19.Size = new System.Drawing.Size(96, 20); + this.TextBox19.TabIndex = 40; + this.TextBox19.Text = "TextBox19"; + // + // Label28 + // + this.Label28.ForeColor = System.Drawing.Color.Black; + this.Label28.Location = new System.Drawing.Point(17, 97); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(120, 16); + this.Label28.TabIndex = 39; + this.Label28.Text = "Trasparenza (0-100%)"; + this.Label28.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CheckBox5 + // + this.CheckBox5.ForeColor = System.Drawing.Color.Black; + this.CheckBox5.Location = new System.Drawing.Point(0, 26); + this.CheckBox5.Name = "CheckBox5"; + this.CheckBox5.Size = new System.Drawing.Size(72, 20); + this.CheckBox5.TabIndex = 38; + this.CheckBox5.Text = "Aggiungi"; + // + // TextBox15 + // + this.TextBox15.Location = new System.Drawing.Point(144, 72); + this.TextBox15.Name = "TextBox15"; + this.TextBox15.Size = new System.Drawing.Size(96, 20); + this.TextBox15.TabIndex = 19; + this.TextBox15.Text = "TextBox15"; + // + // TextBox14 + // + this.TextBox14.Location = new System.Drawing.Point(144, 48); + this.TextBox14.Name = "TextBox14"; + this.TextBox14.Size = new System.Drawing.Size(96, 20); + this.TextBox14.TabIndex = 18; + this.TextBox14.Text = "TextBox14"; + // + // Label25 + // + this.Label25.AutoSize = true; + this.Label25.ForeColor = System.Drawing.Color.Black; + this.Label25.Location = new System.Drawing.Point(17, 168); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(95, 13); + this.Label25.TabIndex = 36; + this.Label25.Text = "Posizione verticale"; + this.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TextBox16 + // + this.TextBox16.Location = new System.Drawing.Point(144, 120); + this.TextBox16.Name = "TextBox16"; + this.TextBox16.Size = new System.Drawing.Size(96, 20); + this.TextBox16.TabIndex = 35; + this.TextBox16.Text = "TextBox16"; + // + // Label24 + // + this.Label24.AutoSize = true; + this.Label24.ForeColor = System.Drawing.Color.Black; + this.Label24.Location = new System.Drawing.Point(19, 123); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(88, 13); + this.Label24.TabIndex = 34; + this.Label24.Text = "Margine (pixel/%)"; + this.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.ForeColor = System.Drawing.Color.Black; + this.Label22.Location = new System.Drawing.Point(19, 51); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(41, 13); + this.Label22.TabIndex = 20; + this.Label22.Text = "Altezza"; + this.Label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label23 + // + this.Label23.AutoSize = true; + this.Label23.ForeColor = System.Drawing.Color.Black; + this.Label23.Location = new System.Drawing.Point(19, 75); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(56, 13); + this.Label23.TabIndex = 21; + this.Label23.Text = "Larghezza"; + this.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // _Button4 + // + this._Button4.Location = new System.Drawing.Point(464, 24); + this._Button4.Name = "_Button4"; + this._Button4.Size = new System.Drawing.Size(24, 20); + this._Button4.TabIndex = 8; + this._Button4.Text = "..."; + this._Button4.Click += new System.EventHandler(this.Button4_Click); + // + // TextBox10 + // + this.TextBox10.Location = new System.Drawing.Point(144, 24); + this.TextBox10.Name = "TextBox10"; + this.TextBox10.Size = new System.Drawing.Size(312, 20); + this.TextBox10.TabIndex = 6; + this.TextBox10.Text = "TextBox10"; + // + // Label29 + // + this.Label29.AutoSize = true; + this.Label29.ForeColor = System.Drawing.Color.Black; + this.Label29.Location = new System.Drawing.Point(17, 147); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(105, 13); + this.Label29.TabIndex = 36; + this.Label29.Text = "Posizione orizzontale"; + this.Label29.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.ForeColor = System.Drawing.Color.Black; + this.Label30.Location = new System.Drawing.Point(19, 203); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(93, 13); + this.Label30.TabIndex = 36; + this.Label30.Text = "Colore trasparente"; + this.Label30.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.Label30.Visible = false; + // + // PictureBox3 + // + this.PictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.PictureBox3.Location = new System.Drawing.Point(216, 192); + this.PictureBox3.Name = "PictureBox3"; + this.PictureBox3.Size = new System.Drawing.Size(24, 24); + this.PictureBox3.TabIndex = 44; + this.PictureBox3.TabStop = false; + this.PictureBox3.Visible = false; + // + // _Label27 + // + this._Label27.Location = new System.Drawing.Point(591, 378); + this._Label27.Name = "_Label27"; + this._Label27.Size = new System.Drawing.Size(140, 20); + this._Label27.TabIndex = 62; + this._Label27.Text = "Versione 2.2 2021"; + this._Label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this._Label27.Click += new System.EventHandler(this.Label27_Click); + // + // _Button7 + // + this._Button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this._Button7.Location = new System.Drawing.Point(539, 120); + this._Button7.Name = "_Button7"; + this._Button7.Size = new System.Drawing.Size(192, 40); + this._Button7.TabIndex = 61; + this._Button7.Text = "stop creazione"; + this._Button7.Click += new System.EventHandler(this.Button7_Click); + // + // _Button5 + // + this._Button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this._Button5.Location = new System.Drawing.Point(539, 43); + this._Button5.Name = "_Button5"; + this._Button5.Size = new System.Drawing.Size(192, 32); + this._Button5.TabIndex = 60; + this._Button5.Text = "Salva impostazioni"; + this._Button5.Click += new System.EventHandler(this.Button5_Click); + // + // Label20 + // + this.Label20.AutoSize = true; + this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label20.Location = new System.Drawing.Point(539, 294); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(104, 16); + this.Label20.TabIndex = 59; + this.Label20.Text = "foto generate:"; + // + // Label19 + // + this.Label19.AutoSize = true; + this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(539, 275); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(80, 16); + this.Label19.TabIndex = 58; + this.Label19.Text = "foto totali: "; + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label18.Location = new System.Drawing.Point(643, 294); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(19, 20); + this.Label18.TabIndex = 57; + this.Label18.Text = "0"; + // + // lblFotoTotaliNum + // + this.lblFotoTotaliNum.AutoSize = true; + this.lblFotoTotaliNum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblFotoTotaliNum.Location = new System.Drawing.Point(643, 275); + this.lblFotoTotaliNum.Name = "lblFotoTotaliNum"; + this.lblFotoTotaliNum.Size = new System.Drawing.Size(19, 20); + this.lblFotoTotaliNum.TabIndex = 56; + this.lblFotoTotaliNum.Text = "0"; + // + // Label10 + // + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label10.Location = new System.Drawing.Point(539, 163); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(192, 72); + this.Label10.TabIndex = 55; + this.Label10.Text = "file"; + // + // _Button6 + // + this._Button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this._Button6.Location = new System.Drawing.Point(539, 12); + this._Button6.Name = "_Button6"; + this._Button6.Size = new System.Drawing.Size(192, 32); + this._Button6.TabIndex = 54; + this._Button6.Text = "Carica impostazioni"; + this._Button6.Click += new System.EventHandler(this.Button6_Click); + // + // _btnCreaCatalogoAsync + // + this._btnCreaCatalogoAsync.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this._btnCreaCatalogoAsync.Location = new System.Drawing.Point(539, 78); + this._btnCreaCatalogoAsync.Name = "_btnCreaCatalogoAsync"; + this._btnCreaCatalogoAsync.Size = new System.Drawing.Size(192, 38); + this._btnCreaCatalogoAsync.TabIndex = 68; + this._btnCreaCatalogoAsync.Text = "CREA"; + this._btnCreaCatalogoAsync.UseVisualStyleBackColor = true; + this._btnCreaCatalogoAsync.Click += new System.EventHandler(this.Button1_Click); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(739, 401); + this.Controls.Add(this._btnCreaCatalogoAsync); + this.Controls.Add(this.ProgressBar1); + this.Controls.Add(this.CheckBox22); + this.Controls.Add(this.Label43); + this.Controls.Add(this.TabControl1); + this.Controls.Add(this._Label27); + this.Controls.Add(this._Button7); + this.Controls.Add(this._Button5); + this.Controls.Add(this.Label20); + this.Controls.Add(this.Label19); + this.Controls.Add(this.Label18); + this.Controls.Add(this.lblFotoTotaliNum); + this.Controls.Add(this.Label10); + this.Controls.Add(this._Button6); + this.MaximizeBox = false; + this.Name = "MainForm"; + this.Text = "Image Catalog"; + this.Load += new System.EventHandler(this.Form1_Load); + this.TabControl1.ResumeLayout(false); + this.TabPage5.ResumeLayout(false); + this.GroupBox11.ResumeLayout(false); + this.GroupBox11.PerformLayout(); + this.Panel3.ResumeLayout(false); + this.Panel3.PerformLayout(); + this.GroupBox3.ResumeLayout(false); + this.GroupBox3.PerformLayout(); + this.GroupBox8.ResumeLayout(false); + this.GroupBox8.PerformLayout(); + this.GroupBox7.ResumeLayout(false); + this.GroupBox7.PerformLayout(); + this.TabPage3.ResumeLayout(false); + this.GroupBox10.ResumeLayout(false); + this.GroupBox10.PerformLayout(); + this.GroupBox9.ResumeLayout(false); + this.GroupBox9.PerformLayout(); + this.GroupBox5.ResumeLayout(false); + this.GroupBox5.PerformLayout(); + this.GroupBox4.ResumeLayout(false); + this.GroupBox4.PerformLayout(); + this.TabPage2.ResumeLayout(false); + this.GroupBox2.ResumeLayout(false); + this.GroupBox2.PerformLayout(); + this.TabPage1.ResumeLayout(false); + this.Panel1.ResumeLayout(false); + this.Panel1.PerformLayout(); + this.GroupBox1.ResumeLayout(false); + this.GroupBox1.PerformLayout(); + this.Panel2.ResumeLayout(false); + this.Panel2.PerformLayout(); + this.TabPage4.ResumeLayout(false); + this.GroupBox6.ResumeLayout(false); + this.GroupBox6.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this._PictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + internal ProgressBar ProgressBar1; + internal CheckBox CheckBox22; + internal Label Label43; + internal TabControl TabControl1; + internal TabPage TabPage5; + internal GroupBox GroupBox3; + internal CheckBox chkAggiornaSottodirectory; + private Button _Button3; + + internal Button Button3 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button3; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button3 != null) + { + _Button3.Click -= Button3_Click; + } + + _Button3 = value; + if (_Button3 != null) + { + _Button3.Click += Button3_Click; + } + } + } + + private Button _Button2; + + internal Button Button2 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button2; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button2 != null) + { + _Button2.Click -= Button2_Click; + } + + _Button2 = value; + if (_Button2 != null) + { + _Button2.Click += Button2_Click; + } + } + } + + internal Label Label1; + internal Label Label2; + internal TextBox txtSorgente; + internal TextBox txtDestinazione; + internal GroupBox GroupBox8; + internal RadioButton rdbNumFiles; + internal RadioButton rdbNumProgressiva; + internal TextBox txtCifreContatore; + internal Label Label34; + internal TextBox txtSuffissoCartelle; + internal Label Label33; + internal Label Label31; + internal CheckBox chkCreaSottocartelle; + internal TextBox txtFilePerCartella; + internal Label Label32; + internal GroupBox GroupBox7; + internal CheckBox chkRotazioneAutomatica; + internal CheckBox chkForzaJpg; + internal TabPage TabPage3; + internal GroupBox GroupBox10; + internal Label Label42; + internal Label Label41; + internal TextBox TextBox31; + internal TextBox TextBox30; + internal GroupBox GroupBox9; + internal CheckBox CheckBox17; + internal CheckBox CheckBox16; + internal GroupBox GroupBox5; + internal TextBox TextBox34; + private Button _Button8; + + internal Button Button8 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button8; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button8 != null) + { + _Button8.Click -= Button8_Click; + } + + _Button8 = value; + if (_Button8 != null) + { + _Button8.Click += Button8_Click; + } + } + } + + internal Label Label36; + internal TextBox TextBox25; + internal Label Label35; + internal ComboBox ComboBox3; + internal TextBox TextBox11; + internal Label Label12; + internal Label Label11; + internal CheckBox CheckBox3; + internal GroupBox GroupBox4; + internal Label Label40; + internal TextBox TextBox29; + internal TextBox TextBox18; + internal Label Label26; + internal DateTimePicker DateTimePicker1; + internal CheckBox CheckBox8; + internal TextBox TextBox9; + internal CheckBox CheckBox7; + internal Label Label4; + internal TextBox TextBox4; + internal Label Label9; + internal Label Label13; + internal ComboBox ComboBox1; + internal ComboBox ComboBox2; + internal Label Label14; + internal TextBox TextBox12; + internal Label Label15; + internal TabPage TabPage2; + internal GroupBox GroupBox2; + internal Label Label45; + internal TextBox TextBox32; + internal TextBox TextBox26; + internal Label Label37; + internal Label Label38; + internal TextBox TextBox27; + internal Label Label39; + internal TextBox TextBox28; + internal CheckBox CheckBox15; + internal TabPage TabPage1; + internal Panel Panel1; + private CheckBox _CheckBox18; + + internal CheckBox CheckBox18 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox18; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox18 != null) + { + _CheckBox18.CheckedChanged -= CheckBox18_CheckedChanged; + } + + _CheckBox18 = value; + if (_CheckBox18 != null) + { + _CheckBox18.CheckedChanged += CheckBox18_CheckedChanged; + } + } + } + + private CheckBox _CheckBox4; + + internal CheckBox CheckBox4 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox4; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox4 != null) + { + _CheckBox4.CheckedChanged -= CheckBox4_CheckedChanged; + } + + _CheckBox4 = value; + if (_CheckBox4 != null) + { + _CheckBox4.CheckedChanged += CheckBox4_CheckedChanged; + } + } + } + + private CheckBox _CheckBox12; + + internal CheckBox CheckBox12 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _CheckBox12; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_CheckBox12 != null) + { + _CheckBox12.CheckedChanged -= CheckBox12_CheckedChanged; + } + + _CheckBox12 = value; + if (_CheckBox12 != null) + { + _CheckBox12.CheckedChanged += CheckBox12_CheckedChanged; + } + } + } + + internal GroupBox GroupBox1; + internal Label Label46; + internal TextBox TextBox33; + internal Panel Panel2; + internal RadioButton RadioButton3; + internal RadioButton RadioButton7; + internal RadioButton RadioButton4; + internal RadioButton RadioButton6; + internal RadioButton RadioButton5; + internal Label Label5; + internal TextBox TextBox5; + internal Label Label6; + internal TextBox TextBox6; + internal Label Label3; + internal TextBox TextBox3; + internal CheckBox CheckBox1; + internal TabPage TabPage4; + internal GroupBox GroupBox6; + internal PictureBox PictureBox2; + private PictureBox _PictureBox1; + + internal PictureBox PictureBox1 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _PictureBox1; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_PictureBox1 != null) + { + _PictureBox1.MouseMove -= PictureBox1_MouseMove; + _PictureBox1.MouseUp -= PictureBox1_MouseUp; + } + + _PictureBox1 = value; + if (_PictureBox1 != null) + { + _PictureBox1.MouseMove += PictureBox1_MouseMove; + _PictureBox1.MouseUp += PictureBox1_MouseUp; + } + } + } + + internal ComboBox ComboBox5; + internal ComboBox ComboBox4; + internal TextBox TextBox19; + internal Label Label28; + internal CheckBox CheckBox5; + internal TextBox TextBox15; + internal TextBox TextBox14; + internal Label Label25; + internal TextBox TextBox16; + internal Label Label24; + internal Label Label22; + internal Label Label23; + private Button _Button4; + + internal Button Button4 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button4; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button4 != null) + { + _Button4.Click -= Button4_Click; + } + + _Button4 = value; + if (_Button4 != null) + { + _Button4.Click += Button4_Click; + } + } + } + + internal TextBox TextBox10; + internal Label Label29; + internal Label Label30; + internal PictureBox PictureBox3; + private Label _Label27; + + internal Label Label27 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Label27; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Label27 != null) + { + _Label27.Click -= Label27_Click; + } + + _Label27 = value; + if (_Label27 != null) + { + _Label27.Click += Label27_Click; + } + } + } + + private Button _Button7; + + internal Button Button7 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button7; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button7 != null) + { + _Button7.Click -= Button7_Click; + } + + _Button7 = value; + if (_Button7 != null) + { + _Button7.Click += Button7_Click; + } + } + } + + private Button _Button5; + + internal Button Button5 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button5; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button5 != null) + { + _Button5.Click -= Button5_Click; + } + + _Button5 = value; + if (_Button5 != null) + { + _Button5.Click += Button5_Click; + } + } + } + + internal Label Label20; + internal Label Label19; + internal Label Label18; + internal Label lblFotoTotaliNum; + internal Label Label10; + + //internal Button btnCreaCatalogo + //{ + // [MethodImpl(MethodImplOptions.Synchronized)] + // get + // { + // return _btnCreaCatalogo; + // } + + // [MethodImpl(MethodImplOptions.Synchronized)] + // set + // { + // if (_btnCreaCatalogo != null) + // { + // _btnCreaCatalogo.Click -= btnCreaCatalogo_Click; + // } + + // _btnCreaCatalogo = value; + // if (_btnCreaCatalogo != null) + // { + // _btnCreaCatalogo.Click += btnCreaCatalogo_Click; + // } + // } + //} + + private Button _Button6; + + internal Button Button6 + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _Button6; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_Button6 != null) + { + _Button6.Click -= Button6_Click; + } + + _Button6 = value; + if (_Button6 != null) + { + _Button6.Click += Button6_Click; + } + } + } + + internal GroupBox GroupBox11; + internal Label Label7; + internal TextBox TextBox7; + internal Label Label8; + internal TextBox TextBox8; + internal Panel Panel3; + internal RadioButton rdbNuovoMetodo; + internal RadioButton rdbVecchioMetodo; + internal CheckBox chkSovrascriviFile; + private Button _btnCreaCatalogoAsync; + private Timer timer1; + + internal Button btnCreaCatalogoAsync + { + [MethodImpl(MethodImplOptions.Synchronized)] + get + { + return _btnCreaCatalogoAsync; + } + + [MethodImpl(MethodImplOptions.Synchronized)] + set + { + if (_btnCreaCatalogoAsync != null) + { + _btnCreaCatalogoAsync.Click -= Button1_Click; + } + + _btnCreaCatalogoAsync = value; + if (_btnCreaCatalogoAsync != null) + { + _btnCreaCatalogoAsync.Click += Button1_Click; + } + } + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/MainForm.Designer.vb b/imagecatalog.backup/MainForm.Designer.vb new file mode 100644 index 0000000..0150130 --- /dev/null +++ b/imagecatalog.backup/MainForm.Designer.vb @@ -0,0 +1,1798 @@ + _ +Partial Class MainForm + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ProgressBar1 = New System.Windows.Forms.ProgressBar() + Me.CheckBox22 = New System.Windows.Forms.CheckBox() + Me.Label43 = New System.Windows.Forms.Label() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.TabPage5 = New System.Windows.Forms.TabPage() + Me.GroupBox11 = New System.Windows.Forms.GroupBox() + Me.Panel3 = New System.Windows.Forms.Panel() + Me.rdbNuovoMetodo = New System.Windows.Forms.RadioButton() + Me.rdbVecchioMetodo = New System.Windows.Forms.RadioButton() + Me.Label8 = New System.Windows.Forms.Label() + Me.TextBox8 = New System.Windows.Forms.TextBox() + Me.Label7 = New System.Windows.Forms.Label() + Me.TextBox7 = New System.Windows.Forms.TextBox() + Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.chkAggiornaSottodirectory = New System.Windows.Forms.CheckBox() + Me.Button3 = New System.Windows.Forms.Button() + Me.Button2 = New System.Windows.Forms.Button() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.txtSorgente = New System.Windows.Forms.TextBox() + Me.txtDestinazione = New System.Windows.Forms.TextBox() + Me.GroupBox8 = New System.Windows.Forms.GroupBox() + Me.rdbNumFiles = New System.Windows.Forms.RadioButton() + Me.rdbNumProgressiva = New System.Windows.Forms.RadioButton() + Me.txtCifreContatore = New System.Windows.Forms.TextBox() + Me.Label34 = New System.Windows.Forms.Label() + Me.txtSuffissoCartelle = New System.Windows.Forms.TextBox() + Me.Label33 = New System.Windows.Forms.Label() + Me.Label31 = New System.Windows.Forms.Label() + Me.chkCreaSottocartelle = New System.Windows.Forms.CheckBox() + Me.txtFilePerCartella = New System.Windows.Forms.TextBox() + Me.Label32 = New System.Windows.Forms.Label() + Me.GroupBox7 = New System.Windows.Forms.GroupBox() + Me.chkSovrascriviFile = New System.Windows.Forms.CheckBox() + Me.chkRotazioneAutomatica = New System.Windows.Forms.CheckBox() + Me.chkForzaJpg = New System.Windows.Forms.CheckBox() + Me.TabPage3 = New System.Windows.Forms.TabPage() + Me.CheckBox2 = New System.Windows.Forms.CheckBox() + Me.GroupBox10 = New System.Windows.Forms.GroupBox() + Me.Label42 = New System.Windows.Forms.Label() + Me.Label41 = New System.Windows.Forms.Label() + Me.TextBox31 = New System.Windows.Forms.TextBox() + Me.TextBox30 = New System.Windows.Forms.TextBox() + Me.GroupBox9 = New System.Windows.Forms.GroupBox() + Me.CheckBox17 = New System.Windows.Forms.CheckBox() + Me.CheckBox16 = New System.Windows.Forms.CheckBox() + Me.GroupBox5 = New System.Windows.Forms.GroupBox() + Me.TextBox34 = New System.Windows.Forms.TextBox() + Me.Button8 = New System.Windows.Forms.Button() + Me.Label36 = New System.Windows.Forms.Label() + Me.TextBox25 = New System.Windows.Forms.TextBox() + Me.Label35 = New System.Windows.Forms.Label() + Me.ComboBox3 = New System.Windows.Forms.ComboBox() + Me.TextBox11 = New System.Windows.Forms.TextBox() + Me.Label12 = New System.Windows.Forms.Label() + Me.Label11 = New System.Windows.Forms.Label() + Me.CheckBox3 = New System.Windows.Forms.CheckBox() + Me.GroupBox4 = New System.Windows.Forms.GroupBox() + Me.Label40 = New System.Windows.Forms.Label() + Me.TextBox29 = New System.Windows.Forms.TextBox() + Me.TextBox18 = New System.Windows.Forms.TextBox() + Me.Label26 = New System.Windows.Forms.Label() + Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker() + Me.CheckBox8 = New System.Windows.Forms.CheckBox() + Me.TextBox9 = New System.Windows.Forms.TextBox() + Me.CheckBox7 = New System.Windows.Forms.CheckBox() + Me.Label4 = New System.Windows.Forms.Label() + Me.TextBox4 = New System.Windows.Forms.TextBox() + Me.Label9 = New System.Windows.Forms.Label() + Me.Label13 = New System.Windows.Forms.Label() + Me.ComboBox1 = New System.Windows.Forms.ComboBox() + Me.ComboBox2 = New System.Windows.Forms.ComboBox() + Me.Label14 = New System.Windows.Forms.Label() + Me.TextBox12 = New System.Windows.Forms.TextBox() + Me.Label15 = New System.Windows.Forms.Label() + Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.Label45 = New System.Windows.Forms.Label() + Me.TextBox32 = New System.Windows.Forms.TextBox() + Me.TextBox26 = New System.Windows.Forms.TextBox() + Me.Label37 = New System.Windows.Forms.Label() + Me.Label38 = New System.Windows.Forms.Label() + Me.TextBox27 = New System.Windows.Forms.TextBox() + Me.Label39 = New System.Windows.Forms.Label() + Me.TextBox28 = New System.Windows.Forms.TextBox() + Me.CheckBox15 = New System.Windows.Forms.CheckBox() + Me.TabPage1 = New System.Windows.Forms.TabPage() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.CheckBox18 = New System.Windows.Forms.CheckBox() + Me.CheckBox4 = New System.Windows.Forms.CheckBox() + Me.CheckBox12 = New System.Windows.Forms.CheckBox() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.Label46 = New System.Windows.Forms.Label() + Me.TextBox33 = New System.Windows.Forms.TextBox() + Me.Panel2 = New System.Windows.Forms.Panel() + Me.RadioButton3 = New System.Windows.Forms.RadioButton() + Me.RadioButton7 = New System.Windows.Forms.RadioButton() + Me.RadioButton4 = New System.Windows.Forms.RadioButton() + Me.RadioButton6 = New System.Windows.Forms.RadioButton() + Me.RadioButton5 = New System.Windows.Forms.RadioButton() + Me.Label5 = New System.Windows.Forms.Label() + Me.TextBox5 = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.TextBox6 = New System.Windows.Forms.TextBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.TextBox3 = New System.Windows.Forms.TextBox() + Me.CheckBox1 = New System.Windows.Forms.CheckBox() + Me.TabPage4 = New System.Windows.Forms.TabPage() + Me.GroupBox6 = New System.Windows.Forms.GroupBox() + Me.PictureBox2 = New System.Windows.Forms.PictureBox() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.ComboBox5 = New System.Windows.Forms.ComboBox() + Me.ComboBox4 = New System.Windows.Forms.ComboBox() + Me.TextBox19 = New System.Windows.Forms.TextBox() + Me.Label28 = New System.Windows.Forms.Label() + Me.CheckBox5 = New System.Windows.Forms.CheckBox() + Me.TextBox15 = New System.Windows.Forms.TextBox() + Me.TextBox14 = New System.Windows.Forms.TextBox() + Me.Label25 = New System.Windows.Forms.Label() + Me.TextBox16 = New System.Windows.Forms.TextBox() + Me.Label24 = New System.Windows.Forms.Label() + Me.Label22 = New System.Windows.Forms.Label() + Me.Label23 = New System.Windows.Forms.Label() + Me.Button4 = New System.Windows.Forms.Button() + Me.TextBox10 = New System.Windows.Forms.TextBox() + Me.Label29 = New System.Windows.Forms.Label() + Me.Label30 = New System.Windows.Forms.Label() + Me.PictureBox3 = New System.Windows.Forms.PictureBox() + Me.Label27 = New System.Windows.Forms.Label() + Me.Button7 = New System.Windows.Forms.Button() + Me.Button5 = New System.Windows.Forms.Button() + Me.Label20 = New System.Windows.Forms.Label() + Me.Label19 = New System.Windows.Forms.Label() + Me.Label18 = New System.Windows.Forms.Label() + Me.lblFotoTotaliNum = New System.Windows.Forms.Label() + Me.Label10 = New System.Windows.Forms.Label() + Me.btnCreaCatalogo = New System.Windows.Forms.Button() + Me.Button6 = New System.Windows.Forms.Button() + Me.btnCreaCatalogoAsync = New System.Windows.Forms.Button() + Me.TabControl1.SuspendLayout() + Me.TabPage5.SuspendLayout() + Me.GroupBox11.SuspendLayout() + Me.Panel3.SuspendLayout() + Me.GroupBox3.SuspendLayout() + Me.GroupBox8.SuspendLayout() + Me.GroupBox7.SuspendLayout() + Me.TabPage3.SuspendLayout() + Me.GroupBox10.SuspendLayout() + Me.GroupBox9.SuspendLayout() + Me.GroupBox5.SuspendLayout() + Me.GroupBox4.SuspendLayout() + Me.TabPage2.SuspendLayout() + Me.GroupBox2.SuspendLayout() + Me.TabPage1.SuspendLayout() + Me.Panel1.SuspendLayout() + Me.GroupBox1.SuspendLayout() + Me.Panel2.SuspendLayout() + Me.TabPage4.SuspendLayout() + Me.GroupBox6.SuspendLayout() + CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'ProgressBar1 + ' + Me.ProgressBar1.Location = New System.Drawing.Point(539, 243) + Me.ProgressBar1.Name = "ProgressBar1" + Me.ProgressBar1.Size = New System.Drawing.Size(192, 23) + Me.ProgressBar1.TabIndex = 67 + ' + 'CheckBox22 + ' + Me.CheckBox22.AutoSize = True + Me.CheckBox22.Location = New System.Drawing.Point(539, 358) + Me.CheckBox22.Name = "CheckBox22" + Me.CheckBox22.Size = New System.Drawing.Size(104, 17) + Me.CheckBox22.TabIndex = 65 + Me.CheckBox22.Text = "Arresta il sistema" + Me.CheckBox22.UseVisualStyleBackColor = True + ' + 'Label43 + ' + Me.Label43.AutoSize = True + Me.Label43.Location = New System.Drawing.Point(536, 342) + Me.Label43.Name = "Label43" + Me.Label43.Size = New System.Drawing.Size(25, 13) + Me.Label43.TabIndex = 64 + Me.Label43.Text = "000" + Me.Label43.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'TabControl1 + ' + Me.TabControl1.Controls.Add(Me.TabPage5) + Me.TabControl1.Controls.Add(Me.TabPage3) + Me.TabControl1.Controls.Add(Me.TabPage2) + Me.TabControl1.Controls.Add(Me.TabPage1) + Me.TabControl1.Controls.Add(Me.TabPage4) + Me.TabControl1.Location = New System.Drawing.Point(12, 12) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(521, 377) + Me.TabControl1.TabIndex = 63 + ' + 'TabPage5 + ' + Me.TabPage5.Controls.Add(Me.GroupBox11) + Me.TabPage5.Controls.Add(Me.GroupBox3) + Me.TabPage5.Controls.Add(Me.GroupBox8) + Me.TabPage5.Controls.Add(Me.GroupBox7) + Me.TabPage5.Location = New System.Drawing.Point(4, 22) + Me.TabPage5.Name = "TabPage5" + Me.TabPage5.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage5.Size = New System.Drawing.Size(513, 351) + Me.TabPage5.TabIndex = 4 + Me.TabPage5.Text = "Generale" + Me.TabPage5.UseVisualStyleBackColor = True + ' + 'GroupBox11 + ' + Me.GroupBox11.Controls.Add(Me.Panel3) + Me.GroupBox11.Controls.Add(Me.Label8) + Me.GroupBox11.Controls.Add(Me.TextBox8) + Me.GroupBox11.Controls.Add(Me.Label7) + Me.GroupBox11.Controls.Add(Me.TextBox7) + Me.GroupBox11.Location = New System.Drawing.Point(7, 209) + Me.GroupBox11.Name = "GroupBox11" + Me.GroupBox11.Size = New System.Drawing.Size(191, 132) + Me.GroupBox11.TabIndex = 48 + Me.GroupBox11.TabStop = False + Me.GroupBox11.Text = "Avanzate (ATTENZIONE)" + ' + 'Panel3 + ' + Me.Panel3.Controls.Add(Me.rdbNuovoMetodo) + Me.Panel3.Controls.Add(Me.rdbVecchioMetodo) + Me.Panel3.Location = New System.Drawing.Point(7, 73) + Me.Panel3.Name = "Panel3" + Me.Panel3.Size = New System.Drawing.Size(178, 53) + Me.Panel3.TabIndex = 4 + ' + 'rdbNuovoMetodo + ' + Me.rdbNuovoMetodo.AutoSize = True + Me.rdbNuovoMetodo.Checked = True + Me.rdbNuovoMetodo.Location = New System.Drawing.Point(8, 28) + Me.rdbNuovoMetodo.Name = "rdbNuovoMetodo" + Me.rdbNuovoMetodo.Size = New System.Drawing.Size(95, 17) + Me.rdbNuovoMetodo.TabIndex = 1 + Me.rdbNuovoMetodo.TabStop = True + Me.rdbNuovoMetodo.Text = "Nuovo metodo" + Me.rdbNuovoMetodo.UseVisualStyleBackColor = True + ' + 'rdbVecchioMetodo + ' + Me.rdbVecchioMetodo.AutoSize = True + Me.rdbVecchioMetodo.Location = New System.Drawing.Point(8, 4) + Me.rdbVecchioMetodo.Name = "rdbVecchioMetodo" + Me.rdbVecchioMetodo.Size = New System.Drawing.Size(102, 17) + Me.rdbVecchioMetodo.TabIndex = 0 + Me.rdbVecchioMetodo.Text = "Vecchio metodo" + Me.rdbVecchioMetodo.UseVisualStyleBackColor = True + ' + 'Label8 + ' + Me.Label8.AutoSize = True + Me.Label8.Location = New System.Drawing.Point(64, 26) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(111, 13) + Me.Label8.TabIndex = 3 + Me.Label8.Text = "Chunk Size (0 = MAX)" + ' + 'TextBox8 + ' + Me.TextBox8.Location = New System.Drawing.Point(7, 20) + Me.TextBox8.Name = "TextBox8" + Me.TextBox8.Size = New System.Drawing.Size(47, 20) + Me.TextBox8.TabIndex = 2 + Me.TextBox8.Text = "0" + ' + 'Label7 + ' + Me.Label7.AutoSize = True + Me.Label7.Location = New System.Drawing.Point(61, 48) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(108, 13) + Me.Label7.TabIndex = 1 + Me.Label7.Text = "Threads (0 = CPU *2)" + ' + 'TextBox7 + ' + Me.TextBox7.Location = New System.Drawing.Point(7, 46) + Me.TextBox7.Name = "TextBox7" + Me.TextBox7.Size = New System.Drawing.Size(47, 20) + Me.TextBox7.TabIndex = 0 + Me.TextBox7.Text = "0" + ' + 'GroupBox3 + ' + Me.GroupBox3.Controls.Add(Me.chkAggiornaSottodirectory) + Me.GroupBox3.Controls.Add(Me.Button3) + Me.GroupBox3.Controls.Add(Me.Button2) + Me.GroupBox3.Controls.Add(Me.Label1) + Me.GroupBox3.Controls.Add(Me.Label2) + Me.GroupBox3.Controls.Add(Me.txtSorgente) + Me.GroupBox3.Controls.Add(Me.txtDestinazione) + Me.GroupBox3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox3.Location = New System.Drawing.Point(6, 6) + Me.GroupBox3.Name = "GroupBox3" + Me.GroupBox3.Size = New System.Drawing.Size(496, 101) + Me.GroupBox3.TabIndex = 35 + Me.GroupBox3.TabStop = False + Me.GroupBox3.Text = "Directory" + ' + 'chkAggiornaSottodirectory + ' + Me.chkAggiornaSottodirectory.ForeColor = System.Drawing.Color.Black + Me.chkAggiornaSottodirectory.Location = New System.Drawing.Point(80, 64) + Me.chkAggiornaSottodirectory.Name = "chkAggiornaSottodirectory" + Me.chkAggiornaSottodirectory.Size = New System.Drawing.Size(152, 24) + Me.chkAggiornaSottodirectory.TabIndex = 25 + Me.chkAggiornaSottodirectory.Text = "aggiorna le sottodirectory" + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(462, 40) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(24, 20) + Me.Button3.TabIndex = 6 + Me.Button3.Text = "..." + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(462, 16) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(24, 20) + Me.Button2.TabIndex = 5 + Me.Button2.Text = "..." + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.ForeColor = System.Drawing.Color.Black + Me.Label1.Location = New System.Drawing.Point(6, 19) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(50, 13) + Me.Label1.TabIndex = 3 + Me.Label1.Text = "Sorgente" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.ForeColor = System.Drawing.Color.Black + Me.Label2.Location = New System.Drawing.Point(6, 43) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(68, 13) + Me.Label2.TabIndex = 4 + Me.Label2.Text = "Destinazione" + ' + 'txtSorgente + ' + Me.txtSorgente.Location = New System.Drawing.Point(80, 16) + Me.txtSorgente.Name = "txtSorgente" + Me.txtSorgente.Size = New System.Drawing.Size(376, 20) + Me.txtSorgente.TabIndex = 0 + Me.txtSorgente.Text = "TextBox1" + ' + 'txtDestinazione + ' + Me.txtDestinazione.Location = New System.Drawing.Point(80, 40) + Me.txtDestinazione.Name = "txtDestinazione" + Me.txtDestinazione.Size = New System.Drawing.Size(376, 20) + Me.txtDestinazione.TabIndex = 1 + Me.txtDestinazione.Text = "TextBox2" + ' + 'GroupBox8 + ' + Me.GroupBox8.Controls.Add(Me.rdbNumFiles) + Me.GroupBox8.Controls.Add(Me.rdbNumProgressiva) + Me.GroupBox8.Controls.Add(Me.txtCifreContatore) + Me.GroupBox8.Controls.Add(Me.Label34) + Me.GroupBox8.Controls.Add(Me.txtSuffissoCartelle) + Me.GroupBox8.Controls.Add(Me.Label33) + Me.GroupBox8.Controls.Add(Me.Label31) + Me.GroupBox8.Controls.Add(Me.chkCreaSottocartelle) + Me.GroupBox8.Controls.Add(Me.txtFilePerCartella) + Me.GroupBox8.Controls.Add(Me.Label32) + Me.GroupBox8.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox8.Location = New System.Drawing.Point(204, 113) + Me.GroupBox8.Name = "GroupBox8" + Me.GroupBox8.Size = New System.Drawing.Size(192, 152) + Me.GroupBox8.TabIndex = 47 + Me.GroupBox8.TabStop = False + Me.GroupBox8.Text = "Sottocartelle" + ' + 'rdbNumFiles + ' + Me.rdbNumFiles.ForeColor = System.Drawing.Color.Black + Me.rdbNumFiles.Location = New System.Drawing.Point(32, 128) + Me.rdbNumFiles.Name = "rdbNumFiles" + Me.rdbNumFiles.Size = New System.Drawing.Size(136, 16) + Me.rdbNumFiles.TabIndex = 38 + Me.rdbNumFiles.Text = "Numerazione files" + ' + 'rdbNumProgressiva + ' + Me.rdbNumProgressiva.Checked = True + Me.rdbNumProgressiva.ForeColor = System.Drawing.Color.Black + Me.rdbNumProgressiva.Location = New System.Drawing.Point(32, 112) + Me.rdbNumProgressiva.Name = "rdbNumProgressiva" + Me.rdbNumProgressiva.Size = New System.Drawing.Size(152, 16) + Me.rdbNumProgressiva.TabIndex = 37 + Me.rdbNumProgressiva.TabStop = True + Me.rdbNumProgressiva.Text = "Numerazione progressiva" + ' + 'txtCifreContatore + ' + Me.txtCifreContatore.Location = New System.Drawing.Point(128, 88) + Me.txtCifreContatore.Name = "txtCifreContatore" + Me.txtCifreContatore.Size = New System.Drawing.Size(56, 20) + Me.txtCifreContatore.TabIndex = 34 + Me.txtCifreContatore.Text = "4" + ' + 'Label34 + ' + Me.Label34.ForeColor = System.Drawing.Color.Black + Me.Label34.Location = New System.Drawing.Point(8, 88) + Me.Label34.Name = "Label34" + Me.Label34.Size = New System.Drawing.Size(112, 16) + Me.Label34.TabIndex = 33 + Me.Label34.Text = "Num. cifre contatore" + Me.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'txtSuffissoCartelle + ' + Me.txtSuffissoCartelle.Location = New System.Drawing.Point(56, 64) + Me.txtSuffissoCartelle.Name = "txtSuffissoCartelle" + Me.txtSuffissoCartelle.Size = New System.Drawing.Size(128, 20) + Me.txtSuffissoCartelle.TabIndex = 32 + Me.txtSuffissoCartelle.Text = "TextBox20" + ' + 'Label33 + ' + Me.Label33.ForeColor = System.Drawing.Color.Black + Me.Label33.Location = New System.Drawing.Point(6, 67) + Me.Label33.Name = "Label33" + Me.Label33.Size = New System.Drawing.Size(48, 16) + Me.Label33.TabIndex = 31 + Me.Label33.Text = "Suffisso" + ' + 'Label31 + ' + Me.Label31.ForeColor = System.Drawing.Color.Black + Me.Label31.Location = New System.Drawing.Point(24, 40) + Me.Label31.Name = "Label31" + Me.Label31.Size = New System.Drawing.Size(32, 16) + Me.Label31.TabIndex = 30 + Me.Label31.Text = "ogni" + ' + 'chkCreaSottocartelle + ' + Me.chkCreaSottocartelle.ForeColor = System.Drawing.Color.Black + Me.chkCreaSottocartelle.Location = New System.Drawing.Point(56, 16) + Me.chkCreaSottocartelle.Name = "chkCreaSottocartelle" + Me.chkCreaSottocartelle.Size = New System.Drawing.Size(112, 16) + Me.chkCreaSottocartelle.TabIndex = 29 + Me.chkCreaSottocartelle.Text = "crea sottocartelle" + ' + 'txtFilePerCartella + ' + Me.txtFilePerCartella.Location = New System.Drawing.Point(56, 40) + Me.txtFilePerCartella.Name = "txtFilePerCartella" + Me.txtFilePerCartella.Size = New System.Drawing.Size(64, 20) + Me.txtFilePerCartella.TabIndex = 27 + Me.txtFilePerCartella.Text = "99" + ' + 'Label32 + ' + Me.Label32.ForeColor = System.Drawing.Color.Black + Me.Label32.Location = New System.Drawing.Point(128, 40) + Me.Label32.Name = "Label32" + Me.Label32.Size = New System.Drawing.Size(24, 16) + Me.Label32.TabIndex = 28 + Me.Label32.Text = "file" + ' + 'GroupBox7 + ' + Me.GroupBox7.Controls.Add(Me.chkSovrascriviFile) + Me.GroupBox7.Controls.Add(Me.chkRotazioneAutomatica) + Me.GroupBox7.Controls.Add(Me.chkForzaJpg) + Me.GroupBox7.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox7.Location = New System.Drawing.Point(6, 113) + Me.GroupBox7.Name = "GroupBox7" + Me.GroupBox7.Size = New System.Drawing.Size(192, 88) + Me.GroupBox7.TabIndex = 45 + Me.GroupBox7.TabStop = False + Me.GroupBox7.Text = "Generale" + ' + 'chkSovrascriviFile + ' + Me.chkSovrascriviFile.AutoSize = True + Me.chkSovrascriviFile.Location = New System.Drawing.Point(16, 61) + Me.chkSovrascriviFile.Name = "chkSovrascriviFile" + Me.chkSovrascriviFile.Size = New System.Drawing.Size(94, 17) + Me.chkSovrascriviFile.TabIndex = 2 + Me.chkSovrascriviFile.Text = "Sovrascrivi file" + Me.chkSovrascriviFile.UseVisualStyleBackColor = True + ' + 'chkRotazioneAutomatica + ' + Me.chkRotazioneAutomatica.ForeColor = System.Drawing.Color.Black + Me.chkRotazioneAutomatica.Location = New System.Drawing.Point(16, 39) + Me.chkRotazioneAutomatica.Name = "chkRotazioneAutomatica" + Me.chkRotazioneAutomatica.Size = New System.Drawing.Size(136, 16) + Me.chkRotazioneAutomatica.TabIndex = 1 + Me.chkRotazioneAutomatica.Text = "Rotazione automatica" + ' + 'chkForzaJpg + ' + Me.chkForzaJpg.Checked = True + Me.chkForzaJpg.CheckState = System.Windows.Forms.CheckState.Checked + Me.chkForzaJpg.ForeColor = System.Drawing.Color.Black + Me.chkForzaJpg.Location = New System.Drawing.Point(16, 18) + Me.chkForzaJpg.Name = "chkForzaJpg" + Me.chkForzaJpg.Size = New System.Drawing.Size(80, 16) + Me.chkForzaJpg.TabIndex = 0 + Me.chkForzaJpg.Text = "Forza Jpg" + ' + 'TabPage3 + ' + Me.TabPage3.Controls.Add(Me.CheckBox2) + Me.TabPage3.Controls.Add(Me.GroupBox10) + Me.TabPage3.Controls.Add(Me.GroupBox9) + Me.TabPage3.Controls.Add(Me.GroupBox5) + Me.TabPage3.Controls.Add(Me.GroupBox4) + Me.TabPage3.Location = New System.Drawing.Point(4, 22) + Me.TabPage3.Name = "TabPage3" + Me.TabPage3.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage3.Size = New System.Drawing.Size(513, 351) + Me.TabPage3.TabIndex = 2 + Me.TabPage3.Text = "Testo" + Me.TabPage3.UseVisualStyleBackColor = True + ' + 'CheckBox2 + ' + Me.CheckBox2.AutoSize = True + Me.CheckBox2.Location = New System.Drawing.Point(7, 8) + Me.CheckBox2.Name = "CheckBox2" + Me.CheckBox2.Size = New System.Drawing.Size(93, 17) + Me.CheckBox2.TabIndex = 40 + Me.CheckBox2.Text = "Aggiungi testo" + Me.CheckBox2.UseVisualStyleBackColor = True + ' + 'GroupBox10 + ' + Me.GroupBox10.Controls.Add(Me.Label42) + Me.GroupBox10.Controls.Add(Me.Label41) + Me.GroupBox10.Controls.Add(Me.TextBox31) + Me.GroupBox10.Controls.Add(Me.TextBox30) + Me.GroupBox10.Location = New System.Drawing.Point(316, 78) + Me.GroupBox10.Name = "GroupBox10" + Me.GroupBox10.Size = New System.Drawing.Size(186, 73) + Me.GroupBox10.TabIndex = 39 + Me.GroupBox10.TabStop = False + Me.GroupBox10.Text = "Testo foto verticali" + ' + 'Label42 + ' + Me.Label42.AutoSize = True + Me.Label42.Location = New System.Drawing.Point(7, 46) + Me.Label42.Name = "Label42" + Me.Label42.Size = New System.Drawing.Size(45, 13) + Me.Label42.TabIndex = 3 + Me.Label42.Text = "Margine" + ' + 'Label41 + ' + Me.Label41.AutoSize = True + Me.Label41.Location = New System.Drawing.Point(7, 25) + Me.Label41.Name = "Label41" + Me.Label41.Size = New System.Drawing.Size(108, 13) + Me.Label41.TabIndex = 2 + Me.Label41.Text = "Dimensione Carattere" + ' + 'TextBox31 + ' + Me.TextBox31.Location = New System.Drawing.Point(131, 46) + Me.TextBox31.Name = "TextBox31" + Me.TextBox31.Size = New System.Drawing.Size(39, 20) + Me.TextBox31.TabIndex = 1 + ' + 'TextBox30 + ' + Me.TextBox30.Location = New System.Drawing.Point(131, 22) + Me.TextBox30.Name = "TextBox30" + Me.TextBox30.Size = New System.Drawing.Size(39, 20) + Me.TextBox30.TabIndex = 0 + ' + 'GroupBox9 + ' + Me.GroupBox9.Controls.Add(Me.CheckBox17) + Me.GroupBox9.Controls.Add(Me.CheckBox16) + Me.GroupBox9.Location = New System.Drawing.Point(316, 31) + Me.GroupBox9.Name = "GroupBox9" + Me.GroupBox9.Size = New System.Drawing.Size(186, 45) + Me.GroupBox9.TabIndex = 38 + Me.GroupBox9.TabStop = False + Me.GroupBox9.Text = "Slide show" + ' + 'CheckBox17 + ' + Me.CheckBox17.AutoSize = True + Me.CheckBox17.Location = New System.Drawing.Point(96, 18) + Me.CheckBox17.Name = "CheckBox17" + Me.CheckBox17.Size = New System.Drawing.Size(84, 17) + Me.CheckBox17.TabIndex = 1 + Me.CheckBox17.Text = "Numero foto" + Me.CheckBox17.UseVisualStyleBackColor = True + ' + 'CheckBox16 + ' + Me.CheckBox16.AutoSize = True + Me.CheckBox16.Location = New System.Drawing.Point(6, 19) + Me.CheckBox16.Name = "CheckBox16" + Me.CheckBox16.Size = New System.Drawing.Size(49, 17) + Me.CheckBox16.TabIndex = 0 + Me.CheckBox16.Text = "Data" + Me.CheckBox16.UseVisualStyleBackColor = True + ' + 'GroupBox5 + ' + Me.GroupBox5.Controls.Add(Me.TextBox34) + Me.GroupBox5.Controls.Add(Me.Button8) + Me.GroupBox5.Controls.Add(Me.Label36) + Me.GroupBox5.Controls.Add(Me.TextBox25) + Me.GroupBox5.Controls.Add(Me.Label35) + Me.GroupBox5.Controls.Add(Me.ComboBox3) + Me.GroupBox5.Controls.Add(Me.TextBox11) + Me.GroupBox5.Controls.Add(Me.Label12) + Me.GroupBox5.Controls.Add(Me.Label11) + Me.GroupBox5.Controls.Add(Me.CheckBox3) + Me.GroupBox5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox5.Location = New System.Drawing.Point(6, 31) + Me.GroupBox5.Name = "GroupBox5" + Me.GroupBox5.Size = New System.Drawing.Size(304, 120) + Me.GroupBox5.TabIndex = 37 + Me.GroupBox5.TabStop = False + Me.GroupBox5.Text = "Carattere" + ' + 'TextBox34 + ' + Me.TextBox34.Location = New System.Drawing.Point(160, 91) + Me.TextBox34.Name = "TextBox34" + Me.TextBox34.Size = New System.Drawing.Size(56, 20) + Me.TextBox34.TabIndex = 36 + Me.TextBox34.TextAlign = System.Windows.Forms.HorizontalAlignment.Right + ' + 'Button8 + ' + Me.Button8.ForeColor = System.Drawing.Color.Black + Me.Button8.Location = New System.Drawing.Point(222, 89) + Me.Button8.Name = "Button8" + Me.Button8.Size = New System.Drawing.Size(74, 24) + Me.Button8.TabIndex = 35 + Me.Button8.Text = "Scegli..." + ' + 'Label36 + ' + Me.Label36.ForeColor = System.Drawing.Color.Black + Me.Label36.Location = New System.Drawing.Point(8, 60) + Me.Label36.Name = "Label36" + Me.Label36.Size = New System.Drawing.Size(120, 19) + Me.Label36.TabIndex = 34 + Me.Label36.Text = "Dimensione miniatura" + Me.Label36.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'TextBox25 + ' + Me.TextBox25.Location = New System.Drawing.Point(160, 59) + Me.TextBox25.Name = "TextBox25" + Me.TextBox25.Size = New System.Drawing.Size(56, 20) + Me.TextBox25.TabIndex = 33 + Me.TextBox25.Text = "TextBox25" + ' + 'Label35 + ' + Me.Label35.ForeColor = System.Drawing.Color.Black + Me.Label35.Location = New System.Drawing.Point(8, 93) + Me.Label35.Name = "Label35" + Me.Label35.Size = New System.Drawing.Size(72, 16) + Me.Label35.TabIndex = 32 + Me.Label35.Text = "Colore RGB" + Me.Label35.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'ComboBox3 + ' + Me.ComboBox3.Location = New System.Drawing.Point(96, 8) + Me.ComboBox3.Name = "ComboBox3" + Me.ComboBox3.Size = New System.Drawing.Size(120, 21) + Me.ComboBox3.TabIndex = 28 + Me.ComboBox3.Text = "ComboBox3" + ' + 'TextBox11 + ' + Me.TextBox11.Location = New System.Drawing.Point(160, 35) + Me.TextBox11.Name = "TextBox11" + Me.TextBox11.Size = New System.Drawing.Size(56, 20) + Me.TextBox11.TabIndex = 27 + Me.TextBox11.Text = "TextBox11" + ' + 'Label12 + ' + Me.Label12.AutoSize = True + Me.Label12.ForeColor = System.Drawing.Color.Black + Me.Label12.Location = New System.Drawing.Point(8, 38) + Me.Label12.Name = "Label12" + Me.Label12.Size = New System.Drawing.Size(62, 13) + Me.Label12.TabIndex = 26 + Me.Label12.Text = "Dimensione" + Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label11 + ' + Me.Label11.AutoSize = True + Me.Label11.ForeColor = System.Drawing.Color.Black + Me.Label11.Location = New System.Drawing.Point(56, 8) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(28, 13) + Me.Label11.TabIndex = 22 + Me.Label11.Text = "Font" + ' + 'CheckBox3 + ' + Me.CheckBox3.ForeColor = System.Drawing.Color.Black + Me.CheckBox3.Location = New System.Drawing.Point(224, 8) + Me.CheckBox3.Name = "CheckBox3" + Me.CheckBox3.Size = New System.Drawing.Size(72, 24) + Me.CheckBox3.TabIndex = 24 + Me.CheckBox3.Text = "Grassetto" + ' + 'GroupBox4 + ' + Me.GroupBox4.Controls.Add(Me.Label40) + Me.GroupBox4.Controls.Add(Me.TextBox29) + Me.GroupBox4.Controls.Add(Me.TextBox18) + Me.GroupBox4.Controls.Add(Me.Label26) + Me.GroupBox4.Controls.Add(Me.DateTimePicker1) + Me.GroupBox4.Controls.Add(Me.CheckBox8) + Me.GroupBox4.Controls.Add(Me.TextBox9) + Me.GroupBox4.Controls.Add(Me.CheckBox7) + Me.GroupBox4.Controls.Add(Me.Label4) + Me.GroupBox4.Controls.Add(Me.TextBox4) + Me.GroupBox4.Controls.Add(Me.Label9) + Me.GroupBox4.Controls.Add(Me.Label13) + Me.GroupBox4.Controls.Add(Me.ComboBox1) + Me.GroupBox4.Controls.Add(Me.ComboBox2) + Me.GroupBox4.Controls.Add(Me.Label14) + Me.GroupBox4.Controls.Add(Me.TextBox12) + Me.GroupBox4.Controls.Add(Me.Label15) + Me.GroupBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox4.Location = New System.Drawing.Point(6, 157) + Me.GroupBox4.Name = "GroupBox4" + Me.GroupBox4.Size = New System.Drawing.Size(496, 186) + Me.GroupBox4.TabIndex = 36 + Me.GroupBox4.TabStop = False + Me.GroupBox4.Text = "Testo da applicare" + ' + 'Label40 + ' + Me.Label40.AutoSize = True + Me.Label40.Location = New System.Drawing.Point(8, 52) + Me.Label40.Name = "Label40" + Me.Label40.Size = New System.Drawing.Size(48, 13) + Me.Label40.TabIndex = 40 + Me.Label40.Text = "Verticale" + ' + 'TextBox29 + ' + Me.TextBox29.Location = New System.Drawing.Point(72, 49) + Me.TextBox29.Multiline = True + Me.TextBox29.Name = "TextBox29" + Me.TextBox29.Size = New System.Drawing.Size(408, 44) + Me.TextBox29.TabIndex = 39 + ' + 'TextBox18 + ' + Me.TextBox18.Location = New System.Drawing.Point(232, 156) + Me.TextBox18.Name = "TextBox18" + Me.TextBox18.Size = New System.Drawing.Size(100, 20) + Me.TextBox18.TabIndex = 38 + ' + 'Label26 + ' + Me.Label26.AutoSize = True + Me.Label26.ForeColor = System.Drawing.Color.Black + Me.Label26.Location = New System.Drawing.Point(344, 156) + Me.Label26.Name = "Label26" + Me.Label26.Size = New System.Drawing.Size(48, 13) + Me.Label26.TabIndex = 37 + Me.Label26.Text = "partenza" + ' + 'DateTimePicker1 + ' + Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Time + Me.DateTimePicker1.Location = New System.Drawing.Point(392, 156) + Me.DateTimePicker1.Name = "DateTimePicker1" + Me.DateTimePicker1.Size = New System.Drawing.Size(88, 20) + Me.DateTimePicker1.TabIndex = 36 + ' + 'CheckBox8 + ' + Me.CheckBox8.ForeColor = System.Drawing.Color.Black + Me.CheckBox8.Location = New System.Drawing.Point(72, 156) + Me.CheckBox8.Name = "CheckBox8" + Me.CheckBox8.Size = New System.Drawing.Size(56, 16) + Me.CheckBox8.TabIndex = 35 + Me.CheckBox8.Text = "Orario" + ' + 'TextBox9 + ' + Me.TextBox9.Location = New System.Drawing.Point(120, 108) + Me.TextBox9.Name = "TextBox9" + Me.TextBox9.Size = New System.Drawing.Size(56, 20) + Me.TextBox9.TabIndex = 20 + Me.TextBox9.Text = "TextBox9" + ' + 'CheckBox7 + ' + Me.CheckBox7.ForeColor = System.Drawing.Color.Black + Me.CheckBox7.Location = New System.Drawing.Point(136, 156) + Me.CheckBox7.Name = "CheckBox7" + Me.CheckBox7.Size = New System.Drawing.Size(88, 16) + Me.CheckBox7.TabIndex = 34 + Me.CheckBox7.Text = "Tempo gara" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.ForeColor = System.Drawing.Color.Black + Me.Label4.Location = New System.Drawing.Point(8, 24) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(59, 13) + Me.Label4.TabIndex = 9 + Me.Label4.Text = "Orizzontale" + ' + 'TextBox4 + ' + Me.TextBox4.Location = New System.Drawing.Point(72, 24) + Me.TextBox4.Name = "TextBox4" + Me.TextBox4.Size = New System.Drawing.Size(408, 20) + Me.TextBox4.TabIndex = 8 + Me.TextBox4.Text = "TextBox4" + ' + 'Label9 + ' + Me.Label9.AutoSize = True + Me.Label9.ForeColor = System.Drawing.Color.Black + Me.Label9.Location = New System.Drawing.Point(8, 108) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(110, 13) + Me.Label9.TabIndex = 19 + Me.Label9.Text = "Trasparenza (0-100%)" + ' + 'Label13 + ' + Me.Label13.AutoSize = True + Me.Label13.ForeColor = System.Drawing.Color.Black + Me.Label13.Location = New System.Drawing.Point(16, 132) + Me.Label13.Name = "Label13" + Me.Label13.Size = New System.Drawing.Size(52, 13) + Me.Label13.TabIndex = 29 + Me.Label13.Text = "Posizione" + ' + 'ComboBox1 + ' + Me.ComboBox1.Location = New System.Drawing.Point(72, 132) + Me.ComboBox1.Name = "ComboBox1" + Me.ComboBox1.Size = New System.Drawing.Size(104, 21) + Me.ComboBox1.TabIndex = 28 + Me.ComboBox1.Text = "ComboBox1" + ' + 'ComboBox2 + ' + Me.ComboBox2.Location = New System.Drawing.Point(376, 132) + Me.ComboBox2.Name = "ComboBox2" + Me.ComboBox2.Size = New System.Drawing.Size(104, 21) + Me.ComboBox2.TabIndex = 31 + Me.ComboBox2.Text = "ComboBox2" + ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.ForeColor = System.Drawing.Color.Black + Me.Label14.Location = New System.Drawing.Point(304, 132) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(67, 13) + Me.Label14.TabIndex = 30 + Me.Label14.Text = "Allineamento" + ' + 'TextBox12 + ' + Me.TextBox12.Location = New System.Drawing.Point(376, 108) + Me.TextBox12.Name = "TextBox12" + Me.TextBox12.Size = New System.Drawing.Size(104, 20) + Me.TextBox12.TabIndex = 33 + Me.TextBox12.Text = "TextBox12" + ' + 'Label15 + ' + Me.Label15.AutoSize = True + Me.Label15.ForeColor = System.Drawing.Color.Black + Me.Label15.Location = New System.Drawing.Point(296, 108) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(75, 13) + Me.Label15.TabIndex = 32 + Me.Label15.Text = "Margine (pixel)" + ' + 'TabPage2 + ' + Me.TabPage2.Controls.Add(Me.GroupBox2) + Me.TabPage2.Location = New System.Drawing.Point(4, 22) + Me.TabPage2.Name = "TabPage2" + Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage2.Size = New System.Drawing.Size(513, 351) + Me.TabPage2.TabIndex = 5 + Me.TabPage2.Text = "Foto" + Me.TabPage2.UseVisualStyleBackColor = True + ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.Label45) + Me.GroupBox2.Controls.Add(Me.TextBox32) + Me.GroupBox2.Controls.Add(Me.TextBox26) + Me.GroupBox2.Controls.Add(Me.Label37) + Me.GroupBox2.Controls.Add(Me.Label38) + Me.GroupBox2.Controls.Add(Me.TextBox27) + Me.GroupBox2.Controls.Add(Me.Label39) + Me.GroupBox2.Controls.Add(Me.TextBox28) + Me.GroupBox2.Controls.Add(Me.CheckBox15) + Me.GroupBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox2.Location = New System.Drawing.Point(3, 6) + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.Size = New System.Drawing.Size(304, 156) + Me.GroupBox2.TabIndex = 36 + Me.GroupBox2.TabStop = False + Me.GroupBox2.Text = "Foto grande" + ' + 'Label45 + ' + Me.Label45.AutoSize = True + Me.Label45.Location = New System.Drawing.Point(11, 86) + Me.Label45.Name = "Label45" + Me.Label45.Size = New System.Drawing.Size(40, 13) + Me.Label45.TabIndex = 22 + Me.Label45.Text = "Qualità" + ' + 'TextBox32 + ' + Me.TextBox32.Location = New System.Drawing.Point(72, 80) + Me.TextBox32.Name = "TextBox32" + Me.TextBox32.Size = New System.Drawing.Size(72, 20) + Me.TextBox32.TabIndex = 21 + Me.TextBox32.Text = "100" + ' + 'TextBox26 + ' + Me.TextBox26.Location = New System.Drawing.Point(224, 48) + Me.TextBox26.Name = "TextBox26" + Me.TextBox26.Size = New System.Drawing.Size(56, 20) + Me.TextBox26.TabIndex = 20 + Me.TextBox26.Text = "TextBox26" + ' + 'Label37 + ' + Me.Label37.ForeColor = System.Drawing.Color.Black + Me.Label37.Location = New System.Drawing.Point(168, 48) + Me.Label37.Name = "Label37" + Me.Label37.Size = New System.Drawing.Size(48, 16) + Me.Label37.TabIndex = 19 + Me.Label37.Text = "Suffisso" + Me.Label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'Label38 + ' + Me.Label38.AutoSize = True + Me.Label38.ForeColor = System.Drawing.Color.Black + Me.Label38.Location = New System.Drawing.Point(24, 24) + Me.Label38.Name = "Label38" + Me.Label38.Size = New System.Drawing.Size(41, 13) + Me.Label38.TabIndex = 16 + Me.Label38.Text = "Altezza" + ' + 'TextBox27 + ' + Me.TextBox27.Location = New System.Drawing.Point(72, 24) + Me.TextBox27.Name = "TextBox27" + Me.TextBox27.Size = New System.Drawing.Size(72, 20) + Me.TextBox27.TabIndex = 14 + Me.TextBox27.Text = "TextBox27" + ' + 'Label39 + ' + Me.Label39.AutoSize = True + Me.Label39.ForeColor = System.Drawing.Color.Black + Me.Label39.Location = New System.Drawing.Point(8, 48) + Me.Label39.Name = "Label39" + Me.Label39.Size = New System.Drawing.Size(56, 13) + Me.Label39.TabIndex = 17 + Me.Label39.Text = "Larghezza" + ' + 'TextBox28 + ' + Me.TextBox28.Location = New System.Drawing.Point(72, 48) + Me.TextBox28.Name = "TextBox28" + Me.TextBox28.Size = New System.Drawing.Size(72, 20) + Me.TextBox28.TabIndex = 15 + Me.TextBox28.Text = "TextBox28" + ' + 'CheckBox15 + ' + Me.CheckBox15.Checked = True + Me.CheckBox15.CheckState = System.Windows.Forms.CheckState.Checked + Me.CheckBox15.ForeColor = System.Drawing.Color.Black + Me.CheckBox15.Location = New System.Drawing.Point(168, 16) + Me.CheckBox15.Name = "CheckBox15" + Me.CheckBox15.Size = New System.Drawing.Size(120, 32) + Me.CheckBox15.TabIndex = 18 + Me.CheckBox15.Text = "Mantieni dimensioni originali" + ' + 'TabPage1 + ' + Me.TabPage1.Controls.Add(Me.Panel1) + Me.TabPage1.Controls.Add(Me.GroupBox1) + Me.TabPage1.Location = New System.Drawing.Point(4, 22) + Me.TabPage1.Name = "TabPage1" + Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage1.Size = New System.Drawing.Size(513, 351) + Me.TabPage1.TabIndex = 0 + Me.TabPage1.Text = "Miniature" + Me.TabPage1.UseVisualStyleBackColor = True + ' + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.CheckBox18) + Me.Panel1.Controls.Add(Me.CheckBox4) + Me.Panel1.Controls.Add(Me.CheckBox12) + Me.Panel1.Location = New System.Drawing.Point(52, 236) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(304, 73) + Me.Panel1.TabIndex = 26 + Me.Panel1.Visible = False + ' + 'CheckBox18 + ' + Me.CheckBox18.AutoSize = True + Me.CheckBox18.Location = New System.Drawing.Point(140, 3) + Me.CheckBox18.Name = "CheckBox18" + Me.CheckBox18.Size = New System.Drawing.Size(84, 17) + Me.CheckBox18.TabIndex = 36 + Me.CheckBox18.Text = "Numero foto" + Me.CheckBox18.UseVisualStyleBackColor = True + ' + 'CheckBox4 + ' + Me.CheckBox4.ForeColor = System.Drawing.Color.Black + Me.CheckBox4.Location = New System.Drawing.Point(10, 3) + Me.CheckBox4.Name = "CheckBox4" + Me.CheckBox4.Size = New System.Drawing.Size(104, 17) + Me.CheckBox4.TabIndex = 34 + Me.CheckBox4.Text = "Aggiungi scritta" + ' + 'CheckBox12 + ' + Me.CheckBox12.ForeColor = System.Drawing.Color.Black + Me.CheckBox12.Location = New System.Drawing.Point(10, 19) + Me.CheckBox12.Name = "CheckBox12" + Me.CheckBox12.Size = New System.Drawing.Size(104, 21) + Me.CheckBox12.TabIndex = 35 + Me.CheckBox12.Text = "Aggiungi orario" + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.Label46) + Me.GroupBox1.Controls.Add(Me.TextBox33) + Me.GroupBox1.Controls.Add(Me.Panel2) + Me.GroupBox1.Controls.Add(Me.Label5) + Me.GroupBox1.Controls.Add(Me.TextBox5) + Me.GroupBox1.Controls.Add(Me.Label6) + Me.GroupBox1.Controls.Add(Me.TextBox6) + Me.GroupBox1.Controls.Add(Me.Label3) + Me.GroupBox1.Controls.Add(Me.TextBox3) + Me.GroupBox1.Controls.Add(Me.CheckBox1) + Me.GroupBox1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox1.Location = New System.Drawing.Point(6, 5) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(350, 210) + Me.GroupBox1.TabIndex = 25 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Miniature" + ' + 'Label46 + ' + Me.Label46.AutoSize = True + Me.Label46.Location = New System.Drawing.Point(198, 43) + Me.Label46.Name = "Label46" + Me.Label46.Size = New System.Drawing.Size(40, 13) + Me.Label46.TabIndex = 21 + Me.Label46.Text = "Qualità" + ' + 'TextBox33 + ' + Me.TextBox33.Location = New System.Drawing.Point(244, 40) + Me.TextBox33.Name = "TextBox33" + Me.TextBox33.Size = New System.Drawing.Size(100, 20) + Me.TextBox33.TabIndex = 20 + ' + 'Panel2 + ' + Me.Panel2.Controls.Add(Me.RadioButton3) + Me.Panel2.Controls.Add(Me.RadioButton7) + Me.Panel2.Controls.Add(Me.RadioButton4) + Me.Panel2.Controls.Add(Me.RadioButton6) + Me.Panel2.Controls.Add(Me.RadioButton5) + Me.Panel2.Location = New System.Drawing.Point(56, 114) + Me.Panel2.Name = "Panel2" + Me.Panel2.Size = New System.Drawing.Size(235, 90) + Me.Panel2.TabIndex = 19 + ' + 'RadioButton3 + ' + Me.RadioButton3.AutoSize = True + Me.RadioButton3.Location = New System.Drawing.Point(15, 16) + Me.RadioButton3.Name = "RadioButton3" + Me.RadioButton3.Size = New System.Drawing.Size(99, 17) + Me.RadioButton3.TabIndex = 14 + Me.RadioButton3.TabStop = True + Me.RadioButton3.Text = "Aggiungi Scritta" + Me.RadioButton3.UseVisualStyleBackColor = True + ' + 'RadioButton7 + ' + Me.RadioButton7.AutoSize = True + Me.RadioButton7.Location = New System.Drawing.Point(129, 40) + Me.RadioButton7.Name = "RadioButton7" + Me.RadioButton7.Size = New System.Drawing.Size(95, 17) + Me.RadioButton7.TabIndex = 18 + Me.RadioButton7.TabStop = True + Me.RadioButton7.Text = "numero+tempo" + Me.RadioButton7.UseVisualStyleBackColor = True + ' + 'RadioButton4 + ' + Me.RadioButton4.AutoSize = True + Me.RadioButton4.Location = New System.Drawing.Point(15, 40) + Me.RadioButton4.Name = "RadioButton4" + Me.RadioButton4.Size = New System.Drawing.Size(95, 17) + Me.RadioButton4.TabIndex = 15 + Me.RadioButton4.TabStop = True + Me.RadioButton4.Text = "Aggiungi orario" + Me.RadioButton4.UseVisualStyleBackColor = True + ' + 'RadioButton6 + ' + Me.RadioButton6.AutoSize = True + Me.RadioButton6.Location = New System.Drawing.Point(129, 16) + Me.RadioButton6.Name = "RadioButton6" + Me.RadioButton6.Size = New System.Drawing.Size(83, 17) + Me.RadioButton6.TabIndex = 17 + Me.RadioButton6.TabStop = True + Me.RadioButton6.Text = "Numero foto" + Me.RadioButton6.UseVisualStyleBackColor = True + ' + 'RadioButton5 + ' + Me.RadioButton5.AutoSize = True + Me.RadioButton5.Location = New System.Drawing.Point(15, 65) + Me.RadioButton5.Name = "RadioButton5" + Me.RadioButton5.Size = New System.Drawing.Size(84, 17) + Me.RadioButton5.TabIndex = 16 + Me.RadioButton5.TabStop = True + Me.RadioButton5.Text = "Tempo Gara" + Me.RadioButton5.UseVisualStyleBackColor = True + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.ForeColor = System.Drawing.Color.Black + Me.Label5.Location = New System.Drawing.Point(24, 88) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(41, 13) + Me.Label5.TabIndex = 12 + Me.Label5.Text = "Altezza" + ' + 'TextBox5 + ' + Me.TextBox5.Location = New System.Drawing.Point(72, 64) + Me.TextBox5.Name = "TextBox5" + Me.TextBox5.Size = New System.Drawing.Size(88, 20) + Me.TextBox5.TabIndex = 10 + Me.TextBox5.Text = "TextBox5" + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.ForeColor = System.Drawing.Color.Black + Me.Label6.Location = New System.Drawing.Point(8, 64) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(56, 13) + Me.Label6.TabIndex = 13 + Me.Label6.Text = "Larghezza" + ' + 'TextBox6 + ' + Me.TextBox6.Location = New System.Drawing.Point(72, 88) + Me.TextBox6.Name = "TextBox6" + Me.TextBox6.Size = New System.Drawing.Size(88, 20) + Me.TextBox6.TabIndex = 11 + Me.TextBox6.Text = "TextBox6" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.ForeColor = System.Drawing.Color.Black + Me.Label3.Location = New System.Drawing.Point(24, 40) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(44, 13) + Me.Label3.TabIndex = 7 + Me.Label3.Text = "Suffisso" + ' + 'TextBox3 + ' + Me.TextBox3.Location = New System.Drawing.Point(72, 40) + Me.TextBox3.Name = "TextBox3" + Me.TextBox3.Size = New System.Drawing.Size(88, 20) + Me.TextBox3.TabIndex = 6 + Me.TextBox3.Text = "TextBox3" + ' + 'CheckBox1 + ' + Me.CheckBox1.ForeColor = System.Drawing.Color.Black + Me.CheckBox1.Location = New System.Drawing.Point(72, 16) + Me.CheckBox1.Name = "CheckBox1" + Me.CheckBox1.Size = New System.Drawing.Size(104, 24) + Me.CheckBox1.TabIndex = 5 + Me.CheckBox1.Text = "Crea miniature" + ' + 'TabPage4 + ' + Me.TabPage4.Controls.Add(Me.GroupBox6) + Me.TabPage4.Location = New System.Drawing.Point(4, 22) + Me.TabPage4.Name = "TabPage4" + Me.TabPage4.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage4.Size = New System.Drawing.Size(513, 351) + Me.TabPage4.TabIndex = 3 + Me.TabPage4.Text = "Logo" + Me.TabPage4.UseVisualStyleBackColor = True + ' + 'GroupBox6 + ' + Me.GroupBox6.Controls.Add(Me.PictureBox2) + Me.GroupBox6.Controls.Add(Me.PictureBox1) + Me.GroupBox6.Controls.Add(Me.ComboBox5) + Me.GroupBox6.Controls.Add(Me.ComboBox4) + Me.GroupBox6.Controls.Add(Me.TextBox19) + Me.GroupBox6.Controls.Add(Me.Label28) + Me.GroupBox6.Controls.Add(Me.CheckBox5) + Me.GroupBox6.Controls.Add(Me.TextBox15) + Me.GroupBox6.Controls.Add(Me.TextBox14) + Me.GroupBox6.Controls.Add(Me.Label25) + Me.GroupBox6.Controls.Add(Me.TextBox16) + Me.GroupBox6.Controls.Add(Me.Label24) + Me.GroupBox6.Controls.Add(Me.Label22) + Me.GroupBox6.Controls.Add(Me.Label23) + Me.GroupBox6.Controls.Add(Me.Button4) + Me.GroupBox6.Controls.Add(Me.TextBox10) + Me.GroupBox6.Controls.Add(Me.Label29) + Me.GroupBox6.Controls.Add(Me.Label30) + Me.GroupBox6.Controls.Add(Me.PictureBox3) + Me.GroupBox6.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer)) + Me.GroupBox6.Location = New System.Drawing.Point(6, 6) + Me.GroupBox6.Name = "GroupBox6" + Me.GroupBox6.Size = New System.Drawing.Size(496, 224) + Me.GroupBox6.TabIndex = 42 + Me.GroupBox6.TabStop = False + Me.GroupBox6.Text = "Logo" + ' + 'PictureBox2 + ' + Me.PictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PictureBox2.Location = New System.Drawing.Point(144, 192) + Me.PictureBox2.Name = "PictureBox2" + Me.PictureBox2.Size = New System.Drawing.Size(24, 24) + Me.PictureBox2.TabIndex = 44 + Me.PictureBox2.TabStop = False + Me.PictureBox2.Visible = False + ' + 'PictureBox1 + ' + Me.PictureBox1.Cursor = System.Windows.Forms.Cursors.Cross + Me.PictureBox1.Location = New System.Drawing.Point(256, 56) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(224, 160) + Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.PictureBox1.TabIndex = 43 + Me.PictureBox1.TabStop = False + ' + 'ComboBox5 + ' + Me.ComboBox5.Location = New System.Drawing.Point(144, 168) + Me.ComboBox5.Name = "ComboBox5" + Me.ComboBox5.Size = New System.Drawing.Size(96, 21) + Me.ComboBox5.TabIndex = 42 + Me.ComboBox5.Text = "ComboBox5" + ' + 'ComboBox4 + ' + Me.ComboBox4.Location = New System.Drawing.Point(144, 144) + Me.ComboBox4.Name = "ComboBox4" + Me.ComboBox4.Size = New System.Drawing.Size(96, 21) + Me.ComboBox4.TabIndex = 41 + Me.ComboBox4.Text = "ComboBox4" + ' + 'TextBox19 + ' + Me.TextBox19.Location = New System.Drawing.Point(144, 96) + Me.TextBox19.Name = "TextBox19" + Me.TextBox19.Size = New System.Drawing.Size(96, 20) + Me.TextBox19.TabIndex = 40 + Me.TextBox19.Text = "TextBox19" + ' + 'Label28 + ' + Me.Label28.ForeColor = System.Drawing.Color.Black + Me.Label28.Location = New System.Drawing.Point(17, 97) + Me.Label28.Name = "Label28" + Me.Label28.Size = New System.Drawing.Size(120, 16) + Me.Label28.TabIndex = 39 + Me.Label28.Text = "Trasparenza (0-100%)" + Me.Label28.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'CheckBox5 + ' + Me.CheckBox5.ForeColor = System.Drawing.Color.Black + Me.CheckBox5.Location = New System.Drawing.Point(0, 26) + Me.CheckBox5.Name = "CheckBox5" + Me.CheckBox5.Size = New System.Drawing.Size(72, 20) + Me.CheckBox5.TabIndex = 38 + Me.CheckBox5.Text = "Aggiungi" + ' + 'TextBox15 + ' + Me.TextBox15.Location = New System.Drawing.Point(144, 72) + Me.TextBox15.Name = "TextBox15" + Me.TextBox15.Size = New System.Drawing.Size(96, 20) + Me.TextBox15.TabIndex = 19 + Me.TextBox15.Text = "TextBox15" + ' + 'TextBox14 + ' + Me.TextBox14.Location = New System.Drawing.Point(144, 48) + Me.TextBox14.Name = "TextBox14" + Me.TextBox14.Size = New System.Drawing.Size(96, 20) + Me.TextBox14.TabIndex = 18 + Me.TextBox14.Text = "TextBox14" + ' + 'Label25 + ' + Me.Label25.AutoSize = True + Me.Label25.ForeColor = System.Drawing.Color.Black + Me.Label25.Location = New System.Drawing.Point(17, 168) + Me.Label25.Name = "Label25" + Me.Label25.Size = New System.Drawing.Size(95, 13) + Me.Label25.TabIndex = 36 + Me.Label25.Text = "Posizione verticale" + Me.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'TextBox16 + ' + Me.TextBox16.Location = New System.Drawing.Point(144, 120) + Me.TextBox16.Name = "TextBox16" + Me.TextBox16.Size = New System.Drawing.Size(96, 20) + Me.TextBox16.TabIndex = 35 + Me.TextBox16.Text = "TextBox16" + ' + 'Label24 + ' + Me.Label24.AutoSize = True + Me.Label24.ForeColor = System.Drawing.Color.Black + Me.Label24.Location = New System.Drawing.Point(19, 123) + Me.Label24.Name = "Label24" + Me.Label24.Size = New System.Drawing.Size(88, 13) + Me.Label24.TabIndex = 34 + Me.Label24.Text = "Margine (pixel/%)" + Me.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label22 + ' + Me.Label22.AutoSize = True + Me.Label22.ForeColor = System.Drawing.Color.Black + Me.Label22.Location = New System.Drawing.Point(19, 51) + Me.Label22.Name = "Label22" + Me.Label22.Size = New System.Drawing.Size(41, 13) + Me.Label22.TabIndex = 20 + Me.Label22.Text = "Altezza" + Me.Label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label23 + ' + Me.Label23.AutoSize = True + Me.Label23.ForeColor = System.Drawing.Color.Black + Me.Label23.Location = New System.Drawing.Point(19, 75) + Me.Label23.Name = "Label23" + Me.Label23.Size = New System.Drawing.Size(56, 13) + Me.Label23.TabIndex = 21 + Me.Label23.Text = "Larghezza" + Me.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Button4 + ' + Me.Button4.Location = New System.Drawing.Point(464, 24) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(24, 20) + Me.Button4.TabIndex = 8 + Me.Button4.Text = "..." + ' + 'TextBox10 + ' + Me.TextBox10.Location = New System.Drawing.Point(144, 24) + Me.TextBox10.Name = "TextBox10" + Me.TextBox10.Size = New System.Drawing.Size(312, 20) + Me.TextBox10.TabIndex = 6 + Me.TextBox10.Text = "TextBox10" + ' + 'Label29 + ' + Me.Label29.AutoSize = True + Me.Label29.ForeColor = System.Drawing.Color.Black + Me.Label29.Location = New System.Drawing.Point(17, 147) + Me.Label29.Name = "Label29" + Me.Label29.Size = New System.Drawing.Size(105, 13) + Me.Label29.TabIndex = 36 + Me.Label29.Text = "Posizione orizzontale" + Me.Label29.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'Label30 + ' + Me.Label30.AutoSize = True + Me.Label30.ForeColor = System.Drawing.Color.Black + Me.Label30.Location = New System.Drawing.Point(19, 203) + Me.Label30.Name = "Label30" + Me.Label30.Size = New System.Drawing.Size(93, 13) + Me.Label30.TabIndex = 36 + Me.Label30.Text = "Colore trasparente" + Me.Label30.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Label30.Visible = False + ' + 'PictureBox3 + ' + Me.PictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.PictureBox3.Location = New System.Drawing.Point(216, 192) + Me.PictureBox3.Name = "PictureBox3" + Me.PictureBox3.Size = New System.Drawing.Size(24, 24) + Me.PictureBox3.TabIndex = 44 + Me.PictureBox3.TabStop = False + Me.PictureBox3.Visible = False + ' + 'Label27 + ' + Me.Label27.Location = New System.Drawing.Point(591, 378) + Me.Label27.Name = "Label27" + Me.Label27.Size = New System.Drawing.Size(140, 20) + Me.Label27.TabIndex = 62 + Me.Label27.Text = "Versione 2.2 2021" + Me.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'Button7 + ' + Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button7.Location = New System.Drawing.Point(539, 120) + Me.Button7.Name = "Button7" + Me.Button7.Size = New System.Drawing.Size(192, 40) + Me.Button7.TabIndex = 61 + Me.Button7.Text = "stop creazione" + ' + 'Button5 + ' + Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button5.Location = New System.Drawing.Point(539, 43) + Me.Button5.Name = "Button5" + Me.Button5.Size = New System.Drawing.Size(192, 32) + Me.Button5.TabIndex = 60 + Me.Button5.Text = "Salva impostazioni" + ' + 'Label20 + ' + Me.Label20.AutoSize = True + Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label20.Location = New System.Drawing.Point(539, 294) + Me.Label20.Name = "Label20" + Me.Label20.Size = New System.Drawing.Size(104, 16) + Me.Label20.TabIndex = 59 + Me.Label20.Text = "foto generate:" + ' + 'Label19 + ' + Me.Label19.AutoSize = True + Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label19.Location = New System.Drawing.Point(539, 275) + Me.Label19.Name = "Label19" + Me.Label19.Size = New System.Drawing.Size(80, 16) + Me.Label19.TabIndex = 58 + Me.Label19.Text = "foto totali: " + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label18.Location = New System.Drawing.Point(643, 294) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(19, 20) + Me.Label18.TabIndex = 57 + Me.Label18.Text = "0" + ' + 'lblFotoTotaliNum + ' + Me.lblFotoTotaliNum.AutoSize = True + Me.lblFotoTotaliNum.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblFotoTotaliNum.Location = New System.Drawing.Point(643, 275) + Me.lblFotoTotaliNum.Name = "lblFotoTotaliNum" + Me.lblFotoTotaliNum.Size = New System.Drawing.Size(19, 20) + Me.lblFotoTotaliNum.TabIndex = 56 + Me.lblFotoTotaliNum.Text = "0" + ' + 'Label10 + ' + Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label10.Location = New System.Drawing.Point(539, 163) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(192, 72) + Me.Label10.TabIndex = 55 + Me.Label10.Text = "file" + ' + 'btnCreaCatalogo + ' + Me.btnCreaCatalogo.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.btnCreaCatalogo.Location = New System.Drawing.Point(539, 77) + Me.btnCreaCatalogo.Name = "btnCreaCatalogo" + Me.btnCreaCatalogo.Size = New System.Drawing.Size(102, 39) + Me.btnCreaCatalogo.TabIndex = 53 + Me.btnCreaCatalogo.Text = "crea catalogo" + ' + 'Button6 + ' + Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button6.Location = New System.Drawing.Point(539, 12) + Me.Button6.Name = "Button6" + Me.Button6.Size = New System.Drawing.Size(192, 32) + Me.Button6.TabIndex = 54 + Me.Button6.Text = "Carica impostazioni" + ' + 'btnCreaCatalogoAsync + ' + Me.btnCreaCatalogoAsync.Location = New System.Drawing.Point(647, 78) + Me.btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync" + Me.btnCreaCatalogoAsync.Size = New System.Drawing.Size(84, 38) + Me.btnCreaCatalogoAsync.TabIndex = 68 + Me.btnCreaCatalogoAsync.Text = "Crea 2" + Me.btnCreaCatalogoAsync.UseVisualStyleBackColor = True + ' + 'MainForm + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(739, 401) + Me.Controls.Add(Me.btnCreaCatalogoAsync) + Me.Controls.Add(Me.ProgressBar1) + Me.Controls.Add(Me.CheckBox22) + Me.Controls.Add(Me.Label43) + Me.Controls.Add(Me.TabControl1) + Me.Controls.Add(Me.Label27) + Me.Controls.Add(Me.Button7) + Me.Controls.Add(Me.Button5) + Me.Controls.Add(Me.Label20) + Me.Controls.Add(Me.Label19) + Me.Controls.Add(Me.Label18) + Me.Controls.Add(Me.lblFotoTotaliNum) + Me.Controls.Add(Me.Label10) + Me.Controls.Add(Me.btnCreaCatalogo) + Me.Controls.Add(Me.Button6) + Me.MaximizeBox = False + Me.Name = "MainForm" + Me.Text = "Image Catalog" + Me.TabControl1.ResumeLayout(False) + Me.TabPage5.ResumeLayout(False) + Me.GroupBox11.ResumeLayout(False) + Me.GroupBox11.PerformLayout() + Me.Panel3.ResumeLayout(False) + Me.Panel3.PerformLayout() + Me.GroupBox3.ResumeLayout(False) + Me.GroupBox3.PerformLayout() + Me.GroupBox8.ResumeLayout(False) + Me.GroupBox8.PerformLayout() + Me.GroupBox7.ResumeLayout(False) + Me.GroupBox7.PerformLayout() + Me.TabPage3.ResumeLayout(False) + Me.TabPage3.PerformLayout() + Me.GroupBox10.ResumeLayout(False) + Me.GroupBox10.PerformLayout() + Me.GroupBox9.ResumeLayout(False) + Me.GroupBox9.PerformLayout() + Me.GroupBox5.ResumeLayout(False) + Me.GroupBox5.PerformLayout() + Me.GroupBox4.ResumeLayout(False) + Me.GroupBox4.PerformLayout() + Me.TabPage2.ResumeLayout(False) + Me.GroupBox2.ResumeLayout(False) + Me.GroupBox2.PerformLayout() + Me.TabPage1.ResumeLayout(False) + Me.Panel1.ResumeLayout(False) + Me.Panel1.PerformLayout() + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.Panel2.ResumeLayout(False) + Me.Panel2.PerformLayout() + Me.TabPage4.ResumeLayout(False) + Me.GroupBox6.ResumeLayout(False) + Me.GroupBox6.PerformLayout() + CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar + Friend WithEvents CheckBox22 As System.Windows.Forms.CheckBox + Friend WithEvents Label43 As System.Windows.Forms.Label + Friend WithEvents TabControl1 As System.Windows.Forms.TabControl + Friend WithEvents TabPage5 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox + Friend WithEvents chkAggiornaSottodirectory As System.Windows.Forms.CheckBox + Friend WithEvents Button3 As System.Windows.Forms.Button + Friend WithEvents Button2 As System.Windows.Forms.Button + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents txtSorgente As System.Windows.Forms.TextBox + Friend WithEvents txtDestinazione As System.Windows.Forms.TextBox + Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox + Friend WithEvents rdbNumFiles As System.Windows.Forms.RadioButton + Friend WithEvents rdbNumProgressiva As System.Windows.Forms.RadioButton + Friend WithEvents txtCifreContatore As System.Windows.Forms.TextBox + Friend WithEvents Label34 As System.Windows.Forms.Label + Friend WithEvents txtSuffissoCartelle As System.Windows.Forms.TextBox + Friend WithEvents Label33 As System.Windows.Forms.Label + Friend WithEvents Label31 As System.Windows.Forms.Label + Friend WithEvents chkCreaSottocartelle As System.Windows.Forms.CheckBox + Friend WithEvents txtFilePerCartella As System.Windows.Forms.TextBox + Friend WithEvents Label32 As System.Windows.Forms.Label + Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox + Friend WithEvents chkRotazioneAutomatica As System.Windows.Forms.CheckBox + Friend WithEvents chkForzaJpg As System.Windows.Forms.CheckBox + Friend WithEvents TabPage3 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox10 As System.Windows.Forms.GroupBox + Friend WithEvents Label42 As System.Windows.Forms.Label + Friend WithEvents Label41 As System.Windows.Forms.Label + Friend WithEvents TextBox31 As System.Windows.Forms.TextBox + Friend WithEvents TextBox30 As System.Windows.Forms.TextBox + Friend WithEvents GroupBox9 As System.Windows.Forms.GroupBox + Friend WithEvents CheckBox17 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox16 As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox + Friend WithEvents TextBox34 As System.Windows.Forms.TextBox + Friend WithEvents Button8 As System.Windows.Forms.Button + Friend WithEvents Label36 As System.Windows.Forms.Label + Friend WithEvents TextBox25 As System.Windows.Forms.TextBox + Friend WithEvents Label35 As System.Windows.Forms.Label + Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox + Friend WithEvents TextBox11 As System.Windows.Forms.TextBox + Friend WithEvents Label12 As System.Windows.Forms.Label + Friend WithEvents Label11 As System.Windows.Forms.Label + Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox + Friend WithEvents Label40 As System.Windows.Forms.Label + Friend WithEvents TextBox29 As System.Windows.Forms.TextBox + Friend WithEvents TextBox18 As System.Windows.Forms.TextBox + Friend WithEvents Label26 As System.Windows.Forms.Label + Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker + Friend WithEvents CheckBox8 As System.Windows.Forms.CheckBox + Friend WithEvents TextBox9 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox7 As System.Windows.Forms.CheckBox + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents TextBox4 As System.Windows.Forms.TextBox + Friend WithEvents Label9 As System.Windows.Forms.Label + Friend WithEvents Label13 As System.Windows.Forms.Label + Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox + Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox + Friend WithEvents Label14 As System.Windows.Forms.Label + Friend WithEvents TextBox12 As System.Windows.Forms.TextBox + Friend WithEvents Label15 As System.Windows.Forms.Label + Friend WithEvents TabPage2 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox + Friend WithEvents Label45 As System.Windows.Forms.Label + Friend WithEvents TextBox32 As System.Windows.Forms.TextBox + Friend WithEvents TextBox26 As System.Windows.Forms.TextBox + Friend WithEvents Label37 As System.Windows.Forms.Label + Friend WithEvents Label38 As System.Windows.Forms.Label + Friend WithEvents TextBox27 As System.Windows.Forms.TextBox + Friend WithEvents Label39 As System.Windows.Forms.Label + Friend WithEvents TextBox28 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox15 As System.Windows.Forms.CheckBox + Friend WithEvents TabPage1 As System.Windows.Forms.TabPage + Friend WithEvents Panel1 As System.Windows.Forms.Panel + Friend WithEvents CheckBox18 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox4 As System.Windows.Forms.CheckBox + Friend WithEvents CheckBox12 As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents Label46 As System.Windows.Forms.Label + Friend WithEvents TextBox33 As System.Windows.Forms.TextBox + Friend WithEvents Panel2 As System.Windows.Forms.Panel + Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton7 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton6 As System.Windows.Forms.RadioButton + Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents TextBox5 As System.Windows.Forms.TextBox + Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents TextBox6 As System.Windows.Forms.TextBox + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents TextBox3 As System.Windows.Forms.TextBox + Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox + Friend WithEvents TabPage4 As System.Windows.Forms.TabPage + Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox + Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox + Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox + Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox + Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox + Friend WithEvents TextBox19 As System.Windows.Forms.TextBox + Friend WithEvents Label28 As System.Windows.Forms.Label + Friend WithEvents CheckBox5 As System.Windows.Forms.CheckBox + Friend WithEvents TextBox15 As System.Windows.Forms.TextBox + Friend WithEvents TextBox14 As System.Windows.Forms.TextBox + Friend WithEvents Label25 As System.Windows.Forms.Label + Friend WithEvents TextBox16 As System.Windows.Forms.TextBox + Friend WithEvents Label24 As System.Windows.Forms.Label + Friend WithEvents Label22 As System.Windows.Forms.Label + Friend WithEvents Label23 As System.Windows.Forms.Label + Friend WithEvents Button4 As System.Windows.Forms.Button + Friend WithEvents TextBox10 As System.Windows.Forms.TextBox + Friend WithEvents Label29 As System.Windows.Forms.Label + Friend WithEvents Label30 As System.Windows.Forms.Label + Friend WithEvents PictureBox3 As System.Windows.Forms.PictureBox + Friend WithEvents Label27 As System.Windows.Forms.Label + Friend WithEvents Button7 As System.Windows.Forms.Button + Friend WithEvents Button5 As System.Windows.Forms.Button + Friend WithEvents Label20 As System.Windows.Forms.Label + Friend WithEvents Label19 As System.Windows.Forms.Label + Friend WithEvents Label18 As System.Windows.Forms.Label + Friend WithEvents lblFotoTotaliNum As System.Windows.Forms.Label + Friend WithEvents Label10 As System.Windows.Forms.Label + Friend WithEvents btnCreaCatalogo As System.Windows.Forms.Button + Friend WithEvents Button6 As System.Windows.Forms.Button + Friend WithEvents GroupBox11 As System.Windows.Forms.GroupBox + Friend WithEvents Label7 As System.Windows.Forms.Label + Friend WithEvents TextBox7 As System.Windows.Forms.TextBox + Friend WithEvents Label8 As System.Windows.Forms.Label + Friend WithEvents TextBox8 As System.Windows.Forms.TextBox + Friend WithEvents Panel3 As System.Windows.Forms.Panel + Friend WithEvents rdbNuovoMetodo As System.Windows.Forms.RadioButton + Friend WithEvents rdbVecchioMetodo As System.Windows.Forms.RadioButton + Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox + Friend WithEvents chkSovrascriviFile As System.Windows.Forms.CheckBox + Friend WithEvents btnCreaCatalogoAsync As Button +End Class diff --git a/imagecatalog.backup/MainForm.cs b/imagecatalog.backup/MainForm.cs new file mode 100644 index 0000000..29719bd --- /dev/null +++ b/imagecatalog.backup/MainForm.cs @@ -0,0 +1,1704 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Text; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using CatalogVbLib; +using MaddoShared; +using Microsoft.VisualBasic; +using Microsoft.VisualBasic.CompilerServices; +using Microsoft.WindowsAPICodePack.Dialogs; + +namespace ImageCatalog +{ + public delegate void XyThreadAdd(string Info); + + public partial class MainForm + { + public MainForm() + { + InitializeComponent(); + _Button3.Name = "Button3"; + _Button2.Name = "Button2"; + _Button8.Name = "Button8"; + _CheckBox18.Name = "CheckBox18"; + _CheckBox4.Name = "CheckBox4"; + _CheckBox12.Name = "CheckBox12"; + _PictureBox1.Name = "PictureBox1"; + _Button4.Name = "Button4"; + _Label27.Name = "Label27"; + _Button7.Name = "Button7"; + _Button5.Name = "Button5"; + //_btnCreaCatalogo.Name = "btnCreaCatalogo"; + _Button6.Name = "Button6"; + _btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync"; + + _results = new ConcurrentBag(); + UiUpdateEvent += OnUiUpdateEvent; + + } + private event EventHandler> UiUpdateEvent; + + delegate void SetTextCallback(Label target, string text); + + private void SetText(Label target, string text) + { + + if (InvokeRequired) + { + SetTextCallback d = new SetTextCallback(SetText); + this.Invoke(d, new object[] { target, text }); + } + else + { + target.Text = text; + } + } + delegate void SetProgressCallback(ProgressBar target, int amount, int maximum); + private void SetProgress(ProgressBar target, int amount, int maximum) + { + if (InvokeRequired) + { + SetProgressCallback d = new SetProgressCallback(SetProgress); + this.Invoke(d, new object[] { target, amount, maximum }); + } + else + { + target.Maximum = maximum; + target.Value = amount; + } + } + private void OnUiUpdateEvent(object sender, Tuple args) + { + SetProgress(ProgressBar1, _results.Count, args.Item2); + SetText(Label18, _results.Count.ToString()); + SetText(Label10, args.Item1); + SetText(lblFotoTotaliNum, args.Item2.ToString()); + } + + /* TODO ERROR: Skipped DefineDirectiveTrivia */ + private bool StopAttivo; + private bool WaterSelectColor = false; + + // Private ContaFotoCuori As Integer + // Private TaskCuori() As PicInfo + + private XYThreadPool MyPool = new XYThreadPool(); + private int ContaImmaginiThread; + private int maxThreads = 15; + private int minThreads = 5; + + private ConcurrentBag _results; + + private void setDefaults() + { + txtSorgente.Text = ""; + txtDestinazione.Text = ""; + TextBox3.Text = "tn_"; + TextBox4.Text = ""; + TextBox5.Text = "350"; + TextBox6.Text = "350"; + TextBox27.Text = "2240"; + TextBox28.Text = "2240"; + TextBox9.Text = "0"; + TextBox11.Text = "20"; + TextBox12.Text = "8"; + // TextBox13.Text = "" + TextBox10.Text = ""; + TextBox14.Text = "430"; + TextBox15.Text = "430"; + TextBox16.Text = "290"; + txtFilePerCartella.Text = "99"; + TextBox19.Text = "100"; + txtSuffissoCartelle.Text = ""; + txtCifreContatore.Text = "2"; + TextBox25.Text = "50"; + TextBox26.Text = ""; + TextBox7.Text = 4.ToString(); + TextBox8.Text = 4.ToString(); + TextBox34.Text = "Yellow"; + TextBox30.Text = "20"; + TextBox31.Text = "6"; + TextBox32.Text = "85"; + TextBox33.Text = "30"; + ComboBox1.Items.Add("Alto"); + ComboBox1.Items.Add("Basso"); + ComboBox1.SelectedIndex = 1; + ComboBox2.Items.Add("Sinistra"); + ComboBox2.Items.Add("Centro"); + ComboBox2.Items.Add("Destra"); + ComboBox2.SelectedIndex = 1; + + // Create a obejct of InstalledFontCollection + var InstalledFonts = new InstalledFontCollection(); + // Gets the array of FontFamily objects associated with this FontCollection. + var fontfamilies = InstalledFonts.Families; + + // Populates font combobox with the font name + + foreach (FontFamily fontFamily in fontfamilies) + ComboBox3.Items.Add(fontFamily.Name); + ComboBox3.Text = ComboBox3.Items[0].ToString(); + + // ComboBox3.Items.Add("Arial") + // ComboBox3.Items.Add("Arial Black") + // ComboBox3.Items.Add("Arial Narrow") + // ComboBox3.Items.Add("Comic Sans MS") + // ComboBox3.Items.Add("Courier New") + // ComboBox3.Items.Add("System") + // ComboBox3.Items.Add("Times New Roman") + // ComboBox3.Items.Add("Verdana") + // ComboBox3.Items.Add("Wingdings") + // ComboBox3.SelectedIndex = 7 + + ComboBox4.Items.Add("Sinistra"); + ComboBox4.Items.Add("Centro"); + ComboBox4.Items.Add("Destra"); + ComboBox4.SelectedIndex = 2; + ComboBox5.Items.Add("Alto"); + ComboBox5.Items.Add("Centro"); + ComboBox5.Items.Add("Basso"); + ComboBox5.SelectedIndex = 2; + } + + [DllImport("kernel32.dll", SetLastError = true)] + private static extern bool AllocConsole(); + + private void Form1_Load(object sender, EventArgs e) + { + Application.EnableVisualStyles(); + setDefaults(); + /* TODO ERROR: Skipped IfDirectiveTrivia */ + AllocConsole(); + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + Console.WriteLine("Programma avviato"); + } + + private void FixPaths() + { + if (txtSorgente.Text.EndsWith(@"\") == false) + { + txtSorgente.Text += @"\"; + } + + if (txtDestinazione.Text.EndsWith(@"\") == false) + { + txtDestinazione.Text += @"\"; + } + } + + private void lockUI() + { + TabControl1.Enabled = false; + Button5.Enabled = false; + Button6.Enabled = false; + btnCreaCatalogoAsync.Enabled = false; + } + + private void unlockUI() + { + TabControl1.Enabled = true; + Button5.Enabled = true; + Button6.Enabled = true; + btnCreaCatalogoAsync.Enabled = true; + } + + private void btnCreaCatalogo_Click(object sender, EventArgs e) + { + lockUI(); + DateTime timeStart; + var timeStop = default(DateTime); + timeStart = DateAndTime.TimeOfDay; + FixPaths(); + Label10.Text = ""; + lblFotoTotaliNum.Text = "0"; + Label18.Text = "0"; + Label43.Text = "-s"; + maxThreads = Conversions.ToInteger(TextBox7.Text); + minThreads = Conversions.ToInteger(TextBox8.Text); + if (rdbNuovoMetodo.Checked) + { + setPicSettings(txtSorgente.Text, txtDestinazione.Text); + ProgressBar1.Minimum = 0; + ProgressBar1.Step = 1; + ProgressBar1.Value = 0; + var t1 = new Thread(creaCatalogoThread); + t1.IsBackground = false; + t1.Start(); + } + else if (rdbVecchioMetodo.Checked) + { + creaCatalogo(timeStart, timeStop); + unlockUI(); + } + } + + private void creaCatalogoThread() + { + var timeStart = DateAndTime.TimeOfDay; + MyPool.StopThreadPool(); + MyPool.StartThreadPool(minThreads, maxThreads); + ContaImmaginiThread = 0; + + // creaImmaginiWithThreadMod(txtSorgente.Text, txtDestinazione.Text) + creaimmaginiWithThreadDict(txtSorgente.Text, txtDestinazione.Text); + ThreadPoolWorkItem ThAttivo = null; + int i = 0; + /* TODO ERROR: Skipped DefineDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + + while (i != ContaImmaginiThread) + { + Thread.Sleep(100); + ThAttivo = MyPool.ExtractWorkItem(); + if (ThAttivo is object) + { + i += 1; + // stepProgressBar() + int threads = MyPool.GetThreadCount(); + setLabel10Text("File: " + ThAttivo.m_sName + " Threads: " + threads.ToString()); + + // setLabel18Text(ContaImmaginiThread.ToString) + // setLabel18Text(i.ToString) + + + // Label10.Text = "File: " & ThAttivo.m_sName + // Label18.Text = ContaImmaginiThread.ToString + } + } + + MyPool.StopThreadPool(); + var timeStop = DateAndTime.TimeOfDay; + setLabel10Text("Finito"); + setLabel43Text(CalcTime(timeStart, timeStop, ContaImmaginiThread)); + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + } + + private void creaCatalogo(DateTime timeStart, DateTime timeStop) + { + // asdfg + MyPool.StopThreadPool(); + MyPool.StartThreadPool(minThreads, maxThreads); + ContaImmaginiThread = 0; + CreaImmaginiWithThread(txtSorgente.Text, txtDestinazione.Text); + ThreadPoolWorkItem ThAttivo = null; + int i = 0; + while (i != ContaImmaginiThread) + { + Thread.Sleep(100); + ThAttivo = MyPool.ExtractWorkItem(); + if (ThAttivo is object) + { + i += 1; + Label10.Text = "File: " + ThAttivo.m_sName; + Label18.Text = ContaImmaginiThread.ToString(); + } + } + + MyPool.StopThreadPool(); + timeStop = DateAndTime.TimeOfDay; + CalcTime(timeStart, timeStop, ContaImmaginiThread); + Label10.Text = "Finito"; + if (CheckBox22.Checked == true) + { + Interaction.Shell(@"%windir%\System32\shutdown.exe"); + } + } + + private string CalcTime(DateTime timeStart, DateTime timeStop, int numFoto) + { + long timediffH, timediffS; + long timediffM; + timediffM = DateAndTime.DateDiff(DateInterval.Minute, timeStart, timeStop); + timediffS = DateAndTime.DateDiff(DateInterval.Second, timeStart, timeStop); + timediffH = DateAndTime.DateDiff(DateInterval.Hour, timeStart, timeStop); + // dim s As String = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + + // Label43.Text = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + double fotoSec = numFoto / (double)timediffS; + double fotoMin = numFoto / (double)timediffM; + double fotoOra = numFoto / (double)timediffH; + string s = "S: " + timediffS.ToString() + "; F/s: " + fotoSec.ToString("0.000"); // + " F/m: " + fotoMin.ToString("0.00") + " F/h: " + fotoOra.ToString("0.00") + return s; + } + + private string SelectFolder(string startingFolder) + { + CommonOpenFileDialog dialog = new CommonOpenFileDialog + { + InitialDirectory = startingFolder, + IsFolderPicker = true + }; + if (dialog.ShowDialog() != CommonFileDialogResult.Ok) return null; + var directoryScelta = dialog.FileName; + if (directoryScelta.EndsWith(@"\") == false) + { + directoryScelta += @"\"; + } + + return directoryScelta; + + } + + private void Button2_Click(object sender, EventArgs e) + { + var dialogResult = SelectFolder(txtSorgente.Text); + if (!string.IsNullOrWhiteSpace(dialogResult)) + { + txtSorgente.Text = dialogResult; + } + + //CommonOpenFileDialog dialog = new CommonOpenFileDialog(); + //dialog.InitialDirectory = txtSorgente.Text; + //dialog.IsFolderPicker = true; + //if (dialog.ShowDialog() == CommonFileDialogResult.Ok) + //{ + // string directoryScelta = dialog.FileName; + // if (directoryScelta.EndsWith(@"\") == false) + // { + // directoryScelta += @"\"; + // } + + // txtSorgente.Text = directoryScelta; + //} + + //var DirSearch = new FolderBrowserDialog(); + //DirSearch.SelectedPath = txtSorgente.Text; + //if (DialogResult.OK == DirSearch.ShowDialog()) + //{ + // string DirectoryScelta = DirSearch.SelectedPath; + // if (DirectoryScelta.EndsWith(@"\") == false) + // { + // DirectoryScelta += @"\"; + // } + + // txtSorgente.Text = DirectoryScelta; + //} + } + + private void Button3_Click(object sender, EventArgs e) + { + var dialogResult = SelectFolder(txtDestinazione.Text); + if (!string.IsNullOrWhiteSpace(dialogResult)) + { + txtDestinazione.Text = dialogResult; + } + + //var DirSearch = new FolderBrowserDialog(); + //DirSearch.SelectedPath = txtDestinazione.Text; + //if (DialogResult.OK == DirSearch.ShowDialog()) + //{ + // string DirectoryScelta = DirSearch.SelectedPath; + // if (DirectoryScelta.EndsWith(@"\") == false) + // { + // DirectoryScelta += @"\"; + // } + + // txtDestinazione.Text = DirectoryScelta; + //} + + // Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + // Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + // openFileDialog.InitialDirectory = TextBox1.Text + // openFileDialog.Filter = "Bitmap files (*.bmp)|*.bmp|Jpeg files (*.jpg)|*.jpg|All valid files (*.*)|*.*" + // openFileDialog.FilterIndex = 2 + // openFileDialog.RestoreDirectory = True + + // If DialogResult.OK = openFileDialog.ShowDialog() Then + // Dim IlNome As String = openFileDialog.FileName + // Dim NomeFine As String = "" + // Dim i As Integer + + // Dim Elenco As String() + // Elenco = IlNome.Split(New Char() {"\"c}) + // For i = 0 To Elenco.Length - 1 + // NomeFine &= Elenco(i) & "\" + // Next + + // TextBox1.Text = NomeFine + // End If + } + + private void Button5_Click(object sender, EventArgs e) + { + var SaveFileDlg = new SaveFileDialog(); + + // SaveFileDlg.InitialDirectory = "c:\" + SaveFileDlg.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*"; + SaveFileDlg.FilterIndex = 0; + SaveFileDlg.RestoreDirectory = true; + if (DialogResult.OK == SaveFileDlg.ShowDialog()) + { + string IlNome = SaveFileDlg.FileName; + Module1.SetupIni.NomeFileSetup = IlNome; + Module1.SetupIni.AggiornaParametro("DirSorgente", txtSorgente.Text); + Module1.SetupIni.AggiornaParametro("DirDestinazione", txtDestinazione.Text); + Module1.SetupIni.AggiornaParametro("DirSottoDirectory", chkAggiornaSottodirectory.Checked); + Module1.SetupIni.AggiornaParametro("DirDividiDestinazione", chkCreaSottocartelle.Checked); + Module1.SetupIni.AggiornaParametro("DirDividiNumFile", txtFilePerCartella.Text); + Module1.SetupIni.AggiornaParametro("DirDividiSuffisso", txtSuffissoCartelle.Text); + Module1.SetupIni.AggiornaParametro("DirDividiNumCifre", txtCifreContatore.Text); + if (rdbNumProgressiva.Checked == true) + { + Module1.SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Progressiva"); + } + else + { + Module1.SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Files"); + } + + Module1.SetupIni.AggiornaParametro("MiniatureCrea", CheckBox1.Checked); + Module1.SetupIni.AggiornaParametro("MiniatureSuffisso", TextBox3.Text); + Module1.SetupIni.AggiornaParametro("MiniatureAltezza", TextBox5.Text); + Module1.SetupIni.AggiornaParametro("MiniatureLarghezza", TextBox6.Text); + Module1.SetupIni.AggiornaParametro("MiniatureAddScritta", RadioButton3.Checked); + Module1.SetupIni.AggiornaParametro("MiniatureAddOrario", RadioButton4.Checked); + Module1.SetupIni.AggiornaParametro("FotoAltezza", TextBox27.Text); + Module1.SetupIni.AggiornaParametro("FotoLarghezza", TextBox28.Text); + // SetupIni.AggiornaParametro("FotoCodice", TextBox13.Text) + // SetupIni.AggiornaParametro("FotoDimOriginali", CheckBox2.Checked) + + Module1.SetupIni.AggiornaParametro("FontDimensione", TextBox11.Text); + Module1.SetupIni.AggiornaParametro("FontDimensioneMiniatura", TextBox25.Text); + Module1.SetupIni.AggiornaParametro("FontBold", CheckBox3.Checked); + Module1.SetupIni.AggiornaParametro("FontNome", ComboBox3.Text); + Module1.SetupIni.AggiornaParametro("TestoTesto", TextBox4.Text); + Module1.SetupIni.AggiornaParametro("TestoTrasparente", TextBox9.Text); + Module1.SetupIni.AggiornaParametro("TestoMargine", TextBox12.Text); + Module1.SetupIni.AggiornaParametro("TestoPosizione", ComboBox1.Text); + Module1.SetupIni.AggiornaParametro("TestoAllineamento", ComboBox2.Text); + Module1.SetupIni.AggiornaParametro("MarchioFile", TextBox10.Text); + Module1.SetupIni.AggiornaParametro("MarchioAltezza", TextBox14.Text); + Module1.SetupIni.AggiornaParametro("MarchioLarghezza", TextBox15.Text); + Module1.SetupIni.AggiornaParametro("MarchioMargine", TextBox16.Text); + Module1.SetupIni.AggiornaParametro("MarchioAllOrizzontale", ComboBox4.Text); + Module1.SetupIni.AggiornaParametro("MarchioAllVerticale", ComboBox5.Text); + Module1.SetupIni.AggiornaParametro("MarchioTrasparenza", TextBox19.Text); + Module1.SetupIni.AggiornaParametro("MarchioAggiungi", CheckBox5.Checked); + Module1.SetupIni.AggiornaParametro("TempoGara", CheckBox7.Checked); + Module1.SetupIni.AggiornaParametro("Orario", CheckBox8.Checked); + Module1.SetupIni.AggiornaParametro("EtichettaOrario", TextBox18.Text); + Module1.SetupIni.AggiornaParametro("GeneraleForzaJpg", chkForzaJpg.Checked); + Module1.SetupIni.AggiornaParametro("GeneraleRotazioneAutomatica", chkRotazioneAutomatica.Checked); + Module1.SetupIni.AggiornaParametro("GrandezzaVerticale", TextBox30.Text); + Module1.SetupIni.AggiornaParametro("MargineVerticale", TextBox31.Text); + Module1.SetupIni.AggiornaParametro("DimensioniOriginali", CheckBox15.Checked); + Module1.SetupIni.AggiornaParametro("TestoVerticale", TextBox29.Text); + Module1.SetupIni.AggiornaParametro("NomeMiniatura", RadioButton6.Checked); + Module1.SetupIni.AggiornaParametro("DataFoto", CheckBox16.Checked); + Module1.SetupIni.AggiornaParametro("NumeroFoto", CheckBox17.Checked); + Module1.SetupIni.AggiornaParametro("ColoreTestoRGB", TextBox34.Text); + Module1.SetupIni.AggiornaParametro("TempoSmall", RadioButton5.Checked); + Module1.SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked); + Module1.SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text); + Module1.SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text); + // 2021 + Module1.SetupIni.AggiornaParametro("ChunkSize", TextBox8.Text); + Module1.SetupIni.AggiornaParametro("ThreadsCount", TextBox7.Text); + Module1.SetupIni.SalvaParametriSetup(); + Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome); + } + } + + private void Button6_Click(object sender, EventArgs e) + { + var openFileDialog = new OpenFileDialog(); + + // openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*"; + openFileDialog.FilterIndex = 0; + openFileDialog.RestoreDirectory = true; + if (DialogResult.OK == openFileDialog.ShowDialog()) + { + string IlNome = openFileDialog.FileName; + Module1.SetupIni.NomeFileSetup = IlNome; + Module1.SetupIni.CaricaParametriSetup(); + txtSorgente.Text = Module1.SetupIni.LeggiParametroString("DirSorgente"); + txtDestinazione.Text = Module1.SetupIni.LeggiParametroString("DirDestinazione"); + chkAggiornaSottodirectory.Checked = Module1.SetupIni.LeggiParametroBoolean("DirSottoDirectory"); + chkCreaSottocartelle.Checked = Module1.SetupIni.LeggiParametroBoolean("DirDividiDestinazione"); + txtFilePerCartella.Text = Module1.SetupIni.LeggiParametroString("DirDividiNumFile"); + txtSuffissoCartelle.Text = Module1.SetupIni.LeggiParametroString("DirDividiSuffisso"); + txtCifreContatore.Text = Module1.SetupIni.LeggiParametroString("DirDividiNumCifre"); + string TestoTemp = Module1.SetupIni.LeggiParametroString("DirDividiTipoNumerazione"); + if (TestoTemp.ToUpper() == "PROGRESSIVA") + { + rdbNumProgressiva.Checked = true; + } + else + { + rdbNumFiles.Checked = true; + } + + CheckBox1.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureCrea"); + TextBox3.Text = Module1.SetupIni.LeggiParametroString("MiniatureSuffisso"); + TextBox5.Text = Module1.SetupIni.LeggiParametroString("MiniatureAltezza"); + TextBox6.Text = Module1.SetupIni.LeggiParametroString("MiniatureLarghezza"); + RadioButton3.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureAddScritta"); + RadioButton4.Checked = Module1.SetupIni.LeggiParametroBoolean("MiniatureAddOrario"); + TextBox27.Text = Module1.SetupIni.LeggiParametroString("FotoAltezza"); + TextBox28.Text = Module1.SetupIni.LeggiParametroString("FotoLarghezza"); + // TextBox13.Text = SetupIni.LeggiParametroString("FotoCodice") + // CheckBox2.Checked = SetupIni.LeggiParametroBoolean("FotoDimOriginali") + + TextBox11.Text = Module1.SetupIni.LeggiParametroString("FontDimensione"); + TextBox25.Text = Module1.SetupIni.LeggiParametroString("FontDimensioneMiniatura"); + CheckBox3.Checked = Module1.SetupIni.LeggiParametroBoolean("FontBold"); + ComboBox3.Text = Module1.SetupIni.LeggiParametroString("FontNome"); + if (string.IsNullOrEmpty(TextBox25.Text)) + { + TextBox25.Text = "0"; + } + + TextBox4.Text = Module1.SetupIni.LeggiParametroString("TestoTesto"); + TextBox9.Text = Module1.SetupIni.LeggiParametroString("TestoTrasparente"); + TextBox12.Text = Module1.SetupIni.LeggiParametroString("TestoMargine"); + ComboBox1.Text = Module1.SetupIni.LeggiParametroString("TestoPosizione"); + ComboBox2.Text = Module1.SetupIni.LeggiParametroString("TestoAllineamento"); + TextBox10.Text = Module1.SetupIni.LeggiParametroString("MarchioFile"); + TextBox14.Text = Module1.SetupIni.LeggiParametroString("MarchioAltezza"); + TextBox15.Text = Module1.SetupIni.LeggiParametroString("MarchioLarghezza"); + TextBox16.Text = Module1.SetupIni.LeggiParametroString("MarchioMargine"); + ComboBox4.Text = Module1.SetupIni.LeggiParametroString("MarchioAllOrizzontale"); + ComboBox5.Text = Module1.SetupIni.LeggiParametroString("MarchioAllVerticale"); + TextBox19.Text = Module1.SetupIni.LeggiParametroString("MarchioTrasparenza"); + CheckBox5.Checked = Module1.SetupIni.LeggiParametroBoolean("MarchioAggiungi"); + CheckBox7.Checked = Module1.SetupIni.LeggiParametroBoolean("TempoGara"); + CheckBox8.Checked = Module1.SetupIni.LeggiParametroBoolean("Orario"); + TextBox18.Text = Module1.SetupIni.LeggiParametroString("EtichettaOrario"); + chkForzaJpg.Checked = Module1.SetupIni.LeggiParametroBoolean("GeneraleForzaJpg"); + chkRotazioneAutomatica.Checked = Module1.SetupIni.LeggiParametroBoolean("GeneraleRotazioneAutomatica"); + TextBox30.Text = Module1.SetupIni.LeggiParametroString("GrandezzaVerticale"); + TextBox31.Text = Module1.SetupIni.LeggiParametroString("MargineVerticale"); + CheckBox15.Checked = Module1.SetupIni.LeggiParametroBoolean("DimensioniOriginali"); + TextBox29.Text = Module1.SetupIni.LeggiParametroString("TestoVerticale"); + RadioButton6.Checked = Module1.SetupIni.LeggiParametroBoolean("NomeMiniatura"); + CheckBox16.Checked = Module1.SetupIni.LeggiParametroBoolean("DataFoto"); + CheckBox17.Checked = Module1.SetupIni.LeggiParametroBoolean("NumeroFoto"); + RadioButton5.Checked = Module1.SetupIni.LeggiParametroBoolean("TempoSmall"); + RadioButton7.Checked = Module1.SetupIni.LeggiParametroBoolean("NumTempoSmall"); + TextBox32.Text = Module1.SetupIni.LeggiParametroString("CompressioneJpeg"); + TextBox33.Text = Module1.SetupIni.LeggiParametroString("CompressioneJpegMiniatura"); + TextBox34.Text = Module1.SetupIni.LeggiParametroString("ColoreTestoRGB"); + if (File.Exists(TextBox10.Text)) + { + PictureBox1.Image = Image.FromFile(TextBox10.Text); + if (PictureBox1.Image.Height >= PictureBox1.Image.Width) + { + PictureBox1.Height = 160; + PictureBox1.Width = Conversions.ToInteger(160 * PictureBox1.Image.Width / (double)PictureBox1.Image.Height); + } + else + { + PictureBox1.Width = 224; + PictureBox1.Height = Conversions.ToInteger(224 * PictureBox1.Image.Height / (double)PictureBox1.Image.Width); + } + } + + Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome); + + // 2021 + TextBox8.Text = Module1.SetupIni.LeggiParametroString("ChunkSize"); + TextBox7.Text = Module1.SetupIni.LeggiParametroString("ThreadsCount"); + + } + } + + private void setPicSettings(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + PicSettings.DirectorySorgente = txtSorgente.Text; + PicSettings.DirectoryDestinazione = txtDestinazione.Text; + + // PicSettings.DestDir = DestDir + // PicSettings.SourceDir = SourceDir + // PicSettings.DestDirStart = DestDirStart + + PicSettings.DimStandard = Conversions.ToInteger(TextBox11.Text); + PicSettings.DimStandardMiniatura = Conversions.ToInteger(TextBox25.Text); + PicSettings.UsaOrarioMiniatura = CheckBox12.Checked; + PicSettings.UsaOrarioTestoApplicare = CheckBox8.Checked; + PicSettings.UsaTempoGaraTestoApplicare = CheckBox7.Checked; + PicSettings.UsaRotazioneAutomatica = chkRotazioneAutomatica.Checked; + PicSettings.UsaForzaJpg = chkForzaJpg.Checked; + if (CheckBox17.Checked) + { + PicSettings.TestoNome = true; + } + else + { + PicSettings.TestoNome = false; + } + + if (CheckBox16.Checked) + { + PicSettings.NomeData = true; + } + else + { + PicSettings.NomeData = false; + } + + PicSettings.TestoFirmaStart = TextBox4.Text; + PicSettings.TestoFirmaStartV = TextBox29.Text; + PicSettings.DataPartenza = DateTimePicker1.Value; + PicSettings.TestoOrario = TextBox18.Text; + PicSettings.AltezzaSmall = Conversions.ToInteger(TextBox6.Text); + PicSettings.LarghezzaSmall = Conversions.ToInteger(TextBox5.Text); + PicSettings.CreaMiniature = CheckBox1.Checked; + PicSettings.AggiungiScritteMiniature = RadioButton3.Checked; + PicSettings.AggTempoGaraMin = RadioButton5.Checked; + PicSettings.AggNumTempMin = RadioButton7.Checked; + PicSettings.DimVert = Conversions.ToInteger(TextBox30.Text); + PicSettings.MargVert = Conversions.ToInteger(TextBox31.Text); + + // PicSettings.NomeFileChild = childFile.Name + PicSettings.Suffisso = TextBox3.Text; + // PicSettings.Codice = TextBox13.Text + + PicSettings.Trasparenza = Conversions.ToInteger(TextBox9.Text); + PicSettings.IlFont = ComboBox3.SelectedItem.ToString(); + PicSettings.Grassetto = CheckBox3.Checked; + PicSettings.Posizione = ComboBox1.SelectedItem.ToString(); + PicSettings.Allineamento = ComboBox2.SelectedItem.ToString(); + PicSettings.Margine = Conversions.ToInteger(TextBox12.Text); + PicSettings.LogoAltezza = Conversions.ToInteger(TextBox14.Text); + PicSettings.LogoLarghezza = Conversions.ToInteger(TextBox15.Text); + PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text); + PicSettings.LogoAggiungi = CheckBox5.Checked; + PicSettings.LogoNomeFile = TextBox10.Text; + PicSettings.LogoTrasparenza = TextBox19.Text; + PicSettings.LogoMargine = TextBox16.Text; + PicSettings.LogoPosizioneH = ComboBox4.Text; + PicSettings.LogoPosizioneV = ComboBox5.Text; + PicSettings.FotoGrandeDimOrigina = CheckBox15.Checked; + PicSettings.AltezzaBig = Conversions.ToInteger(TextBox27.Text); + PicSettings.LarghezzaBig = Conversions.ToInteger(TextBox28.Text); + PicSettings.DimMin = Conversions.ToInteger(TextBox25.Text); + PicSettings.TestoMin = RadioButton6.Checked; + PicSettings.jpegQuality = Conversions.ToLong(TextBox32.Text); + PicSettings.jpegQualityMin = Conversions.ToLong(TextBox33.Text); + PicSettings.mainForm = this; + } + + private List> makeFilesList(string SourcePath) + { + var SourceDir = new DirectoryInfo(SourcePath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(txtFilePerCartella.Text); + string SuffixDir = txtSuffissoCartelle.Text; + int NumCifreDir = Conversions.ToInteger(txtCifreContatore.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + var picList = new List(); + var dirList = new List>(); + + + // controlla directory principale + // Dim childFile As FileInfo + // For Each childFile In SourceDir.GetFiles("*.jpg") + // picList.Add(childFile) + // Next + + // picList = getFiles(SourceDir, SearchOption.AllDirectories) + + // dirList.Add(picList) + + // controlla sottodirectory + if (chkAggiornaSottodirectory.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + { + var filesList = new List(); + filesList = getFiles(subDir); + dirList.Add(filesList); + } + } + + return dirList; + } + + private List getFiles(DirectoryInfo sourceDir) + { + var picList = new List(); + foreach (var childFile in sourceDir.GetFiles("*.jpg")) + picList.Add(childFile); + return picList; + } + + private Dictionary getDirsDict(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(txtFilePerCartella.Text); + string SuffixDir = txtSuffissoCartelle.Text; + int NumCifreDir = Conversions.ToInteger(txtCifreContatore.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + // Dim TestoTemp As String = "" + // Dim ContaTemp As Integer = 0 + var dirSourceDest = new Dictionary(); + if (SourceDir.Exists) + { + if (chkAggiornaSottodirectory.Checked) + { + FileConta = SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories).GetLength(0); + } + else + { + FileConta = SourceDir.GetFiles("*.jpg", SearchOption.TopDirectoryOnly).GetLength(0); + } + + string a = (Conversions.ToInteger(lblFotoTotaliNum.Text) + FileConta).ToString(); + setLabel17Text(a); + setProgressBarMaximum(Conversions.ToInteger(a)); + if (chkAggiornaSottodirectory.Checked) + { + foreach (DirectoryInfo directory in SourceDir.GetDirectories()) + { + foreach (FileInfo file in directory.GetFiles(".jpg")) + { + } + } + } + + foreach (FileInfo file in SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories)) + { + } + + if (NumFileXDir > 0 & chkCreaSottocartelle.Checked == true & FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + + var filesList = new List(); + if (chkAggiornaSottodirectory.Checked) + { + filesList.AddRange(SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories)); + filesList.AddRange(SourceDir.GetFiles("*.png", SearchOption.AllDirectories)); + } + else + { + filesList.AddRange(SourceDir.GetFiles("*.jpg", SearchOption.TopDirectoryOnly)); + filesList.AddRange(SourceDir.GetFiles("*.png", SearchOption.TopDirectoryOnly)); + } + + foreach (FileInfo file in filesList) + { + ContaFileXDir += 1; + if (DividiFile == true) + { + if (ContaFileXDir == ContaDirXDir * NumFileXDir + 1) + { + ContaDirXDir += 1; + string TestoTemp; + if (rdbNumProgressiva.Checked == true) + { + TestoTemp = ContaDirXDir.ToString(); + } + else + { + TestoTemp = (ContaDirXDir * NumFileXDir).ToString(); + } + + for (int ContaTemp = 1, loopTo = NumCifreDir - TestoTemp.Length; ContaTemp <= loopTo; ContaTemp++) + TestoTemp = "0" + TestoTemp; + DestDir = new DirectoryInfo(Path.Combine(DestDirStart.FullName, SuffixDir, TestoTemp)); + // DestDir = New DirectoryInfo(DestDirStart.FullName & IIf(Not DestDirStart.FullName.EndsWith("\"), "\", String.Empty).ToString & SuffixDir & TestoTemp) + dirSourceDest.Add(file, DestDir); + if (!DestDir.Exists) + { + DestDir.Create(); + } + } + } + } + } + + return dirSourceDest; + } + + private void setLabel17Text(string text) + { + if (lblFotoTotaliNum.InvokeRequired) + { + lblFotoTotaliNum.Invoke(new Action(setLabel17Text), text); + } + else + { + lblFotoTotaliNum.Text = text; + } + } + + private void setLabel10Text(string text) + { + if (Label10.InvokeRequired) + { + Label10.Invoke(new Action(setLabel10Text), text); + } + else + { + Label10.Text = text; + } + } + + public void stepProgressBar() + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new MethodInvoker(ProgressBar1.PerformStep)); + } + else + { + ProgressBar1.PerformStep(); + } + + setLabel18Text(ProgressBar1.Value.ToString()); + } + + private void setProgressBarMaximum(int value) + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new Action(setProgressBarMaximum), (object)value); + } + else + { + ProgressBar1.Maximum = value; + } + } + + private void setProgressBarValue(int value) + { + if (ProgressBar1.InvokeRequired) + { + ProgressBar1.Invoke(new Action(setProgressBarValue), (object)value); + } + else + { + ProgressBar1.Value = value; + } + } + + private void setLabel18Text(string text) + { + if (Label18.InvokeRequired) + { + Label18.Invoke(new Action(setLabel18Text), text); + } + else + { + Label18.Text = text; + } + } + + private void setLabel43Text(string text) + { + if (Label43.InvokeRequired) + { + Label43.Invoke(new Action(setLabel43Text), text); + } + else + { + Label43.Text = text; + } + } + + private void creaImmaginiWithThreadMod(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(txtFilePerCartella.Text); + string SuffixDir = txtSuffissoCartelle.Text; + int NumCifreDir = Conversions.ToInteger(txtCifreContatore.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + if (SourceDir.Exists) + { + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0); + // Label17.Text = (CType(Label17.Text, Integer) + FileConta).ToString + string a = (Conversions.ToInteger(lblFotoTotaliNum.Text) + FileConta).ToString(); + setLabel17Text(a); + setProgressBarMaximum(Conversions.ToInteger(a)); + if (NumFileXDir > 0 & chkCreaSottocartelle.Checked == true) + { + if (FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + + foreach (var childFile in SourceDir.GetFiles("*.jpg")) + { + if (StopAttivo == true) + { + break; + } + + setLabel10Text("File: " + childFile.Name); + string b = (Conversions.ToInteger(Label18.Text) + 1).ToString(); + // setLabel18Text(b) + // setProgressBarValue(CInt(b)) + // Label10.Text = "File: " & childFile.Name + // Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + // Application.DoEvents() + + ContaFileXDir += 1; + if (DividiFile == true) + { + if (ContaFileXDir == ContaDirXDir * NumFileXDir + 1) + { + ContaDirXDir += 1; + if (rdbNumProgressiva.Checked == true) + { + TestoTemp = ContaDirXDir.ToString(); + } + else + { + TestoTemp = (ContaDirXDir * NumFileXDir).ToString(); + } + + var loopTo = NumCifreDir - TestoTemp.Length; + for (ContaTemp = 1; ContaTemp <= loopTo; ContaTemp++) + TestoTemp = "0" + TestoTemp; + if (DestDirStart.FullName.EndsWith(@"\")) + { + DestDir = new DirectoryInfo(DestDirStart.FullName + SuffixDir + TestoTemp); + } + else + { + DestDir = new DirectoryInfo(DestDirStart.FullName + @"\" + SuffixDir + TestoTemp); + } + + if (!DestDir.Exists) + { + DestDir.Create(); + } + } + } + + // Application.DoEvents() + + + + var ClsCreaImmagine = new ImageCreatorSharp(childFile.Name, SourceDir, DestDir, DestDirStart); + // ClsCreaImmagine.NomeFileChild = childFile.Name + // ClsCreaImmagine.DestDir = DestDir + // ClsCreaImmagine.SourceDir = SourceDir + // ClsCreaImmagine.DestDirStart = DestDirStart + + ContaImmaginiThread += 1; + //MyPool.InsertWorkItem(childFile.Name, new XyThreadAdd((_) => ClsCreaImmagine.CreaImmagineThread()), new object[1] { childFile.Name }, true); + } + // copy all the sub-directories by recursively calling this same routine + if (chkAggiornaSottodirectory.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + creaImmaginiWithThreadMod(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)); + } + } + } + + private int getNumerazione() + { + int numerazione; + if (rdbNumProgressiva.Checked) + { + numerazione = (int)FileHelper.numerazione.Progressiva; + } + else + { + numerazione = (int)FileHelper.numerazione.Files; + } + + return numerazione; + } + + private NumerazioneType GetNumerazioneEnum() + { + NumerazioneType numerazioneType; + if (rdbNumProgressiva.Checked) + { + numerazioneType = NumerazioneType.Progressiva; // FileHelper.numerazione.Progressiva + } + else + { + numerazioneType = NumerazioneType.Files; + } // FileHelper.numerazione.Files + + return numerazioneType; + } + + private void creaimmaginiWithThreadDict(string SourcePath, string DestPath) + { + var dirSourceDest = new Dictionary(); + if (chkAggiornaSottodirectory.Checked & chkCreaSottocartelle.Checked) + { + var helper = new FileHelper(Conversions.ToInteger(txtFilePerCartella.Text), txtSuffissoCartelle.Text, Conversions.ToInteger(txtCifreContatore.Text), getNumerazione()); + // getfilesrecursive + dirSourceDest = helper.GetFilesRecursive(new DirectoryInfo(SourcePath), new DirectoryInfo(DestPath), "*.jpg"); + } + else if (chkAggiornaSottodirectory.Checked & !chkCreaSottocartelle.Checked) + { + + // = getDirsDict(SourcePath, DestPath) + + } + + foreach (var pair in dirSourceDest) + { + setLabel10Text("File: " + pair.Key.Name); + string b = (Conversions.ToInteger(Label18.Text) + 1).ToString(); + var ClsCreaImmagine = new ImageCreatorSharp(pair.Key, pair.Value); + ContaImmaginiThread += 1; + //MyPool.InsertWorkItem(pair.Key.Name, new XyThreadAdd((_) => ClsCreaImmagine.CreaImmagineThread()), new object[1] { pair.Key.Name }, true); + } + } + + // il posto giusto dove fare modifiche + private void CreaImmaginiWithThread(string SourcePath, string DestPath) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDirStart = new DirectoryInfo(DestPath); + DirectoryInfo DestDir = null; + int NumFileXDir = Conversions.ToInteger(txtFilePerCartella.Text); + string SuffixDir = txtSuffissoCartelle.Text; + int NumCifreDir = Conversions.ToInteger(txtCifreContatore.Text); + bool DividiFile = false; + StopAttivo = false; + int FileConta = 0; + int ContaFileXDir = 0; + int ContaDirXDir = 0; + string TestoTemp = ""; + int ContaTemp = 0; + if (SourceDir.Exists) + { + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0); + lblFotoTotaliNum.Text = (Conversions.ToInteger(lblFotoTotaliNum.Text) + FileConta).ToString(); + if (NumFileXDir > 0 & chkCreaSottocartelle.Checked == true) + { + if (FileConta > NumFileXDir) + { + DividiFile = true; + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + } + else + { + DestDir = DestDirStart; + if (!DestDir.Exists) + { + DestDir.Create(); + } + + DividiFile = false; + } + + foreach (var childFile in SourceDir.GetFiles("*.jpg")) + { + if (StopAttivo == true) + { + break; + } + // Label10.Text = "File: " & childFile.Name + // Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + // Application.DoEvents() + + ContaFileXDir += 1; + if (DividiFile == true) + { + if (ContaFileXDir == ContaDirXDir * NumFileXDir + 1) + { + ContaDirXDir += 1; + if (rdbNumProgressiva.Checked == true) + { + TestoTemp = ContaDirXDir.ToString(); + } + else + { + TestoTemp = (ContaDirXDir * NumFileXDir).ToString(); + } + + var loopTo = NumCifreDir - TestoTemp.Length; + for (ContaTemp = 1; ContaTemp <= loopTo; ContaTemp++) + TestoTemp = "0" + TestoTemp; + if (DestDirStart.FullName.EndsWith(@"\")) + { + DestDir = new DirectoryInfo(DestDirStart.FullName + SuffixDir + TestoTemp); + } + else + { + DestDir = new DirectoryInfo(DestDirStart.FullName + @"\" + SuffixDir + TestoTemp); + } + + if (!DestDir.Exists) + { + DestDir.Create(); + } + } + } + + Application.DoEvents(); + var ClsCreaImmagine = new CreaImmagineSeparateThread(); + ClsCreaImmagine.DirectorySorgente = txtSorgente.Text; + ClsCreaImmagine.DirectoryDestinazione = txtDestinazione.Text; + ClsCreaImmagine.DestDir = DestDir; + ClsCreaImmagine.SourceDir = SourceDir; + ClsCreaImmagine.DestDirStart = DestDirStart; + ClsCreaImmagine.DimStandard = Conversions.ToInteger(TextBox11.Text); + ClsCreaImmagine.DimStandardMiniatura = Conversions.ToInteger(TextBox25.Text); + ClsCreaImmagine.UsaOrarioMiniatura = CheckBox12.Checked; + ClsCreaImmagine.UsaOrarioTestoApplicare = CheckBox8.Checked; + ClsCreaImmagine.UsaTempoGaraTestoApplicare = CheckBox7.Checked; + ClsCreaImmagine.UsaRotazioneAutomatica = chkRotazioneAutomatica.Checked; + ClsCreaImmagine.UsaForzaJpg = chkForzaJpg.Checked; + if (CheckBox17.Checked) + { + ClsCreaImmagine.TestoNome = true; + } + else + { + ClsCreaImmagine.TestoNome = false; + } + + if (CheckBox16.Checked) + { + ClsCreaImmagine.NomeData = true; + } + else + { + ClsCreaImmagine.NomeData = false; + } + + ClsCreaImmagine.TestoFirmaStart = TextBox4.Text; + ClsCreaImmagine.TestoFirmaStartV = TextBox29.Text; + ClsCreaImmagine.DataPartenza = DateTimePicker1.Value; + ClsCreaImmagine.TestoOrario = TextBox18.Text; + ClsCreaImmagine.AltezzaSmall = Conversions.ToInteger(TextBox5.Text); + ClsCreaImmagine.LarghezzaSmall = Conversions.ToInteger(TextBox5.Text); + ClsCreaImmagine.CreaMiniature = CheckBox1.Checked; + ClsCreaImmagine.AggiungiScritteMiniature = RadioButton3.Checked; + ClsCreaImmagine.AggTempoGaraMin = RadioButton5.Checked; + ClsCreaImmagine.AggNumTempMin = RadioButton7.Checked; + ClsCreaImmagine.DimVert = Conversions.ToInteger(TextBox30.Text); + ClsCreaImmagine.MargVert = Conversions.ToInteger(TextBox31.Text); + ClsCreaImmagine.NomeFileChild = childFile.Name; + ClsCreaImmagine.Suffisso = TextBox3.Text; + // ClsCreaImmagine.Codice = TextBox13.Text + + ClsCreaImmagine.Trasparenza = Conversions.ToInteger(TextBox9.Text); + ClsCreaImmagine.IlFont = ComboBox3.SelectedItem.ToString(); + ClsCreaImmagine.Grassetto = CheckBox3.Checked; + ClsCreaImmagine.Posizione = ComboBox1.SelectedItem.ToString(); + ClsCreaImmagine.Allineamento = ComboBox2.SelectedItem.ToString(); + ClsCreaImmagine.Margine = Conversions.ToInteger(TextBox12.Text); + ClsCreaImmagine.LogoAltezza = Conversions.ToInteger(TextBox14.Text); + ClsCreaImmagine.LogoLarghezza = Conversions.ToInteger(TextBox15.Text); + + // ClsCreaImmagine.FontColoreR = CType(TextBox22.Text, Integer) + // ClsCreaImmagine.FontColoreG = CType(TextBox23.Text, Integer) + // ClsCreaImmagine.FontColoreB = CType(TextBox24.Text, Integer) + ClsCreaImmagine.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text); + ClsCreaImmagine.LogoAggiungi = CheckBox5.Checked; + ClsCreaImmagine.LogoNomeFile = TextBox10.Text; + ClsCreaImmagine.LogoTrasparenza = TextBox19.Text; + ClsCreaImmagine.LogoMargine = TextBox16.Text; + ClsCreaImmagine.LogoPosizioneH = ComboBox4.Text; + ClsCreaImmagine.LogoPosizioneV = ComboBox5.Text; + ClsCreaImmagine.FotoGrandeDimOrigina = CheckBox15.Checked; + ClsCreaImmagine.AltezzaBig = Conversions.ToInteger(TextBox27.Text); + ClsCreaImmagine.LarghezzaBig = Conversions.ToInteger(TextBox28.Text); + ClsCreaImmagine.DimMin = Conversions.ToInteger(TextBox25.Text); + ClsCreaImmagine.TestoMin = RadioButton6.Checked; + ClsCreaImmagine.jpegQuality = Conversions.ToLong(TextBox32.Text); + ClsCreaImmagine.jpegQualityMin = Conversions.ToLong(TextBox33.Text); + ContaImmaginiThread += 1; + MyPool.InsertWorkItem(childFile.Name, new XyThreadAdd(ClsCreaImmagine.CreaImmagineThread), new object[1] { childFile.Name }, true); + } + // copy all the sub-directories by recursively calling this same routine + if (chkAggiornaSottodirectory.Checked == true) + { + foreach (var subDir in SourceDir.GetDirectories()) + CreaImmaginiWithThread(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)); + } + } + } + + private void CopyDirectoryFile(string SourcePath, string DestPath, bool OverWrite = false) + { + var SourceDir = new DirectoryInfo(SourcePath); + var DestDir = new DirectoryInfo(DestPath); + if (SourceDir.Exists) + { + if (!DestDir.Exists) + { + DestDir.Create(); + // copy all the files of the current directory + } + + foreach (var childFile in SourceDir.GetFiles()) + { + if (OverWrite) + { + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), true); + } + // if overwrite = false, copy the file only if it does not exist + // this is done to avoid an IOException if a file already exists + // this way the other files can be copied anyway... + else if (!File.Exists(Path.Combine(DestDir.FullName, childFile.Name))) + { + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), false); + } + // copy all the sub-directories by recursively calling this same routine + } + + foreach (var subDir in SourceDir.GetDirectories()) + CopyDirectoryFile(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name), OverWrite); + } + } + + public Size NewthumbSize(int currentwidth, int currentheight, int MaxPixel, string TipoSize) + { + // Calculate the Size of the New image + // *** Larghezza, Altezza, Auto + + double tempMultiplier; + if ((TipoSize.ToUpper() ?? "") == ("Larghezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + else if ((TipoSize.ToUpper() ?? "") == ("Altezza".ToUpper() ?? "")) + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else if (currentheight > currentwidth) // portrait + { + tempMultiplier = MaxPixel / (double)currentheight; + } + else + { + tempMultiplier = MaxPixel / (double)currentwidth; + } + + var NewSize = new Size((int)Math.Round(currentwidth * tempMultiplier), (int)Math.Round(currentheight * tempMultiplier)); + return NewSize; + } + + private void Button7_Click(object sender, EventArgs e) + { + StopAttivo = true; + //MyPool.StopThreadPool(); + + if (_mainToken != null) + { + _mainToken.Cancel(); + } + + unlockUI(); + } + + private void Button4_Click(object sender, EventArgs e) + { + var openFileDialog = new OpenFileDialog(); + + // openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Immagini jpg (*.jpg)|*.jpg|Immagini gif (*.gif)|*.gif|Tutti i file (*.*)|*.*"; + if (TextBox10.Text.Length > 0) + { + openFileDialog.FileName = TextBox10.Text; + } + + openFileDialog.FilterIndex = 0; + openFileDialog.RestoreDirectory = true; + if (DialogResult.OK == openFileDialog.ShowDialog()) + { + TextBox10.Text = openFileDialog.FileName; + PictureBox1.Image = Image.FromFile(TextBox10.Text); + if (PictureBox1.Image.Height >= PictureBox1.Image.Width) + { + PictureBox1.Height = 160; + PictureBox1.Width = Conversions.ToInteger(160 * PictureBox1.Image.Width / (double)PictureBox1.Image.Height); + } + else + { + PictureBox1.Width = 224; + PictureBox1.Height = Conversions.ToInteger(224 * PictureBox1.Image.Height / (double)PictureBox1.Image.Width); + } + } + } + + private string LeggiSoloNomeFile(string FileName) + { + string Testo = FileName; + string Risposta = ""; + var Nomi = Testo.Split(new char[] { '\\' }); + if (Nomi.Length > 1) + { + Risposta = Nomi[Nomi.Length - 1]; + } + + return Risposta; + } + + private void PictureBox1_MouseMove(object sender, MouseEventArgs e) + { + // GetColor() + // GetPixelColor(PictureBox1.PointToScreen(e.Location)).ToArgb.ToString("X8") + + } + + private void PictureBox1_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + WaterSelectColor = true; + } + else + { + WaterSelectColor = false; + } + } + + + // Private Declare Function CreateDC Lib "gdi32.dll" (ByVal strDriver As String, ByVal strDevice As String, ByVal strOutput As String, ByVal pData As IntPtr) As IntPtr + // Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hdc As IntPtr) As Boolean + // Private Declare Function GetPixel Lib "gdi32.dll" (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer) As Integer + // Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As Point) As Boolean + + + // ''' + // ''' Get the color relative to mouse position + // ''' + // Private Sub GetColor() + // Dim hdcScreen As IntPtr = CreateDC("Display", Nothing, Nothing, IntPtr.Zero) + // Dim pt As Point = New Point + // GetCursorPos(pt) + // Dim cr As Integer = GetPixel(hdcScreen, pt.X, pt.Y) + // DeleteDC(hdcScreen) + // Dim clr As Color = Color.FromArgb((cr And &HFF), (cr And &HFF00) >> 8, (cr And &HFF0000) >> 16) + // PictureBox3.BackColor = clr + // If WaterSelectColor = True Then + // PictureBox2.BackColor = clr + // End If + // WaterSelectColor = False + // End Sub + + + private Color[] GetPixelColor(Point screenLocation) + { + // Dim bm As New Bitmap(1, 1, Imaging.PixelFormat.Format24bppRgb) + // Dim g As Graphics = Graphics.FromImage(bm) + // g.CopyFromScreen(screenLocation, New Point(0, 0), New Size(1, 1)) + // Dim result As Color = bm.GetPixel(0, 0) + // g.Dispose() + // bm.Dispose() + // Return result + return null; + } + + private void Button8_Click(object sender, EventArgs e) + { + var MyDialog = new ColorDialog(); + MyDialog.AllowFullOpen = true; + // If TextBox22.Text.Length > 0 And TextBox23.Text.Length > 0 And TextBox24.Text.Length > 0 Then + // If CType(TextBox22.Text, Integer) >= 0 And CType(TextBox23.Text, Integer) >= 0 And CType(TextBox24.Text, Integer) >= 0 Then + // MyDialog.Color = Color.FromArgb(0, CType(TextBox22.Text, Integer), CType(TextBox23.Text, Integer), CType(TextBox24.Text, Integer)) + // End If + // End If + + if (MyDialog.ShowDialog() == DialogResult.OK) + { + // TextBox22.Text = MyDialog.Color.R.ToString + // TextBox23.Text = MyDialog.Color.G.ToString + // TextBox24.Text = MyDialog.Color.B.ToString + TextBox34.Text = ColorTranslator.ToHtml(MyDialog.Color); + TextBox34.BackColor = MyDialog.Color; + } + } + + private void TextBox27_TextChanged(object sender, EventArgs e) + { + } + + private void CheckBox18_CheckedChanged(object sender, EventArgs e) + { + CheckBox4.Checked = false; + CheckBox12.Checked = false; + } + + private void CheckBox4_CheckedChanged(object sender, EventArgs e) + { + CheckBox18.Checked = false; + } + + private void CheckBox12_CheckedChanged(object sender, EventArgs e) + { + CheckBox18.Checked = false; + } + + private void Label27_Click(object sender, EventArgs e) + { + } + + private CancellationTokenSource _mainToken; + + private async void Button1_Click(object sender, EventArgs e) + { + lockUI(); + // Dim timeStart As Date + // Dim timeStop As Date + + _mainToken = new CancellationTokenSource(); + var token = _mainToken.Token; + + + // timeStart = TimeOfDay + FixPaths(); + Label10.Text = "Elaborazione in corso..."; + lblFotoTotaliNum.Text = "0"; + Label18.Text = "0"; + Label43.Text = "-s"; + setPicSettings(txtSorgente.Text, txtDestinazione.Text); + ProgressBar1.Minimum = 0; + ProgressBar1.Step = 1; + ProgressBar1.Value = 0; + + // Await CreaCatalogoParallel() + var imgStf = new ImageCreationStuff(); + var imageCreationOptions = new ImageCreationStuff.Options(); + imageCreationOptions.AggiornaSottodirectory = chkAggiornaSottodirectory.Checked; + imageCreationOptions.CreaSottocartelle = chkCreaSottocartelle.Checked; + imageCreationOptions.FilePerCartella = Conversions.ToInteger(txtFilePerCartella.Text); + imageCreationOptions.SuffissoCartelle = txtSuffissoCartelle.Text; + imageCreationOptions.CifreContatore = Conversions.ToInteger(txtCifreContatore.Text); + imageCreationOptions.NumerazioneType = GetNumerazioneEnum(); + imageCreationOptions.SourcePath = txtSorgente.Text; + imageCreationOptions.DestinationPath = txtDestinazione.Text; + imageCreationOptions.MaxThreads = Conversions.ToInteger(TextBox7.Text); + imageCreationOptions.ChunksSize = Conversions.ToInteger(TextBox8.Text); + imageCreationOptions.LinearExecution = rdbVecchioMetodo.Checked; + + + + try + { + _results = new ConcurrentBag(); + _currentAmount = 0; + _previousAmount = 0; + timer1.Tick += Timer1OnTick; + + timer1.Interval = 1000 * 60; + timer1.Enabled = true; + + string time = await imgStf.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token); + Label43.Text = time; + timer1.Enabled = false; + } + catch (OperationCanceledException operationCanceledException) + { + Console.WriteLine("Operazione cancellata"); + } + finally + { + _mainToken.Dispose(); + + timer1.Tick -= Timer1OnTick; + } + Label10.Text = "Finito"; + unlockUI(); + } + + private int _currentAmount = 0; + private int _previousAmount = 0; + private void Timer1OnTick(object sender, EventArgs e) + { + _previousAmount = _currentAmount; + _currentAmount = _results.Count; + int diff = _currentAmount - _previousAmount; + SetText(Label43, $"{diff} f/m"); + } + + private void UpdateCounter(string text) + { + Label10.Invoke(new Action(() => Label10.Text = text)); + } + + + + private async Task CreaCatalogoParallel() + { + var timeStart = DateAndTime.TimeOfDay; + ContaImmaginiThread = 0; + setLabel10Text("Elaborazione in corso..."); + var imgStf = new ImageCreationStuff(); + var imageCreationOptions = new ImageCreationStuff.Options(); + imageCreationOptions.AggiornaSottodirectory = chkAggiornaSottodirectory.Checked; + imageCreationOptions.CreaSottocartelle = chkCreaSottocartelle.Checked; + imageCreationOptions.FilePerCartella = Conversions.ToInteger(txtFilePerCartella.Text); + imageCreationOptions.SuffissoCartelle = txtSuffissoCartelle.Text; + imageCreationOptions.CifreContatore = Conversions.ToInteger(txtCifreContatore.Text); + imageCreationOptions.NumerazioneType = GetNumerazioneEnum(); + imageCreationOptions.SourcePath = txtSorgente.Text; + imageCreationOptions.DestinationPath = txtDestinazione.Text; + await imgStf.CreaImmaginiParallel(imageCreationOptions, _results, UiUpdateEvent); + + // Await CreaImmaginiParallel(txtSorgente.Text, txtDestinazione.Text) + + setLabel10Text("Finito"); + var timeStop = DateAndTime.TimeOfDay; + setLabel43Text(CalcTime(timeStart, timeStop, ContaImmaginiThread)); + } + + // Private Async Function CreaImmaginiParallel(ByVal SourcePath As String, ByVal DestPath As String) As Task + // Dim dataToProcess As List(Of FileData) = New List(Of FileData) + + // 'Dim dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) = New Dictionary(Of FileInfo, DirectoryInfo) + // If chkAggiornaSottodirectory.Checked And chkCreaSottocartelle.Checked Then + + // Dim helperSharp As New FileHelperSharp() + + // 'Dim helper As New FileHelper(CInt(txtFilePerCartella.Text), txtSuffissoCartelle.Text, CInt(txtCifreContatore.Text), getNumerazione()) + // 'getfilesrecursive + + // Dim fileHelperOptions As FileHelperOptions = New FileHelperOptions() + // fileHelperOptions.FilesPerFolder = CInt(txtFilePerCartella.Text) + // fileHelperOptions.Suffix = txtSuffissoCartelle.Text + // fileHelperOptions.CounterSize = CInt(txtCifreContatore.Text) + // fileHelperOptions.NumerationType = GetNumerazioneEnum() + + // dataToProcess = helperSharp.GetFilesRecursive(New DirectoryInfo(SourcePath), New DirectoryInfo(DestPath), "*.jpg", fileHelperOptions) + + // 'dataToProcess = helper.GetFilesRecursiveParallel(New DirectoryInfo(SourcePath), New DirectoryInfo(DestPath), "*.jpg") + // ElseIf chkAggiornaSottodirectory.Checked And Not chkCreaSottocartelle.Checked Then + // ' TODO manca tutto?!?!?!? + // End If + + // Dim scheduler As TaskScheduler = New ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, Environment.ProcessorCount * 2).ConcurrentScheduler + + // Dim test As IEnumerable(Of Task) = From d In dataToProcess Select Task.Factory.StartNew(Sub() + // 'setLabel10Text("File: " & p.File.Name) + + // Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + // Dim clsCreaImmagine As New ImageCreator(d.File, d.Directory) + + // clsCreaImmagine.CreaImmagineThread(d.File.Name) + + // ContaImmaginiThread += 1 + // UpdateCounter(ContaImmaginiThread & " " & d.File.Name) + // End Sub, CancellationToken.None, TaskCreationOptions.LongRunning, scheduler) 'TODO Cancellation Token + + // 'ThreadingHelper.StartAndWaitAllThrottled(test, CType(TextBox7.Text, Integer)) + + // Await Task.WhenAll(test) + + // '= getDirsDict(SourcePath, DestPath) + // 'Parallel.ForEach(dataToProcess, + // ' Sub(p, state) + // ' 'setLabel10Text("File: " & p.File.Name) + + // ' Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + // ' Dim clsCreaImmagine As New ImageCreator(p.File, p.Directory) + + // ' clsCreaImmagine.CreaImmagineThread(p.File.Name) + + // ' ContaImmaginiThread += 1 + // ' UpdateCounter(ContaImmaginiThread & " " & p.File.Name) + // ' 'MyPool.InsertWorkItem(p.File.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {p.File.Name}, True) + // ' ' TODO: BREAK ON STOP state.stop() + + // ' End Sub) + + // 'Dim pair As KeyValuePair(Of FileInfo, DirectoryInfo) + // 'For Each pair In dirSourceDest + + // ' setLabel10Text("File: " & pair.Key.Name) + // ' Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + // ' Dim ClsCreaImmagine As New ImageCreator(pair.Key, pair.Value) + // ' ContaImmaginiThread += 1 + // ' MyPool.InsertWorkItem(pair.Key.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {pair.Key.Name}, True) + + // 'Next + // End Function + } + + public class PicInfo + { + public DirectoryInfo DirSource, DirDest, DirDestStart; + public string NomeImmagine; + + public PicInfo(DirectoryInfo Dir_Source, DirectoryInfo Dir_Dest, DirectoryInfo Dir_DestStart, string Nome_Immagine) + { + DirSource = Dir_Source; + DirDest = Dir_Dest; + DirDestStart = Dir_DestStart; + NomeImmagine = Nome_Immagine; + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/MainForm.resx b/imagecatalog.backup/MainForm.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/imagecatalog.backup/MainForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/imagecatalog.backup/MainForm.vb b/imagecatalog.backup/MainForm.vb new file mode 100644 index 0000000..63a7373 --- /dev/null +++ b/imagecatalog.backup/MainForm.vb @@ -0,0 +1,1502 @@ +Imports System.Collections.Concurrent +Imports System.IO +Imports System.Drawing.Drawing2D +Imports System.Drawing.Imaging +Imports System.Threading +Imports System.Collections.Generic +Imports System.Drawing.Text +Imports System.Runtime.InteropServices +Imports System.Threading.Tasks +Imports CatalogVbLib +Imports MaddoShared + +Public Delegate Sub XyThreadAdd(ByVal Info As String) + +Public Class MainForm +#Const MULTI_THREADED_UI = True + + Private StopAttivo As Boolean + Private WaterSelectColor As Boolean = False + + 'Private ContaFotoCuori As Integer + 'Private TaskCuori() As PicInfo + + Private MyPool As XYThreadPool = New XYThreadPool + Private ContaImmaginiThread As Integer + + Private maxThreads As Integer = 15 + Private minThreads As Integer = 5 + + Private Sub setDefaults() + txtSorgente.Text = "" + txtDestinazione.Text = "" + TextBox3.Text = "tn_" + TextBox4.Text = "" + TextBox5.Text = "350" + TextBox6.Text = "350" + TextBox27.Text = "2240" + TextBox28.Text = "2240" + TextBox9.Text = "0" + TextBox11.Text = "20" + TextBox12.Text = "8" + 'TextBox13.Text = "" + TextBox10.Text = "" + TextBox14.Text = "430" + TextBox15.Text = "430" + TextBox16.Text = "290" + txtFilePerCartella.Text = "99" + TextBox19.Text = "100" + txtSuffissoCartelle.Text = "" + txtCifreContatore.Text = "2" + TextBox25.Text = "50" + TextBox26.Text = "" + TextBox7.Text = CStr(4) + TextBox8.Text = CStr(4) + TextBox34.Text = "Yellow" + TextBox30.Text = "20" + TextBox31.Text = "6" + TextBox32.Text = "85" + TextBox33.Text = "30" + + + ComboBox1.Items.Add("Alto") + ComboBox1.Items.Add("Basso") + ComboBox1.SelectedIndex = 1 + + ComboBox2.Items.Add("Sinistra") + ComboBox2.Items.Add("Centro") + ComboBox2.Items.Add("Destra") + ComboBox2.SelectedIndex = 1 + + ' Create a obejct of InstalledFontCollection + Dim InstalledFonts As New InstalledFontCollection + ' Gets the array of FontFamily objects associated with this FontCollection. + Dim fontfamilies() As FontFamily = InstalledFonts.Families() + + ' Populates font combobox with the font name + + For Each fontFamily As FontFamily In fontfamilies + ComboBox3.Items.Add(fontFamily.Name) + Next + + ComboBox3.Text = ComboBox3.Items(0).ToString + + 'ComboBox3.Items.Add("Arial") + 'ComboBox3.Items.Add("Arial Black") + 'ComboBox3.Items.Add("Arial Narrow") + 'ComboBox3.Items.Add("Comic Sans MS") + 'ComboBox3.Items.Add("Courier New") + 'ComboBox3.Items.Add("System") + 'ComboBox3.Items.Add("Times New Roman") + 'ComboBox3.Items.Add("Verdana") + 'ComboBox3.Items.Add("Wingdings") + 'ComboBox3.SelectedIndex = 7 + + ComboBox4.Items.Add("Sinistra") + ComboBox4.Items.Add("Centro") + ComboBox4.Items.Add("Destra") + ComboBox4.SelectedIndex = 2 + + ComboBox5.Items.Add("Alto") + ComboBox5.Items.Add("Centro") + ComboBox5.Items.Add("Basso") + ComboBox5.SelectedIndex = 2 + End Sub + + Private Shared Function AllocConsole() As Boolean + + End Function + + Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + Application.EnableVisualStyles() + + setDefaults() +#If Not DEBUG Then + AllocConsole() +#End If + + Console.WriteLine("Programma avviato") + End Sub + + Private Sub FixPaths() + If txtSorgente.Text.EndsWith("\") = False Then + txtSorgente.Text &= "\" + End If + If txtDestinazione.Text.EndsWith("\") = False Then + txtDestinazione.Text &= "\" + End If + End Sub + + Private Sub lockUI() + TabControl1.Enabled = False + Button5.Enabled = False + Button6.Enabled = False + btnCreaCatalogo.Enabled = False + + End Sub + + Private Sub unlockUI() + TabControl1.Enabled = True + Button5.Enabled = True + Button6.Enabled = True + btnCreaCatalogo.Enabled = True + End Sub + + Private Sub btnCreaCatalogo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreaCatalogo.Click + lockUI() + Dim timeStart As Date + Dim timeStop As Date + + timeStart = TimeOfDay + FixPaths() + + Label10.Text = "" + lblFotoTotaliNum.Text = "0" + Label18.Text = "0" + Label43.Text = "-s" + + maxThreads = CInt(TextBox7.Text) + minThreads = CInt(TextBox8.Text) + + If rdbNuovoMetodo.Checked Then + setPicSettings(txtSorgente.Text, txtDestinazione.Text) + ProgressBar1.Minimum = 0 + ProgressBar1.Step = 1 + ProgressBar1.Value = 0 + + Dim t1 As New Threading.Thread(AddressOf creaCatalogoThread) + t1.IsBackground = False + t1.Start() + ElseIf rdbVecchioMetodo.Checked Then + creaCatalogo(timeStart, timeStop) + unlockUI() + End If + End Sub + + + Private Sub creaCatalogoThread() + Dim timeStart As Date = TimeOfDay + MyPool.StopThreadPool() + MyPool.StartThreadPool(minThreads, maxThreads) + ContaImmaginiThread = 0 + + 'creaImmaginiWithThreadMod(txtSorgente.Text, txtDestinazione.Text) + creaimmaginiWithThreadDict(txtSorgente.Text, txtDestinazione.Text) + Dim ThAttivo As ThreadPoolWorkItem = Nothing + Dim i As Integer = 0 +#Const asfd = 1 + +#If asfd = 1 Then + + + Do Until i = ContaImmaginiThread + Thread.Sleep(100) + ThAttivo = MyPool.ExtractWorkItem() + If ThAttivo IsNot Nothing Then + i += 1 + 'stepProgressBar() + Dim threads As Integer = MyPool.GetThreadCount() + setLabel10Text("File: " & ThAttivo.m_sName & " Threads: " & CStr(threads)) + + 'setLabel18Text(ContaImmaginiThread.ToString) + 'setLabel18Text(i.ToString) + + + 'Label10.Text = "File: " & ThAttivo.m_sName + 'Label18.Text = ContaImmaginiThread.ToString + End If + Loop + MyPool.StopThreadPool() + Dim timeStop As Date = TimeOfDay + + setLabel10Text("Finito") + setLabel43Text(CalcTime(timeStart, timeStop, ContaImmaginiThread)) +#End If + End Sub + + Private Sub creaCatalogo(timeStart As Date, timeStop As Date) + 'asdfg + MyPool.StopThreadPool() + MyPool.StartThreadPool(minThreads, maxThreads) + ContaImmaginiThread = 0 + + CreaImmaginiWithThread(txtSorgente.Text, txtDestinazione.Text) + + Dim ThAttivo As ThreadPoolWorkItem = Nothing + Dim i As Integer = 0 + + Do Until i = ContaImmaginiThread + Thread.Sleep(100) + ThAttivo = MyPool.ExtractWorkItem() + If ThAttivo IsNot Nothing Then + i += 1 + Label10.Text = "File: " & ThAttivo.m_sName + Label18.Text = ContaImmaginiThread.ToString + + End If + Loop + MyPool.StopThreadPool() + timeStop = TimeOfDay + + CalcTime(timeStart, timeStop, ContaImmaginiThread) + Label10.Text = "Finito" + If CheckBox22.Checked = True Then + Shell("%windir%\System32\shutdown.exe") + End If + End Sub + + Private Function CalcTime(ByVal timeStart As Date, ByVal timeStop As Date, ByVal numFoto As Integer) As String + Dim timediffH, timediffS As Long + Dim timediffM As Long + timediffM = DateAndTime.DateDiff(DateInterval.Minute, timeStart, timeStop) + timediffS = DateAndTime.DateDiff(DateInterval.Second, timeStart, timeStop) + timediffH = DateAndTime.DateDiff(DateInterval.Hour, timeStart, timeStop) + 'dim s As String = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + + 'Label43.Text = "H:" + timediffH.ToString + " M:" + timediffM.ToString + " S:" + timediffS.ToString + Dim fotoSec As Double = numFoto / CDbl(timediffS) + Dim fotoMin As Double = numFoto / CDbl(timediffM) + Dim fotoOra As Double = numFoto / CDbl(timediffH) + Dim s As String = "S: " + timediffS.ToString + "; F/s: " + fotoSec.ToString("0.000") '+ " F/m: " + fotoMin.ToString("0.00") + " F/h: " + fotoOra.ToString("0.00") + Return s + End Function + Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click + Dim DirSearch As FolderBrowserDialog = New FolderBrowserDialog + DirSearch.SelectedPath = txtSorgente.Text + If DialogResult.OK = DirSearch.ShowDialog() Then + Dim DirectoryScelta As String = DirSearch.SelectedPath + If DirectoryScelta.EndsWith("\") = False Then + DirectoryScelta &= "\" + End If + + txtSorgente.Text = DirectoryScelta + End If + End Sub + + Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click + Dim DirSearch As FolderBrowserDialog = New FolderBrowserDialog + DirSearch.SelectedPath = txtDestinazione.Text + If DialogResult.OK = DirSearch.ShowDialog() Then + Dim DirectoryScelta As String = DirSearch.SelectedPath + If DirectoryScelta.EndsWith("\") = False Then + DirectoryScelta &= "\" + End If + + txtDestinazione.Text = DirectoryScelta + End If + + 'Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + 'openFileDialog.Filter = "Bitmap files (*.bmp)|*.bmp|Jpeg files (*.jpg)|*.jpg|All valid files (*.*)|*.*" + 'openFileDialog.FilterIndex = 2 + 'openFileDialog.RestoreDirectory = True + + 'If DialogResult.OK = openFileDialog.ShowDialog() Then + ' Dim IlNome As String = openFileDialog.FileName + ' Dim NomeFine As String = "" + ' Dim i As Integer + + ' Dim Elenco As String() + ' Elenco = IlNome.Split(New Char() {"\"c}) + ' For i = 0 To Elenco.Length - 1 + ' NomeFine &= Elenco(i) & "\" + ' Next + + ' TextBox1.Text = NomeFine + 'End If + End Sub + + Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click + Dim SaveFileDlg As SaveFileDialog = New SaveFileDialog + + 'SaveFileDlg.InitialDirectory = "c:\" + SaveFileDlg.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*" + SaveFileDlg.FilterIndex = 0 + SaveFileDlg.RestoreDirectory = True + + If DialogResult.OK = SaveFileDlg.ShowDialog Then + Dim IlNome As String = SaveFileDlg.FileName + + SetupIni.NomeFileSetup = IlNome + + SetupIni.AggiornaParametro("DirSorgente", txtSorgente.Text) + SetupIni.AggiornaParametro("DirDestinazione", txtDestinazione.Text) + SetupIni.AggiornaParametro("DirSottoDirectory", chkAggiornaSottodirectory.Checked) + + SetupIni.AggiornaParametro("DirDividiDestinazione", chkCreaSottocartelle.Checked) + SetupIni.AggiornaParametro("DirDividiNumFile", txtFilePerCartella.Text) + SetupIni.AggiornaParametro("DirDividiSuffisso", txtSuffissoCartelle.Text) + SetupIni.AggiornaParametro("DirDividiNumCifre", txtCifreContatore.Text) + If rdbNumProgressiva.Checked = True Then + SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Progressiva") + Else + SetupIni.AggiornaParametro("DirDividiTipoNumerazione", "Files") + End If + + SetupIni.AggiornaParametro("MiniatureCrea", CheckBox1.Checked) + SetupIni.AggiornaParametro("MiniatureSuffisso", TextBox3.Text) + SetupIni.AggiornaParametro("MiniatureAltezza", TextBox5.Text) + SetupIni.AggiornaParametro("MiniatureLarghezza", TextBox6.Text) + SetupIni.AggiornaParametro("MiniatureAddScritta", RadioButton3.Checked) + SetupIni.AggiornaParametro("MiniatureAddOrario", RadioButton4.Checked) + + SetupIni.AggiornaParametro("FotoAltezza", TextBox27.Text) + SetupIni.AggiornaParametro("FotoLarghezza", TextBox28.Text) + 'SetupIni.AggiornaParametro("FotoCodice", TextBox13.Text) + 'SetupIni.AggiornaParametro("FotoDimOriginali", CheckBox2.Checked) + + SetupIni.AggiornaParametro("FontDimensione", TextBox11.Text) + SetupIni.AggiornaParametro("FontDimensioneMiniatura", TextBox25.Text) + SetupIni.AggiornaParametro("FontBold", CheckBox3.Checked) + SetupIni.AggiornaParametro("FontNome", ComboBox3.Text) + + + SetupIni.AggiornaParametro("TestoTesto", TextBox4.Text) + SetupIni.AggiornaParametro("TestoTrasparente", TextBox9.Text) + SetupIni.AggiornaParametro("TestoMargine", TextBox12.Text) + SetupIni.AggiornaParametro("TestoPosizione", ComboBox1.Text) + SetupIni.AggiornaParametro("TestoAllineamento", ComboBox2.Text) + + SetupIni.AggiornaParametro("MarchioFile", TextBox10.Text) + SetupIni.AggiornaParametro("MarchioAltezza", TextBox14.Text) + SetupIni.AggiornaParametro("MarchioLarghezza", TextBox15.Text) + SetupIni.AggiornaParametro("MarchioMargine", TextBox16.Text) + SetupIni.AggiornaParametro("MarchioAllOrizzontale", ComboBox4.Text) + SetupIni.AggiornaParametro("MarchioAllVerticale", ComboBox5.Text) + SetupIni.AggiornaParametro("MarchioTrasparenza", TextBox19.Text) + SetupIni.AggiornaParametro("MarchioAggiungi", CheckBox5.Checked) + + SetupIni.AggiornaParametro("TempoGara", CheckBox7.Checked) + SetupIni.AggiornaParametro("Orario", CheckBox8.Checked) + SetupIni.AggiornaParametro("EtichettaOrario", TextBox18.Text) + + SetupIni.AggiornaParametro("GeneraleForzaJpg", chkForzaJpg.Checked) + SetupIni.AggiornaParametro("GeneraleRotazioneAutomatica", chkRotazioneAutomatica.Checked) + SetupIni.AggiornaParametro("GrandezzaVerticale", TextBox30.Text) + SetupIni.AggiornaParametro("MargineVerticale", TextBox31.Text) + SetupIni.AggiornaParametro("DimensioniOriginali", CheckBox15.Checked) + SetupIni.AggiornaParametro("TestoVerticale", TextBox29.Text) + SetupIni.AggiornaParametro("NomeMiniatura", RadioButton6.Checked) + SetupIni.AggiornaParametro("DataFoto", CheckBox16.Checked) + SetupIni.AggiornaParametro("NumeroFoto", CheckBox17.Checked) + + SetupIni.AggiornaParametro("ColoreTestoRGB", TextBox34.Text) + + SetupIni.AggiornaParametro("TempoSmall", RadioButton5.Checked) + SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked) + + SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text) + SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text) + SetupIni.SalvaParametriSetup() + Me.Text = "Image Catalog - " & LeggiSoloNomeFile(IlNome) + End If + End Sub + + Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click + Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*" + openFileDialog.FilterIndex = 0 + openFileDialog.RestoreDirectory = True + + If DialogResult.OK = openFileDialog.ShowDialog() Then + Dim IlNome As String = openFileDialog.FileName + + SetupIni.NomeFileSetup = IlNome + SetupIni.CaricaParametriSetup() + + txtSorgente.Text = SetupIni.LeggiParametroString("DirSorgente") + txtDestinazione.Text = SetupIni.LeggiParametroString("DirDestinazione") + chkAggiornaSottodirectory.Checked = SetupIni.LeggiParametroBoolean("DirSottoDirectory") + + chkCreaSottocartelle.Checked = SetupIni.LeggiParametroBoolean("DirDividiDestinazione") + txtFilePerCartella.Text = SetupIni.LeggiParametroString("DirDividiNumFile") + txtSuffissoCartelle.Text = SetupIni.LeggiParametroString("DirDividiSuffisso") + txtCifreContatore.Text = SetupIni.LeggiParametroString("DirDividiNumCifre") + + Dim TestoTemp As String = SetupIni.LeggiParametroString("DirDividiTipoNumerazione") + If TestoTemp.ToUpper = "PROGRESSIVA" Then + rdbNumProgressiva.Checked = True + Else + rdbNumFiles.Checked = True + End If + + CheckBox1.Checked = SetupIni.LeggiParametroBoolean("MiniatureCrea") + TextBox3.Text = SetupIni.LeggiParametroString("MiniatureSuffisso") + TextBox5.Text = SetupIni.LeggiParametroString("MiniatureAltezza") + TextBox6.Text = SetupIni.LeggiParametroString("MiniatureLarghezza") + RadioButton3.Checked = SetupIni.LeggiParametroBoolean("MiniatureAddScritta") + RadioButton4.Checked = SetupIni.LeggiParametroBoolean("MiniatureAddOrario") + + TextBox27.Text = SetupIni.LeggiParametroString("FotoAltezza") + TextBox28.Text = SetupIni.LeggiParametroString("FotoLarghezza") + 'TextBox13.Text = SetupIni.LeggiParametroString("FotoCodice") + 'CheckBox2.Checked = SetupIni.LeggiParametroBoolean("FotoDimOriginali") + + TextBox11.Text = SetupIni.LeggiParametroString("FontDimensione") + TextBox25.Text = SetupIni.LeggiParametroString("FontDimensioneMiniatura") + CheckBox3.Checked = SetupIni.LeggiParametroBoolean("FontBold") + ComboBox3.Text = SetupIni.LeggiParametroString("FontNome") + + If TextBox25.Text = "" Then + TextBox25.Text = "0" + End If + + TextBox4.Text = SetupIni.LeggiParametroString("TestoTesto") + TextBox9.Text = SetupIni.LeggiParametroString("TestoTrasparente") + TextBox12.Text = SetupIni.LeggiParametroString("TestoMargine") + ComboBox1.Text = SetupIni.LeggiParametroString("TestoPosizione") + ComboBox2.Text = SetupIni.LeggiParametroString("TestoAllineamento") + + TextBox10.Text = SetupIni.LeggiParametroString("MarchioFile") + TextBox14.Text = SetupIni.LeggiParametroString("MarchioAltezza") + TextBox15.Text = SetupIni.LeggiParametroString("MarchioLarghezza") + TextBox16.Text = SetupIni.LeggiParametroString("MarchioMargine") + ComboBox4.Text = SetupIni.LeggiParametroString("MarchioAllOrizzontale") + ComboBox5.Text = SetupIni.LeggiParametroString("MarchioAllVerticale") + TextBox19.Text = SetupIni.LeggiParametroString("MarchioTrasparenza") + CheckBox5.Checked = SetupIni.LeggiParametroBoolean("MarchioAggiungi") + + CheckBox7.Checked = SetupIni.LeggiParametroBoolean("TempoGara") + CheckBox8.Checked = SetupIni.LeggiParametroBoolean("Orario") + TextBox18.Text = SetupIni.LeggiParametroString("EtichettaOrario") + + chkForzaJpg.Checked = SetupIni.LeggiParametroBoolean("GeneraleForzaJpg") + chkRotazioneAutomatica.Checked = SetupIni.LeggiParametroBoolean("GeneraleRotazioneAutomatica") + + TextBox30.Text = SetupIni.LeggiParametroString("GrandezzaVerticale") + TextBox31.Text = SetupIni.LeggiParametroString("MargineVerticale") + CheckBox15.Checked = SetupIni.LeggiParametroBoolean("DimensioniOriginali") + TextBox29.Text = SetupIni.LeggiParametroString("TestoVerticale") + RadioButton6.Checked = SetupIni.LeggiParametroBoolean("NomeMiniatura") + CheckBox16.Checked = SetupIni.LeggiParametroBoolean("DataFoto") + CheckBox17.Checked = SetupIni.LeggiParametroBoolean("NumeroFoto") + + + RadioButton5.Checked = SetupIni.LeggiParametroBoolean("TempoSmall") + RadioButton7.Checked = SetupIni.LeggiParametroBoolean("NumTempoSmall") + + TextBox32.Text = SetupIni.LeggiParametroString("CompressioneJpeg") + TextBox33.Text = SetupIni.LeggiParametroString("CompressioneJpegMiniatura") + + TextBox34.Text = SetupIni.LeggiParametroString("ColoreTestoRGB") + If File.Exists(TextBox10.Text) Then + + + PictureBox1.Image = Image.FromFile(TextBox10.Text) + If PictureBox1.Image.Height >= PictureBox1.Image.Width Then + PictureBox1.Height = 160 + PictureBox1.Width = CType(160 * PictureBox1.Image.Width / PictureBox1.Image.Height, Integer) + Else + PictureBox1.Width = 224 + PictureBox1.Height = CType(224 * PictureBox1.Image.Height / PictureBox1.Image.Width, Integer) + End If + End If + Me.Text = "Image Catalog - " & LeggiSoloNomeFile(IlNome) + End If + End Sub + + Private Sub setPicSettings(ByVal SourcePath As String, ByVal DestPath As String) + + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + + + + PicSettings.DirectorySorgente = txtSorgente.Text + PicSettings.DirectoryDestinazione = txtDestinazione.Text + + 'PicSettings.DestDir = DestDir + 'PicSettings.SourceDir = SourceDir + 'PicSettings.DestDirStart = DestDirStart + + PicSettings.DimStandard = CType(TextBox11.Text, Integer) + PicSettings.DimStandardMiniatura = CType(TextBox25.Text, Integer) + + PicSettings.UsaOrarioMiniatura = CheckBox12.Checked + PicSettings.UsaOrarioTestoApplicare = CheckBox8.Checked + PicSettings.UsaTempoGaraTestoApplicare = CheckBox7.Checked + + PicSettings.UsaRotazioneAutomatica = chkRotazioneAutomatica.Checked + PicSettings.UsaForzaJpg = chkForzaJpg.Checked + + If CheckBox17.Checked Then + PicSettings.TestoNome = True + Else + PicSettings.TestoNome = False + + End If + + If CheckBox16.Checked Then + PicSettings.NomeData = True + Else + PicSettings.NomeData = False + End If + PicSettings.TestoFirmaStart = TextBox4.Text + PicSettings.TestoFirmaStartV = TextBox29.Text + + PicSettings.DataPartenza = DateTimePicker1.Value + PicSettings.TestoOrario = TextBox18.Text + + PicSettings.AltezzaSmall = CType(TextBox6.Text, Integer) + PicSettings.LarghezzaSmall = CType(TextBox5.Text, Integer) + + PicSettings.CreaMiniature = CheckBox1.Checked + PicSettings.AggiungiScritteMiniature = RadioButton3.Checked + PicSettings.AggTempoGaraMin = RadioButton5.Checked + PicSettings.AggNumTempMin = RadioButton7.Checked + + + PicSettings.DimVert = CType(TextBox30.Text, Integer) + PicSettings.MargVert = CType(TextBox31.Text, Integer) + + 'PicSettings.NomeFileChild = childFile.Name + PicSettings.Suffisso = TextBox3.Text + 'PicSettings.Codice = TextBox13.Text + + PicSettings.Trasparenza = CType(TextBox9.Text, Integer) + PicSettings.IlFont = ComboBox3.SelectedItem.ToString + PicSettings.Grassetto = CheckBox3.Checked + + PicSettings.Posizione = ComboBox1.SelectedItem.ToString + PicSettings.Allineamento = ComboBox2.SelectedItem.ToString + PicSettings.Margine = CType(TextBox12.Text, Integer) + + PicSettings.LogoAltezza = CType(TextBox14.Text, Integer) + PicSettings.LogoLarghezza = CType(TextBox15.Text, Integer) + + PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text) + + PicSettings.LogoAggiungi = CheckBox5.Checked + PicSettings.LogoNomeFile = TextBox10.Text + PicSettings.LogoTrasparenza = TextBox19.Text + PicSettings.LogoMargine = TextBox16.Text + PicSettings.LogoPosizioneH = ComboBox4.Text + PicSettings.LogoPosizioneV = ComboBox5.Text + + PicSettings.FotoGrandeDimOrigina = CheckBox15.Checked + PicSettings.AltezzaBig = CType(TextBox27.Text, Integer) + PicSettings.LarghezzaBig = CType(TextBox28.Text, Integer) + PicSettings.DimMin = CType(TextBox25.Text, Integer) + + PicSettings.TestoMin = RadioButton6.Checked + + PicSettings.jpegQuality = CLng(TextBox32.Text) + PicSettings.jpegQualityMin = CLng(TextBox33.Text) + + PicSettings.mainForm = Me + + + End Sub + + Private Function makeFilesList(ByVal SourcePath As String) As List(Of List(Of FileInfo)) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(txtFilePerCartella.Text, Integer) + Dim SuffixDir As String = txtSuffissoCartelle.Text + Dim NumCifreDir As Integer = CType(txtCifreContatore.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + Dim picList As New List(Of FileInfo) + Dim dirList As New List(Of List(Of FileInfo)) + + + 'controlla directory principale + 'Dim childFile As FileInfo + 'For Each childFile In SourceDir.GetFiles("*.jpg") + ' picList.Add(childFile) + 'Next + + 'picList = getFiles(SourceDir, SearchOption.AllDirectories) + + 'dirList.Add(picList) + + 'controlla sottodirectory + If chkAggiornaSottodirectory.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + Dim filesList As New List(Of FileInfo) + filesList = getFiles(subDir) + dirList.Add(filesList) + Next + End If + + Return dirList + End Function + + Private Function getFiles(sourceDir As DirectoryInfo) As List(Of FileInfo) + Dim picList As New List(Of FileInfo) + Dim childFile As FileInfo + For Each childFile In sourceDir.GetFiles("*.jpg") + picList.Add(childFile) + Next + Return picList + End Function + + Private Function getDirsDict(SourcePath As String, DestPath As String) As Dictionary(Of FileInfo, DirectoryInfo) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(txtFilePerCartella.Text, Integer) + Dim SuffixDir As String = txtSuffissoCartelle.Text + Dim NumCifreDir As Integer = CType(txtCifreContatore.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + 'Dim TestoTemp As String = "" + 'Dim ContaTemp As Integer = 0 + Dim dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) = New Dictionary(Of FileInfo, DirectoryInfo) + + If SourceDir.Exists Then + + If chkAggiornaSottodirectory.Checked Then + FileConta = SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories).GetLength(0) + Else + FileConta = SourceDir.GetFiles("*.jpg", SearchOption.TopDirectoryOnly).GetLength(0) + End If + + Dim a As String = (CType(lblFotoTotaliNum.Text, Integer) + FileConta).ToString + setLabel17Text(a) + setProgressBarMaximum(CInt(a)) + + If chkAggiornaSottodirectory.Checked Then + + For Each directory As DirectoryInfo In SourceDir.GetDirectories + For Each file As FileInfo In directory.GetFiles(".jpg") + + Next + Next + + End If + + For Each file As FileInfo In SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories) + + Next + + + If NumFileXDir > 0 And chkCreaSottocartelle.Checked = True And FileConta > NumFileXDir Then + DividiFile = True + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + + Dim filesList As New List(Of FileInfo) + If chkAggiornaSottodirectory.Checked Then + filesList.AddRange(SourceDir.GetFiles("*.jpg", SearchOption.AllDirectories)) + filesList.AddRange(SourceDir.GetFiles("*.png", SearchOption.AllDirectories)) + Else + filesList.AddRange(SourceDir.GetFiles("*.jpg", SearchOption.TopDirectoryOnly)) + filesList.AddRange(SourceDir.GetFiles("*.png", SearchOption.TopDirectoryOnly)) + End If + + For Each file As FileInfo In filesList + + + + ContaFileXDir += 1 + If DividiFile = True Then + If ContaFileXDir = (ContaDirXDir * NumFileXDir) + 1 Then + ContaDirXDir += 1 + Dim TestoTemp As String + If rdbNumProgressiva.Checked = True Then + TestoTemp = ContaDirXDir.ToString + Else + TestoTemp = (ContaDirXDir * NumFileXDir).ToString + End If + For ContaTemp As Integer = 1 To (NumCifreDir - TestoTemp.Length) + TestoTemp = "0" & TestoTemp + Next + DestDir = New DirectoryInfo(Path.Combine(DestDirStart.FullName, SuffixDir, TestoTemp)) + 'DestDir = New DirectoryInfo(DestDirStart.FullName & IIf(Not DestDirStart.FullName.EndsWith("\"), "\", String.Empty).ToString & SuffixDir & TestoTemp) + dirSourceDest.Add(file, DestDir) + + If Not DestDir.Exists Then + DestDir.Create() + End If + End If + End If + + Next + + + End If + Return dirSourceDest + End Function + + Private Sub setLabel17Text(ByVal text As String) + If lblFotoTotaliNum.InvokeRequired Then + lblFotoTotaliNum.Invoke(New Action(Of String)(AddressOf setLabel17Text), text) + Else + lblFotoTotaliNum.Text = text + + End If + End Sub + + Private Sub setLabel10Text(ByVal text As String) + If Label10.InvokeRequired Then + Label10.Invoke(New Action(Of String)(AddressOf setLabel10Text), text) + Else + Label10.Text = text + + End If + End Sub + Public Sub stepProgressBar() + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New MethodInvoker(AddressOf ProgressBar1.PerformStep)) + Else + ProgressBar1.PerformStep() + End If + setLabel18Text(ProgressBar1.Value.ToString) + End Sub + Private Sub setProgressBarMaximum(ByVal value As Integer) + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New Action(Of Integer)(AddressOf setProgressBarMaximum), value) + Else + ProgressBar1.Maximum = value + + End If + End Sub + + Private Sub setProgressBarValue(ByVal value As Integer) + If ProgressBar1.InvokeRequired Then + ProgressBar1.Invoke(New Action(Of Integer)(AddressOf setProgressBarValue), value) + Else + ProgressBar1.Value = value + + End If + End Sub + + Private Sub setLabel18Text(ByVal text As String) + If Label18.InvokeRequired Then + Label18.Invoke(New Action(Of String)(AddressOf setLabel18Text), text) + Else + Label18.Text = text + + End If + End Sub + + Private Sub setLabel43Text(ByVal text As String) + If Label43.InvokeRequired Then + Label43.Invoke(New Action(Of String)(AddressOf setLabel43Text), text) + Else + Label43.Text = text + + End If + End Sub + + Private Sub creaImmaginiWithThreadMod(ByVal SourcePath As String, ByVal DestPath As String) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(txtFilePerCartella.Text, Integer) + Dim SuffixDir As String = txtSuffissoCartelle.Text + Dim NumCifreDir As Integer = CType(txtCifreContatore.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + If SourceDir.Exists Then + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0) + 'Label17.Text = (CType(Label17.Text, Integer) + FileConta).ToString + Dim a As String = (CType(lblFotoTotaliNum.Text, Integer) + FileConta).ToString + setLabel17Text(a) + setProgressBarMaximum(CInt(a)) + + If NumFileXDir > 0 And chkCreaSottocartelle.Checked = True Then + If FileConta > NumFileXDir Then + DividiFile = True + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles("*.jpg") + If StopAttivo = True Then + Exit For + End If + setLabel10Text("File: " & childFile.Name) + Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + 'setLabel18Text(b) + 'setProgressBarValue(CInt(b)) + 'Label10.Text = "File: " & childFile.Name + 'Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + 'Application.DoEvents() + + ContaFileXDir += 1 + + If DividiFile = True Then + If ContaFileXDir = (ContaDirXDir * NumFileXDir) + 1 Then + ContaDirXDir += 1 + + If rdbNumProgressiva.Checked = True Then + TestoTemp = ContaDirXDir.ToString + Else + TestoTemp = (ContaDirXDir * NumFileXDir).ToString + End If + For ContaTemp = 1 To (NumCifreDir - TestoTemp.Length) + TestoTemp = "0" & TestoTemp + Next + + If DestDirStart.FullName.EndsWith("\") Then + DestDir = New DirectoryInfo(DestDirStart.FullName & SuffixDir & TestoTemp) + Else + DestDir = New DirectoryInfo(DestDirStart.FullName & "\" & SuffixDir & TestoTemp) + End If + + If Not DestDir.Exists Then + DestDir.Create() + End If + End If + End If + + 'Application.DoEvents() + + + + Dim ClsCreaImmagine As New ImageCreatorSharp(childFile.Name, SourceDir, DestDir, DestDirStart) + ' ClsCreaImmagine.NomeFileChild = childFile.Name + ' ClsCreaImmagine.DestDir = DestDir + ' ClsCreaImmagine.SourceDir = SourceDir + ' ClsCreaImmagine.DestDirStart = DestDirStart + + ContaImmaginiThread += 1 + MyPool.InsertWorkItem(childFile.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {childFile.Name}, True) + Next + ' copy all the sub-directories by recursively calling this same routine + If chkAggiornaSottodirectory.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + creaImmaginiWithThreadMod(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)) + Next + End If + End If + End Sub + + Private Function getNumerazione() As Integer + Dim numerazione As Integer + If rdbNumProgressiva.Checked Then + numerazione = FileHelper.numerazione.Progressiva + Else + numerazione = FileHelper.numerazione.Files + End If + Return numerazione + End Function + + Private Function GetNumerazioneEnum() As NumerazioneType + Dim numerazioneType As NumerazioneType + If rdbNumProgressiva.Checked Then + numerazioneType = NumerazioneType.Progressiva ' FileHelper.numerazione.Progressiva + Else + numerazioneType = NumerazioneType.Files ' FileHelper.numerazione.Files + End If + Return numerazioneType + End Function + + Private Sub creaimmaginiWithThreadDict(ByVal SourcePath As String, ByVal DestPath As String) + Dim dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) = New Dictionary(Of FileInfo, DirectoryInfo) + If chkAggiornaSottodirectory.Checked And chkCreaSottocartelle.Checked Then + + Dim helper As New FileHelper(CInt(txtFilePerCartella.Text), txtSuffissoCartelle.Text, CInt(txtCifreContatore.Text), getNumerazione()) + 'getfilesrecursive + dirSourceDest = helper.GetFilesRecursive(New DirectoryInfo(SourcePath), New DirectoryInfo(DestPath), "*.jpg") + ElseIf chkAggiornaSottodirectory.Checked And Not chkCreaSottocartelle.Checked Then + + End If + + '= getDirsDict(SourcePath, DestPath) + + Dim pair As KeyValuePair(Of FileInfo, DirectoryInfo) + For Each pair In dirSourceDest + setLabel10Text("File: " & pair.Key.Name) + Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + Dim ClsCreaImmagine As New ImageCreatorSharp(pair.Key, pair.Value) + ContaImmaginiThread += 1 + + MyPool.InsertWorkItem(pair.Key.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {pair.Key.Name}, True) + + Next + + End Sub + + 'il posto giusto dove fare modifiche + Private Sub CreaImmaginiWithThread(ByVal SourcePath As String, ByVal DestPath As String) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDirStart As DirectoryInfo = New DirectoryInfo(DestPath) + Dim DestDir As DirectoryInfo = Nothing + Dim NumFileXDir As Integer = CType(txtFilePerCartella.Text, Integer) + Dim SuffixDir As String = txtSuffissoCartelle.Text + Dim NumCifreDir As Integer = CType(txtCifreContatore.Text, Integer) + Dim DividiFile As Boolean = False + + StopAttivo = False + + Dim FileConta As Integer = 0 + Dim ContaFileXDir As Integer = 0 + Dim ContaDirXDir As Integer = 0 + Dim TestoTemp As String = "" + Dim ContaTemp As Integer = 0 + + + + If SourceDir.Exists Then + FileConta = SourceDir.GetFiles("*.jpg").GetLength(0) + lblFotoTotaliNum.Text = (CType(lblFotoTotaliNum.Text, Integer) + FileConta).ToString + + If NumFileXDir > 0 And chkCreaSottocartelle.Checked = True Then + If FileConta > NumFileXDir Then + DividiFile = True + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + Else + DestDir = DestDirStart + If Not DestDir.Exists Then + DestDir.Create() + End If + DividiFile = False + End If + + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles("*.jpg") + If StopAttivo = True Then + Exit For + End If + 'Label10.Text = "File: " & childFile.Name + 'Label18.Text = (CType(Label18.Text, Integer) + 1).ToString + 'Application.DoEvents() + + ContaFileXDir += 1 + + If DividiFile = True Then + If ContaFileXDir = (ContaDirXDir * NumFileXDir) + 1 Then + ContaDirXDir += 1 + + If rdbNumProgressiva.Checked = True Then + TestoTemp = ContaDirXDir.ToString + Else + TestoTemp = (ContaDirXDir * NumFileXDir).ToString + End If + For ContaTemp = 1 To (NumCifreDir - TestoTemp.Length) + TestoTemp = "0" & TestoTemp + Next + + If DestDirStart.FullName.EndsWith("\") Then + DestDir = New DirectoryInfo(DestDirStart.FullName & SuffixDir & TestoTemp) + Else + DestDir = New DirectoryInfo(DestDirStart.FullName & "\" & SuffixDir & TestoTemp) + End If + + If Not DestDir.Exists Then + DestDir.Create() + End If + End If + End If + + Application.DoEvents() + Dim ClsCreaImmagine As New CreaImmagineSeparateThread + + ClsCreaImmagine.DirectorySorgente = txtSorgente.Text + ClsCreaImmagine.DirectoryDestinazione = txtDestinazione.Text + + ClsCreaImmagine.DestDir = DestDir + ClsCreaImmagine.SourceDir = SourceDir + ClsCreaImmagine.DestDirStart = DestDirStart + + ClsCreaImmagine.DimStandard = CType(TextBox11.Text, Integer) + ClsCreaImmagine.DimStandardMiniatura = CType(TextBox25.Text, Integer) + + ClsCreaImmagine.UsaOrarioMiniatura = CheckBox12.Checked + ClsCreaImmagine.UsaOrarioTestoApplicare = CheckBox8.Checked + ClsCreaImmagine.UsaTempoGaraTestoApplicare = CheckBox7.Checked + + ClsCreaImmagine.UsaRotazioneAutomatica = chkRotazioneAutomatica.Checked + ClsCreaImmagine.UsaForzaJpg = chkForzaJpg.Checked + + If CheckBox17.Checked Then + ClsCreaImmagine.TestoNome = True + Else + ClsCreaImmagine.TestoNome = False + + End If + + If CheckBox16.Checked Then + ClsCreaImmagine.NomeData = True + Else + ClsCreaImmagine.NomeData = False + End If + ClsCreaImmagine.TestoFirmaStart = TextBox4.Text + ClsCreaImmagine.TestoFirmaStartV = TextBox29.Text + + ClsCreaImmagine.DataPartenza = DateTimePicker1.Value + ClsCreaImmagine.TestoOrario = TextBox18.Text + + ClsCreaImmagine.AltezzaSmall = CType(TextBox5.Text, Integer) + ClsCreaImmagine.LarghezzaSmall = CType(TextBox5.Text, Integer) + + ClsCreaImmagine.CreaMiniature = CheckBox1.Checked + ClsCreaImmagine.AggiungiScritteMiniature = RadioButton3.Checked + ClsCreaImmagine.AggTempoGaraMin = RadioButton5.Checked + ClsCreaImmagine.AggNumTempMin = RadioButton7.Checked + + + ClsCreaImmagine.DimVert = CType(TextBox30.Text, Integer) + ClsCreaImmagine.MargVert = CType(TextBox31.Text, Integer) + + ClsCreaImmagine.NomeFileChild = childFile.Name + ClsCreaImmagine.Suffisso = TextBox3.Text + 'ClsCreaImmagine.Codice = TextBox13.Text + + ClsCreaImmagine.Trasparenza = CType(TextBox9.Text, Integer) + ClsCreaImmagine.IlFont = ComboBox3.SelectedItem.ToString + ClsCreaImmagine.Grassetto = CheckBox3.Checked + + ClsCreaImmagine.Posizione = ComboBox1.SelectedItem.ToString + ClsCreaImmagine.Allineamento = ComboBox2.SelectedItem.ToString + ClsCreaImmagine.Margine = CType(TextBox12.Text, Integer) + + ClsCreaImmagine.LogoAltezza = CType(TextBox14.Text, Integer) + ClsCreaImmagine.LogoLarghezza = CType(TextBox15.Text, Integer) + + 'ClsCreaImmagine.FontColoreR = CType(TextBox22.Text, Integer) + 'ClsCreaImmagine.FontColoreG = CType(TextBox23.Text, Integer) + 'ClsCreaImmagine.FontColoreB = CType(TextBox24.Text, Integer) + ClsCreaImmagine.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text) + + ClsCreaImmagine.LogoAggiungi = CheckBox5.Checked + ClsCreaImmagine.LogoNomeFile = TextBox10.Text + ClsCreaImmagine.LogoTrasparenza = TextBox19.Text + ClsCreaImmagine.LogoMargine = TextBox16.Text + ClsCreaImmagine.LogoPosizioneH = ComboBox4.Text + ClsCreaImmagine.LogoPosizioneV = ComboBox5.Text + + ClsCreaImmagine.FotoGrandeDimOrigina = CheckBox15.Checked + ClsCreaImmagine.AltezzaBig = CType(TextBox27.Text, Integer) + ClsCreaImmagine.LarghezzaBig = CType(TextBox28.Text, Integer) + ClsCreaImmagine.DimMin = CType(TextBox25.Text, Integer) + + ClsCreaImmagine.TestoMin = RadioButton6.Checked + + ClsCreaImmagine.jpegQuality = CLng(TextBox32.Text) + ClsCreaImmagine.jpegQualityMin = CLng(TextBox33.Text) + + ContaImmaginiThread += 1 + MyPool.InsertWorkItem(childFile.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {childFile.Name}, True) + Next + ' copy all the sub-directories by recursively calling this same routine + If chkAggiornaSottodirectory.Checked = True Then + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + CreaImmaginiWithThread(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name)) + Next + End If + End If + End Sub + + Private Sub CopyDirectoryFile(ByVal SourcePath As String, ByVal DestPath As String, Optional ByVal OverWrite As Boolean = False) + Dim SourceDir As DirectoryInfo = New DirectoryInfo(SourcePath) + Dim DestDir As DirectoryInfo = New DirectoryInfo(DestPath) + + If SourceDir.Exists Then + If Not DestDir.Exists Then + DestDir.Create() + End If + ' copy all the files of the current directory + Dim childFile As FileInfo + For Each childFile In SourceDir.GetFiles() + If OverWrite Then + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), True) + Else + ' if overwrite = false, copy the file only if it does not exist + ' this is done to avoid an IOException if a file already exists + ' this way the other files can be copied anyway... + If Not File.Exists(Path.Combine(DestDir.FullName, childFile.Name)) Then + childFile.CopyTo(Path.Combine(DestDir.FullName, childFile.Name), False) + End If + End If + Next + ' copy all the sub-directories by recursively calling this same routine + Dim subDir As DirectoryInfo + For Each subDir In SourceDir.GetDirectories() + CopyDirectoryFile(subDir.FullName, Path.Combine(DestDir.FullName, subDir.Name), OverWrite) + Next + End If + End Sub + + + + + + Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size + ' Calculate the Size of the New image + '*** Larghezza, Altezza, Auto + + Dim tempMultiplier As Double + + If TipoSize.ToUpper = "Larghezza".ToUpper Then + tempMultiplier = MaxPixel / currentwidth + ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then + tempMultiplier = MaxPixel / currentheight + Else + If currentheight > currentwidth Then ' portrait + tempMultiplier = MaxPixel / currentheight + Else + tempMultiplier = MaxPixel / currentwidth + End If + End If + + Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier)) + + Return NewSize + End Function + + + + Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click + StopAttivo = True + + MyPool.StopThreadPool() + unlockUI() + + End Sub + + Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click + Dim openFileDialog As OpenFileDialog = New OpenFileDialog + + 'openFileDialog.InitialDirectory = TextBox1.Text + openFileDialog.Filter = "Immagini jpg (*.jpg)|*.jpg|Immagini gif (*.gif)|*.gif|Tutti i file (*.*)|*.*" + If TextBox10.Text.Length > 0 Then + openFileDialog.FileName = TextBox10.Text + End If + openFileDialog.FilterIndex = 0 + openFileDialog.RestoreDirectory = True + + If DialogResult.OK = openFileDialog.ShowDialog() Then + TextBox10.Text = openFileDialog.FileName + PictureBox1.Image = Image.FromFile(TextBox10.Text) + If PictureBox1.Image.Height >= PictureBox1.Image.Width Then + PictureBox1.Height = 160 + PictureBox1.Width = CType(160 * PictureBox1.Image.Width / PictureBox1.Image.Height, Integer) + Else + PictureBox1.Width = 224 + PictureBox1.Height = CType(224 * PictureBox1.Image.Height / PictureBox1.Image.Width, Integer) + End If + End If + End Sub + + Private Function LeggiSoloNomeFile(ByVal FileName As String) As String + Dim Testo As String = FileName + Dim Risposta As String = "" + + Dim Nomi() As String = Testo.Split(New Char() {"\"c}) + If Nomi.Length > 1 Then + Risposta = Nomi(Nomi.Length - 1) + End If + + Return Risposta + End Function + + + Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove + 'GetColor() + 'GetPixelColor(PictureBox1.PointToScreen(e.Location)).ToArgb.ToString("X8") + + End Sub + + Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp + If e.Button = MouseButtons.Left Then + WaterSelectColor = True + Else + WaterSelectColor = False + End If + End Sub + + + 'Private Declare Function CreateDC Lib "gdi32.dll" (ByVal strDriver As String, ByVal strDevice As String, ByVal strOutput As String, ByVal pData As IntPtr) As IntPtr + 'Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hdc As IntPtr) As Boolean + 'Private Declare Function GetPixel Lib "gdi32.dll" (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer) As Integer + 'Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As Point) As Boolean + + + '''' + '''' Get the color relative to mouse position + '''' + 'Private Sub GetColor() + ' Dim hdcScreen As IntPtr = CreateDC("Display", Nothing, Nothing, IntPtr.Zero) + ' Dim pt As Point = New Point + ' GetCursorPos(pt) + ' Dim cr As Integer = GetPixel(hdcScreen, pt.X, pt.Y) + ' DeleteDC(hdcScreen) + ' Dim clr As Color = Color.FromArgb((cr And &HFF), (cr And &HFF00) >> 8, (cr And &HFF0000) >> 16) + ' PictureBox3.BackColor = clr + ' If WaterSelectColor = True Then + ' PictureBox2.BackColor = clr + ' End If + ' WaterSelectColor = False + 'End Sub + + + Private Function GetPixelColor(ByVal screenLocation As Point) As Color() + 'Dim bm As New Bitmap(1, 1, Imaging.PixelFormat.Format24bppRgb) + 'Dim g As Graphics = Graphics.FromImage(bm) + 'g.CopyFromScreen(screenLocation, New Point(0, 0), New Size(1, 1)) + 'Dim result As Color = bm.GetPixel(0, 0) + 'g.Dispose() + 'bm.Dispose() + 'Return result + Return Nothing + End Function + + Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click + Dim MyDialog As New ColorDialog + MyDialog.AllowFullOpen = True + 'If TextBox22.Text.Length > 0 And TextBox23.Text.Length > 0 And TextBox24.Text.Length > 0 Then + ' If CType(TextBox22.Text, Integer) >= 0 And CType(TextBox23.Text, Integer) >= 0 And CType(TextBox24.Text, Integer) >= 0 Then + ' MyDialog.Color = Color.FromArgb(0, CType(TextBox22.Text, Integer), CType(TextBox23.Text, Integer), CType(TextBox24.Text, Integer)) + ' End If + 'End If + + If (MyDialog.ShowDialog() = Windows.Forms.DialogResult.OK) Then + 'TextBox22.Text = MyDialog.Color.R.ToString + 'TextBox23.Text = MyDialog.Color.G.ToString + 'TextBox24.Text = MyDialog.Color.B.ToString + TextBox34.Text = ColorTranslator.ToHtml(MyDialog.Color) + TextBox34.BackColor = MyDialog.Color + + End If + End Sub + + + + + + + + Private Sub TextBox27_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) + + End Sub + + + + + Private Sub CheckBox18_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox18.CheckedChanged + CheckBox4.Checked = False + CheckBox12.Checked = False + + End Sub + + Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged + CheckBox18.Checked = False + End Sub + + Private Sub CheckBox12_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox12.CheckedChanged + CheckBox18.Checked = False + End Sub + + Private Sub Label27_Click(sender As Object, e As EventArgs) Handles Label27.Click + + End Sub + + Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles btnCreaCatalogoAsync.Click + lockUI() + 'Dim timeStart As Date + 'Dim timeStop As Date + + 'timeStart = TimeOfDay + FixPaths() + Label10.Text = "Elaborazione in corso..." + lblFotoTotaliNum.Text = "0" + Label18.Text = "0" + Label43.Text = "-s" + + setPicSettings(txtSorgente.Text, txtDestinazione.Text) + ProgressBar1.Minimum = 0 + ProgressBar1.Step = 1 + ProgressBar1.Value = 0 + + 'Await CreaCatalogoParallel() + Dim imgStf As ImageCreationStuff = New ImageCreationStuff() + + Dim imageCreationOptions As ImageCreationStuff.Options = New ImageCreationStuff.Options() + With imageCreationOptions + .AggiornaSottodirectory = chkAggiornaSottodirectory.Checked + .CreaSottocartelle = chkCreaSottocartelle.Checked + .FilePerCartella = CInt(txtFilePerCartella.Text) + .SuffissoCartelle = txtSuffissoCartelle.Text + .CifreContatore = CInt(txtCifreContatore.Text) + .NumerazioneType = GetNumerazioneEnum() + .SourcePath = txtSorgente.Text + .DestinationPath = txtDestinazione.Text + .MaxThreads = CInt(TextBox7.Text) + .ChunksSize = CInt(TextBox8.Text) + .LinearExecution = rdbVecchioMetodo.Checked + End With + + Dim time As String = Await imgStf.CreaCatalogoParallel(imageCreationOptions) + Label43.Text = time + Label10.Text = "Finito" + unlockUI() + + End Sub + Private Sub UpdateCounter(text As String) + Label10.Invoke(Sub() + Label10.Text = text + + End Sub) + End Sub + Private Async Function CreaCatalogoParallel() As Task + Dim timeStart As Date = TimeOfDay + ContaImmaginiThread = 0 + setLabel10Text("Elaborazione in corso...") + Dim imgStf As ImageCreationStuff = New ImageCreationStuff() + + Dim imageCreationOptions As ImageCreationStuff.Options = New ImageCreationStuff.Options() + With imageCreationOptions + .AggiornaSottodirectory = chkAggiornaSottodirectory.Checked + .CreaSottocartelle = chkCreaSottocartelle.Checked + .FilePerCartella = CInt(txtFilePerCartella.Text) + .SuffissoCartelle = txtSuffissoCartelle.Text + .CifreContatore = CInt(txtCifreContatore.Text) + .NumerazioneType = GetNumerazioneEnum() + .SourcePath = txtSorgente.Text + .DestinationPath = txtDestinazione.Text + End With + + Await imgStf.CreaImmaginiParallel(imageCreationOptions) + + 'Await CreaImmaginiParallel(txtSorgente.Text, txtDestinazione.Text) + + setLabel10Text("Finito") + Dim timeStop As Date = TimeOfDay + setLabel43Text(CalcTime(timeStart, timeStop, ContaImmaginiThread)) + End Function + + 'Private Async Function CreaImmaginiParallel(ByVal SourcePath As String, ByVal DestPath As String) As Task + ' Dim dataToProcess As List(Of FileData) = New List(Of FileData) + + ' 'Dim dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo) = New Dictionary(Of FileInfo, DirectoryInfo) + ' If chkAggiornaSottodirectory.Checked And chkCreaSottocartelle.Checked Then + + ' Dim helperSharp As New FileHelperSharp() + + ' 'Dim helper As New FileHelper(CInt(txtFilePerCartella.Text), txtSuffissoCartelle.Text, CInt(txtCifreContatore.Text), getNumerazione()) + ' 'getfilesrecursive + + ' Dim fileHelperOptions As FileHelperOptions = New FileHelperOptions() + ' fileHelperOptions.FilesPerFolder = CInt(txtFilePerCartella.Text) + ' fileHelperOptions.Suffix = txtSuffissoCartelle.Text + ' fileHelperOptions.CounterSize = CInt(txtCifreContatore.Text) + ' fileHelperOptions.NumerationType = GetNumerazioneEnum() + + ' dataToProcess = helperSharp.GetFilesRecursive(New DirectoryInfo(SourcePath), New DirectoryInfo(DestPath), "*.jpg", fileHelperOptions) + + ' 'dataToProcess = helper.GetFilesRecursiveParallel(New DirectoryInfo(SourcePath), New DirectoryInfo(DestPath), "*.jpg") + ' ElseIf chkAggiornaSottodirectory.Checked And Not chkCreaSottocartelle.Checked Then + ' ' TODO manca tutto?!?!?!? + ' End If + + ' Dim scheduler As TaskScheduler = New ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, Environment.ProcessorCount * 2).ConcurrentScheduler + + ' Dim test As IEnumerable(Of Task) = From d In dataToProcess Select Task.Factory.StartNew(Sub() + ' 'setLabel10Text("File: " & p.File.Name) + + ' Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + ' Dim clsCreaImmagine As New ImageCreator(d.File, d.Directory) + + ' clsCreaImmagine.CreaImmagineThread(d.File.Name) + + ' ContaImmaginiThread += 1 + ' UpdateCounter(ContaImmaginiThread & " " & d.File.Name) + ' End Sub, CancellationToken.None, TaskCreationOptions.LongRunning, scheduler) 'TODO Cancellation Token + + ' 'ThreadingHelper.StartAndWaitAllThrottled(test, CType(TextBox7.Text, Integer)) + + ' Await Task.WhenAll(test) + + ' '= getDirsDict(SourcePath, DestPath) + ' 'Parallel.ForEach(dataToProcess, + ' ' Sub(p, state) + ' ' 'setLabel10Text("File: " & p.File.Name) + + ' ' Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + ' ' Dim clsCreaImmagine As New ImageCreator(p.File, p.Directory) + + ' ' clsCreaImmagine.CreaImmagineThread(p.File.Name) + + ' ' ContaImmaginiThread += 1 + ' ' UpdateCounter(ContaImmaginiThread & " " & p.File.Name) + ' ' 'MyPool.InsertWorkItem(p.File.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {p.File.Name}, True) + ' ' ' TODO: BREAK ON STOP state.stop() + + ' ' End Sub) + + ' 'Dim pair As KeyValuePair(Of FileInfo, DirectoryInfo) + ' 'For Each pair In dirSourceDest + + ' ' setLabel10Text("File: " & pair.Key.Name) + ' ' Dim b As String = (CType(Label18.Text, Integer) + 1).ToString + + ' ' Dim ClsCreaImmagine As New ImageCreator(pair.Key, pair.Value) + ' ' ContaImmaginiThread += 1 + ' ' MyPool.InsertWorkItem(pair.Key.Name, New XyThreadAdd(AddressOf ClsCreaImmagine.CreaImmagineThread), New Object(0) {pair.Key.Name}, True) + + ' 'Next + 'End Function +End Class + +Public Class PicInfo + Public DirSource, DirDest, DirDestStart As DirectoryInfo + Public NomeImmagine As String + + Public Sub New(ByVal Dir_Source As DirectoryInfo, ByVal Dir_Dest As DirectoryInfo, ByVal Dir_DestStart As DirectoryInfo, ByVal Nome_Immagine As String) + DirSource = Dir_Source + DirDest = Dir_Dest + DirDestStart = Dir_DestStart + NomeImmagine = Nome_Immagine + End Sub +End Class \ No newline at end of file diff --git a/imagecatalog.backup/Module1.cs b/imagecatalog.backup/Module1.cs new file mode 100644 index 0000000..de80777 --- /dev/null +++ b/imagecatalog.backup/Module1.cs @@ -0,0 +1,158 @@ + +namespace ImageCatalog +{ + static class Module1 + { + + // Sub CaricaIni() + // Dim Parola As String + // Dim i As Integer + // Dim p As Integer + + // If Dir$(NomeIni) <> "" Then + // Open NomeIni For Input As #1 + // Input #1, NumeroMacchine + // For i = 1 To NumeroMacchine + // Input #1, NomeMacchina(i) + // Input #1, CodiceMacchina(i) + // Input #1, TempoMacchinaFerma(i) + // Input #1, LunghezzaImpulso(i) + // Input #1, TempoRegistrazioneDati(i) + // Input #1, RangoVelocita(i) + // Input #1, MaxVelocita(i) + // Input #1, NumeroRulli(i) + // Input #1, NumeroFili(i) + // Input #1, IndirizzoMacchina(i) + // Input #1, StampaAutoMacchina(i) + // Next i + // Input #1, SettimanaInizio + // Input #1, SettimanaFine + // Input #1, Chiusura + // Input #1, OrarioStampa + // Input #1, OrarioStampaSecondi + // Input #1, OrarioAccendiProg + // Input #1, OrarioSpengiProg + // Input #1, NomeDitta + // Input #1, StampaAutoGiorno + // Input #1, StampaAutoWeek + // Input #1, StampaGiornoRiepilogo + // Input #1, StampaGiornoGrafTMFA + // Input #1, StampaGiornoGrafVel + // Input #1, StampaWeekRiepilogo + // Input #1, StampaWeekGrafTMFA + // Input #1, StampaWeekGrafVel + // Input #1, StampanteManuale + // Input #1, StampanteAutomatica + // Input #1, StampanteNomeAghi + // Input #1, StampanteNomeLaser + // Input #1, NomePortaComm + + // Input #1, TurniTotali + // For p = 1 To TurniTotali + // Input #1, TurnoNumero(p) + // Input #1, TurnoInizioMinuti(p) + // Input #1, TurnoFineMinuti(p) + // Input #1, TurnoInizioSecondi(p) + // Input #1, TurnoFineSecondi(p) + // Next p + // Input #1, Parola + // Close #1 + // PassWordAmm = Trim$(Cripta(Parola, ChiaveCriDecri)) + // End If + // End Sub + + // Sub SalvaIni() + // Dim Conto As Single + // Dim Nomefile As String + // Dim NomeDir As String + // Dim Testo As String + // Dim TestoA As String + // Dim i As Integer + // Dim k As Integer + // Dim p As Integer + // Dim Lungo As Integer + // Dim Resto As Integer + // Dim Primo(3) As String + + // For i = 1 To NumeroMacchine + // If Right$(DirectoryProgramma, 1) = "\" Then + // NomeDir = DirectoryProgramma + NomeMacchina(i) + // Else + // NomeDir = DirectoryProgramma + "\" + NomeMacchina(i) + // End If + // Nomefile = NomeDir + "\" + NomeMacchina(i) + ".SYS" + // If Dir$(Nomefile) = "" Then MkDir(NomeDir) + // Next i + + // Open NomeIni For Output As #3 + // Print #3, NumeroMacchine + // For i = 1 To NumeroMacchine + // If Right$(DirectoryProgramma, 1) = "\" Then + // Nomefile = DirectoryProgramma + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS" + // Else + // Nomefile = DirectoryProgramma + "\" + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS" + // End If + // Open Nomefile For Output As #4 + // Write #4, NomeMacchina(i) + // Write #4, CodiceMacchina(i) + // Print #4, TempoMacchinaFerma(i) + // Print #4, LunghezzaImpulso(i) + // Print #4, TempoRegistrazioneDati(i) + // Print #4, RangoVelocita(i) + // Print #4, MaxVelocita(i) + // Print #4, NumeroRulli(i) + // Print #4, NumeroFili(i) + // Print #4, IndirizzoMacchina(i) + // Write #4, StampaAutoMacchina(i) + // Close #4 + // Write #3, NomeMacchina(i) + // Write #3, CodiceMacchina(i) + // Print #3, TempoMacchinaFerma(i) + // Print #3, LunghezzaImpulso(i) + // Print #3, TempoRegistrazioneDati(i) + // Print #3, RangoVelocita(i) + // Print #3, MaxVelocita(i) + // Print #3, NumeroRulli(i) + // Print #3, NumeroFili(i) + // Print #3, IndirizzoMacchina(i) + // Write #3, StampaAutoMacchina(i) + // Next i + // Print #3, SettimanaInizio + // Print #3, SettimanaFine + // Write #3, Chiusura + // Write #3, OrarioStampa + // Print #3, OrarioStampaSecondi + // Write #3, OrarioAccendiProg + // Write #3, OrarioSpengiProg + // Write #3, NomeDitta + // Write #3, StampaAutoGiorno + // Write #3, StampaAutoWeek + // Write #3, StampaGiornoRiepilogo + // Write #3, StampaGiornoGrafTMFA + // Write #3, StampaGiornoGrafVel + // Write #3, StampaWeekRiepilogo + // Write #3, StampaWeekGrafTMFA + // Write #3, StampaWeekGrafVel + // Write #3, StampanteManuale + // Write #3, StampanteAutomatica + // Write #3, StampanteNomeAghi + // Write #3, StampanteNomeLaser + // Write #3, NomePortaComm + + // Print #3, TurniTotali + // For p = 1 To TurniTotali + // Print #3, TurnoNumero(p) + // Print #3, TurnoInizioMinuti(p) + // Print #3, TurnoFineMinuti(p) + // Print #3, TurnoInizioSecondi(p) + // Print #3, TurnoFineSecondi(p) + // Next p + // Testo = Cripta(PassWordAmm, ChiaveCriDecri) + // Write #3, Testo + // Close #3 + // End Sub + + + public static ParametriSetup SetupIni = new ParametriSetup(); + } +} \ No newline at end of file diff --git a/imagecatalog.backup/Module1.vb b/imagecatalog.backup/Module1.vb new file mode 100644 index 0000000..f9b2cbc --- /dev/null +++ b/imagecatalog.backup/Module1.vb @@ -0,0 +1,155 @@ +Module Module1 + + 'Sub CaricaIni() + ' Dim Parola As String + ' Dim i As Integer + ' Dim p As Integer + + ' If Dir$(NomeIni) <> "" Then + ' Open NomeIni For Input As #1 + ' Input #1, NumeroMacchine + ' For i = 1 To NumeroMacchine + ' Input #1, NomeMacchina(i) + ' Input #1, CodiceMacchina(i) + ' Input #1, TempoMacchinaFerma(i) + ' Input #1, LunghezzaImpulso(i) + ' Input #1, TempoRegistrazioneDati(i) + ' Input #1, RangoVelocita(i) + ' Input #1, MaxVelocita(i) + ' Input #1, NumeroRulli(i) + ' Input #1, NumeroFili(i) + ' Input #1, IndirizzoMacchina(i) + ' Input #1, StampaAutoMacchina(i) + ' Next i + ' Input #1, SettimanaInizio + ' Input #1, SettimanaFine + ' Input #1, Chiusura + ' Input #1, OrarioStampa + ' Input #1, OrarioStampaSecondi + ' Input #1, OrarioAccendiProg + ' Input #1, OrarioSpengiProg + ' Input #1, NomeDitta + ' Input #1, StampaAutoGiorno + ' Input #1, StampaAutoWeek + ' Input #1, StampaGiornoRiepilogo + ' Input #1, StampaGiornoGrafTMFA + ' Input #1, StampaGiornoGrafVel + ' Input #1, StampaWeekRiepilogo + ' Input #1, StampaWeekGrafTMFA + ' Input #1, StampaWeekGrafVel + ' Input #1, StampanteManuale + ' Input #1, StampanteAutomatica + ' Input #1, StampanteNomeAghi + ' Input #1, StampanteNomeLaser + ' Input #1, NomePortaComm + + ' Input #1, TurniTotali + ' For p = 1 To TurniTotali + ' Input #1, TurnoNumero(p) + ' Input #1, TurnoInizioMinuti(p) + ' Input #1, TurnoFineMinuti(p) + ' Input #1, TurnoInizioSecondi(p) + ' Input #1, TurnoFineSecondi(p) + ' Next p + ' Input #1, Parola + ' Close #1 + ' PassWordAmm = Trim$(Cripta(Parola, ChiaveCriDecri)) + ' End If + 'End Sub + + 'Sub SalvaIni() + ' Dim Conto As Single + ' Dim Nomefile As String + ' Dim NomeDir As String + ' Dim Testo As String + ' Dim TestoA As String + ' Dim i As Integer + ' Dim k As Integer + ' Dim p As Integer + ' Dim Lungo As Integer + ' Dim Resto As Integer + ' Dim Primo(3) As String + + ' For i = 1 To NumeroMacchine + ' If Right$(DirectoryProgramma, 1) = "\" Then + ' NomeDir = DirectoryProgramma + NomeMacchina(i) + ' Else + ' NomeDir = DirectoryProgramma + "\" + NomeMacchina(i) + ' End If + ' Nomefile = NomeDir + "\" + NomeMacchina(i) + ".SYS" + ' If Dir$(Nomefile) = "" Then MkDir(NomeDir) + ' Next i + + 'Open NomeIni For Output As #3 + ' Print #3, NumeroMacchine + ' For i = 1 To NumeroMacchine + ' If Right$(DirectoryProgramma, 1) = "\" Then + ' Nomefile = DirectoryProgramma + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS" + ' Else + ' Nomefile = DirectoryProgramma + "\" + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS" + ' End If + ' Open Nomefile For Output As #4 + ' Write #4, NomeMacchina(i) + ' Write #4, CodiceMacchina(i) + ' Print #4, TempoMacchinaFerma(i) + ' Print #4, LunghezzaImpulso(i) + ' Print #4, TempoRegistrazioneDati(i) + ' Print #4, RangoVelocita(i) + ' Print #4, MaxVelocita(i) + ' Print #4, NumeroRulli(i) + ' Print #4, NumeroFili(i) + ' Print #4, IndirizzoMacchina(i) + ' Write #4, StampaAutoMacchina(i) + ' Close #4 + ' Write #3, NomeMacchina(i) + ' Write #3, CodiceMacchina(i) + ' Print #3, TempoMacchinaFerma(i) + ' Print #3, LunghezzaImpulso(i) + ' Print #3, TempoRegistrazioneDati(i) + ' Print #3, RangoVelocita(i) + ' Print #3, MaxVelocita(i) + ' Print #3, NumeroRulli(i) + ' Print #3, NumeroFili(i) + ' Print #3, IndirizzoMacchina(i) + ' Write #3, StampaAutoMacchina(i) + ' Next i + ' Print #3, SettimanaInizio + ' Print #3, SettimanaFine + ' Write #3, Chiusura + ' Write #3, OrarioStampa + ' Print #3, OrarioStampaSecondi + ' Write #3, OrarioAccendiProg + ' Write #3, OrarioSpengiProg + ' Write #3, NomeDitta + ' Write #3, StampaAutoGiorno + ' Write #3, StampaAutoWeek + ' Write #3, StampaGiornoRiepilogo + ' Write #3, StampaGiornoGrafTMFA + ' Write #3, StampaGiornoGrafVel + ' Write #3, StampaWeekRiepilogo + ' Write #3, StampaWeekGrafTMFA + ' Write #3, StampaWeekGrafVel + ' Write #3, StampanteManuale + ' Write #3, StampanteAutomatica + ' Write #3, StampanteNomeAghi + ' Write #3, StampanteNomeLaser + ' Write #3, NomePortaComm + + ' Print #3, TurniTotali + ' For p = 1 To TurniTotali + ' Print #3, TurnoNumero(p) + ' Print #3, TurnoInizioMinuti(p) + ' Print #3, TurnoFineMinuti(p) + ' Print #3, TurnoInizioSecondi(p) + ' Print #3, TurnoFineSecondi(p) + ' Next p + ' Testo = Cripta(PassWordAmm, ChiaveCriDecri) + ' Write #3, Testo + 'Close #3 + 'End Sub + + + Public SetupIni As New ParametriSetup + + +End Module diff --git a/imagecatalog.backup/Module2.cs b/imagecatalog.backup/Module2.cs new file mode 100644 index 0000000..9a86f8b --- /dev/null +++ b/imagecatalog.backup/Module2.cs @@ -0,0 +1,7 @@ + +namespace ImageCatalog +{ + static class Module2 + { + } +} \ No newline at end of file diff --git a/imagecatalog.backup/Module2.vb b/imagecatalog.backup/Module2.vb new file mode 100644 index 0000000..f48fe0e --- /dev/null +++ b/imagecatalog.backup/Module2.vb @@ -0,0 +1,3 @@ +Module Module2 + +End Module diff --git a/imagecatalog.backup/My Project/Application.Designer.cs b/imagecatalog.backup/My Project/Application.Designer.cs new file mode 100644 index 0000000..1c924b5 --- /dev/null +++ b/imagecatalog.backup/My Project/Application.Designer.cs @@ -0,0 +1,38 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System.Diagnostics; + +namespace ImageCatalog.My +{ + + // NOTE: This file is auto-generated; do not modify it directly. To make changes, + // or if you encounter build errors in this file, go to the Project Designer + // (go to Project Properties or double-click the My Project node in + // Solution Explorer), and make changes on the Application tab. + // + internal partial class MyApplication + { + [DebuggerStepThrough()] + public MyApplication() : base(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + { + IsSingleInstance = false; + EnableVisualStyles = true; + SaveMySettingsOnExit = true; + ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses; + } + + [DebuggerStepThrough()] + protected override void OnCreateMainForm() + { + MainForm = MyProject.Forms.MainForm; + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/My Project/Application.Designer.vb b/imagecatalog.backup/My Project/Application.Designer.vb new file mode 100644 index 0000000..24fc37f --- /dev/null +++ b/imagecatalog.backup/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.ImageCatalog.MainForm + End Sub + End Class +End Namespace diff --git a/imagecatalog.backup/My Project/Application.myapp b/imagecatalog.backup/My Project/Application.myapp new file mode 100644 index 0000000..c9098c2 --- /dev/null +++ b/imagecatalog.backup/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + true + MainForm + false + 0 + true + 0 + true + \ No newline at end of file diff --git a/imagecatalog.backup/My Project/MyNamespace.Dynamic.Designer.cs b/imagecatalog.backup/My Project/MyNamespace.Dynamic.Designer.cs new file mode 100644 index 0000000..5f1eb17 --- /dev/null +++ b/imagecatalog.backup/My Project/MyNamespace.Dynamic.Designer.cs @@ -0,0 +1,58 @@ +using System; +using System.ComponentModel; +using System.Diagnostics; + +namespace ImageCatalog.My +{ + internal static partial class MyProject + { + internal partial class MyForms + { + [EditorBrowsable(EditorBrowsableState.Never)] + public Form1 m_Form1; + + public Form1 Form1 + { + [DebuggerHidden] + get + { + m_Form1 = Create__Instance__(m_Form1); + return m_Form1; + } + + [DebuggerHidden] + set + { + if (ReferenceEquals(value, m_Form1)) + return; + if (value is object) + throw new ArgumentException("Property can only be set to Nothing"); + Dispose__Instance__(ref m_Form1); + } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public MainForm m_MainForm; + + public MainForm MainForm + { + [DebuggerHidden] + get + { + m_MainForm = Create__Instance__(m_MainForm); + return m_MainForm; + } + + [DebuggerHidden] + set + { + if (ReferenceEquals(value, m_MainForm)) + return; + if (value is object) + throw new ArgumentException("Property can only be set to Nothing"); + Dispose__Instance__(ref m_MainForm); + } + } + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/My Project/MyNamespace.Static.1.Designer.cs b/imagecatalog.backup/My Project/MyNamespace.Static.1.Designer.cs new file mode 100644 index 0000000..5212c44 --- /dev/null +++ b/imagecatalog.backup/My Project/MyNamespace.Static.1.Designer.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections; +using System.Diagnostics; +using System.Windows.Forms; +using Microsoft.VisualBasic; + +/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ +/* TODO ERROR: Skipped IfDirectiveTrivia */ +/* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia */ +/* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ +/* TODO ERROR: Skipped IfDirectiveTrivia */ +namespace ImageCatalog.My +{ + + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + + /* TODO ERROR: Skipped IfDirectiveTrivia */ + internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase + { + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [STAThread()] + [DebuggerHidden()] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static void Main(string[] Args) + { + try + { + Application.SetCompatibleTextRenderingDefault(UseCompatibleTextRendering); + } + finally + { + } + + MyProject.Application.Run(Args); + } + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ + } + + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + + /* TODO ERROR: Skipped IfDirectiveTrivia */ + internal partial class MyComputer : Microsoft.VisualBasic.Devices.Computer + { + /* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ + [DebuggerHidden()] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public MyComputer() : base() + { + } + } + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + [HideModuleName()] + [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] + internal static partial class MyProject + { + + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.ComponentModel.Design.HelpKeyword("My.Computer")] + internal static MyComputer Computer + { + [DebuggerHidden()] + get + { + return m_ComputerObjectProvider.GetInstance; + } + } + + private readonly static ThreadSafeObjectProvider m_ComputerObjectProvider = new ThreadSafeObjectProvider(); + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.ComponentModel.Design.HelpKeyword("My.Application")] + internal static MyApplication Application + { + [DebuggerHidden()] + get + { + return m_AppObjectProvider.GetInstance; + } + } + + private readonly static ThreadSafeObjectProvider m_AppObjectProvider = new ThreadSafeObjectProvider(); + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.ComponentModel.Design.HelpKeyword("My.User")] + internal static Microsoft.VisualBasic.ApplicationServices.User User + { + [DebuggerHidden()] + get + { + return m_UserObjectProvider.GetInstance; + } + } + + private readonly static ThreadSafeObjectProvider m_UserObjectProvider = new ThreadSafeObjectProvider(); + /* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + /* TODO ERROR: Skipped DefineDirectiveTrivia */ + [System.ComponentModel.Design.HelpKeyword("My.Forms")] + internal static MyForms Forms + { + [DebuggerHidden()] + get + { + return m_MyFormsObjectProvider.GetInstance; + } + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")] + internal sealed partial class MyForms + { + [DebuggerHidden()] + private static T Create__Instance__(T Instance) where T : Form, new() + { + if (Instance is null || Instance.IsDisposed) + { + if (m_FormBeingCreated is object) + { + if (m_FormBeingCreated.ContainsKey(typeof(T)) == true) + { + throw new InvalidOperationException(Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_RecursiveFormCreate")); + } + } + else + { + m_FormBeingCreated = new Hashtable(); + } + + m_FormBeingCreated.Add(typeof(T), null); + try + { + return new T(); + } + catch (System.Reflection.TargetInvocationException ex) when (ex.InnerException is object) + { + string BetterMessage = Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_SeeInnerException", ex.InnerException.Message); + throw new InvalidOperationException(BetterMessage, ex.InnerException); + } + finally + { + m_FormBeingCreated.Remove(typeof(T)); + } + } + else + { + return Instance; + } + } + + [DebuggerHidden()] + private void Dispose__Instance__(ref T instance) where T : Form + { + instance.Dispose(); + instance = null; + } + + [DebuggerHidden()] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public MyForms() : base() + { + } + + [ThreadStatic()] + private static Hashtable m_FormBeingCreated; + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object o) + { + return base.Equals(o); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() + { + return base.GetHashCode(); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + internal new Type GetType() + { + return typeof(MyForms); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() + { + return base.ToString(); + } + } + + private static ThreadSafeObjectProvider m_MyFormsObjectProvider = new ThreadSafeObjectProvider(); + + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia */ + [System.ComponentModel.Design.HelpKeyword("My.WebServices")] + internal static MyWebServices WebServices + { + [DebuggerHidden()] + get + { + return m_MyWebServicesObjectProvider.GetInstance; + } + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")] + internal sealed class MyWebServices + { + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [DebuggerHidden()] + public override bool Equals(object o) + { + return base.Equals(o); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [DebuggerHidden()] + public override int GetHashCode() + { + return base.GetHashCode(); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [DebuggerHidden()] + internal new Type GetType() + { + return typeof(MyWebServices); + } + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [DebuggerHidden()] + public override string ToString() + { + return base.ToString(); + } + + [DebuggerHidden()] + private static T Create__Instance__(T instance) where T : new() + { + if (instance is null) + { + return new T(); + } + else + { + return instance; + } + } + + [DebuggerHidden()] + private void Dispose__Instance__(ref T instance) + { + instance = default; + } + + [DebuggerHidden()] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public MyWebServices() : base() + { + } + } + + private readonly static ThreadSafeObjectProvider m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider(); + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */ + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [System.Runtime.InteropServices.ComVisible(false)] + internal sealed class ThreadSafeObjectProvider where T : new() + { + internal T GetInstance + { + /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElseDirectiveTrivia */ + [DebuggerHidden()] + get + { + if (m_ThreadStaticValue is null) + m_ThreadStaticValue = new T(); + return m_ThreadStaticValue; + } + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + } + + [DebuggerHidden()] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public ThreadSafeObjectProvider() : base() + { + } + + /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElseDirectiveTrivia */ + [System.Runtime.CompilerServices.CompilerGenerated()] + [ThreadStatic()] + private static T m_ThreadStaticValue; + /* TODO ERROR: Skipped EndIfDirectiveTrivia */ + } + } +} +/* TODO ERROR: Skipped EndIfDirectiveTrivia */ \ No newline at end of file diff --git a/imagecatalog.backup/My Project/Settings.Designer.cs b/imagecatalog.backup/My Project/Settings.Designer.cs new file mode 100644 index 0000000..21716e7 --- /dev/null +++ b/imagecatalog.backup/My Project/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ImageCatalog.My { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/imagecatalog.backup/My Project/Settings.Designer.vb b/imagecatalog.backup/My Project/Settings.Designer.vb new file mode 100644 index 0000000..75ffa5f --- /dev/null +++ b/imagecatalog.backup/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.ImageCatalog.My.MySettings + Get + Return Global.ImageCatalog.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/imagecatalog.backup/My Project/Settings.settings b/imagecatalog.backup/My Project/Settings.settings new file mode 100644 index 0000000..392df0a --- /dev/null +++ b/imagecatalog.backup/My Project/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/imagecatalog.backup/My Project/app.manifest b/imagecatalog.backup/My Project/app.manifest new file mode 100644 index 0000000..4c249cd --- /dev/null +++ b/imagecatalog.backup/My Project/app.manifest @@ -0,0 +1,22 @@ + + + + + + + + + + + + diff --git a/imagecatalog.backup/ParametriSetup.cs b/imagecatalog.backup/ParametriSetup.cs new file mode 100644 index 0000000..2fb9290 --- /dev/null +++ b/imagecatalog.backup/ParametriSetup.cs @@ -0,0 +1,179 @@ +using System; +using System.Data; +using Microsoft.VisualBasic; + +namespace ImageCatalog +{ + public class ParametriSetup + { + private DataSet _ElencoParametri; + private string _NomeFileSetup; + + public ParametriSetup(string FileSetup) + { + _ElencoParametri = new DataSet(); + _NomeFileSetup = FileSetup; + if (!string.IsNullOrEmpty(FileSetup)) + { + CaricaParametriSetup(); + } + } + + public ParametriSetup() + { + _ElencoParametri = new DataSet(); + _NomeFileSetup = ""; + } + + public void CaricaParametriSetup() + { + _ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome"); + } + + public void SalvaParametriSetup() + { + if (System.IO.File.Exists(_NomeFileSetup) == true) + { + FileSystem.Kill(_NomeFileSetup); + } + + _ElencoParametri.WriteXml(_NomeFileSetup); + } + + public string LeggiParametroString(string NomeParametro) + { + string Risposta = ""; + try + { + var LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'"); + foreach (var LaRiga in LElenco) + Risposta = LaRiga["Valore"].ToString(); + } + catch + { + Risposta = ""; + } + + return Risposta; + } + + public bool LeggiParametroBoolean(string NomeParametro) + { + string Risposta = ""; + try + { + var LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'"); + foreach (var LaRiga in LElenco) + Risposta = LaRiga["Valore"].ToString(); + } + catch + { + Risposta = ""; + } + + switch (Risposta.ToUpper() ?? "") + { + case "TRUE": + case "OK": + case "SI": + case "1": + case "YES": + case "VERO": + { + return true; + } + + default: + { + return false; + } + } + } + + public void AggiornaParametro(string NomeParametro, object ValoreParametro) + { + try + { + if (_ElencoParametri.Tables["Setup"] is null) + { + var TabellaTmp = new DataTable("Setup"); + DataRow RigaTmp; + DataColumn LaColonna; + LaColonna = TabellaTmp.Columns.Add("Nome", Type.GetType("System.String")); + LaColonna = TabellaTmp.Columns.Add("Valore", Type.GetType("System.String")); + + // * Aggiunge alla tabella tutte le righe + RigaTmp = TabellaTmp.NewRow(); + RigaTmp["Nome"] = NomeParametro; + RigaTmp["Valore"] = ValoreParametro; + TabellaTmp.Rows.Add(RigaTmp); + _ElencoParametri.Tables.Add(TabellaTmp); + } + else + { + var LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'"); + if (LElenco.Length == 0) + { + DataRow LaRiga; + LaRiga = _ElencoParametri.Tables["Setup"].NewRow(); + LaRiga["Nome"] = NomeParametro; + LaRiga["Valore"] = ValoreParametro; + _ElencoParametri.Tables["Setup"].Rows.Add(LaRiga); + } + else + { + LElenco[0]["Valore"] = ValoreParametro; + } + } + } + catch + { + } + } + + private DataTable LeggiXmlDataTable(string NomeTabella, string NomeFileXml, string NomeColonnaChiave = "") + { + // * Crea e Legge il dataset dal file xml + var DataSetXml = new DataSet(); + DataSetXml.ReadXml(NomeFileXml); + + // * Aggiunge il campo chiave + if (!string.IsNullOrEmpty(NomeColonnaChiave)) + { + DataSetXml.Tables[NomeTabella].Constraints.Add(NomeColonnaChiave, DataSetXml.Tables[NomeTabella].Columns[NomeColonnaChiave], true); + } + + // * Restituisce la risposta + return DataSetXml.Tables[NomeTabella]; + } + + private static DataSet LeggiXmlDataSet(string NomeTabella, string NomeFileXml, string NomeColonnaChiave = "") + { + // * Crea e Legge il dataset dal file xml + var DataSetXml = new DataSet(); + DataSetXml.ReadXml(NomeFileXml); + + // * Aggiunge il campo chiave + if (!string.IsNullOrEmpty(NomeColonnaChiave)) + { + DataSetXml.Tables[NomeTabella].Constraints.Add(NomeColonnaChiave, DataSetXml.Tables[NomeTabella].Columns[NomeColonnaChiave], true); + } + + // * Restituisce la risposta + return DataSetXml; + } + + public string NomeFileSetup + { + get + { + return _NomeFileSetup; + } + + set + { + _NomeFileSetup = value; + } + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/ParametriSetup.vb b/imagecatalog.backup/ParametriSetup.vb new file mode 100644 index 0000000..104335c --- /dev/null +++ b/imagecatalog.backup/ParametriSetup.vb @@ -0,0 +1,148 @@ +Public Class ParametriSetup + + + Private _ElencoParametri As DataSet + Private _NomeFileSetup As String + + Public Sub New(ByVal FileSetup As String) + _ElencoParametri = New DataSet + _NomeFileSetup = FileSetup + + If FileSetup <> "" Then + CaricaParametriSetup() + End If + End Sub + + Public Sub New() + _ElencoParametri = New DataSet + _NomeFileSetup = "" + End Sub + + Public Sub CaricaParametriSetup() + _ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome") + End Sub + + Public Sub SalvaParametriSetup() + If System.IO.File.Exists(_NomeFileSetup) = True Then + Kill(_NomeFileSetup) + End If + _ElencoParametri.WriteXml(_NomeFileSetup) + End Sub + + Public Function LeggiParametroString(ByVal NomeParametro As String) As String + Dim Risposta As String = "" + + Try + Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'") + + Dim LaRiga As DataRow + For Each LaRiga In LElenco + Risposta = LaRiga("Valore").ToString + Next + Catch + Risposta = "" + End Try + + Return Risposta + End Function + + Public Function LeggiParametroBoolean(ByVal NomeParametro As String) As Boolean + Dim Risposta As String = "" + + Try + Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'") + + Dim LaRiga As DataRow + For Each LaRiga In LElenco + Risposta = LaRiga("Valore").ToString + Next + Catch + Risposta = "" + End Try + + Select Case Risposta.ToUpper + Case "TRUE", "OK", "SI", "1", "YES", "VERO" + Return True + Case Else + Return False + End Select + End Function + + Public Sub AggiornaParametro(ByVal NomeParametro As String, ByVal ValoreParametro As Object) + Try + If _ElencoParametri.Tables("Setup") Is Nothing Then + Dim TabellaTmp As New DataTable("Setup") + Dim RigaTmp As DataRow + + Dim LaColonna As DataColumn + LaColonna = TabellaTmp.Columns.Add("Nome", System.Type.GetType("System.String")) + LaColonna = TabellaTmp.Columns.Add("Valore", System.Type.GetType("System.String")) + + '* Aggiunge alla tabella tutte le righe + RigaTmp = TabellaTmp.NewRow + RigaTmp("Nome") = NomeParametro + RigaTmp("Valore") = ValoreParametro + TabellaTmp.Rows.Add(RigaTmp) + + _ElencoParametri.Tables.Add(TabellaTmp) + Else + Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'") + + If LElenco.Length = 0 Then + Dim LaRiga As DataRow + LaRiga = _ElencoParametri.Tables("Setup").NewRow + LaRiga("Nome") = NomeParametro + LaRiga("Valore") = ValoreParametro + _ElencoParametri.Tables("Setup").Rows.Add(LaRiga) + Else + LElenco(0).Item("Valore") = ValoreParametro + End If + End If + Catch + + End Try + End Sub + + + Private Function LeggiXmlDataTable(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataTable + '* Crea e Legge il dataset dal file xml + Dim DataSetXml As New System.Data.DataSet + DataSetXml.ReadXml(NomeFileXml) + + '* Aggiunge il campo chiave + If NomeColonnaChiave <> "" Then + DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True) + End If + + '* Restituisce la risposta + Return DataSetXml.Tables(NomeTabella) + End Function + + Private Shared Function LeggiXmlDataSet(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataSet + '* Crea e Legge il dataset dal file xml + Dim DataSetXml As New System.Data.DataSet + DataSetXml.ReadXml(NomeFileXml) + + '* Aggiunge il campo chiave + If NomeColonnaChiave <> "" Then + DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True) + End If + + '* Restituisce la risposta + Return DataSetXml + End Function + + + + + Public Property NomeFileSetup() As String + Get + Return _NomeFileSetup + End Get + Set(ByVal Value As String) + _NomeFileSetup = Value + End Set + End Property + + +End Class diff --git a/imagecatalog.backup/PicSettings.cs b/imagecatalog.backup/PicSettings.cs new file mode 100644 index 0000000..08d52f9 --- /dev/null +++ b/imagecatalog.backup/PicSettings.cs @@ -0,0 +1,602 @@ + + +// Module PicSettings + +// Private _DirectorySorgente As String +// Private _DirectoryDestinazione As String + +// Private _DimVert As Integer +// Private _MargVert As Integer + + +// Private _DimStandard As Integer +// Private _DimStandardMiniatura As Integer + +// Private _NomeData As Boolean +// Private _TestoNome As Boolean +// Private _UsaOrarioMiniatura As Boolean +// Private _UsaOrarioTestoApplicare As Boolean +// Private _UsaTempoGaraTestoApplicare As Boolean +// Private _TestoFirmaStart As String +// Private _TestoFirmaStartV As String +// Private _DataPartenza As DateTime +// Private _TestoOrario As String + +// Private _UsaRotazioneAutomatica As Boolean +// Private _UsaForzaJpg As Boolean + +// Private _LarghezzaSmall As Integer +// Private _AltezzaSmall As Integer + +// Private _CreaMiniature As Boolean +// Private _AggiungiScritteMiniature As Boolean +// Private _AggTempoGaraMin As Boolean +// Private _AggNumTempMin As Boolean + +// Private _Suffisso As String +// Private _Codice As String + +// Private _Trasparenza As Integer +// Private _IlFont As String +// Private _Grassetto As Boolean + +// Private _Posizione As String +// Private _Allineamento As String +// Private _Margine As Integer + +// Private _LogoAltezza As Integer +// Private _LogoLarghezza As Integer + +// Private _fontColoreRGB As Color + +// Private _LogoAggiungi As Boolean +// Private _LogoNomeFile As String +// Private _LogoTrasparenza As String +// Private _LogoMargine As String +// Private _LogoPosizioneH As String +// Private _LogoPosizioneV As String + +// Private _FotoGrandeDimOrigina As Boolean +// Private _AltezzaBig As Integer +// Private _LarghezzaBig As Integer +// Private _DestDir As DirectoryInfo +// Private _DimMin As Integer + +// Private _TestoMin As Boolean + +// Private _SecretDefault As Boolean +// Private _SecretBig As Boolean +// Private _SecretSmall As Boolean + +// Private _SecretPathSmall As String +// Private _SecretPathBig As String + +// Private _jpegQuality As Long +// Private _jpegQualityMin As Long + +// Private FotoRuotaADestra As Boolean = False +// Private FotoRuotaASinistra As Boolean = False + +// Private TempMinText As String = "" + +// Private _mainForm As MainForm + +// 'Private progressBar As System.Windows.Forms.ProgressBar + + + +// Public Property mainForm() As MainForm +// Get +// Return _mainForm +// End Get +// Set(ByVal value As MainForm) +// _mainForm = value +// End Set +// End Property + +// Public Property DirectorySorgente() As String +// Get +// Return _DirectorySorgente +// End Get +// Set(ByVal value As String) +// _DirectorySorgente = value +// End Set +// End Property + +// Public Property DirectoryDestinazione() As String +// Get +// Return _DirectoryDestinazione +// End Get +// Set(ByVal value As String) +// _DirectoryDestinazione = value +// End Set +// End Property + +// Public Property TestoFirmaStart() As String +// Get +// Return _TestoFirmaStart +// End Get +// Set(ByVal value As String) +// _TestoFirmaStart = value +// End Set +// End Property + +// Public Property TestoFirmaStartV() As String +// Get +// Return _TestoFirmaStartV +// End Get + +// Set(ByVal value As String) +// _TestoFirmaStartV = value +// End Set +// End Property + +// Public Property DataPartenza() As DateTime +// Get +// Return _DataPartenza +// End Get +// Set(ByVal value As DateTime) +// _DataPartenza = value +// End Set +// End Property + +// Public Property TestoOrario() As String +// Get +// Return _TestoOrario +// End Get +// Set(ByVal value As String) +// _TestoOrario = value +// End Set +// End Property + +// Public Property DimStandard() As Integer +// Get +// Return _DimStandard +// End Get +// Set(ByVal value As Integer) +// _DimStandard = value +// End Set +// End Property + +// Public Property DimStandardMiniatura() As Integer +// Get +// Return _DimStandardMiniatura +// End Get +// Set(ByVal value As Integer) +// _DimStandardMiniatura = value +// End Set +// End Property + +// Public Property NomeData() As Boolean +// Get +// Return _NomeData +// End Get +// Set(ByVal value As Boolean) +// _NomeData = value +// End Set +// End Property + +// Public Property TestoNome() As Boolean +// Get +// Return _TestoNome +// End Get +// Set(ByVal value As Boolean) +// _TestoNome = value +// End Set +// End Property + +// Public Property UsaOrarioMiniatura() As Boolean +// Get +// Return _UsaOrarioMiniatura +// End Get +// Set(ByVal value As Boolean) +// _UsaOrarioMiniatura = value +// End Set +// End Property + +// Public Property UsaOrarioTestoApplicare() As Boolean +// Get +// Return _UsaOrarioTestoApplicare +// End Get +// Set(ByVal value As Boolean) +// _UsaOrarioTestoApplicare = value +// End Set +// End Property + +// Public Property UsaTempoGaraTestoApplicare() As Boolean +// Get +// Return _UsaTempoGaraTestoApplicare +// End Get +// Set(ByVal value As Boolean) +// _UsaTempoGaraTestoApplicare = value +// End Set +// End Property + +// Public Property UsaRotazioneAutomatica() As Boolean +// Get +// Return _UsaRotazioneAutomatica +// End Get +// Set(ByVal value As Boolean) +// _UsaRotazioneAutomatica = value +// End Set +// End Property + +// Public Property UsaForzaJpg() As Boolean +// Get +// Return _UsaForzaJpg +// End Get +// Set(ByVal value As Boolean) +// _UsaForzaJpg = value +// End Set +// End Property + + + +// Public Property LarghezzaSmall() As Integer +// Get +// Return _LarghezzaSmall +// End Get +// Set(ByVal value As Integer) +// _LarghezzaSmall = value +// End Set +// End Property + +// Public Property AltezzaSmall() As Integer +// Get +// Return _AltezzaSmall +// End Get +// Set(ByVal value As Integer) +// _AltezzaSmall = value +// End Set +// End Property + + +// Public Property CreaMiniature() As Boolean +// Get +// Return _CreaMiniature +// End Get +// Set(ByVal value As Boolean) +// _CreaMiniature = value +// End Set +// End Property + +// Public Property AggiungiScritteMiniature() As Boolean +// Get +// Return _AggiungiScritteMiniature +// End Get +// Set(ByVal value As Boolean) +// _AggiungiScritteMiniature = value +// End Set +// End Property + + +// Public Property Suffisso() As String +// Get +// Return _Suffisso +// End Get +// Set(ByVal value As String) +// _Suffisso = value +// End Set +// End Property + +// Public Property Codice() As String +// Get +// Return _Codice +// End Get +// Set(ByVal value As String) +// _Codice = value +// End Set +// End Property + + +// Public Property Trasparenza() As Integer +// Get +// Return _Trasparenza +// End Get +// Set(ByVal value As Integer) +// _Trasparenza = value +// End Set +// End Property + +// Public Property IlFont() As String +// Get +// Return _IlFont +// End Get +// Set(ByVal value As String) +// _IlFont = value +// End Set +// End Property + +// Public Property Grassetto() As Boolean +// Get +// Return _Grassetto +// End Get +// Set(ByVal value As Boolean) +// _Grassetto = value +// End Set +// End Property + +// Public Property Posizione() As String +// Get +// Return _Posizione +// End Get +// Set(ByVal value As String) +// _Posizione = value +// End Set +// End Property + +// Public Property Allineamento() As String +// Get +// Return _Allineamento +// End Get +// Set(ByVal value As String) +// _Allineamento = value +// End Set +// End Property + +// Public Property Margine() As Integer +// Get +// Return _Margine +// End Get +// Set(ByVal value As Integer) +// _Margine = value +// End Set +// End Property + +// Public Property LogoAltezza() As Integer +// Get +// Return _LogoAltezza +// End Get +// Set(ByVal value As Integer) +// _LogoAltezza = value +// End Set +// End Property + +// Public Property LogoLarghezza() As Integer +// Get +// Return _LogoLarghezza +// End Get +// Set(ByVal value As Integer) +// _LogoLarghezza = value +// End Set +// End Property + +// Public Property fontColoreRGB() As Color +// Get +// Return _fontColoreRGB +// End Get +// Set(ByVal value As Color) +// _fontColoreRGB = value +// End Set +// End Property + +// Public Property LogoAggiungi() As Boolean +// Get +// Return _LogoAggiungi +// End Get +// Set(ByVal value As Boolean) +// _LogoAggiungi = value +// End Set +// End Property + +// Public Property LogoNomeFile() As String +// Get +// Return _LogoNomeFile +// End Get +// Set(ByVal value As String) +// _LogoNomeFile = value +// End Set +// End Property + +// Public Property LogoTrasparenza() As String +// Get +// Return _LogoTrasparenza +// End Get +// Set(ByVal value As String) +// _LogoTrasparenza = value +// End Set +// End Property + +// Public Property LogoMargine() As String +// Get +// Return _LogoMargine +// End Get +// Set(ByVal value As String) +// _LogoMargine = value +// End Set +// End Property + +// Public Property LogoPosizioneH() As String +// Get +// Return _LogoPosizioneH +// End Get +// Set(ByVal value As String) +// _LogoPosizioneH = value +// End Set +// End Property + +// Public Property LogoPosizioneV() As String +// Get +// Return _LogoPosizioneV +// End Get +// Set(ByVal value As String) +// _LogoPosizioneV = value +// End Set +// End Property + +// Public Property FotoGrandeDimOrigina() As Boolean +// Get +// Return _FotoGrandeDimOrigina +// End Get +// Set(ByVal value As Boolean) +// _FotoGrandeDimOrigina = value +// End Set +// End Property + +// Public Property AltezzaBig() As Integer +// Get +// Return _AltezzaBig +// End Get +// Set(ByVal value As Integer) +// _AltezzaBig = value +// End Set +// End Property + +// Public Property LarghezzaBig() As Integer +// Get +// Return _LarghezzaBig +// End Get +// Set(ByVal value As Integer) +// _LarghezzaBig = value +// End Set +// End Property + +// Public Property DestDir() As DirectoryInfo +// Get +// Return _DestDir +// End Get +// Set(ByVal value As DirectoryInfo) +// _DestDir = value +// End Set +// End Property + +// Public Property DimVert() As Integer +// Get +// Return _DimVert + +// End Get +// Set(ByVal value As Integer) +// _DimVert = value + +// End Set +// End Property + +// Public Property MargVert() As Integer +// Get +// Return _MargVert + +// End Get +// Set(ByVal value As Integer) +// _MargVert = value +// End Set +// End Property + +// Public Property TestoMin() As Boolean +// Get +// Return _TestoMin + +// End Get +// Set(ByVal value As Boolean) +// _TestoMin = value + +// End Set +// End Property + +// Public Property DimMin() As Integer +// Get +// Return _DimMin + +// End Get +// Set(ByVal value As Integer) +// _DimMin = value + +// End Set +// End Property + +// Public Property SecretDefault() As Boolean +// Get +// Return _SecretDefault + +// End Get +// Set(ByVal value As Boolean) +// _SecretDefault = value + +// End Set +// End Property + +// Public Property SecretBig() As Boolean +// Get +// Return _SecretBig + +// End Get +// Set(ByVal value As Boolean) +// _SecretBig = value + +// End Set +// End Property + +// Public Property SecretSmall() As Boolean +// Get +// Return _SecretSmall + +// End Get +// Set(ByVal value As Boolean) +// _SecretSmall = value + +// End Set +// End Property + +// Public Property SecretPathSmall() As String +// Get +// Return _SecretPathSmall + +// End Get +// Set(ByVal value As String) +// _SecretPathSmall = value + +// End Set +// End Property + +// Public Property SecretPathBig() As String +// Get +// Return _SecretPathBig + +// End Get +// Set(ByVal value As String) +// _SecretPathBig = value + +// End Set +// End Property + +// Public Property AggTempoGaraMin() As Boolean +// Get +// Return _AggTempoGaraMin + +// End Get +// Set(ByVal value As Boolean) +// _AggTempoGaraMin = value + +// End Set +// End Property + +// Public Property AggNumTempMin() As Boolean +// Get +// Return _AggNumTempMin + +// End Get +// Set(ByVal value As Boolean) +// _AggNumTempMin = value + +// End Set +// End Property + +// Public Property jpegQuality() As Long +// Get +// Return _jpegQuality +// End Get +// Set(ByVal value As Long) +// _jpegQuality = value +// End Set + +// End Property + +// Public Property jpegQualityMin() As Long +// Get +// Return _jpegQualityMin +// End Get +// Set(ByVal value As Long) +// _jpegQualityMin = value +// End Set + +// End Property +// End Module diff --git a/imagecatalog.backup/PicSettings.vb b/imagecatalog.backup/PicSettings.vb new file mode 100644 index 0000000..b82a77d --- /dev/null +++ b/imagecatalog.backup/PicSettings.vb @@ -0,0 +1,604 @@ +Imports System.IO +Imports System.Drawing.Drawing2D +Imports System.Drawing.Imaging + +'Module PicSettings + +' Private _DirectorySorgente As String +' Private _DirectoryDestinazione As String + +' Private _DimVert As Integer +' Private _MargVert As Integer + + +' Private _DimStandard As Integer +' Private _DimStandardMiniatura As Integer + +' Private _NomeData As Boolean +' Private _TestoNome As Boolean +' Private _UsaOrarioMiniatura As Boolean +' Private _UsaOrarioTestoApplicare As Boolean +' Private _UsaTempoGaraTestoApplicare As Boolean +' Private _TestoFirmaStart As String +' Private _TestoFirmaStartV As String +' Private _DataPartenza As DateTime +' Private _TestoOrario As String + +' Private _UsaRotazioneAutomatica As Boolean +' Private _UsaForzaJpg As Boolean + +' Private _LarghezzaSmall As Integer +' Private _AltezzaSmall As Integer + +' Private _CreaMiniature As Boolean +' Private _AggiungiScritteMiniature As Boolean +' Private _AggTempoGaraMin As Boolean +' Private _AggNumTempMin As Boolean + +' Private _Suffisso As String +' Private _Codice As String + +' Private _Trasparenza As Integer +' Private _IlFont As String +' Private _Grassetto As Boolean + +' Private _Posizione As String +' Private _Allineamento As String +' Private _Margine As Integer + +' Private _LogoAltezza As Integer +' Private _LogoLarghezza As Integer + +' Private _fontColoreRGB As Color + +' Private _LogoAggiungi As Boolean +' Private _LogoNomeFile As String +' Private _LogoTrasparenza As String +' Private _LogoMargine As String +' Private _LogoPosizioneH As String +' Private _LogoPosizioneV As String + +' Private _FotoGrandeDimOrigina As Boolean +' Private _AltezzaBig As Integer +' Private _LarghezzaBig As Integer +' Private _DestDir As DirectoryInfo +' Private _DimMin As Integer + +' Private _TestoMin As Boolean + +' Private _SecretDefault As Boolean +' Private _SecretBig As Boolean +' Private _SecretSmall As Boolean + +' Private _SecretPathSmall As String +' Private _SecretPathBig As String + +' Private _jpegQuality As Long +' Private _jpegQualityMin As Long + +' Private FotoRuotaADestra As Boolean = False +' Private FotoRuotaASinistra As Boolean = False + +' Private TempMinText As String = "" + +' Private _mainForm As MainForm + +' 'Private progressBar As System.Windows.Forms.ProgressBar + + + +' Public Property mainForm() As MainForm +' Get +' Return _mainForm +' End Get +' Set(ByVal value As MainForm) +' _mainForm = value +' End Set +' End Property + +' Public Property DirectorySorgente() As String +' Get +' Return _DirectorySorgente +' End Get +' Set(ByVal value As String) +' _DirectorySorgente = value +' End Set +' End Property + +' Public Property DirectoryDestinazione() As String +' Get +' Return _DirectoryDestinazione +' End Get +' Set(ByVal value As String) +' _DirectoryDestinazione = value +' End Set +' End Property + +' Public Property TestoFirmaStart() As String +' Get +' Return _TestoFirmaStart +' End Get +' Set(ByVal value As String) +' _TestoFirmaStart = value +' End Set +' End Property + +' Public Property TestoFirmaStartV() As String +' Get +' Return _TestoFirmaStartV +' End Get + +' Set(ByVal value As String) +' _TestoFirmaStartV = value +' End Set +' End Property + +' Public Property DataPartenza() As DateTime +' Get +' Return _DataPartenza +' End Get +' Set(ByVal value As DateTime) +' _DataPartenza = value +' End Set +' End Property + +' Public Property TestoOrario() As String +' Get +' Return _TestoOrario +' End Get +' Set(ByVal value As String) +' _TestoOrario = value +' End Set +' End Property + +' Public Property DimStandard() As Integer +' Get +' Return _DimStandard +' End Get +' Set(ByVal value As Integer) +' _DimStandard = value +' End Set +' End Property + +' Public Property DimStandardMiniatura() As Integer +' Get +' Return _DimStandardMiniatura +' End Get +' Set(ByVal value As Integer) +' _DimStandardMiniatura = value +' End Set +' End Property + +' Public Property NomeData() As Boolean +' Get +' Return _NomeData +' End Get +' Set(ByVal value As Boolean) +' _NomeData = value +' End Set +' End Property + +' Public Property TestoNome() As Boolean +' Get +' Return _TestoNome +' End Get +' Set(ByVal value As Boolean) +' _TestoNome = value +' End Set +' End Property + +' Public Property UsaOrarioMiniatura() As Boolean +' Get +' Return _UsaOrarioMiniatura +' End Get +' Set(ByVal value As Boolean) +' _UsaOrarioMiniatura = value +' End Set +' End Property + +' Public Property UsaOrarioTestoApplicare() As Boolean +' Get +' Return _UsaOrarioTestoApplicare +' End Get +' Set(ByVal value As Boolean) +' _UsaOrarioTestoApplicare = value +' End Set +' End Property + +' Public Property UsaTempoGaraTestoApplicare() As Boolean +' Get +' Return _UsaTempoGaraTestoApplicare +' End Get +' Set(ByVal value As Boolean) +' _UsaTempoGaraTestoApplicare = value +' End Set +' End Property + +' Public Property UsaRotazioneAutomatica() As Boolean +' Get +' Return _UsaRotazioneAutomatica +' End Get +' Set(ByVal value As Boolean) +' _UsaRotazioneAutomatica = value +' End Set +' End Property + +' Public Property UsaForzaJpg() As Boolean +' Get +' Return _UsaForzaJpg +' End Get +' Set(ByVal value As Boolean) +' _UsaForzaJpg = value +' End Set +' End Property + + + +' Public Property LarghezzaSmall() As Integer +' Get +' Return _LarghezzaSmall +' End Get +' Set(ByVal value As Integer) +' _LarghezzaSmall = value +' End Set +' End Property + +' Public Property AltezzaSmall() As Integer +' Get +' Return _AltezzaSmall +' End Get +' Set(ByVal value As Integer) +' _AltezzaSmall = value +' End Set +' End Property + + +' Public Property CreaMiniature() As Boolean +' Get +' Return _CreaMiniature +' End Get +' Set(ByVal value As Boolean) +' _CreaMiniature = value +' End Set +' End Property + +' Public Property AggiungiScritteMiniature() As Boolean +' Get +' Return _AggiungiScritteMiniature +' End Get +' Set(ByVal value As Boolean) +' _AggiungiScritteMiniature = value +' End Set +' End Property + + +' Public Property Suffisso() As String +' Get +' Return _Suffisso +' End Get +' Set(ByVal value As String) +' _Suffisso = value +' End Set +' End Property + +' Public Property Codice() As String +' Get +' Return _Codice +' End Get +' Set(ByVal value As String) +' _Codice = value +' End Set +' End Property + + +' Public Property Trasparenza() As Integer +' Get +' Return _Trasparenza +' End Get +' Set(ByVal value As Integer) +' _Trasparenza = value +' End Set +' End Property + +' Public Property IlFont() As String +' Get +' Return _IlFont +' End Get +' Set(ByVal value As String) +' _IlFont = value +' End Set +' End Property + +' Public Property Grassetto() As Boolean +' Get +' Return _Grassetto +' End Get +' Set(ByVal value As Boolean) +' _Grassetto = value +' End Set +' End Property + +' Public Property Posizione() As String +' Get +' Return _Posizione +' End Get +' Set(ByVal value As String) +' _Posizione = value +' End Set +' End Property + +' Public Property Allineamento() As String +' Get +' Return _Allineamento +' End Get +' Set(ByVal value As String) +' _Allineamento = value +' End Set +' End Property + +' Public Property Margine() As Integer +' Get +' Return _Margine +' End Get +' Set(ByVal value As Integer) +' _Margine = value +' End Set +' End Property + +' Public Property LogoAltezza() As Integer +' Get +' Return _LogoAltezza +' End Get +' Set(ByVal value As Integer) +' _LogoAltezza = value +' End Set +' End Property + +' Public Property LogoLarghezza() As Integer +' Get +' Return _LogoLarghezza +' End Get +' Set(ByVal value As Integer) +' _LogoLarghezza = value +' End Set +' End Property + +' Public Property fontColoreRGB() As Color +' Get +' Return _fontColoreRGB +' End Get +' Set(ByVal value As Color) +' _fontColoreRGB = value +' End Set +' End Property + +' Public Property LogoAggiungi() As Boolean +' Get +' Return _LogoAggiungi +' End Get +' Set(ByVal value As Boolean) +' _LogoAggiungi = value +' End Set +' End Property + +' Public Property LogoNomeFile() As String +' Get +' Return _LogoNomeFile +' End Get +' Set(ByVal value As String) +' _LogoNomeFile = value +' End Set +' End Property + +' Public Property LogoTrasparenza() As String +' Get +' Return _LogoTrasparenza +' End Get +' Set(ByVal value As String) +' _LogoTrasparenza = value +' End Set +' End Property + +' Public Property LogoMargine() As String +' Get +' Return _LogoMargine +' End Get +' Set(ByVal value As String) +' _LogoMargine = value +' End Set +' End Property + +' Public Property LogoPosizioneH() As String +' Get +' Return _LogoPosizioneH +' End Get +' Set(ByVal value As String) +' _LogoPosizioneH = value +' End Set +' End Property + +' Public Property LogoPosizioneV() As String +' Get +' Return _LogoPosizioneV +' End Get +' Set(ByVal value As String) +' _LogoPosizioneV = value +' End Set +' End Property + +' Public Property FotoGrandeDimOrigina() As Boolean +' Get +' Return _FotoGrandeDimOrigina +' End Get +' Set(ByVal value As Boolean) +' _FotoGrandeDimOrigina = value +' End Set +' End Property + +' Public Property AltezzaBig() As Integer +' Get +' Return _AltezzaBig +' End Get +' Set(ByVal value As Integer) +' _AltezzaBig = value +' End Set +' End Property + +' Public Property LarghezzaBig() As Integer +' Get +' Return _LarghezzaBig +' End Get +' Set(ByVal value As Integer) +' _LarghezzaBig = value +' End Set +' End Property + +' Public Property DestDir() As DirectoryInfo +' Get +' Return _DestDir +' End Get +' Set(ByVal value As DirectoryInfo) +' _DestDir = value +' End Set +' End Property + +' Public Property DimVert() As Integer +' Get +' Return _DimVert + +' End Get +' Set(ByVal value As Integer) +' _DimVert = value + +' End Set +' End Property + +' Public Property MargVert() As Integer +' Get +' Return _MargVert + +' End Get +' Set(ByVal value As Integer) +' _MargVert = value +' End Set +' End Property + +' Public Property TestoMin() As Boolean +' Get +' Return _TestoMin + +' End Get +' Set(ByVal value As Boolean) +' _TestoMin = value + +' End Set +' End Property + +' Public Property DimMin() As Integer +' Get +' Return _DimMin + +' End Get +' Set(ByVal value As Integer) +' _DimMin = value + +' End Set +' End Property + +' Public Property SecretDefault() As Boolean +' Get +' Return _SecretDefault + +' End Get +' Set(ByVal value As Boolean) +' _SecretDefault = value + +' End Set +' End Property + +' Public Property SecretBig() As Boolean +' Get +' Return _SecretBig + +' End Get +' Set(ByVal value As Boolean) +' _SecretBig = value + +' End Set +' End Property + +' Public Property SecretSmall() As Boolean +' Get +' Return _SecretSmall + +' End Get +' Set(ByVal value As Boolean) +' _SecretSmall = value + +' End Set +' End Property + +' Public Property SecretPathSmall() As String +' Get +' Return _SecretPathSmall + +' End Get +' Set(ByVal value As String) +' _SecretPathSmall = value + +' End Set +' End Property + +' Public Property SecretPathBig() As String +' Get +' Return _SecretPathBig + +' End Get +' Set(ByVal value As String) +' _SecretPathBig = value + +' End Set +' End Property + +' Public Property AggTempoGaraMin() As Boolean +' Get +' Return _AggTempoGaraMin + +' End Get +' Set(ByVal value As Boolean) +' _AggTempoGaraMin = value + +' End Set +' End Property + +' Public Property AggNumTempMin() As Boolean +' Get +' Return _AggNumTempMin + +' End Get +' Set(ByVal value As Boolean) +' _AggNumTempMin = value + +' End Set +' End Property + +' Public Property jpegQuality() As Long +' Get +' Return _jpegQuality +' End Get +' Set(ByVal value As Long) +' _jpegQuality = value +' End Set + +' End Property + +' Public Property jpegQualityMin() As Long +' Get +' Return _jpegQualityMin +' End Get +' Set(ByVal value As Long) +' _jpegQualityMin = value +' End Set + +' End Property +'End Module diff --git a/imagecatalog.backup/XYThreadPool.cs b/imagecatalog.backup/XYThreadPool.cs new file mode 100644 index 0000000..9f675d1 --- /dev/null +++ b/imagecatalog.backup/XYThreadPool.cs @@ -0,0 +1,273 @@ +using System; +using System.Collections; +using System.Threading; + +namespace ImageCatalog +{ + public delegate void ThreadErrorHandlerDelegate(ThreadPoolWorkItem oWorkItem, Exception oError); + + public class ThreadPoolWorkItem + { + public bool m_bStoreOutput = false; + public string m_sName = ""; + public Delegate m_pMethod = null; + public object[] m_pInput = null; + public object m_oOutput = null; + public Exception m_oException = null; + + public ThreadPoolWorkItem() + { + } + + public ThreadPoolWorkItem(string sName, Delegate pMethod, object[] pInput, bool bStoreOutput) + { + m_sName = sName; + m_pMethod = pMethod; + m_pInput = pInput; + m_bStoreOutput = bStoreOutput; + } + } + + public class XYThreadPool + { + public XYThreadPool() + { + m_delegateThreadErrorHandler = new ThreadErrorHandlerDelegate(OnThreadError); + } + + private Hashtable m_htThreads = new Hashtable(256); + private int m_nMinThreadCount = 5; + private int m_nMaxThreadCount = 10; + private int m_nShutdownPause = 200; + private int m_nServerPause = 25; + private bool m_bContinue = false; + private Exception m_oException = null; + private Queue m_qInput = new Queue(1024); + private Queue m_qOutput = new Queue(1024); + private Delegate m_delegateThreadErrorHandler; + + private void ThreadProc() + { + while (m_bContinue) + { + object obj = null; + Monitor.Enter(this); + if (m_qInput.Count > 0) + obj = m_qInput.Dequeue(); + Monitor.Exit(this); + if (obj is null) + { + bool bQuit = false; + Monitor.Enter(this); + if (m_htThreads.Count > m_nMinThreadCount) + { + m_htThreads.Remove(Thread.CurrentThread.Name); + bQuit = true; + } + + Monitor.Exit(this); + if (bQuit) + return; + Thread.Sleep(10 * m_nServerPause); + } + else + { + ThreadPoolWorkItem oWorkItem = (ThreadPoolWorkItem)obj; + // oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput) + try + { + oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput); + } + catch (Exception oBug) + { + if (m_delegateThreadErrorHandler is object) + { + try + { + var pInput = new object[] { oWorkItem, oBug }; + m_delegateThreadErrorHandler.DynamicInvoke(pInput); + } + catch + { + } + } + } + + if (oWorkItem.m_bStoreOutput) + { + Monitor.Enter(m_qOutput); + m_qOutput.Enqueue(oWorkItem); + Monitor.Exit(m_qOutput); + } + + Thread.Sleep(m_nServerPause); + } + } + } + + private void OnThreadError(ThreadPoolWorkItem oWorkItem, Exception oError) + { + if (oWorkItem is null) + { + m_oException = oError; + } + else + { + oWorkItem.m_oException = oError; + } + } + + public void SetThreadErrorHandler(ThreadErrorHandlerDelegate pMethod) + { + Monitor.Enter(this); + m_delegateThreadErrorHandler = pMethod; + Monitor.Exit(this); + } + + public void SetServerPause(int nMilliseconds) + { + Monitor.Enter(this); + if (nMilliseconds > 9 & nMilliseconds < 101) + m_nServerPause = nMilliseconds; + Monitor.Exit(this); + } + + public void SetShutdownPause(int nMilliseconds) + { + Monitor.Enter(this); + m_nShutdownPause = nMilliseconds; + Monitor.Exit(this); + } + + public Exception GetException() + { + return m_oException; + } + + public void InsertWorkItem(ThreadPoolWorkItem oWorkItem) + { + try + { + Monitor.Enter(this); + m_qInput.Enqueue(oWorkItem); + if (m_bContinue && m_qInput.Count > m_htThreads.Count && m_htThreads.Count < m_nMaxThreadCount) + { + var th = new Thread(ThreadProc); + th.Name = Guid.NewGuid().ToString(); + m_htThreads.Add(th.Name, th); + th.Start(); + } + } + catch (Exception oBug) + { + m_oException = oBug; + } + finally + { + Monitor.Exit(this); + } + } + + public void InsertWorkItem(string sName, Delegate pMethod, object[] pArgs, bool bStoreOutput) + { + InsertWorkItem(new ThreadPoolWorkItem(sName, pMethod, pArgs, bStoreOutput)); + } + + public ThreadPoolWorkItem ExtractWorkItem() + { + object oWorkItem = null; + Monitor.Enter(m_qOutput); + if (m_qOutput.Count > 0) + oWorkItem = m_qOutput.Dequeue(); + Monitor.Exit(m_qOutput); + if (oWorkItem is null) + return null; + return (ThreadPoolWorkItem)oWorkItem; + } + + public bool StartThreadPool(int nMinThreadCount = 5, int nMaxThreadCount = 10) + { + try + { + Monitor.Enter(this); + if (m_bContinue == false) + { + m_bContinue = true; + if (nMinThreadCount > 0) + { + m_nMinThreadCount = nMinThreadCount; + } + + if (nMaxThreadCount > m_nMinThreadCount) + { + m_nMaxThreadCount = nMaxThreadCount; + } + else + { + m_nMaxThreadCount = 2 * m_nMinThreadCount; + } + + int i; + var loopTo = m_nMinThreadCount; + for (i = 1; i <= loopTo; i++) + { + var th = new Thread(ThreadProc); + th.Name = Guid.NewGuid().ToString(); + m_htThreads.Add(th.Name, th); + th.Start(); + } + } + + return true; + } + catch (Exception oBug) + { + m_bContinue = false; + m_oException = oBug; + return false; + } + finally + { + Monitor.Exit(this); + } + } + + public void StopThreadPool() + { + Monitor.Enter(this); + m_bContinue = false; + Thread.Sleep(Math.Max(200, m_nShutdownPause)); + if (m_nShutdownPause > 0) + { + var dict = m_htThreads.GetEnumerator(); + while (dict.MoveNext()) + { + Thread th = (Thread)dict.Value; + if (th.IsAlive) + { + try + { + th.Abort(); + } + catch + { + } + } + } + } + + m_htThreads.Clear(); + m_qInput.Clear(); + // m_qOutput.Clear() + Monitor.Exit(this); + } + + public int GetThreadCount() + { + Monitor.Enter(this); + int nCount = m_htThreads.Count; + Monitor.Exit(this); + return nCount; + } + } +} \ No newline at end of file diff --git a/imagecatalog.backup/XYThreadPool.vb b/imagecatalog.backup/XYThreadPool.vb new file mode 100644 index 0000000..63460d9 --- /dev/null +++ b/imagecatalog.backup/XYThreadPool.vb @@ -0,0 +1,185 @@ +Option Explicit On +Option Strict Off + +Imports System.Threading +Imports System.Collections + +Public Delegate Sub ThreadErrorHandlerDelegate(ByVal oWorkItem As ThreadPoolWorkItem, ByVal oError As Exception) + +Public Class ThreadPoolWorkItem + Public m_bStoreOutput As Boolean = False + Public m_sName As String = "" + Public m_pMethod As [Delegate] = Nothing + Public m_pInput As Object() = Nothing + Public m_oOutput As Object = Nothing + Public m_oException As Exception = Nothing + Public Sub New() + End Sub + Public Sub New(ByVal sName As String, ByVal pMethod As [Delegate], ByVal pInput As Object(), ByVal bStoreOutput As Boolean) + m_sName = sName + m_pMethod = pMethod + m_pInput = pInput + m_bStoreOutput = bStoreOutput + End Sub +End Class + +Public Class XYThreadPool + Private m_htThreads As Hashtable = New Hashtable(256) + Private m_nMinThreadCount As Integer = 5 + Private m_nMaxThreadCount As Integer = 10 + Private m_nShutdownPause As Integer = 200 + Private m_nServerPause As Integer = 25 + Private m_bContinue As Boolean = False + Private m_oException As Exception = Nothing + Private m_qInput As Queue = New Queue(1024) + Private m_qOutput As Queue = New Queue(1024) + Private m_delegateThreadErrorHandler As [Delegate] = New ThreadErrorHandlerDelegate(AddressOf OnThreadError) + Private Sub ThreadProc() + While m_bContinue + Dim obj As Object = Nothing + Monitor.Enter(Me) + If m_qInput.Count > 0 Then obj = m_qInput.Dequeue() + Monitor.Exit(Me) + If obj Is Nothing Then + Dim bQuit As Boolean = False + Monitor.Enter(Me) + If m_htThreads.Count > m_nMinThreadCount Then + m_htThreads.Remove(Thread.CurrentThread.Name) + bQuit = True + End If + Monitor.Exit(Me) + If bQuit Then Return + Thread.Sleep(10 * m_nServerPause) + Else + Dim oWorkItem As ThreadPoolWorkItem = CType(obj, ThreadPoolWorkItem) + 'oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput) + Try + oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput) + Catch oBug As Exception + If Not m_delegateThreadErrorHandler Is Nothing Then + Try + Dim pInput As Object() = {oWorkItem, oBug} + m_delegateThreadErrorHandler.DynamicInvoke(pInput) + Catch + End Try + End If + End Try + If oWorkItem.m_bStoreOutput Then + Monitor.Enter(m_qOutput) + m_qOutput.Enqueue(oWorkItem) + Monitor.Exit(m_qOutput) + End If + Thread.Sleep(m_nServerPause) + End If + End While + End Sub + Private Sub OnThreadError(ByVal oWorkItem As ThreadPoolWorkItem, ByVal oError As Exception) + If oWorkItem Is Nothing Then + m_oException = oError + Else + oWorkItem.m_oException = oError + End If + End Sub + Public Sub SetThreadErrorHandler(ByVal pMethod As ThreadErrorHandlerDelegate) + Monitor.Enter(Me) + m_delegateThreadErrorHandler = pMethod + Monitor.Exit(Me) + End Sub + Public Sub SetServerPause(ByVal nMilliseconds As Integer) + Monitor.Enter(Me) + If nMilliseconds > 9 And nMilliseconds < 101 Then m_nServerPause = nMilliseconds + Monitor.Exit(Me) + End Sub + Public Sub SetShutdownPause(ByVal nMilliseconds As Integer) + Monitor.Enter(Me) + m_nShutdownPause = nMilliseconds + Monitor.Exit(Me) + End Sub + Public Function GetException() As Exception + Return m_oException + End Function + Public Sub InsertWorkItem(ByVal oWorkItem As ThreadPoolWorkItem) + Try + Monitor.Enter(Me) + m_qInput.Enqueue(oWorkItem) + If m_bContinue AndAlso m_qInput.Count > m_htThreads.Count AndAlso m_htThreads.Count < m_nMaxThreadCount Then + Dim th As Thread = New Thread(AddressOf ThreadProc) + th.Name = Guid.NewGuid.ToString() + m_htThreads.Add(th.Name, th) + th.Start() + End If + Catch oBug As Exception + m_oException = oBug + Finally + Monitor.Exit(Me) + End Try + End Sub + Public Sub InsertWorkItem(ByVal sName As String, ByVal pMethod As [Delegate], ByVal pArgs As Object(), ByVal bStoreOutput As Boolean) + InsertWorkItem(New ThreadPoolWorkItem(sName, pMethod, pArgs, bStoreOutput)) + End Sub + Public Function ExtractWorkItem() As ThreadPoolWorkItem + Dim oWorkItem As Object = Nothing + Monitor.Enter(m_qOutput) + If m_qOutput.Count > 0 Then oWorkItem = m_qOutput.Dequeue() + Monitor.Exit(m_qOutput) + If oWorkItem Is Nothing Then Return Nothing + Return CType(oWorkItem, ThreadPoolWorkItem) + End Function + Public Function StartThreadPool(Optional ByVal nMinThreadCount As Integer = 5, Optional ByVal nMaxThreadCount As Integer = 10) As Boolean + Try + Monitor.Enter(Me) + If m_bContinue = False Then + m_bContinue = True + If nMinThreadCount > 0 Then + m_nMinThreadCount = nMinThreadCount + End If + If nMaxThreadCount > m_nMinThreadCount Then + m_nMaxThreadCount = nMaxThreadCount + Else + m_nMaxThreadCount = 2 * m_nMinThreadCount + End If + Dim i As Integer + For i = 1 To m_nMinThreadCount + Dim th As Thread = New Thread(AddressOf ThreadProc) + th.Name = Guid.NewGuid.ToString() + m_htThreads.Add(th.Name, th) + th.Start() + Next i + End If + Return True + Catch oBug As Exception + m_bContinue = False + m_oException = oBug + Return False + Finally + Monitor.Exit(Me) + End Try + End Function + Public Sub StopThreadPool() + Monitor.Enter(Me) + m_bContinue = False + Thread.Sleep(Math.Max(200, m_nShutdownPause)) + If (m_nShutdownPause > 0) Then + Dim dict As IDictionaryEnumerator = m_htThreads.GetEnumerator() + While dict.MoveNext() + Dim th As Thread = CType(dict.Value(), Thread) + If th.IsAlive Then + Try + th.Abort() + Catch + End Try + End If + End While + End If + m_htThreads.Clear() + m_qInput.Clear() + ' m_qOutput.Clear() + Monitor.Exit(Me) + End Sub + Public Function GetThreadCount() As Integer + Monitor.Enter(Me) + Dim nCount As Integer = m_htThreads.Count + Monitor.Exit(Me) + Return nCount + End Function +End Class \ No newline at end of file diff --git a/imagecatalog.backup/app.config b/imagecatalog.backup/app.config new file mode 100644 index 0000000..9add436 --- /dev/null +++ b/imagecatalog.backup/app.config @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/imagecatalog/packages.config b/imagecatalog.backup/packages.config similarity index 100% rename from imagecatalog/packages.config rename to imagecatalog.backup/packages.config diff --git a/imagecatalog.backup/upgrade.backup b/imagecatalog.backup/upgrade.backup new file mode 100644 index 0000000..deaf2c6 --- /dev/null +++ b/imagecatalog.backup/upgrade.backup @@ -0,0 +1 @@ +Backup created at 1615021897 (06/03/2021 09:11:37 +00:00) \ No newline at end of file diff --git a/imagecatalog/ImageCatalog 2.csproj b/imagecatalog/ImageCatalog 2.csproj index 6acc065..da406d7 100644 --- a/imagecatalog/ImageCatalog 2.csproj +++ b/imagecatalog/ImageCatalog 2.csproj @@ -1,14 +1,7 @@ - - + + net5.0-windows Local - 9.0.30729 - 2.0 - {3F1E23DB-435E-0590-1EF5-735E898DBA3C} - Debug - AnyCPU - - ImageCatalog @@ -25,23 +18,13 @@ On ImageCatalog ImageCatalog.My.MyApplication - - WindowsForms - 3.5 - - - v4.8 false My Project\app.manifest - - SAK SAK SAK SAK - - $(DefaultItemExcludes);$(ProjectDir)**\*.vb latest \\casa-storage\Foto\catolg\parallel2.0\ @@ -61,6 +44,9 @@ false true true + false + true + true bin\ @@ -72,17 +58,11 @@ true true - true - false false false - false 1 42016,42017,42018,42019,42032,42353,42354,42355 - full - AnyCPU AllRules.ruleset - false bin\ @@ -94,20 +74,14 @@ false true - false - true false false - false 1 42016,42017,42018,42019,42032,42353,42354,42355 none - AnyCPU AllRules.ruleset - false - true true true bin\x64\Debug\ @@ -115,25 +89,18 @@ bin\x64\Debug\ImageCatalog.xml 1 42016,42017,42018,42019,42032,42353,42354,42355 - full - x64 AllRules.ruleset - false true bin\x64\Release\ 285212672 bin\x64\Release\ImageCatalog.xml - true 1 42016,42017,42018,42019,42032,42353,42354,42355 - x64 AllRules.ruleset - false - true true true bin\x86\Debug\ @@ -141,37 +108,26 @@ bin\x86\Debug\ImageCatalog.xml 1 42016,42017,42018,42019,42032,42353,42354,42355 - full - x86 bin\ImageCatalog.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs AllRules.ruleset ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets true ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true - false - false true bin\x86\Release\ 285212672 bin\x86\Release\ImageCatalog.xml - true 1 42016,42017,42018,42019,42032,42353,42354,42355 - x86 bin\ImageCatalog.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs AllRules.ruleset ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets true ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules true - false 6BFA075A69837045D051A6F7B6CAD4961D53335E @@ -186,135 +142,38 @@ true - - - ..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll - - - - ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll - - - ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll - - - ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll - - + System - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll - - + 3.5 True - + System.Data True - + System.Drawing True - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - System.Windows.Forms - - + System.XML - - - - - - Code - - - - - - Code - - - Form - - - - MainForm.cs - - - Form - - - - True - Application.myapp - - - True - True - Settings.settings - - - - - Code - - - Code - - - Form1.cs - Designer - - - MainForm.cs - - - + MyApplicationCodeGenerator Application.Designer.cs - - - - - ImageCatalog.My - SettingsSingleFileGenerator - Settings.Designer.cs - - @@ -352,20 +211,17 @@ - - {44465926-240d-473f-90b8-786ba4384406} - CatalogVbLib - - - {aebfe9e3-277c-4a7b-8448-145d1b11998b} - MaddoShared - + + - - - - - - - + + + + + + + all + + + \ No newline at end of file diff --git a/imagecatalog/app.config b/imagecatalog/app.config index 9add436..7d44156 100644 --- a/imagecatalog/app.config +++ b/imagecatalog/app.config @@ -1,40 +1,43 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/log.txt b/log.txt new file mode 100644 index 0000000..aa7e6df --- /dev/null +++ b/log.txt @@ -0,0 +1,135 @@ +2021-03-06 10:04:44.068 +01:00 [INF] MSBuild registered from C:\Program Files\dotnet\sdk\5.0.200\ +2021-03-06 10:04:44.120 +01:00 [INF] Registered 1 extensions: + Default extension +2021-03-06 10:04:50.740 +01:00 [INF] Initializing upgrade step Select an entrypoint +2021-03-06 10:05:37.931 +01:00 [INF] Applying upgrade step Select an entrypoint +2021-03-06 10:05:56.095 +01:00 [INF] Upgrade step Select an entrypoint applied successfully +2021-03-06 10:05:59.578 +01:00 [INF] Initializing upgrade step Select project to upgrade +2021-03-06 10:06:53.914 +01:00 [INF] Applying upgrade step Select project to upgrade +2021-03-06 10:07:00.961 +01:00 [INF] Upgrade step Select project to upgrade applied successfully +2021-03-06 10:07:03.582 +01:00 [INF] Initializing upgrade step Back up project +2021-03-06 10:07:22.200 +01:00 [INF] Applying upgrade step Back up project +2021-03-06 10:07:26.114 +01:00 [INF] Backing up H:\dev\vs\Catalog\MaddoShared to H:\dev\vs\Catalog\MaddoShared.backup +2021-03-06 10:07:31.549 +01:00 [INF] Project backed up to H:\dev\vs\Catalog\MaddoShared.backup +2021-03-06 10:07:31.550 +01:00 [INF] Upgrade step Back up project applied successfully +2021-03-06 10:07:40.695 +01:00 [INF] Initializing upgrade step Convert project file to SDK style +2021-03-06 10:07:40.696 +01:00 [FTL] Try-Convert not found. This tool depends on the Try-Convert CLI tool. Please ensure that Try-Convert is installed and that the correct location for the tool is specified (in configuration, for example). https://github.com/dotnet/try-convert +2021-03-06 10:09:23.887 +01:00 [INF] Applying upgrade step Convert project file to SDK style +2021-03-06 10:09:23.889 +01:00 [INF] Converting project file format with try-convert +2021-03-06 10:09:27.336 +01:00 [INF] [try-convert] Conversion complete! +2021-03-06 10:09:27.915 +01:00 [INF] Project file converted successfully! The project may require additional changes to build successfully against the new .NET target. +2021-03-06 10:09:30.087 +01:00 [INF] Upgrade step Convert project file to SDK style applied successfully +2021-03-06 10:09:36.050 +01:00 [INF] Initializing upgrade step Update TFM +2021-03-06 10:09:48.944 +01:00 [INF] Applying upgrade step Update TFM +2021-03-06 10:09:54.879 +01:00 [INF] Upgrade step Update TFM applied successfully +2021-03-06 10:10:10.865 +01:00 [INF] Initializing upgrade step Update NuGet packages +2021-03-06 10:10:12.295 +01:00 [INF] Marking package System.Reflection.Metadata for removal because it appears to be a transitive dependency +2021-03-06 10:10:13.789 +01:00 [INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.2.212405) needs added +2021-03-06 10:10:15.101 +01:00 [INF] Adding Microsoft.Windows.Compatibility 5.0.2 +2021-03-06 10:10:15.104 +01:00 [INF] Packages to be removed: +System.Reflection.Metadata, Version=5.0.0 +2021-03-06 10:10:15.105 +01:00 [INF] Packages to be addded: +Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, Version=0.2.212405 +Microsoft.Windows.Compatibility, Version=5.0.2 +2021-03-06 10:10:18.926 +01:00 [INF] Applying upgrade step Update NuGet packages +2021-03-06 10:10:18.932 +01:00 [INF] Removing outdated package reference: System.Reflection.Metadata, Version=5.0.0 +2021-03-06 10:10:18.935 +01:00 [INF] Adding package reference: Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, Version=0.2.212405 +2021-03-06 10:10:18.937 +01:00 [INF] Adding package reference: Microsoft.Windows.Compatibility, Version=5.0.2 +2021-03-06 10:10:24.287 +01:00 [INF] Marking package System.Data.DataSetExtensions for removal because it appears to be a transitive dependency +2021-03-06 10:10:24.292 +01:00 [INF] Marking package System.Numerics.Vectors for removal because it appears to be a transitive dependency +2021-03-06 10:10:24.706 +01:00 [INF] Removing outdated package reference: System.Data.DataSetExtensions, Version=4.5.0 +2021-03-06 10:10:24.707 +01:00 [INF] Removing outdated package reference: System.Numerics.Vectors, Version=4.5.0 +2021-03-06 10:10:27.413 +01:00 [INF] Upgrade step Update NuGet packages applied successfully +2021-03-06 10:10:36.907 +01:00 [INF] Initializing upgrade step Add template files +2021-03-06 10:10:36.924 +01:00 [INF] 0 expected template items needed +2021-03-06 10:10:36.926 +01:00 [INF] Initializing upgrade step Upgrade app config files +2021-03-06 10:10:36.944 +01:00 [INF] Found 0 app settings for upgrade: +2021-03-06 10:10:36.950 +01:00 [INF] 0 web page namespace imports need upgraded: +2021-03-06 10:10:36.951 +01:00 [INF] Initializing upgrade step Update C# source +2021-03-06 10:10:38.659 +01:00 [INF] Initializing upgrade step Move to next project +2021-03-06 10:10:43.824 +01:00 [INF] Applying upgrade step Move to next project +2021-03-06 10:10:43.825 +01:00 [INF] Upgrade step Move to next project applied successfully +2021-03-06 10:11:07.545 +01:00 [INF] Initializing upgrade step Select project to upgrade +2021-03-06 10:11:10.510 +01:00 [INF] Applying upgrade step Select project to upgrade +2021-03-06 10:11:14.382 +01:00 [INF] Upgrade step Select project to upgrade applied successfully +2021-03-06 10:11:17.877 +01:00 [INF] Initializing upgrade step Back up project +2021-03-06 10:11:21.030 +01:00 [INF] Applying upgrade step Back up project +2021-03-06 10:11:22.810 +01:00 [INF] Backing up H:\dev\vs\Catalog\imagecatalog to H:\dev\vs\Catalog\imagecatalog.backup +2021-03-06 10:11:37.349 +01:00 [INF] Project backed up to H:\dev\vs\Catalog\imagecatalog.backup +2021-03-06 10:11:37.350 +01:00 [INF] Upgrade step Back up project applied successfully +2021-03-06 10:11:47.584 +01:00 [INF] Initializing upgrade step Convert project file to SDK style +2021-03-06 10:11:49.609 +01:00 [INF] Applying upgrade step Convert project file to SDK style +2021-03-06 10:11:49.610 +01:00 [INF] Converting project file format with try-convert +2021-03-06 10:11:52.238 +01:00 [INF] [try-convert] Conversion complete! +2021-03-06 10:11:52.666 +01:00 [INF] Project file converted successfully! The project may require additional changes to build successfully against the new .NET target. +2021-03-06 10:11:55.581 +01:00 [INF] Upgrade step Convert project file to SDK style applied successfully +2021-03-06 10:12:00.489 +01:00 [INF] Initializing upgrade step Update TFM +2021-03-06 10:12:03.093 +01:00 [INF] Applying upgrade step Update TFM +2021-03-06 10:12:06.038 +01:00 [INF] Upgrade step Update TFM applied successfully +2021-03-06 10:12:10.906 +01:00 [INF] Initializing upgrade step Update NuGet packages +2021-03-06 10:12:12.592 +01:00 [INF] Marking package Ben.Demystifier for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.607 +01:00 [INF] Marking package System.Buffers for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.624 +01:00 [INF] Marking package System.Collections.Immutable for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.628 +01:00 [INF] Marking package System.Memory for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.630 +01:00 [INF] Marking package System.Numerics.Vectors for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.633 +01:00 [INF] Marking package System.Reflection.Metadata for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.637 +01:00 [INF] Marking package System.Runtime.CompilerServices.Unsafe for removal because it appears to be a transitive dependency +2021-03-06 10:12:12.640 +01:00 [INF] Marking package System.Threading.Tasks.Extensions for removal because it appears to be a transitive dependency +2021-03-06 10:12:14.097 +01:00 [INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.2.212405) needs added +2021-03-06 10:12:14.104 +01:00 [INF] Packages to be removed: +Ben.Demystifier, Version=0.3.0 +System.Buffers, Version=4.5.1 +System.Collections.Immutable, Version=5.0.0 +System.Memory, Version=4.5.4 +System.Numerics.Vectors, Version=4.5.0 +System.Reflection.Metadata, Version=5.0.0 +System.Runtime.CompilerServices.Unsafe, Version=5.0.0 +System.Threading.Tasks.Extensions, Version=4.5.4 +2021-03-06 10:12:14.104 +01:00 [INF] Packages to be addded: +Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, Version=0.2.212405 +2021-03-06 10:12:16.572 +01:00 [INF] Applying upgrade step Update NuGet packages +2021-03-06 10:12:16.573 +01:00 [INF] Removing outdated package reference: Ben.Demystifier, Version=0.3.0 +2021-03-06 10:12:16.573 +01:00 [INF] Removing outdated package reference: System.Buffers, Version=4.5.1 +2021-03-06 10:12:16.574 +01:00 [INF] Removing outdated package reference: System.Collections.Immutable, Version=5.0.0 +2021-03-06 10:12:16.575 +01:00 [INF] Removing outdated package reference: System.Memory, Version=4.5.4 +2021-03-06 10:12:16.576 +01:00 [INF] Removing outdated package reference: System.Numerics.Vectors, Version=4.5.0 +2021-03-06 10:12:16.578 +01:00 [INF] Removing outdated package reference: System.Reflection.Metadata, Version=5.0.0 +2021-03-06 10:12:16.578 +01:00 [INF] Removing outdated package reference: System.Runtime.CompilerServices.Unsafe, Version=5.0.0 +2021-03-06 10:12:16.580 +01:00 [INF] Removing outdated package reference: System.Threading.Tasks.Extensions, Version=4.5.4 +2021-03-06 10:12:16.581 +01:00 [INF] Adding package reference: Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, Version=0.2.212405 +2021-03-06 10:12:19.366 +01:00 [INF] Upgrade step Update NuGet packages applied successfully +2021-03-06 10:12:35.849 +01:00 [INF] Initializing upgrade step Add template files +2021-03-06 10:12:35.850 +01:00 [INF] 0 expected template items needed +2021-03-06 10:12:35.851 +01:00 [INF] Initializing upgrade step Upgrade app config files +2021-03-06 10:12:35.852 +01:00 [INF] Found 0 app settings for upgrade: +2021-03-06 10:12:35.853 +01:00 [INF] system.diagnostics is not supported in .NET 5. See https://github.com/dotnet/runtime/issues/23937 for details. For now, it will be disabled. +2021-03-06 10:12:35.854 +01:00 [INF] 0 web page namespace imports need upgraded: +2021-03-06 10:12:40.725 +01:00 [INF] Applying upgrade step Disable unsupported configuration sections +2021-03-06 10:12:40.727 +01:00 [INF] system.diagnostics is not supported in .NET 5. See https://github.com/dotnet/runtime/issues/23937 for details. For now, it will be disabled. +2021-03-06 10:12:40.730 +01:00 [INF] Configuration file H:\dev\vs\Catalog\imagecatalog\app.config has been updated +2021-03-06 10:12:40.737 +01:00 [INF] Upgrade step Disable unsupported configuration sections applied successfully +2021-03-06 10:12:40.739 +01:00 [INF] Applying upgrade step Upgrade app config files +2021-03-06 10:12:40.740 +01:00 [INF] Upgrade step Upgrade app config files applied successfully +2021-03-06 10:12:43.598 +01:00 [INF] Initializing upgrade step Update C# source +2021-03-06 10:12:44.173 +01:00 [INF] Initializing upgrade step Move to next project +2021-03-06 10:12:47.488 +01:00 [INF] Applying upgrade step Move to next project +2021-03-06 10:12:47.489 +01:00 [INF] Upgrade step Move to next project applied successfully +2021-03-06 10:12:48.833 +01:00 [INF] Initializing upgrade step Select project to upgrade +2021-03-06 10:12:50.361 +01:00 [INF] Applying upgrade step Select project to upgrade +2021-03-06 10:12:54.374 +01:00 [ERR] Unknown selection: '' +2021-03-06 10:13:02.205 +01:00 [ERR] Unknown selection: '' +2021-03-06 10:13:04.059 +01:00 [ERR] Unknown selection: 'exit' +2021-03-06 10:13:06.542 +01:00 [ERR] Unknown selection: '0' +2021-03-06 10:13:08.242 +01:00 [INF] Saving upgrade progress file at H:\dev\vs\Catalog\.upgrade-assistant +2021-03-06 10:13:13.625 +01:00 [INF] MSBuild registered from C:\Program Files\dotnet\sdk\5.0.200\ +2021-03-06 10:13:13.651 +01:00 [INF] Registered 1 extensions: + Default extension +2021-03-06 10:13:15.795 +01:00 [INF] Loading upgrade progress file at H:\dev\vs\Catalog\.upgrade-assistant +2021-03-06 10:13:17.819 +01:00 [INF] Initializing upgrade step Select project to upgrade +2021-03-06 10:13:29.438 +01:00 [INF] Skipping upgrade step Select project to upgrade +2021-03-06 10:13:29.440 +01:00 [INF] Upgrade step Select project to upgrade skipped +2021-03-06 10:13:31.325 +01:00 [INF] Initializing upgrade step Finalize Solution +2021-03-06 10:13:34.820 +01:00 [INF] Applying upgrade step Finalize Solution +2021-03-06 10:13:34.821 +01:00 [INF] Upgrade step Finalize Solution applied successfully +2021-03-06 10:13:36.563 +01:00 [INF] Upgrade has completed. Please review any changes. +2021-03-06 10:13:36.565 +01:00 [INF] Saving upgrade progress file at H:\dev\vs\Catalog\.upgrade-assistant