From 9794ce1abb9a6fab5a42d87f355a2f71dafe320c Mon Sep 17 00:00:00 2001 From: Maddo Scientisto Date: Thu, 4 Mar 2021 10:44:09 +0100 Subject: [PATCH] Gestione status dei thread --- Catalog.sln | 40 +- Catalog.sln.bak | 118 + ImageCatalogParallel/App.config | 6 + ImageCatalogParallel/Form1.Designer.cs | 1809 +++++++++ ImageCatalogParallel/Form1.cs | 20 + ImageCatalogParallel/Form1.resx | 120 + .../ImageCatalogParallel.csproj | 83 + ImageCatalogParallel/Program.cs | 22 + .../Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 70 + .../Properties/Resources.resx | 117 + .../Properties/Settings.Designer.cs | 29 + .../Properties/Settings.settings | 7 + MaddoShared/ImageCreationStuff.cs | 41 +- imagecatalog/AssemblyInfo.cs | 32 + imagecatalog/CreaImmagineSeparateMultiCore.cs | 1255 +++++++ imagecatalog/CreaImmagineSeparateThread.cs | 1721 +++++++++ imagecatalog/ExifReader.cs | 1190 ++++++ imagecatalog/FileHelper.cs | 261 ++ imagecatalog/Form1.cs | 3281 +++++++++++++++++ imagecatalog/ImageCatalog 2.csproj | 355 ++ imagecatalog/LoadBuffer.cs | 13 + imagecatalog/MainForm.Designer.cs | 2169 +++++++++++ imagecatalog/MainForm.cs | 1675 +++++++++ imagecatalog/Module1.cs | 158 + imagecatalog/Module2.cs | 7 + .../My Project/Application.Designer.cs | 38 + .../MyNamespace.Dynamic.Designer.cs | 58 + .../MyNamespace.Static.1.Designer.cs | 305 ++ imagecatalog/My Project/Settings.Designer.cs | 26 + imagecatalog/ParametriSetup.cs | 179 + imagecatalog/PicSettings.cs | 602 +++ imagecatalog/XYThreadPool.cs | 273 ++ imagecatalog/app.config | 22 +- imagecatalog/packages.config | 4 +- 35 files changed, 16112 insertions(+), 30 deletions(-) create mode 100644 Catalog.sln.bak create mode 100644 ImageCatalogParallel/App.config create mode 100644 ImageCatalogParallel/Form1.Designer.cs create mode 100644 ImageCatalogParallel/Form1.cs create mode 100644 ImageCatalogParallel/Form1.resx create mode 100644 ImageCatalogParallel/ImageCatalogParallel.csproj create mode 100644 ImageCatalogParallel/Program.cs create mode 100644 ImageCatalogParallel/Properties/AssemblyInfo.cs create mode 100644 ImageCatalogParallel/Properties/Resources.Designer.cs create mode 100644 ImageCatalogParallel/Properties/Resources.resx create mode 100644 ImageCatalogParallel/Properties/Settings.Designer.cs create mode 100644 ImageCatalogParallel/Properties/Settings.settings create mode 100644 imagecatalog/AssemblyInfo.cs create mode 100644 imagecatalog/CreaImmagineSeparateMultiCore.cs create mode 100644 imagecatalog/CreaImmagineSeparateThread.cs create mode 100644 imagecatalog/ExifReader.cs create mode 100644 imagecatalog/FileHelper.cs create mode 100644 imagecatalog/Form1.cs create mode 100644 imagecatalog/ImageCatalog 2.csproj create mode 100644 imagecatalog/LoadBuffer.cs create mode 100644 imagecatalog/MainForm.Designer.cs create mode 100644 imagecatalog/MainForm.cs create mode 100644 imagecatalog/Module1.cs create mode 100644 imagecatalog/Module2.cs create mode 100644 imagecatalog/My Project/Application.Designer.cs create mode 100644 imagecatalog/My Project/MyNamespace.Dynamic.Designer.cs create mode 100644 imagecatalog/My Project/MyNamespace.Static.1.Designer.cs create mode 100644 imagecatalog/My Project/Settings.Designer.cs create mode 100644 imagecatalog/ParametriSetup.cs create mode 100644 imagecatalog/PicSettings.cs create mode 100644 imagecatalog/XYThreadPool.cs diff --git a/Catalog.sln b/Catalog.sln index 7108485..fb8ac9a 100644 --- a/Catalog.sln +++ b/Catalog.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31005.135 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.vbproj", "{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.csproj", "{3F1E23DB-435E-0590-1EF5-735E898DBA3C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 3", "ImageCatalogCS\ImageCatalog 3.csproj", "{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}" EndProject @@ -17,6 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalogParallel", "ImageCatalogParallel\ImageCatalogParallel.csproj", "{0F42DA5C-2788-48BD-BACA-01625C3CFFBB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,18 +29,18 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x64.ActiveCfg = Debug|x64 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x64.Build.0 = Debug|x64 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x86.ActiveCfg = Debug|x86 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x86.Build.0 = Debug|x86 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|Any CPU.Build.0 = Release|Any CPU - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x64.ActiveCfg = Release|x64 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x64.Build.0 = Release|x64 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x86.ActiveCfg = Release|x86 - {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x86.Build.0 = Release|x86 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.ActiveCfg = Debug|x64 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.Build.0 = Debug|x64 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x86.ActiveCfg = Debug|x86 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x86.Build.0 = Debug|x86 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|Any CPU.Build.0 = Release|Any CPU + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|x64.ActiveCfg = Release|x64 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|x64.Build.0 = Release|x64 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|x86.ActiveCfg = Release|x86 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|x86.Build.0 = Release|x86 {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.ActiveCfg = Debug|x64 @@ -91,6 +93,18 @@ Global {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x64.Build.0 = Release|Any CPU {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x86.ActiveCfg = Release|Any CPU {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x86.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x64.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x64.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x86.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x86.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|Any CPU.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x64.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x64.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x86.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Catalog.sln.bak b/Catalog.sln.bak new file mode 100644 index 0000000..82fc04e --- /dev/null +++ b/Catalog.sln.bak @@ -0,0 +1,118 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31005.135 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.vbproj", "{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 3", "ImageCatalogCS\ImageCatalog 3.csproj", "{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatalogLib", "CatalogLib\CatalogLib.csproj", "{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFCatalog", "WPFCatalog\WPFCatalog.csproj", "{638DE501-CECA-4744-B293-7AE93CAEEB01}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CatalogVbLib", "CatalogVbLib\CatalogVbLib.vbproj", "{44465926-240D-473F-90B8-786BA4384406}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalogParallel", "ImageCatalogParallel\ImageCatalogParallel.csproj", "{0F42DA5C-2788-48BD-BACA-01625C3CFFBB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x64.ActiveCfg = Debug|x64 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x64.Build.0 = Debug|x64 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x86.ActiveCfg = Debug|x86 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Debug|x86.Build.0 = Debug|x86 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|Any CPU.Build.0 = Release|Any CPU + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x64.ActiveCfg = Release|x64 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x64.Build.0 = Release|x64 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x86.ActiveCfg = Release|x86 + {8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x86.Build.0 = Release|x86 + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.ActiveCfg = Debug|x64 + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.Build.0 = Debug|x64 + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x86.ActiveCfg = Debug|Any CPU + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|Any CPU.Build.0 = Release|Any CPU + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x64.ActiveCfg = Release|x64 + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x64.Build.0 = Release|x64 + {D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x86.ActiveCfg = Release|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x64.ActiveCfg = Debug|x64 + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x64.Build.0 = Debug|x64 + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x86.ActiveCfg = Debug|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|Any CPU.Build.0 = Release|Any CPU + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x64.ActiveCfg = Release|x64 + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x64.Build.0 = Release|x64 + {D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x86.ActiveCfg = Release|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x64.ActiveCfg = Debug|x64 + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x64.Build.0 = Debug|x64 + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x86.ActiveCfg = Debug|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|Any CPU.Build.0 = Release|Any CPU + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x64.ActiveCfg = Release|x64 + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x64.Build.0 = Release|x64 + {638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x86.ActiveCfg = Release|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Debug|x64.ActiveCfg = Debug|x64 + {44465926-240D-473F-90B8-786BA4384406}.Debug|x64.Build.0 = Debug|x64 + {44465926-240D-473F-90B8-786BA4384406}.Debug|x86.ActiveCfg = Debug|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Release|Any CPU.Build.0 = Release|Any CPU + {44465926-240D-473F-90B8-786BA4384406}.Release|x64.ActiveCfg = Release|x64 + {44465926-240D-473F-90B8-786BA4384406}.Release|x64.Build.0 = Release|x64 + {44465926-240D-473F-90B8-786BA4384406}.Release|x86.ActiveCfg = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|x64.ActiveCfg = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|x64.Build.0 = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|x86.ActiveCfg = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Debug|x86.Build.0 = Debug|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|Any CPU.Build.0 = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x64.ActiveCfg = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x64.Build.0 = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x86.ActiveCfg = Release|Any CPU + {AEBFE9E3-277C-4A7B-8448-145D1B11998B}.Release|x86.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x64.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x64.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x86.ActiveCfg = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Debug|x86.Build.0 = Debug|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|Any CPU.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x64.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x64.Build.0 = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x86.ActiveCfg = Release|Any CPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {AEBFE9E3-277C-4A7B-8448-145D1B11998B} = {A3D50937-74F6-4DC8-8D89-B534B484C0F9} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0E3ABC63-8601-4DAC-AFEA-33F3E8E36757} + EndGlobalSection +EndGlobal diff --git a/ImageCatalogParallel/App.config b/ImageCatalogParallel/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ImageCatalogParallel/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ImageCatalogParallel/Form1.Designer.cs b/ImageCatalogParallel/Form1.Designer.cs new file mode 100644 index 0000000..d598f89 --- /dev/null +++ b/ImageCatalogParallel/Form1.Designer.cs @@ -0,0 +1,1809 @@ + +namespace ImageCatalogParallel +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + 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.Label37 = new System.Windows.Forms.Label(); + this.Label38 = new System.Windows.Forms.Label(); + this.Label45 = new System.Windows.Forms.Label(); + this.TextBox32 = new System.Windows.Forms.TextBox(); + this.TextBox26 = new System.Windows.Forms.TextBox(); + this.TextBox27 = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.CheckBox15 = new System.Windows.Forms.CheckBox(); + 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.TextBox28 = new System.Windows.Forms.TextBox(); + this.TabPage2 = new System.Windows.Forms.TabPage(); + this.GroupBox2 = new System.Windows.Forms.GroupBox(); + this.Label27 = new System.Windows.Forms.Label(); + this.Button7 = new System.Windows.Forms.Button(); + this.Button5 = new System.Windows.Forms.Button(); + 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.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.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.btnCreaCatalogoAsync = new System.Windows.Forms.Button(); + this.Label20 = new System.Windows.Forms.Label(); + this.btnCreaCatalogo = new System.Windows.Forms.Button(); + this.Label24 = new System.Windows.Forms.Label(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + 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.GroupBox6 = new System.Windows.Forms.GroupBox(); + this.Button4 = new System.Windows.Forms.Button(); + this.TabPage4 = new System.Windows.Forms.TabPage(); + this.Label13 = new System.Windows.Forms.Label(); + 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.txtFilePerCartella = new System.Windows.Forms.TextBox(); + this.GroupBox8 = new System.Windows.Forms.GroupBox(); + this.chkCreaSottocartelle = new System.Windows.Forms.CheckBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.chkAggiornaSottodirectory = new System.Windows.Forms.CheckBox(); + this.GroupBox3 = new System.Windows.Forms.GroupBox(); + 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.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.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.CheckBox2 = new System.Windows.Forms.CheckBox(); + 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.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.Button6 = new System.Windows.Forms.Button(); + this.TabPage1.SuspendLayout(); + this.Panel1.SuspendLayout(); + this.GroupBox1.SuspendLayout(); + this.Panel2.SuspendLayout(); + this.TabPage2.SuspendLayout(); + this.GroupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).BeginInit(); + this.GroupBox6.SuspendLayout(); + this.TabPage4.SuspendLayout(); + this.GroupBox8.SuspendLayout(); + this.GroupBox3.SuspendLayout(); + this.TabControl1.SuspendLayout(); + this.TabPage5.SuspendLayout(); + this.GroupBox11.SuspendLayout(); + this.Panel3.SuspendLayout(); + this.GroupBox7.SuspendLayout(); + this.TabPage3.SuspendLayout(); + this.GroupBox10.SuspendLayout(); + this.GroupBox9.SuspendLayout(); + this.GroupBox5.SuspendLayout(); + this.GroupBox4.SuspendLayout(); + this.SuspendLayout(); + // + // 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; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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%)"; + // + // 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"; + // + // 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"; + // + // Label27 + // + this.Label27.Location = new System.Drawing.Point(591, 378); + this.Label27.Name = "Label27"; + this.Label27.Size = new System.Drawing.Size(145, 20); + this.Label27.TabIndex = 78; + this.Label27.Text = "Versione 2.2 2021"; + this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // 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(197, 40); + this.Button7.TabIndex = 77; + this.Button7.Text = "stop creazione"; + // + // 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(197, 32); + this.Button5.TabIndex = 76; + this.Button5.Text = "Salva impostazioni"; + // + // 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; + // + // 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"; + // + // 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(544, 275); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(80, 16); + this.Label19.TabIndex = 74; + 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(648, 294); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(19, 20); + this.Label18.TabIndex = 73; + 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(648, 275); + this.lblFotoTotaliNum.Name = "lblFotoTotaliNum"; + this.lblFotoTotaliNum.Size = new System.Drawing.Size(19, 20); + this.lblFotoTotaliNum.TabIndex = 72; + 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(197, 72); + this.Label10.TabIndex = 71; + this.Label10.Text = "file"; + // + // 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"; + // + // btnCreaCatalogoAsync + // + this.btnCreaCatalogoAsync.Location = new System.Drawing.Point(647, 78); + this.btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync"; + this.btnCreaCatalogoAsync.Size = new System.Drawing.Size(89, 38); + this.btnCreaCatalogoAsync.TabIndex = 83; + this.btnCreaCatalogoAsync.Text = "Crea 2"; + this.btnCreaCatalogoAsync.UseVisualStyleBackColor = true; + // + // 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(544, 294); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(104, 16); + this.Label20.TabIndex = 75; + this.Label20.Text = "foto generate:"; + // + // btnCreaCatalogo + // + this.btnCreaCatalogo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnCreaCatalogo.Location = new System.Drawing.Point(539, 77); + this.btnCreaCatalogo.Name = "btnCreaCatalogo"; + this.btnCreaCatalogo.Size = new System.Drawing.Size(107, 39); + this.btnCreaCatalogo.TabIndex = 69; + this.btnCreaCatalogo.Text = "crea catalogo"; + // + // 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; + // + // 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; + // + // 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"; + // + // 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 = "..."; + // + // 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; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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"; + // + // 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 = "..."; + // + // 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 = "..."; + // + // 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"; + // + // ProgressBar1 + // + this.ProgressBar1.Location = new System.Drawing.Point(539, 243); + this.ProgressBar1.Name = "ProgressBar1"; + this.ProgressBar1.Size = new System.Drawing.Size(197, 23); + this.ProgressBar1.TabIndex = 82; + // + // CheckBox22 + // + this.CheckBox22.AutoSize = true; + this.CheckBox22.Location = new System.Drawing.Point(544, 358); + this.CheckBox22.Name = "CheckBox22"; + this.CheckBox22.Size = new System.Drawing.Size(104, 17); + this.CheckBox22.TabIndex = 81; + this.CheckBox22.Text = "Arresta il sistema"; + this.CheckBox22.UseVisualStyleBackColor = true; + // + // Label43 + // + this.Label43.AutoSize = true; + this.Label43.Location = new System.Drawing.Point(541, 342); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(25, 13); + this.Label43.TabIndex = 80; + 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(526, 377); + this.TabControl1.TabIndex = 79; + // + // 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(518, 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(95, 17); + this.rdbNuovoMetodo.TabIndex = 1; + this.rdbNuovoMetodo.TabStop = true; + this.rdbNuovoMetodo.Text = "Nuovo metodo"; + 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(102, 17); + this.rdbVecchioMetodo.TabIndex = 0; + this.rdbVecchioMetodo.Text = "Vecchio metodo"; + 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"; + // + // 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.CheckBox2); + 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; + // + // CheckBox2 + // + this.CheckBox2.AutoSize = true; + this.CheckBox2.Location = new System.Drawing.Point(7, 8); + this.CheckBox2.Name = "CheckBox2"; + this.CheckBox2.Size = new System.Drawing.Size(93, 17); + this.CheckBox2.TabIndex = 40; + this.CheckBox2.Text = "Aggiungi testo"; + this.CheckBox2.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..."; + // + // 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"; + // + // 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)"; + // + // 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(197, 32); + this.Button6.TabIndex = 70; + this.Button6.Text = "Carica impostazioni"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.Label27); + this.Controls.Add(this.Button7); + this.Controls.Add(this.Button5); + this.Controls.Add(this.Label19); + this.Controls.Add(this.Label18); + this.Controls.Add(this.lblFotoTotaliNum); + this.Controls.Add(this.Label10); + this.Controls.Add(this.btnCreaCatalogoAsync); + this.Controls.Add(this.Label20); + this.Controls.Add(this.btnCreaCatalogo); + this.Controls.Add(this.ProgressBar1); + this.Controls.Add(this.CheckBox22); + this.Controls.Add(this.Label43); + this.Controls.Add(this.TabControl1); + this.Controls.Add(this.Button6); + this.Name = "Form1"; + this.Text = "Form1"; + 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.TabPage2.ResumeLayout(false); + this.GroupBox2.ResumeLayout(false); + this.GroupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox3)).EndInit(); + this.GroupBox6.ResumeLayout(false); + this.GroupBox6.PerformLayout(); + this.TabPage4.ResumeLayout(false); + this.GroupBox8.ResumeLayout(false); + this.GroupBox8.PerformLayout(); + this.GroupBox3.ResumeLayout(false); + this.GroupBox3.PerformLayout(); + this.TabControl1.ResumeLayout(false); + this.TabPage5.ResumeLayout(false); + this.GroupBox11.ResumeLayout(false); + this.GroupBox11.PerformLayout(); + this.Panel3.ResumeLayout(false); + this.Panel3.PerformLayout(); + this.GroupBox7.ResumeLayout(false); + this.GroupBox7.PerformLayout(); + this.TabPage3.ResumeLayout(false); + this.TabPage3.PerformLayout(); + 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.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + internal System.Windows.Forms.TabPage TabPage1; + internal System.Windows.Forms.Panel Panel1; + internal System.Windows.Forms.CheckBox CheckBox18; + internal System.Windows.Forms.CheckBox CheckBox4; + internal System.Windows.Forms.CheckBox CheckBox12; + internal System.Windows.Forms.GroupBox GroupBox1; + internal System.Windows.Forms.Label Label46; + internal System.Windows.Forms.TextBox TextBox33; + internal System.Windows.Forms.Panel Panel2; + internal System.Windows.Forms.RadioButton RadioButton3; + internal System.Windows.Forms.RadioButton RadioButton7; + internal System.Windows.Forms.RadioButton RadioButton4; + internal System.Windows.Forms.RadioButton RadioButton6; + internal System.Windows.Forms.RadioButton RadioButton5; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.TextBox TextBox5; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.TextBox TextBox6; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.TextBox TextBox3; + internal System.Windows.Forms.CheckBox CheckBox1; + internal System.Windows.Forms.Label Label37; + internal System.Windows.Forms.Label Label38; + internal System.Windows.Forms.Label Label45; + internal System.Windows.Forms.TextBox TextBox32; + internal System.Windows.Forms.TextBox TextBox26; + internal System.Windows.Forms.TextBox TextBox27; + internal System.Windows.Forms.Label Label39; + internal System.Windows.Forms.CheckBox CheckBox15; + internal System.Windows.Forms.Label Label40; + internal System.Windows.Forms.TextBox TextBox29; + internal System.Windows.Forms.TextBox TextBox18; + internal System.Windows.Forms.Label Label26; + internal System.Windows.Forms.DateTimePicker DateTimePicker1; + internal System.Windows.Forms.CheckBox CheckBox8; + internal System.Windows.Forms.TextBox TextBox9; + internal System.Windows.Forms.CheckBox CheckBox7; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.TextBox TextBox4; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.TextBox TextBox28; + internal System.Windows.Forms.TabPage TabPage2; + internal System.Windows.Forms.GroupBox GroupBox2; + internal System.Windows.Forms.Label Label27; + internal System.Windows.Forms.Button Button7; + internal System.Windows.Forms.Button Button5; + internal System.Windows.Forms.PictureBox PictureBox2; + internal System.Windows.Forms.PictureBox PictureBox1; + internal System.Windows.Forms.ComboBox ComboBox5; + internal System.Windows.Forms.ComboBox ComboBox4; + internal System.Windows.Forms.Label Label19; + internal System.Windows.Forms.Label Label18; + internal System.Windows.Forms.Label lblFotoTotaliNum; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.TextBox TextBox19; + internal System.Windows.Forms.Label Label28; + internal System.Windows.Forms.CheckBox CheckBox5; + internal System.Windows.Forms.TextBox TextBox15; + internal System.Windows.Forms.TextBox TextBox14; + internal System.Windows.Forms.Label Label25; + internal System.Windows.Forms.TextBox TextBox16; + internal System.Windows.Forms.Button btnCreaCatalogoAsync; + internal System.Windows.Forms.Label Label20; + internal System.Windows.Forms.Button btnCreaCatalogo; + internal System.Windows.Forms.Label Label24; + internal System.Windows.Forms.Label Label22; + internal System.Windows.Forms.Label Label23; + internal System.Windows.Forms.TextBox TextBox10; + internal System.Windows.Forms.Label Label29; + internal System.Windows.Forms.Label Label30; + internal System.Windows.Forms.PictureBox PictureBox3; + internal System.Windows.Forms.GroupBox GroupBox6; + internal System.Windows.Forms.Button Button4; + internal System.Windows.Forms.TabPage TabPage4; + internal System.Windows.Forms.Label Label13; + internal System.Windows.Forms.RadioButton rdbNumFiles; + internal System.Windows.Forms.RadioButton rdbNumProgressiva; + internal System.Windows.Forms.TextBox txtCifreContatore; + internal System.Windows.Forms.Label Label34; + internal System.Windows.Forms.TextBox txtSuffissoCartelle; + internal System.Windows.Forms.Label Label33; + internal System.Windows.Forms.Label Label31; + internal System.Windows.Forms.TextBox txtFilePerCartella; + internal System.Windows.Forms.GroupBox GroupBox8; + internal System.Windows.Forms.CheckBox chkCreaSottocartelle; + internal System.Windows.Forms.Label Label32; + internal System.Windows.Forms.CheckBox chkAggiornaSottodirectory; + internal System.Windows.Forms.GroupBox GroupBox3; + internal System.Windows.Forms.Button Button3; + internal System.Windows.Forms.Button Button2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.TextBox txtSorgente; + internal System.Windows.Forms.TextBox txtDestinazione; + internal System.Windows.Forms.ProgressBar ProgressBar1; + internal System.Windows.Forms.CheckBox CheckBox22; + internal System.Windows.Forms.Label Label43; + internal System.Windows.Forms.TabControl TabControl1; + internal System.Windows.Forms.TabPage TabPage5; + internal System.Windows.Forms.GroupBox GroupBox11; + internal System.Windows.Forms.Panel Panel3; + internal System.Windows.Forms.RadioButton rdbNuovoMetodo; + internal System.Windows.Forms.RadioButton rdbVecchioMetodo; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.TextBox TextBox8; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.TextBox TextBox7; + internal System.Windows.Forms.GroupBox GroupBox7; + internal System.Windows.Forms.CheckBox chkSovrascriviFile; + internal System.Windows.Forms.CheckBox chkRotazioneAutomatica; + internal System.Windows.Forms.CheckBox chkForzaJpg; + internal System.Windows.Forms.TabPage TabPage3; + internal System.Windows.Forms.CheckBox CheckBox2; + internal System.Windows.Forms.GroupBox GroupBox10; + internal System.Windows.Forms.Label Label42; + internal System.Windows.Forms.Label Label41; + internal System.Windows.Forms.TextBox TextBox31; + internal System.Windows.Forms.TextBox TextBox30; + internal System.Windows.Forms.GroupBox GroupBox9; + internal System.Windows.Forms.CheckBox CheckBox17; + internal System.Windows.Forms.CheckBox CheckBox16; + internal System.Windows.Forms.GroupBox GroupBox5; + internal System.Windows.Forms.TextBox TextBox34; + internal System.Windows.Forms.Button Button8; + internal System.Windows.Forms.Label Label36; + internal System.Windows.Forms.TextBox TextBox25; + internal System.Windows.Forms.Label Label35; + internal System.Windows.Forms.ComboBox ComboBox3; + internal System.Windows.Forms.TextBox TextBox11; + internal System.Windows.Forms.Label Label12; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.CheckBox CheckBox3; + internal System.Windows.Forms.GroupBox GroupBox4; + internal System.Windows.Forms.ComboBox ComboBox1; + internal System.Windows.Forms.ComboBox ComboBox2; + internal System.Windows.Forms.Label Label14; + internal System.Windows.Forms.TextBox TextBox12; + internal System.Windows.Forms.Label Label15; + internal System.Windows.Forms.Button Button6; + } +} + diff --git a/ImageCatalogParallel/Form1.cs b/ImageCatalogParallel/Form1.cs new file mode 100644 index 0000000..458f104 --- /dev/null +++ b/ImageCatalogParallel/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ImageCatalogParallel +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/ImageCatalogParallel/Form1.resx b/ImageCatalogParallel/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ImageCatalogParallel/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/ImageCatalogParallel/ImageCatalogParallel.csproj b/ImageCatalogParallel/ImageCatalogParallel.csproj new file mode 100644 index 0000000..b507943 --- /dev/null +++ b/ImageCatalogParallel/ImageCatalogParallel.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {0F42DA5C-2788-48BD-BACA-01625C3CFFBB} + WinExe + ImageCatalogParallel + ImageCatalogParallel + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/ImageCatalogParallel/Program.cs b/ImageCatalogParallel/Program.cs new file mode 100644 index 0000000..0a1fd3d --- /dev/null +++ b/ImageCatalogParallel/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ImageCatalogParallel +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/ImageCatalogParallel/Properties/AssemblyInfo.cs b/ImageCatalogParallel/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..757c842 --- /dev/null +++ b/ImageCatalogParallel/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("ImageCatalogParallel")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageCatalogParallel")] +[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("0f42da5c-2788-48bd-baca-01625c3cffbb")] + +// 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/ImageCatalogParallel/Properties/Resources.Designer.cs b/ImageCatalogParallel/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a23847e --- /dev/null +++ b/ImageCatalogParallel/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// 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 ImageCatalogParallel.Properties +{ + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + 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() + { + } + + /// + /// 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)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageCatalogParallel.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 + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ImageCatalogParallel/Properties/Resources.resx b/ImageCatalogParallel/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ImageCatalogParallel/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ImageCatalogParallel/Properties/Settings.Designer.cs b/ImageCatalogParallel/Properties/Settings.Designer.cs new file mode 100644 index 0000000..28069fb --- /dev/null +++ b/ImageCatalogParallel/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 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 ImageCatalogParallel.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 + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ImageCatalogParallel/Properties/Settings.settings b/ImageCatalogParallel/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ImageCatalogParallel/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/MaddoShared/ImageCreationStuff.cs b/MaddoShared/ImageCreationStuff.cs index 226cc29..277994f 100644 --- a/MaddoShared/ImageCreationStuff.cs +++ b/MaddoShared/ImageCreationStuff.cs @@ -31,13 +31,13 @@ namespace MaddoShared public bool LinearExecution { get; set; } } - public async Task CreaCatalogoParallel(Options options) + 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); + await CreaImmaginiParallel(options, results, updateEvent, cancellationToken); // todo set finito label stopwatch.Stop(); @@ -47,7 +47,7 @@ namespace MaddoShared } - public async Task CreaImmaginiParallel(Options options) + public async Task CreaImmaginiParallel(Options options, ConcurrentBag results, EventHandler> updateEvent, CancellationToken cancellationToken = default(CancellationToken)) { var dataToProcess = new List(); if (options.AggiornaSottodirectory && options.CreaSottocartelle) @@ -114,6 +114,9 @@ namespace MaddoShared //imgC.CreaImmagineThread(d.File.Name); //imgC = null; }, CancellationToken.None, TaskCreationOptions.None, scheduler); + + //int count = 0; + if (options.LinearExecution) { foreach (var task in test) @@ -127,11 +130,23 @@ namespace MaddoShared { - var opts = new ParallelOptions() { MaxDegreeOfParallelism = threads }; + //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); - }, maxDegreeOfParallelism: threads); + 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); //var throttler = new SemaphoreSlim(initialCount: threads); @@ -156,7 +171,7 @@ namespace MaddoShared else { - var asdf = SplitList(dataToProcess.ToList(), dataToProcess.Count() / options.ChunksSize).ToList(); + var asdf = SplitList(dataToProcess.ToList(), dataToProcess.Count()).ToList(); //var sadf = asdf[0]; //var sadf1 = asdf[1]; @@ -166,7 +181,18 @@ namespace MaddoShared await sdaf.ParallelForEachAsync(async fileData => { await new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread(fileData.File.Name); - }, maxDegreeOfParallelism: threads); + 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); } @@ -189,6 +215,7 @@ namespace MaddoShared } + public static IEnumerable> SplitList(List bigList, int nSize = 3) { for (int i = 0; i < bigList.Count; i += nSize) diff --git a/imagecatalog/AssemblyInfo.cs b/imagecatalog/AssemblyInfo.cs new file mode 100644 index 0000000..70c63ca --- /dev/null +++ b/imagecatalog/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/CreaImmagineSeparateMultiCore.cs b/imagecatalog/CreaImmagineSeparateMultiCore.cs new file mode 100644 index 0000000..8ead6eb --- /dev/null +++ b/imagecatalog/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/CreaImmagineSeparateThread.cs b/imagecatalog/CreaImmagineSeparateThread.cs new file mode 100644 index 0000000..cf80e50 --- /dev/null +++ b/imagecatalog/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/ExifReader.cs b/imagecatalog/ExifReader.cs new file mode 100644 index 0000000..97005ca --- /dev/null +++ b/imagecatalog/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/FileHelper.cs b/imagecatalog/FileHelper.cs new file mode 100644 index 0000000..f0da2d6 --- /dev/null +++ b/imagecatalog/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/Form1.cs b/imagecatalog/Form1.cs new file mode 100644 index 0000000..1f86a2d --- /dev/null +++ b/imagecatalog/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/ImageCatalog 2.csproj b/imagecatalog/ImageCatalog 2.csproj new file mode 100644 index 0000000..d2d3a29 --- /dev/null +++ b/imagecatalog/ImageCatalog 2.csproj @@ -0,0 +1,355 @@ + + + + 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 + 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 + $(DefaultItemExcludes);$(ProjectDir)**\*.vb + latest + + + 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 + + + + + ..\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/LoadBuffer.cs b/imagecatalog/LoadBuffer.cs new file mode 100644 index 0000000..f116be3 --- /dev/null +++ b/imagecatalog/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/MainForm.Designer.cs b/imagecatalog/MainForm.Designer.cs new file mode 100644 index 0000000..d1235e4 --- /dev/null +++ b/imagecatalog/MainForm.Designer.cs @@ -0,0 +1,2169 @@ +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.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.CheckBox2 = new System.Windows.Forms.CheckBox(); + 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.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(95, 17); + this.rdbNuovoMetodo.TabIndex = 1; + this.rdbNuovoMetodo.TabStop = true; + this.rdbNuovoMetodo.Text = "Nuovo metodo"; + 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(102, 17); + this.rdbVecchioMetodo.TabIndex = 0; + this.rdbVecchioMetodo.Text = "Vecchio metodo"; + 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.CheckBox2); + 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; + // + // CheckBox2 + // + this.CheckBox2.AutoSize = true; + this.CheckBox2.Location = new System.Drawing.Point(7, 8); + this.CheckBox2.Name = "CheckBox2"; + this.CheckBox2.Size = new System.Drawing.Size(93, 17); + this.CheckBox2.TabIndex = 40; + this.CheckBox2.Text = "Aggiungi testo"; + this.CheckBox2.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.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 = "Inizia"; + 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.TabPage3.PerformLayout(); + 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 CheckBox2; + internal CheckBox chkSovrascriviFile; + private Button _btnCreaCatalogoAsync; + + 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/MainForm.cs b/imagecatalog/MainForm.cs new file mode 100644 index 0000000..a61ad26 --- /dev/null +++ b/imagecatalog/MainForm.cs @@ -0,0 +1,1675 @@ +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); + 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); + } + } + + 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(); + + string time = await imgStf.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token); + Label43.Text = time; + } + catch (OperationCanceledException operationCanceledException) + { + Console.WriteLine("Operazione cancellata"); + } + finally + { + _mainToken.Dispose(); + } + Label10.Text = "Finito"; + unlockUI(); + } + + 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/Module1.cs b/imagecatalog/Module1.cs new file mode 100644 index 0000000..de80777 --- /dev/null +++ b/imagecatalog/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/Module2.cs b/imagecatalog/Module2.cs new file mode 100644 index 0000000..9a86f8b --- /dev/null +++ b/imagecatalog/Module2.cs @@ -0,0 +1,7 @@ + +namespace ImageCatalog +{ + static class Module2 + { + } +} \ No newline at end of file diff --git a/imagecatalog/My Project/Application.Designer.cs b/imagecatalog/My Project/Application.Designer.cs new file mode 100644 index 0000000..1c924b5 --- /dev/null +++ b/imagecatalog/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/My Project/MyNamespace.Dynamic.Designer.cs b/imagecatalog/My Project/MyNamespace.Dynamic.Designer.cs new file mode 100644 index 0000000..5f1eb17 --- /dev/null +++ b/imagecatalog/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/My Project/MyNamespace.Static.1.Designer.cs b/imagecatalog/My Project/MyNamespace.Static.1.Designer.cs new file mode 100644 index 0000000..5212c44 --- /dev/null +++ b/imagecatalog/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/My Project/Settings.Designer.cs b/imagecatalog/My Project/Settings.Designer.cs new file mode 100644 index 0000000..21716e7 --- /dev/null +++ b/imagecatalog/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/ParametriSetup.cs b/imagecatalog/ParametriSetup.cs new file mode 100644 index 0000000..2fb9290 --- /dev/null +++ b/imagecatalog/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/PicSettings.cs b/imagecatalog/PicSettings.cs new file mode 100644 index 0000000..08d52f9 --- /dev/null +++ b/imagecatalog/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/XYThreadPool.cs b/imagecatalog/XYThreadPool.cs new file mode 100644 index 0000000..9f675d1 --- /dev/null +++ b/imagecatalog/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/app.config b/imagecatalog/app.config index a2b3d96..9add436 100644 --- a/imagecatalog/app.config +++ b/imagecatalog/app.config @@ -1,35 +1,39 @@ - + - + - + - + - + - - + + - - + + + + + + diff --git a/imagecatalog/packages.config b/imagecatalog/packages.config index 61c13e3..560ae9f 100644 --- a/imagecatalog/packages.config +++ b/imagecatalog/packages.config @@ -1,11 +1,13 @@  + + - + \ No newline at end of file