Compare commits
23 commits
9794ce1abb
...
60bda11522
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60bda11522 | ||
| e701ca7f36 | |||
| 16a09d912e | |||
| eb47ebd7e7 | |||
| 62b6e586ed | |||
| 3a7a04920d | |||
| 99b67870a5 | |||
| 5d2f5e4b45 | |||
| a2bfd97d76 | |||
| 4cfc537246 | |||
| ee5b29ae0b | |||
|
|
ce58f99de1 | ||
| d2ab7bfce6 | |||
| 9fd336befb | |||
| a81451bd6b | |||
| 3d1f92321e | |||
| 922315061d | |||
| a2dca4b750 | |||
| 40f25a4f4c | |||
| 0fb9f1aa13 | |||
| 27a2affc19 | |||
| 0d8ab38efd | |||
| 2822038123 |
106 changed files with 29493 additions and 1448 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "MaddoLibrary"]
|
||||||
|
path = MaddoLibrary
|
||||||
|
url = git@gitlab.com:MaddoTools/MaddoLibrary.git
|
||||||
1
.upgrade-assistant
Normal file
1
.upgrade-assistant
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"Build":"0.2.212405\u002B8e7b4314944e5328780f06f20721a4d6ef9783bb","CurrentProject":"","EntryPoint":"","IsComplete":true}
|
||||||
16
Catalog.sln
16
Catalog.sln
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.31005.135
|
VisualStudioVersion = 17.11.35312.102
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.csproj", "{3F1E23DB-435E-0590-1EF5-735E898DBA3C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.csproj", "{3F1E23DB-435E-0590-1EF5-735E898DBA3C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 3", "ImageCatalogCS\ImageCatalog 3.csproj", "{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 3", "ImageCatalogCS\ImageCatalog 3.csproj", "{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
@ -15,10 +15,14 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CatalogVbLib", "CatalogVbLi
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalogParallel", "ImageCatalogParallel\ImageCatalogParallel.csproj", "{0F42DA5C-2788-48BD-BACA-01625C3CFFBB}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalogParallel", "ImageCatalogParallel\ImageCatalogParallel.csproj", "{0F42DA5C-2788-48BD-BACA-01625C3CFFBB}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoLibrary.Base.NET46", "MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj", "{E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoLibrary.WPF.NET46", "MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj", "{73DA19D7-196D-4B16-B610-93250978A607}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -31,8 +35,8 @@ Global
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{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|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.ActiveCfg = Debug|x64
|
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.Build.0 = Debug|x64
|
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x86.ActiveCfg = Debug|x86
|
{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}.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.ActiveCfg = Release|Any CPU
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>CatalogLib</RootNamespace>
|
<RootNamespace>CatalogLib</RootNamespace>
|
||||||
<AssemblyName>CatalogLib</AssemblyName>
|
<AssemblyName>CatalogLib</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>SAK</SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
|
@ -60,28 +60,33 @@
|
||||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SixLabors.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SixLabors.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SixLabors.Core.0.1.0-alpha0002\lib\netstandard1.1\SixLabors.Core.dll</HintPath>
|
<HintPath>..\packages\SixLabors.Core.1.0.0-beta0002\lib\netstandard1.1\SixLabors.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0014\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
|
<HintPath>..\packages\SixLabors.Fonts.1.0.0-beta0001\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\SixLabors.ImageSharp.1.0.0-beta0001\lib\netstandard1.3\SixLabors.ImageSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SixLabors.ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\SixLabors.ImageSharp.Drawing.1.0.0-beta0001\lib\netstandard1.1\SixLabors.ImageSharp.Drawing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0018\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
<HintPath>..\packages\SixLabors.Shapes.1.0.0-beta0001\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SixLabors.Shapes.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SixLabors.Shapes.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SixLabors.Shapes.Text.0.1.0-alpha0018\lib\netstandard1.1\SixLabors.Shapes.Text.dll</HintPath>
|
<HintPath>..\packages\SixLabors.Shapes.Text.1.0.0-beta0001\lib\netstandard1.1\SixLabors.Shapes.Text.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Buffers, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Buffers.4.3.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
|
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
<HintPath>..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
|
@ -109,7 +114,7 @@
|
||||||
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
|
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Memory, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Memory.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Memory.dll</HintPath>
|
<HintPath>..\packages\System.Memory.4.4.0-preview2-25405-01\lib\netstandard1.0\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
|
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
|
||||||
|
|
@ -118,11 +123,11 @@
|
||||||
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
|
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Numerics.Vectors.4.3.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||||
|
|
@ -140,7 +145,7 @@
|
||||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.4.0-preview1-25305-02\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
|
@ -153,11 +158,11 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Class1.cs" />
|
<Compile Include="Class1.cs" />
|
||||||
|
<Compile Include="Enums.cs" />
|
||||||
<Compile Include="IImageProcessor.cs" />
|
<Compile Include="IImageProcessor.cs" />
|
||||||
<Compile Include="ImageCreator.cs" />
|
<Compile Include="ImageCreator.cs" />
|
||||||
<Compile Include="ImageCreator2.cs" />
|
<Compile Include="ImageCreator2.cs" />
|
||||||
<Compile Include="ImgSharpCreator.cs" />
|
<Compile Include="ImgSharpCreator.cs" />
|
||||||
<Compile Include="MaddoLogger.cs" />
|
|
||||||
<Compile Include="PicSettings.cs" />
|
<Compile Include="PicSettings.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SinglePicData.cs" />
|
<Compile Include="SinglePicData.cs" />
|
||||||
|
|
@ -167,10 +172,15 @@
|
||||||
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
||||||
<Name>CatalogVbLib</Name>
|
<Name>CatalogVbLib</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj">
|
||||||
|
<Project>{e93daae6-4aa9-4a45-afb6-58209b3ad3c9}</Project>
|
||||||
|
<Name>MaddoLibrary.Base.NET46</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
<None Include="stylecop.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Settings\" />
|
<Folder Include="Settings\" />
|
||||||
|
|
|
||||||
41
CatalogLib/Enums.cs
Normal file
41
CatalogLib/Enums.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
namespace CatalogLib
|
||||||
|
{
|
||||||
|
public enum Positions
|
||||||
|
{
|
||||||
|
Alto,
|
||||||
|
Centro,
|
||||||
|
Basso
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Alignments
|
||||||
|
{
|
||||||
|
Sinistra,
|
||||||
|
Centro,
|
||||||
|
Destra
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ResizeModes
|
||||||
|
{
|
||||||
|
Bicubic,
|
||||||
|
Box,
|
||||||
|
CatmullRom,
|
||||||
|
Hermite,
|
||||||
|
Lanczos2,
|
||||||
|
Lanczos3,
|
||||||
|
Lanczos5,
|
||||||
|
Lanczos8,
|
||||||
|
MitchellNetravali,
|
||||||
|
NearestNeighbor,
|
||||||
|
Robidoux,
|
||||||
|
Spline,
|
||||||
|
Triangle,
|
||||||
|
Welch
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ResizeDimensions
|
||||||
|
{
|
||||||
|
LatoLungo,
|
||||||
|
LatoCorto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -394,7 +394,7 @@ namespace CatalogLib
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (_picSettings.Posizione.ToUpper())
|
switch (_picSettings.TextPosition.ToString().ToUpper())
|
||||||
{
|
{
|
||||||
case "ALTO":
|
case "ALTO":
|
||||||
yPosFromBottom1 = _picSettings.Margine;
|
yPosFromBottom1 = _picSettings.Margine;
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,76 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ImageSharp;
|
using MaddoLibrary.Base.Log;
|
||||||
using ImageSharp.Drawing;
|
|
||||||
using ImageSharp.PixelFormats;
|
|
||||||
using ImageSharp.Processing;
|
|
||||||
using SixLabors.Fonts;
|
using SixLabors.Fonts;
|
||||||
|
using SixLabors.ImageSharp;
|
||||||
|
using SixLabors.ImageSharp.Drawing;
|
||||||
|
using SixLabors.ImageSharp.Formats.Jpeg;
|
||||||
|
using SixLabors.ImageSharp.MetaData.Profiles.Exif;
|
||||||
|
using SixLabors.ImageSharp.Processing;
|
||||||
|
using SixLabors.Primitives;
|
||||||
using Font = SixLabors.Fonts.Font;
|
using Font = SixLabors.Fonts.Font;
|
||||||
using FontFamily = SixLabors.Fonts.FontFamily;
|
using FontFamily = SixLabors.Fonts.FontFamily;
|
||||||
using FontStyle = SixLabors.Fonts.FontStyle;
|
using FontStyle = SixLabors.Fonts.FontStyle;
|
||||||
using Image = ImageSharp.Image;
|
using Rgba32 = SixLabors.ImageSharp.Rgba32;
|
||||||
|
using Image = SixLabors.ImageSharp.Image;
|
||||||
|
|
||||||
namespace CatalogLib
|
namespace CatalogLib
|
||||||
{
|
{
|
||||||
public class ImgSharpCreator : IImageProcessor
|
public class ImgSharpCreator : IImageProcessor
|
||||||
{
|
{
|
||||||
|
private Image<Rgba32> _logo;
|
||||||
|
public ImgSharpCreator()
|
||||||
|
{
|
||||||
|
if (!PicSettings.Instance.EnableLogo) return;
|
||||||
|
if (string.IsNullOrWhiteSpace(PicSettings.Instance.LogoPath)) return;
|
||||||
|
if (!File.Exists(PicSettings.Instance.LogoPath)) return;
|
||||||
|
|
||||||
|
_logo = Image.Load(PicSettings.Instance.LogoPath);
|
||||||
|
|
||||||
|
}
|
||||||
private FileInfo _currentFile;
|
private FileInfo _currentFile;
|
||||||
public void Start(FileInfo workFile)
|
public void Start(FileInfo workFile)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Stopwatch s = new Stopwatch();
|
||||||
|
s.Start();
|
||||||
|
|
||||||
_currentFile = workFile;
|
_currentFile = workFile;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using (Image<Rgba32> image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
|
using (Image<Rgba32> image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
|
||||||
{
|
{
|
||||||
|
MaddoLogger.Log("Loaded Image: {0}", workFile.FullName);
|
||||||
//image.Rotate(-90);
|
//image.Rotate(-90);
|
||||||
|
bool isRotated;
|
||||||
|
|
||||||
|
var orientation = image.MetaData.ExifProfile.GetValue(ExifTag.Orientation);
|
||||||
|
if ((ushort)orientation.Value != 1)
|
||||||
|
{
|
||||||
|
isRotated = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isRotated = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PicSettings.Instance.FotoRidimensiona)
|
||||||
|
{
|
||||||
|
Resize(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (PicSettings.Instance.GeneraleRotazioneAutomatica)
|
if (PicSettings.Instance.GeneraleRotazioneAutomatica)
|
||||||
{
|
{
|
||||||
image.AutoOrient();
|
image.Mutate(img => img.AutoOrient());
|
||||||
|
MaddoLogger.Log("Rotated Image: {0}", workFile.FullName);
|
||||||
|
//image.AutoOrient();
|
||||||
|
|
||||||
//var exif = image.MetaData.ExifProfile;
|
//var exif = image.MetaData.ExifProfile;
|
||||||
//if (exif != null)
|
//if (exif != null)
|
||||||
|
|
@ -98,25 +133,134 @@ namespace CatalogLib
|
||||||
|
|
||||||
if (PicSettings.Instance.EnableText)
|
if (PicSettings.Instance.EnableText)
|
||||||
{
|
{
|
||||||
SetExtraText(image);
|
//SetTextTest(image);
|
||||||
|
SetExtraText(image, isRotated);
|
||||||
|
|
||||||
|
|
||||||
|
MaddoLogger.Log("Drawn text on Image: {0}", workFile.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//JpegDecoder j = new JpegDecoder();
|
//JpegDecoder j = new JpegDecoder();
|
||||||
var va = Vector.IsHardwareAccelerated;
|
var va = Vector.IsHardwareAccelerated;
|
||||||
|
|
||||||
|
MaddoLogger.Log("Hardware Accelerated: {0}", va);
|
||||||
//image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
|
//image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
|
||||||
|
|
||||||
//image.Resize(2240, 2240);
|
//image.Resize(2240, 2240);
|
||||||
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
||||||
//var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
//var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
||||||
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
|
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
|
||||||
image.Save(Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
|
image.Save(Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name), new JpegEncoder() { Quality = PicSettings.Instance.CompressioneJpeg });
|
||||||
//image.Resize(200, 200).Save("");
|
//image.Resize(200, 200).Save("");
|
||||||
|
|
||||||
|
MaddoLogger.Log("Saved Image: {0} to: {1}", workFile.FullName, Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
|
||||||
|
}
|
||||||
|
s.Stop();
|
||||||
|
MaddoLogger.Log("Time Taken for {0}: {1}", workFile.FullName, s.Elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Resize(Image<Rgba32> image)
|
||||||
|
{
|
||||||
|
IResampler resampler;
|
||||||
|
switch (PicSettings.Instance.ResizeMode)
|
||||||
|
{
|
||||||
|
case ResizeModes.Bicubic:
|
||||||
|
resampler = new BicubicResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Box:
|
||||||
|
resampler = new BoxResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.CatmullRom:
|
||||||
|
resampler = new CatmullRomResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Hermite:
|
||||||
|
resampler = new HermiteResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Lanczos2:
|
||||||
|
resampler = new Lanczos2Resampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Lanczos3:
|
||||||
|
resampler = new Lanczos3Resampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Lanczos5:
|
||||||
|
resampler = new Lanczos5Resampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Lanczos8:
|
||||||
|
resampler = new Lanczos8Resampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.MitchellNetravali:
|
||||||
|
resampler = new MitchellNetravaliResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.NearestNeighbor:
|
||||||
|
resampler = new NearestNeighborResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Robidoux:
|
||||||
|
resampler = new RobidouxResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Spline:
|
||||||
|
resampler = new SplineResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Triangle:
|
||||||
|
resampler = new TriangleResampler();
|
||||||
|
break;
|
||||||
|
case ResizeModes.Welch:
|
||||||
|
resampler = new WelchResampler();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
// todo calcolare ridimensionamento
|
||||||
|
var size = new Size(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
|
||||||
|
if (PicSettings.Instance.FotoMantieniDimensioni)
|
||||||
|
{
|
||||||
|
size = ResizeImage(image, size, PicSettings.Instance.ResizeDimension);
|
||||||
|
image.Mutate(x => x.Resize((size.Width), (size.Height), resampler));
|
||||||
|
|
||||||
|
//Width Formula:
|
||||||
|
//original height / original width * new width = new height
|
||||||
|
//Height Formula:
|
||||||
|
//orignal width / orignal height * new height = new width
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
image.Mutate(x => x.Resize(PicSettings.Instance.FotoAltezza, PicSettings.Instance.FotoLarghezza, resampler));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetExtraText(Image<Rgba32> image)
|
private Size ResizeImage(Image<Rgba32> image, Size size, ResizeDimensions side)
|
||||||
|
{
|
||||||
|
switch (side)
|
||||||
|
{
|
||||||
|
case ResizeDimensions.LatoLungo:
|
||||||
|
size = GetResizeDimensions(new Size(image.Width, image.Height), size, image.Width > image.Height);
|
||||||
|
break;
|
||||||
|
case ResizeDimensions.LatoCorto:
|
||||||
|
size = GetResizeDimensions(new Size(image.Width, image.Height), size, image.Width <= image.Height);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Size GetResizeDimensions(Size originalSize, Size newSize, bool adjustHeight)
|
||||||
|
{
|
||||||
|
return adjustHeight ? new Size(newSize.Width, originalSize.Height / originalSize.Width * newSize.Height) : new Size(originalSize.Width / originalSize.Height * newSize.Height, newSize.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetTextTest(Image<Rgba32> image)
|
||||||
|
{
|
||||||
|
string text = "test test test test test testtest test test test test test test";
|
||||||
|
Font font = new Font(SystemFonts.Find("verdana"), 300, FontStyle.Regular);
|
||||||
|
image.Mutate(x => x.DrawText(text, font, Rgba32.Yellow, new PointF(2760, 3295.54932f), new TextGraphicsOptions()
|
||||||
|
{
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Center
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetExtraText(Image<Rgba32> image, bool isRotated)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(PicSettings.Instance.TestoApplicareOrizzontale))
|
if (string.IsNullOrWhiteSpace(PicSettings.Instance.TestoApplicareOrizzontale))
|
||||||
{
|
{
|
||||||
|
|
@ -124,6 +268,24 @@ namespace CatalogLib
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string text;
|
||||||
|
if (isRotated)
|
||||||
|
{
|
||||||
|
if (PicSettings.Instance.TestoApplicareOrizzontale.Contains("$_"))
|
||||||
|
{
|
||||||
|
text = PicSettings.Instance.TestoApplicareOrizzontale.Replace("$_", "\r\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text = PicSettings.Instance.TestoApplicareOrizzontale.Replace("$_", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text = PicSettings.Instance.TestoApplicareOrizzontale.Replace("$_", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var fo = SixLabors.Fonts.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
var fo = SixLabors.Fonts.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
||||||
|
|
||||||
|
|
@ -131,12 +293,27 @@ namespace CatalogLib
|
||||||
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
||||||
//var fff = FontCollection.SystemFonts.Find("Segoe Print");
|
//var fff = FontCollection.SystemFonts.Find("Segoe Print");
|
||||||
|
|
||||||
var font = new Font(fo, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
Font font;
|
||||||
|
|
||||||
|
if (!PicSettings.Instance.Grassetto)
|
||||||
|
{
|
||||||
|
font = new Font(fo, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font = new Font(fo, (float)PicSettings.Instance.DimensioneFont, FontStyle.Bold);
|
||||||
|
}
|
||||||
|
// todo corsivo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//var font = new Font(fff, 8f, FontStyle.Regular);
|
//var font = new Font(fff, 8f, FontStyle.Regular);
|
||||||
|
|
||||||
|
|
||||||
//Color c = Color.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
//Color c = Color.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
||||||
Rgba32 g = Rgba32.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
Rgba32 g = Rgba32.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
||||||
|
|
||||||
|
Rgba32 gBack = Rgba32.Black; // todo alpha
|
||||||
//TextMeasurer measurer = new TextMeasurer();
|
//TextMeasurer measurer = new TextMeasurer();
|
||||||
|
|
||||||
//var size = measurer.MeasureText(PicSettings.Instance.TestoApplicareOrizzontale, font, 72);
|
//var size = measurer.MeasureText(PicSettings.Instance.TestoApplicareOrizzontale, font, 72);
|
||||||
|
|
@ -147,13 +324,197 @@ namespace CatalogLib
|
||||||
|
|
||||||
Vector2 center = new Vector2(image.Width / 2, image.Height / 2); //center horizontally, 10px down
|
Vector2 center = new Vector2(image.Width / 2, image.Height / 2); //center horizontally, 10px down
|
||||||
|
|
||||||
var size = TextMeasurer.Measure(PicSettings.Instance.TestoApplicareOrizzontale, new RendererOptions(font));
|
var size = TextMeasurer.Measure(text, new RendererOptions(font));
|
||||||
|
|
||||||
|
var larghezzaStandard = size.Width;
|
||||||
|
var dimensioneStandard = (int)Math.Round(PicSettings.Instance.DimensioneFont);
|
||||||
|
if (size.Width > image.Width)
|
||||||
|
{
|
||||||
|
var c = dimensioneStandard;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (c > 20)
|
||||||
|
{
|
||||||
|
c -= 5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
c -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PicSettings.Instance.Grassetto)
|
||||||
|
{
|
||||||
|
font = new Font(fo, c, FontStyle.Bold);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font = new Font(fo, c, FontStyle.Regular);
|
||||||
|
}
|
||||||
|
size = TextMeasurer.Measure(text,
|
||||||
|
new RendererOptions(font));
|
||||||
|
if (size.Width < image.Width)
|
||||||
|
{
|
||||||
|
larghezzaStandard = (int)Math.Round(size.Width);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (c <= 5)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (dimensioneStandard == c);
|
||||||
|
}
|
||||||
|
|
||||||
|
float yPosFromBottom = 0;
|
||||||
|
|
||||||
|
switch (PicSettings.Instance.TextPosition)
|
||||||
|
{
|
||||||
|
case Positions.Alto:
|
||||||
|
yPosFromBottom = PicSettings.Instance.Margine;
|
||||||
|
break;
|
||||||
|
case Positions.Basso:
|
||||||
|
yPosFromBottom = image.Height - size.Height - (image.Height * PicSettings.Instance.Margine / 100);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
float xCenterofImg = 0;
|
||||||
|
|
||||||
|
// stringformat
|
||||||
|
|
||||||
|
switch (PicSettings.Instance.TextAlignment)
|
||||||
|
{
|
||||||
|
case Alignments.Sinistra:
|
||||||
|
xCenterofImg = PicSettings.Instance.Margine + (larghezzaStandard / 2);
|
||||||
|
if ((larghezzaStandard / 2) > (image.Width / 2) - PicSettings.Instance.Margine)
|
||||||
|
{
|
||||||
|
xCenterofImg = image.Width / 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Alignments.Centro:
|
||||||
|
xCenterofImg = image.Width / 2;
|
||||||
|
break;
|
||||||
|
case Alignments.Destra:
|
||||||
|
xCenterofImg = image.Width - PicSettings.Instance.Margine - larghezzaStandard / 2;
|
||||||
|
|
||||||
|
if (larghezzaStandard / 2 > image.Width / 2 - PicSettings.Instance.Margine)
|
||||||
|
{
|
||||||
|
xCenterofImg = image.Width / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// stringformat alignment center
|
||||||
|
|
||||||
|
if (PicSettings.Instance.Grassetto)
|
||||||
|
{
|
||||||
|
font = new Font(fo, dimensioneStandard, FontStyle.Bold);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font = new Font(fo, dimensioneStandard, FontStyle.Regular);
|
||||||
|
}
|
||||||
|
|
||||||
|
image.Mutate(x => x.DrawText(text, font, gBack, new PointF((float)Math.Round(xCenterofImg + 1), (float)Math.Round(yPosFromBottom + 1)), new TextGraphicsOptions()
|
||||||
|
{
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Center
|
||||||
|
}));
|
||||||
|
|
||||||
|
image.Mutate(x => x.DrawText(text, font, g, new PointF((float)Math.Round(xCenterofImg), (float)Math.Round(yPosFromBottom)), new TextGraphicsOptions()
|
||||||
|
{
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Center
|
||||||
|
}));
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
|
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
|
||||||
Font scaledFont = new Font(font, scalingFactor * font.Size);
|
Font scaledFont = new Font(font, scalingFactor * font.Size);
|
||||||
|
|
||||||
|
image.Mutate(x =>
|
||||||
|
x.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center,
|
||||||
|
new TextGraphicsOptions(true)
|
||||||
|
{
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Center,
|
||||||
|
VerticalAlignment = VerticalAlignment.Bottom
|
||||||
|
}));
|
||||||
|
//image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
|
||||||
|
|
||||||
image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddLogo(Image<Rgba32> image)
|
||||||
|
{
|
||||||
|
//if (string.IsNullOrWhiteSpace(PicSettings.Instance.LogoPath)) return;
|
||||||
|
//if (!File.Exists(PicSettings.Instance.LogoPath)) return;
|
||||||
|
//using (Image<Rgba32> logo = Image.Load(PicSettings.Instance.LogoPath))
|
||||||
|
//{
|
||||||
|
// Size size = new Size();
|
||||||
|
// Point location = new Point();
|
||||||
|
// image.Mutate(x => x.DrawImage(logo, size, location, new GraphicsOptions()
|
||||||
|
// {
|
||||||
|
|
||||||
|
// }));
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
Size size = new Size();
|
||||||
|
Point location = new Point();
|
||||||
|
|
||||||
|
if (_logo != null)
|
||||||
|
{
|
||||||
|
var width = PicSettings.Instance.LogoWidth;
|
||||||
|
var height = PicSettings.Instance.LogoHeight;
|
||||||
|
var heightFactor = _logo.Height / height;
|
||||||
|
var widthFactor = _logo.Width / width;
|
||||||
|
var newLogoSize = new Size();
|
||||||
|
|
||||||
|
newLogoSize = GetResizeDimensions(new Size(_logo.Width, _logo.Height), new Size(width, height), PicSettings.Instance.LogoResizeSide.Equals(ResizeDimensions.LatoCorto));
|
||||||
|
//todo riguardare perché non torna cosa ho fatto
|
||||||
|
|
||||||
|
int margineUsato = 0;
|
||||||
|
int margineL;
|
||||||
|
bool inPercentualeL;
|
||||||
|
|
||||||
|
inPercentualeL = PicSettings.Instance.LogoMargin.EndsWith("%");
|
||||||
|
if (inPercentualeL)
|
||||||
|
{
|
||||||
|
margineL = int.Parse(PicSettings.Instance.LogoMargin.Replace("%", ""));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
margineL = int.Parse(PicSettings.Instance.LogoMargin);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (PicSettings.Instance.LogoPosition)
|
||||||
|
{
|
||||||
|
case Positions.Alto:
|
||||||
|
break;
|
||||||
|
case Positions.Centro:
|
||||||
|
break;
|
||||||
|
case Positions.Basso:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (PicSettings.Instance.LogoAlignment)
|
||||||
|
{
|
||||||
|
case Alignments.Sinistra:
|
||||||
|
location.X = margineUsato;
|
||||||
|
break;
|
||||||
|
case Alignments.Centro:
|
||||||
|
//location.X = image.Width -
|
||||||
|
break;
|
||||||
|
case Alignments.Destra:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
image.Mutate(x => x.DrawImage(_logo, size, location, new GraphicsOptions()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -166,7 +527,7 @@ namespace CatalogLib
|
||||||
var size = TextMeasurer.Measure("Test test test test test", new RendererOptions(font));
|
var size = TextMeasurer.Measure("Test test test test test", new RendererOptions(font));
|
||||||
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
|
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
|
||||||
Font scaledFont = new Font(font, scalingFactor * font.Size);
|
Font scaledFont = new Font(font, scalingFactor * font.Size);
|
||||||
image.DrawText("Test test test test test", scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
|
image.Mutate(x => x.DrawText("Test test test test test", scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom }));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string FlipRgbString(string originalString)
|
private string FlipRgbString(string originalString)
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace CatalogLib
|
|
||||||
{
|
|
||||||
public class MaddoLogger
|
|
||||||
{
|
|
||||||
public void AddToLog(string data)
|
|
||||||
{
|
|
||||||
string dest = Path.Combine(PicSettings.Instance.DirectoryDestinazione, "log.txt");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,7 +6,7 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MaddoLibrary.Base.Log;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace CatalogLib
|
namespace CatalogLib
|
||||||
|
|
@ -71,6 +71,11 @@ namespace CatalogLib
|
||||||
SetBase(key, value);
|
SetBase(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFloat(string key, float value)
|
||||||
|
{
|
||||||
|
SetBase(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
public void Set<T>(string key, T value)
|
public void Set<T>(string key, T value)
|
||||||
{
|
{
|
||||||
SetBase(key, value);
|
SetBase(key, value);
|
||||||
|
|
@ -134,6 +139,23 @@ namespace CatalogLib
|
||||||
return (double)_settingsDict[key];
|
return (double)_settingsDict[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float GetFloat(string key, float defaultValue = 0)
|
||||||
|
{
|
||||||
|
if (!_settingsDict.ContainsKey(key))
|
||||||
|
{
|
||||||
|
SetFloat(key, defaultValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_settingsDict[key] is float f) return f;
|
||||||
|
MaddoLogger.LogError("Error while parsing {0}", key);
|
||||||
|
|
||||||
|
float fl = 0;
|
||||||
|
SetFloat(key, float.TryParse(_settingsDict[key].ToString(), out f) ? fl : defaultValue);
|
||||||
|
return (float)_settingsDict[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public T Get<T>(string key, T defaultValue)
|
public T Get<T>(string key, T defaultValue)
|
||||||
{
|
{
|
||||||
if (!_settingsDict.ContainsKey(key))
|
if (!_settingsDict.ContainsKey(key))
|
||||||
|
|
@ -146,6 +168,8 @@ namespace CatalogLib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string GetString(string key, string defaultValue = "")
|
public string GetString(string key, string defaultValue = "")
|
||||||
{
|
{
|
||||||
if (!_settingsDict.ContainsKey(key))
|
if (!_settingsDict.ContainsKey(key))
|
||||||
|
|
@ -184,7 +208,10 @@ namespace CatalogLib
|
||||||
//return _settingsDict.ContainsKey(key) ? _settingsDict[key] : defaultValue;
|
//return _settingsDict.ContainsKey(key) ? _settingsDict[key] : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public T GetEnum<T>(string name, T defaultValue)
|
||||||
|
{
|
||||||
|
return (T)Enum.Parse(typeof(T), GetString(name, defaultValue.ToString()));
|
||||||
|
}
|
||||||
|
|
||||||
public void SetDefaults()
|
public void SetDefaults()
|
||||||
{
|
{
|
||||||
|
|
@ -193,8 +220,8 @@ namespace CatalogLib
|
||||||
|
|
||||||
public bool DirAggiornaSottoDirectory
|
public bool DirAggiornaSottoDirectory
|
||||||
{
|
{
|
||||||
get { return this.GetBool("DirAggiornaSottoDirectory", true); }
|
get => this.GetBool("DirAggiornaSottoDirectory", true);
|
||||||
set { this.SetBool("DirAggiornaSottoDirectory", value); }
|
set => this.SetBool("DirAggiornaSottoDirectory", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Grassetto
|
public bool Grassetto
|
||||||
|
|
@ -262,12 +289,8 @@ namespace CatalogLib
|
||||||
get { return 0; }
|
get { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Posizione
|
|
||||||
{
|
|
||||||
get { return string.Empty; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DateTime DataPartenza { get; set; }
|
public DateTime DataPartenza { get; set; }
|
||||||
public string TestoOrario { get; internal set; }
|
public string TestoOrario { get; internal set; }
|
||||||
public int DimStandard { get; internal set; }
|
public int DimStandard { get; internal set; }
|
||||||
|
|
@ -290,7 +313,11 @@ namespace CatalogLib
|
||||||
set { SetString("DirDestinazione", value); }
|
set { SetString("DirDestinazione", value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Margine { get; set; }
|
public int Margine
|
||||||
|
{
|
||||||
|
get => GetInt("Margin", 1);
|
||||||
|
set => SetInt("Margin", value);
|
||||||
|
}
|
||||||
public float MargVert { get; set; }
|
public float MargVert { get; set; }
|
||||||
public string Allineamento { get; set; }
|
public string Allineamento { get; set; }
|
||||||
|
|
||||||
|
|
@ -432,8 +459,90 @@ namespace CatalogLib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool FotoRidimensiona
|
||||||
|
{
|
||||||
|
get => GetBool("FotoRidimensiona", false);
|
||||||
|
set => Set("FotoRidimensiona", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Positions TextPosition
|
||||||
|
{
|
||||||
|
get => GetEnum("TextPosition", Positions.Alto); //(Positions)Enum.Parse(typeof(Positions), GetString("TextPosition", Positions.Alto.ToString()));
|
||||||
|
set => SetString("TextPosition", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Alignments TextAlignment
|
||||||
|
{
|
||||||
|
get => GetEnum("TextAlignment", Alignments.Centro);
|
||||||
|
set => SetString("TextAlignment", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Threading
|
||||||
|
{
|
||||||
|
get => GetBool("Threading", true);
|
||||||
|
set => SetBool("Threading", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResizeModes ResizeMode
|
||||||
|
{
|
||||||
|
get => GetEnum("ResizeMode", ResizeModes.Bicubic);
|
||||||
|
set => SetString("ResizeMode", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResizeDimensions ResizeDimension
|
||||||
|
{
|
||||||
|
get => GetEnum("ResizeDimension", CatalogLib.ResizeDimensions.LatoCorto);
|
||||||
|
set => SetString("ResizeDimension", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public string LogoPath
|
||||||
|
{
|
||||||
|
get => GetString("LogoPath");
|
||||||
|
set => SetString("LogoPath", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int LogoWidth
|
||||||
|
{
|
||||||
|
get => GetInt("LogoWidth");
|
||||||
|
set => SetInt("LogoWidth", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int LogoHeight
|
||||||
|
{
|
||||||
|
get => GetInt("LogoHeight");
|
||||||
|
set => SetInt("LogoHeight", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string LogoMargin
|
||||||
|
{
|
||||||
|
get => GetString("LogoMargin");
|
||||||
|
set => SetString("LogoMargin", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Positions LogoPosition
|
||||||
|
{
|
||||||
|
get => GetEnum("LogoPositions", Positions.Alto);
|
||||||
|
set => SetString("LogoPositions", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Alignments LogoAlignment
|
||||||
|
{
|
||||||
|
get => GetEnum("LogoAlignments", Alignments.Centro);
|
||||||
|
set => SetString("LogoAlignments", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResizeDimensions LogoResizeSide
|
||||||
|
{
|
||||||
|
get => GetEnum("LogoResizeMode", ResizeDimensions.LatoCorto);
|
||||||
|
set => SetString("LogoResizeMode", value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Enums
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<package id="SixLabors.Fonts" version="0.1.0-alpha0014" targetFramework="net46" />
|
<package id="SixLabors.Fonts" version="0.1.0-alpha0014" targetFramework="net46" />
|
||||||
<package id="SixLabors.Shapes" version="0.1.0-alpha0018" targetFramework="net46" />
|
<package id="SixLabors.Shapes" version="0.1.0-alpha0018" targetFramework="net46" />
|
||||||
<package id="SixLabors.Shapes.Text" version="0.1.0-alpha0018" targetFramework="net46" />
|
<package id="SixLabors.Shapes.Text" version="0.1.0-alpha0018" targetFramework="net46" />
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
<package id="System.AppContext" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
|
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
|
||||||
|
|
@ -19,45 +19,45 @@
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net46" />
|
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Globalization" version="4.3.0" targetFramework="net46" />
|
<package id="System.Globalization" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net46" />
|
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.IO" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.Compression" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Memory" version="4.4.0-preview1-25305-02" targetFramework="net46" />
|
<package id="System.Memory" version="4.4.0-preview1-25305-02" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Net.Http" version="4.3.0" targetFramework="net46" />
|
<package id="System.Net.Http" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net46" />
|
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Numerics.Vectors" version="4.3.0" targetFramework="net46" />
|
<package id="System.Numerics.Vectors" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="net46" />
|
<package id="System.ObjectModel" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="net46" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.4.0-preview1-25305-02" targetFramework="net46" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.4.0-preview1-25305-02" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" />
|
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net46" />
|
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net46" />
|
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.ValueTuple" version="4.4.0-preview1-25305-02" targetFramework="net46" />
|
<package id="System.ValueTuple" version="4.4.0-preview1-25305-02" targetFramework="net46" requireReinstallation="true" />
|
||||||
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
|
||||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
|
||||||
</packages>
|
</packages>
|
||||||
15
CatalogLib/stylecop.json
Normal file
15
CatalogLib/stylecop.json
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"orderingRules":
|
||||||
|
{
|
||||||
|
"usingDirectivesPlacement": "outsideNamespace"
|
||||||
|
},
|
||||||
|
"documentationRules":
|
||||||
|
{
|
||||||
|
"xmlHeader": false,
|
||||||
|
"copyrightText": "Copyright (c) Six Labors and contributors.\nLicensed under the Apache License, Version 2.0."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,156 +1,44 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>net9.0-windows</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{44465926-240D-473F-90B8-786BA4384406}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>CatalogVbLib</RootNamespace>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<AssemblyName>CatalogVbLib</AssemblyName>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<MyType>Windows</MyType>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<SccProjectName>SAK</SccProjectName>
|
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
|
||||||
<SccProvider>SAK</SccProvider>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<DefineDebug>false</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionExplicit>On</OptionExplicit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionCompare>Binary</OptionCompare>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionStrict>Off</OptionStrict>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionInfer>On</OptionInfer>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
|
||||||
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x64\Release\</OutputPath>
|
|
||||||
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugType>embedded</DebugType>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
<DebugType>embedded</DebugType>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
<Compile Update="My Project\Application.Designer.vb">
|
||||||
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Windows" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
|
||||||
<Import Include="System" />
|
|
||||||
<Import Include="System.Collections" />
|
|
||||||
<Import Include="System.Collections.Generic" />
|
|
||||||
<Import Include="System.Data" />
|
|
||||||
<Import Include="System.Diagnostics" />
|
|
||||||
<Import Include="System.Linq" />
|
|
||||||
<Import Include="System.Xml.Linq" />
|
|
||||||
<Import Include="System.Threading.Tasks" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Class1.vb" />
|
|
||||||
<Compile Include="ExifReader.vb" />
|
|
||||||
<Compile Include="ImageCreator.vb" />
|
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\Resources.Designer.vb">
|
<Compile Update="My Project\Resources.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\Settings.Designer.vb">
|
<Compile Update="My Project\Settings.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="PicSettings.vb" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<None Update="My Project\Application.myapp">
|
||||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
|
||||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="My Project\Application.myapp">
|
|
||||||
<Generator>MyApplicationCodeGenerator</Generator>
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="My Project\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<CustomToolNamespace>My</CustomToolNamespace>
|
|
||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<ItemGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
<PackageReference Include="System.Collections.Immutable" Version="9.0.6" />
|
||||||
<Target Name="BeforeBuild">
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
</Target>
|
<PackageReference Include="System.Reflection.Metadata" Version="9.0.6" />
|
||||||
<Target Name="AfterBuild">
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||||
</Target>
|
</ItemGroup>
|
||||||
-->
|
|
||||||
</Project>
|
</Project>
|
||||||
2
CatalogVbLib/My Project/Application.Designer.vb
generated
2
CatalogVbLib/My Project/Application.Designer.vb
generated
|
|
@ -1,7 +1,7 @@
|
||||||
'------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------
|
||||||
' <auto-generated>
|
' <auto-generated>
|
||||||
' This code was generated by a tool.
|
' This code was generated by a tool.
|
||||||
' Runtime Version:4.0.30319.34011
|
' Runtime Version:4.0.30319.42000
|
||||||
'
|
'
|
||||||
' Changes to this file may cause incorrect behavior and will be lost if
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
' the code is regenerated.
|
' the code is regenerated.
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,9 @@
|
||||||
Imports System
|
Imports System
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
' Le informazioni generali relative a un assembly sono controllate dal seguente
|
|
||||||
' insieme di attributi. Per modificare le informazioni associate a un assembly
|
|
||||||
' è necessario modificare i valori di questi attributi.
|
|
||||||
|
|
||||||
' Controllare i valori degli attributi dell'assembly
|
|
||||||
|
|
||||||
<Assembly: AssemblyTitle("CatalogVbLib")>
|
|
||||||
<Assembly: AssemblyDescription("")>
|
|
||||||
<Assembly: AssemblyCompany("")>
|
|
||||||
<Assembly: AssemblyProduct("CatalogVbLib")>
|
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2014")>
|
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
'Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
'Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
||||||
<Assembly: Guid("ed2ef4c1-7f15-469d-9c14-182f2ebc21b5")>
|
<Assembly: Guid("ed2ef4c1-7f15-469d-9c14-182f2ebc21b5")>
|
||||||
|
|
||||||
' Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
|
||||||
'
|
|
||||||
' Numero di versione principale
|
|
||||||
' Numero di versione secondario
|
|
||||||
' Numero build
|
|
||||||
' Revisione
|
|
||||||
'
|
|
||||||
' È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
|
||||||
' utilizzando l'asterisco (*) come descritto di seguito:
|
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
|
||||||
|
|
|
||||||
25
CatalogVbLib/My Project/Resources.Designer.vb
generated
25
CatalogVbLib/My Project/Resources.Designer.vb
generated
|
|
@ -1,7 +1,7 @@
|
||||||
'------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------
|
||||||
' <auto-generated>
|
' <auto-generated>
|
||||||
' This code was generated by a tool.
|
' This code was generated by a tool.
|
||||||
' Runtime Version:4.0.30319.34011
|
' Runtime Version:4.0.30319.42000
|
||||||
'
|
'
|
||||||
' Changes to this file may cause incorrect behavior and will be lost if
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
' the code is regenerated.
|
' the code is regenerated.
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
|
||||||
Namespace My.Resources
|
Namespace My.Resources
|
||||||
|
|
||||||
|
|
@ -21,20 +22,20 @@ Namespace My.Resources
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
Friend Module Resources
|
Friend Module Resources
|
||||||
|
|
||||||
Private resourceMan As Global.System.Resources.ResourceManager
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Returns the cached ResourceManager instance used by this class.
|
''' Returns the cached ResourceManager instance used by this class.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
Get
|
Get
|
||||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
|
|
@ -44,17 +45,17 @@ Namespace My.Resources
|
||||||
Return resourceMan
|
Return resourceMan
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Overrides the current thread's CurrentUICulture property for all
|
''' Overrides the current thread's CurrentUICulture property for all
|
||||||
''' resource lookups using this strongly typed resource class.
|
''' resource lookups using this strongly typed resource class.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
Get
|
Get
|
||||||
Return resourceCulture
|
Return resourceCulture
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
Set
|
||||||
resourceCulture = value
|
resourceCulture = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
|
||||||
52
CatalogVbLib/My Project/Settings.Designer.vb
generated
52
CatalogVbLib/My Project/Settings.Designer.vb
generated
|
|
@ -1,7 +1,7 @@
|
||||||
'------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------
|
||||||
' <auto-generated>
|
' <auto-generated>
|
||||||
' This code was generated by a tool.
|
' This code was generated by a tool.
|
||||||
' Runtime Version:4.0.30319.34011
|
' Runtime Version:4.0.30319.42000
|
||||||
'
|
'
|
||||||
' Changes to this file may cause incorrect behavior and will be lost if
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
' the code is regenerated.
|
' the code is regenerated.
|
||||||
|
|
@ -13,42 +13,42 @@ Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
Namespace My
|
Namespace My
|
||||||
|
|
||||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0"), _
|
||||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Partial Friend NotInheritable Class MySettings
|
Partial Friend NotInheritable Class MySettings
|
||||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
#Region "My.Settings Auto-Save Functionality"
|
#Region "My.Settings Auto-Save Functionality"
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
Private Shared addedHandler As Boolean
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
Private Shared addedHandlerLockObject As New Object
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||||
If My.Application.SaveMySettingsOnExit Then
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End If
|
#End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Shared ReadOnly Property [Default]() As MySettings
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
Get
|
Get
|
||||||
|
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
If Not addedHandler Then
|
If Not addedHandler Then
|
||||||
SyncLock addedHandlerLockObject
|
SyncLock addedHandlerLockObject
|
||||||
If Not addedHandler Then
|
If Not addedHandler Then
|
||||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
addedHandler = True
|
addedHandler = True
|
||||||
End If
|
End If
|
||||||
End SyncLock
|
End SyncLock
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
Return defaultInstance
|
Return defaultInstance
|
||||||
End Get
|
End Get
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Ben.Demystifier" version="0.3.0" targetFramework="net45" />
|
|
||||||
<package id="System.Collections.Immutable" version="5.0.0" targetFramework="net45" />
|
|
||||||
<package id="System.Reflection.Metadata" version="5.0.0" targetFramework="net45" />
|
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net45" />
|
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net45" />
|
|
||||||
</packages>
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||||
</startup>
|
</startup>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
|
@ -9,12 +9,13 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>ImageCatalogCS</RootNamespace>
|
<RootNamespace>ImageCatalogCS</RootNamespace>
|
||||||
<AssemblyName>ImageCatalogCS</AssemblyName>
|
<AssemblyName>ImageCatalogCS</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>SAK</SccProjectName>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
<SccProvider>SAK</SccProvider>
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
|
@ -105,6 +106,7 @@
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
|
|
||||||
46
ImageCatalogCS/Properties/Resources.Designer.cs
generated
46
ImageCatalogCS/Properties/Resources.Designer.cs
generated
|
|
@ -1,17 +1,17 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.18010
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace ImageCatalogCS.Properties
|
namespace ImageCatalogCS.Properties {
|
||||||
{
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -19,51 +19,43 @@ namespace ImageCatalogCS.Properties
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources
|
internal class Resources {
|
||||||
{
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal Resources()
|
internal Resources() {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
{
|
get {
|
||||||
get
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
{
|
|
||||||
if ((resourceMan == null))
|
|
||||||
{
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageCatalogCS.Properties.Resources", typeof(Resources).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageCatalogCS.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
{
|
get {
|
||||||
get
|
|
||||||
{
|
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
set
|
set {
|
||||||
{
|
|
||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
24
ImageCatalogCS/Properties/Settings.Designer.cs
generated
24
ImageCatalogCS/Properties/Settings.Designer.cs
generated
|
|
@ -1,28 +1,24 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.18010
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace ImageCatalogCS.Properties
|
namespace ImageCatalogCS.Properties {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
{
|
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
public static Settings Default
|
public static Settings Default {
|
||||||
{
|
get {
|
||||||
get
|
|
||||||
{
|
|
||||||
return defaultInstance;
|
return defaultInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
MaddoLibrary
Submodule
1
MaddoLibrary
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5987cc26521d839bf81bdaab19d101488294da19
|
||||||
27
MaddoShared.backup/FileData.cs
Normal file
27
MaddoShared.backup/FileData.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MaddoShared
|
||||||
|
{
|
||||||
|
public class FileData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Il file originale
|
||||||
|
/// </summary>
|
||||||
|
public FileInfo File { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// La cartella di destinazione
|
||||||
|
/// </summary>
|
||||||
|
public DirectoryInfo Directory { get; set; }
|
||||||
|
|
||||||
|
public FileData(FileInfo newFile, DirectoryInfo newDirectory)
|
||||||
|
{
|
||||||
|
this.File = newFile;
|
||||||
|
this.Directory = newDirectory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
116
MaddoShared.backup/FileHelperSharp.cs
Normal file
116
MaddoShared.backup/FileHelperSharp.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MaddoShared
|
||||||
|
{
|
||||||
|
public class FileHelperOptions
|
||||||
|
{
|
||||||
|
public bool SeparateFiles { get; set; }
|
||||||
|
public NumerazioneType NumerationType { get; set; }
|
||||||
|
public int CounterSize { get; set; }
|
||||||
|
public string Suffix { get; set; }
|
||||||
|
public int FilesPerFolder { get; set; }
|
||||||
|
}
|
||||||
|
public enum NumerazioneType
|
||||||
|
{
|
||||||
|
Progressiva,
|
||||||
|
Files
|
||||||
|
}
|
||||||
|
public class FileHelperSharp
|
||||||
|
{
|
||||||
|
|
||||||
|
public List<FileData> GetFilesRecursive(DirectoryInfo root, DirectoryInfo destRoot, string filter, FileHelperOptions options)
|
||||||
|
{
|
||||||
|
ConcurrentDictionary<FileInfo, DirectoryInfo> dirSourceDest = new ConcurrentDictionary<FileInfo, DirectoryInfo>();
|
||||||
|
List<FileInfo> result = new List<FileInfo>();
|
||||||
|
|
||||||
|
// Dim stack As New Stack(Of DirectoryInfo)
|
||||||
|
Stack<KeyValuePair<DirectoryInfo, DirectoryInfo>> stack = new Stack<KeyValuePair<DirectoryInfo, DirectoryInfo>>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KeyValuePair<DirectoryInfo, DirectoryInfo> pair = new KeyValuePair<DirectoryInfo, DirectoryInfo>();
|
||||||
|
|
||||||
|
|
||||||
|
// stack.Push(root)
|
||||||
|
stack.Push(new KeyValuePair<DirectoryInfo, DirectoryInfo>(root, destRoot));
|
||||||
|
|
||||||
|
while ((stack.Count > 0))
|
||||||
|
{
|
||||||
|
KeyValuePair<DirectoryInfo, DirectoryInfo> curDirKV = stack.Pop();
|
||||||
|
// curDirKP = stack.Pop()
|
||||||
|
DirectoryInfo dir = curDirKV.Key;
|
||||||
|
DirectoryInfo dDir = curDirKV.Value;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly))
|
||||||
|
// dividere file qui
|
||||||
|
if (options.FilesPerFolder > 0 & options.SeparateFiles)
|
||||||
|
AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir, options, filter));
|
||||||
|
else
|
||||||
|
AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir, options, filter));
|
||||||
|
|
||||||
|
foreach (DirectoryInfo subDirectory in dir.GetDirectories())
|
||||||
|
stack.Push(new KeyValuePair<DirectoryInfo, DirectoryInfo>(subDirectory, new DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name))));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// TODO ERROR
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<FileData> resultData = new List<FileData>();
|
||||||
|
resultData.AddRange(from p in dirSourceDest
|
||||||
|
select new FileData(p.Key, p.Value));
|
||||||
|
return resultData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConcurrentDictionary<FileInfo, DirectoryInfo> AppendDictionaryConcurrent(ConcurrentDictionary<FileInfo, DirectoryInfo> dictA, ConcurrentDictionary<FileInfo, DirectoryInfo> dictB)
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<FileInfo, DirectoryInfo> pair in dictB)
|
||||||
|
dictA.TryAdd(pair.Key, pair.Value);
|
||||||
|
return dictA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private ConcurrentDictionary<FileInfo, DirectoryInfo> DividiFilesInDirConcurrent(DirectoryInfo dir, DirectoryInfo dirDest, FileHelperOptions options, string filter)
|
||||||
|
{
|
||||||
|
//int filesCount = dir.GetFiles(Filter).Length;
|
||||||
|
int contaFilePerDir = 0;
|
||||||
|
int contaDirPerDir = 0;
|
||||||
|
string tempText;// = string.Empty;
|
||||||
|
ConcurrentDictionary<FileInfo, DirectoryInfo> foldersDict = new ConcurrentDictionary<FileInfo, DirectoryInfo>();
|
||||||
|
|
||||||
|
DirectoryInfo destDir;
|
||||||
|
destDir = new DirectoryInfo(Path.Combine(dirDest.FullName));
|
||||||
|
foreach (FileInfo file in dir.GetFiles(filter))
|
||||||
|
{
|
||||||
|
contaFilePerDir += 1;
|
||||||
|
|
||||||
|
if (contaFilePerDir == (contaDirPerDir * options.FilesPerFolder) + 1)
|
||||||
|
{
|
||||||
|
contaDirPerDir += 1;
|
||||||
|
|
||||||
|
tempText = options.NumerationType == NumerazioneType.Progressiva ? contaDirPerDir.ToString() : (contaDirPerDir * options.FilesPerFolder).ToString();
|
||||||
|
int i;
|
||||||
|
for (i = 1; i <= (options.CounterSize - tempText.Length); i++)
|
||||||
|
tempText = "0" + tempText;
|
||||||
|
destDir = new DirectoryInfo(Path.Combine(dirDest.FullName, options.Suffix + tempText));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!destDir.Exists)
|
||||||
|
destDir.Create();
|
||||||
|
|
||||||
|
foldersDict.TryAdd(file, destDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
return foldersDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
194
MaddoShared.backup/ImageCreationStuff.cs
Normal file
194
MaddoShared.backup/ImageCreationStuff.cs
Normal file
|
|
@ -0,0 +1,194 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CatalogVbLib;
|
||||||
|
using Dasync.Collections;
|
||||||
|
|
||||||
|
namespace MaddoShared
|
||||||
|
{
|
||||||
|
public class ImageCreationStuff
|
||||||
|
{
|
||||||
|
public class Options
|
||||||
|
{
|
||||||
|
public bool AggiornaSottodirectory { get; set; }
|
||||||
|
public bool CreaSottocartelle { get; set; }
|
||||||
|
|
||||||
|
public int FilePerCartella { get; set; }
|
||||||
|
public string SuffissoCartelle { get; set; }
|
||||||
|
public int CifreContatore { get; set; }
|
||||||
|
public NumerazioneType NumerazioneType { get; set; }
|
||||||
|
public string SourcePath { get; set; }
|
||||||
|
public string DestinationPath { get; set; }
|
||||||
|
|
||||||
|
public int MaxThreads { get; set; }
|
||||||
|
public int ChunksSize { get; set; }
|
||||||
|
public bool LinearExecution { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string> CreaCatalogoParallel(Options options, ConcurrentBag<string> results, EventHandler<Tuple<string,int>> updateEvent, CancellationToken cancellationToken = default(CancellationToken))
|
||||||
|
{
|
||||||
|
var stopwatch = new Stopwatch();
|
||||||
|
stopwatch.Start();
|
||||||
|
// todo immagini counter
|
||||||
|
//todo set label
|
||||||
|
await CreaImmaginiParallel(options, results, updateEvent, cancellationToken);
|
||||||
|
|
||||||
|
// todo set finito label
|
||||||
|
stopwatch.Stop();
|
||||||
|
|
||||||
|
return $"{stopwatch.Elapsed.Hours}h {stopwatch.Elapsed.Minutes}m ${stopwatch.Elapsed.Seconds}s ({stopwatch.Elapsed.TotalSeconds}s)";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task CreaImmaginiParallel(Options options, ConcurrentBag<string> results, EventHandler<Tuple<string, int>> updateEvent, CancellationToken cancellationToken = default(CancellationToken))
|
||||||
|
{
|
||||||
|
var dataToProcess = new List<FileData>();
|
||||||
|
if (options.AggiornaSottodirectory && options.CreaSottocartelle)
|
||||||
|
{
|
||||||
|
var helper = new FileHelperSharp();
|
||||||
|
dataToProcess = helper.GetFilesRecursive(new DirectoryInfo(options.SourcePath), new DirectoryInfo(options.DestinationPath),
|
||||||
|
"*.jpg", new FileHelperOptions()
|
||||||
|
{
|
||||||
|
FilesPerFolder = options.FilePerCartella,
|
||||||
|
Suffix = options.SuffissoCartelle,
|
||||||
|
CounterSize = options.CifreContatore,
|
||||||
|
NumerationType = options.NumerazioneType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (!options.CreaSottocartelle)
|
||||||
|
{
|
||||||
|
var files = Directory.EnumerateFiles(options.SourcePath, "*.jpg",
|
||||||
|
options.AggiornaSottodirectory
|
||||||
|
? SearchOption.AllDirectories
|
||||||
|
: SearchOption.TopDirectoryOnly);
|
||||||
|
|
||||||
|
dataToProcess = files.Select(x =>
|
||||||
|
{
|
||||||
|
var fInfo = new FileInfo(x);
|
||||||
|
var filePath = fInfo.DirectoryName;
|
||||||
|
var trimmedSourcePath = options.SourcePath.TrimEnd('\\');
|
||||||
|
var newFilePath = fInfo.FullName.Replace(trimmedSourcePath, "").TrimStart('\\');
|
||||||
|
newFilePath = Path.Combine(options.DestinationPath, newFilePath);
|
||||||
|
|
||||||
|
var destFolderPath = new FileInfo(newFilePath).DirectoryName;
|
||||||
|
var destFolderInfo = new DirectoryInfo(destFolderPath);
|
||||||
|
destFolderInfo.EnsureDirectoryExists();
|
||||||
|
|
||||||
|
return new FileData(fInfo, new DirectoryInfo(new FileInfo(newFilePath).DirectoryName));
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
//// TODO
|
||||||
|
//dataToProcess =
|
||||||
|
// (from f in Directory.EnumerateFiles(options.SourcePath, "*.jpg",
|
||||||
|
// options.AggiornaSottodirectory
|
||||||
|
// ? SearchOption.AllDirectories
|
||||||
|
// : SearchOption.TopDirectoryOnly)
|
||||||
|
// select new FileData(new FileInfo(f),
|
||||||
|
// new DirectoryInfo(options.DestinationPath.PathCombine(
|
||||||
|
// new FileInfo(f).DirectoryName.Replace(options.SourcePath.TrimEnd(new char[] {'\\'}), "")
|
||||||
|
// )
|
||||||
|
// )
|
||||||
|
// )
|
||||||
|
// )
|
||||||
|
// .ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
var threads = options.MaxThreads == 0 ? Environment.ProcessorCount * 2 : options.MaxThreads;
|
||||||
|
var scheduler = new ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, threads)
|
||||||
|
.ConcurrentScheduler;
|
||||||
|
|
||||||
|
//var allTasks = new List<Task>();
|
||||||
|
var test = from d in dataToProcess
|
||||||
|
select Task.Factory.StartNew(async () =>
|
||||||
|
{
|
||||||
|
await new ImageCreatorSharp(d.File, d.Directory).CreaImmagineThread(d.File.Name);
|
||||||
|
|
||||||
|
//var imgC = new ImageCreatorSharp(d.File, d.Directory);
|
||||||
|
//imgC.CreaImmagineThread(d.File.Name);
|
||||||
|
//imgC = null;
|
||||||
|
}, CancellationToken.None, TaskCreationOptions.None, scheduler);
|
||||||
|
|
||||||
|
//int count = 0;
|
||||||
|
|
||||||
|
if (options.LinearExecution)
|
||||||
|
{
|
||||||
|
foreach (var task in test)
|
||||||
|
{
|
||||||
|
await task;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (options.ChunksSize == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//var opts = new ParallelOptions() { MaxDegreeOfParallelism = threads, CancellationToken = cancellationToken, TaskScheduler = scheduler};
|
||||||
|
await dataToProcess.ParallelForEachAsync(async fileData =>
|
||||||
|
{
|
||||||
|
await new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread(fileData.File.Name);
|
||||||
|
results.Add(fileData.File.Name);
|
||||||
|
//count = Interlocked.Increment(ref count);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
updateEvent?.Invoke(this, new Tuple<string, int>(fileData.File.Name, dataToProcess.Count) );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
}, maxDegreeOfParallelism: threads, false, cancellationToken);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var asdf = SplitList(dataToProcess.ToList(), options.ChunksSize).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var sdaf in asdf)
|
||||||
|
{
|
||||||
|
await sdaf.ParallelForEachAsync(async fileData =>
|
||||||
|
{
|
||||||
|
await new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread(fileData.File.Name);
|
||||||
|
results.Add(fileData.File.Name);
|
||||||
|
//count = Interlocked.Increment(ref count);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
updateEvent?.Invoke(this, new Tuple<string, int>(fileData.File.Name, dataToProcess.Count));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}, maxDegreeOfParallelism: threads, false, cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IEnumerable<List<T>> SplitList<T>(List<T> bigList, int nSize = 3)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < bigList.Count; i += nSize)
|
||||||
|
{
|
||||||
|
yield return bigList.GetRange(i, Math.Min(nSize, bigList.Count - i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1021
MaddoShared.backup/ImageCreatorSharp.cs
Normal file
1021
MaddoShared.backup/ImageCreatorSharp.cs
Normal file
File diff suppressed because it is too large
Load diff
101
MaddoShared.backup/MaddoShared.csproj
Normal file
101
MaddoShared.backup/MaddoShared.csproj
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{AEBFE9E3-277C-4A7B-8448-145D1B11998B}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>MaddoShared</RootNamespace>
|
||||||
|
<AssemblyName>MaddoShared</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="AsyncEnumerable, Version=4.0.2.0, Culture=neutral, PublicKeyToken=0426b068161bd1d1, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\SixLabors.ImageSharp.1.0.3\lib\net472\SixLabors.ImageSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="Z.ExtensionMethods, Version=2.1.1.0, Culture=neutral, PublicKeyToken=59b66d028979105b, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Z.ExtensionMethods.2.1.1\lib\net45\Z.ExtensionMethods.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ImageCreationStuff.cs" />
|
||||||
|
<Compile Include="ImageCreatorSharp.cs" />
|
||||||
|
<Compile Include="ThreadingHelper.cs" />
|
||||||
|
<Compile Include="FileData.cs" />
|
||||||
|
<Compile Include="FileHelperSharp.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj">
|
||||||
|
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
||||||
|
<Name>CatalogVbLib</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
36
MaddoShared.backup/Properties/AssemblyInfo.cs
Normal file
36
MaddoShared.backup/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("MaddoShared")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("MaddoShared")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("aebfe9e3-277c-4a7b-8448-145d1b11998b")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
60
MaddoShared.backup/ThreadingHelper.cs
Normal file
60
MaddoShared.backup/ThreadingHelper.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MaddoShared
|
||||||
|
{
|
||||||
|
public static class ThreadingHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Starts the given tasks and waits for them to complete. This will run, at most, the specified number of tasks in parallel.
|
||||||
|
/// <para>NOTE: If one of the given tasks has already been started, an exception will be thrown.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tasksToRun">The tasks to run.</param>
|
||||||
|
/// <param name="maxTasksToRunInParallel">The maximum number of tasks to run in parallel.</param>
|
||||||
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
public static void StartAndWaitAllThrottled(IEnumerable<Task> tasksToRun, int maxTasksToRunInParallel, CancellationToken cancellationToken = new CancellationToken())
|
||||||
|
{
|
||||||
|
StartAndWaitAllThrottled(tasksToRun, maxTasksToRunInParallel, -1, cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Starts the given tasks and waits for them to complete. This will run, at most, the specified number of tasks in parallel.
|
||||||
|
/// <para>NOTE: If one of the given tasks has already been started, an exception will be thrown.</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tasksToRun">The tasks to run.</param>
|
||||||
|
/// <param name="maxTasksToRunInParallel">The maximum number of tasks to run in parallel.</param>
|
||||||
|
/// <param name="timeoutInMilliseconds">The maximum milliseconds we should allow the max tasks to run in parallel before allowing another task to start. Specify -1 to wait indefinitely.</param>
|
||||||
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
public static void StartAndWaitAllThrottled(IEnumerable<Task> tasksToRun, int maxTasksToRunInParallel, int timeoutInMilliseconds, CancellationToken cancellationToken = new CancellationToken())
|
||||||
|
{
|
||||||
|
// Convert to a list of tasks so that we don't enumerate over it multiple times needlessly.
|
||||||
|
var tasks = tasksToRun.ToList();
|
||||||
|
|
||||||
|
using (var throttler = new SemaphoreSlim(maxTasksToRunInParallel))
|
||||||
|
{
|
||||||
|
var postTaskTasks = new List<Task>();
|
||||||
|
|
||||||
|
// Have each task notify the throttler when it completes so that it decrements the number of tasks currently running.
|
||||||
|
tasks.ForEach(t => postTaskTasks.Add(t.ContinueWith(tsk => throttler.Release())));
|
||||||
|
|
||||||
|
// Start running each task.
|
||||||
|
foreach (var task in tasks)
|
||||||
|
{
|
||||||
|
// Increment the number of tasks currently running and wait if too many are running.
|
||||||
|
throttler.Wait(timeoutInMilliseconds, cancellationToken);
|
||||||
|
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
task.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait for all of the provided tasks to complete.
|
||||||
|
// We wait on the list of "post" tasks instead of the original tasks, otherwise there is a potential race condition where the throttler's using block is exited before some Tasks have had their "post" action completed, which references the throttler, resulting in an exception due to accessing a disposed object.
|
||||||
|
Task.WaitAll(postTaskTasks.ToArray(), cancellationToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
MaddoShared.backup/app.config
Normal file
19
MaddoShared.backup/app.config
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
1
MaddoShared.backup/upgrade.backup
Normal file
1
MaddoShared.backup/upgrade.backup
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Backup created at 1615021651 (06/03/2021 09:07:31 +00:00)
|
||||||
|
|
@ -149,32 +149,12 @@ namespace MaddoShared
|
||||||
}, maxDegreeOfParallelism: threads, false, cancellationToken);
|
}, maxDegreeOfParallelism: threads, false, cancellationToken);
|
||||||
|
|
||||||
|
|
||||||
//var throttler = new SemaphoreSlim(initialCount: threads);
|
|
||||||
//foreach (var fileData in dataToProcess)
|
|
||||||
//{
|
|
||||||
// await throttler.WaitAsync();
|
|
||||||
// allTasks.Add(Task.Factory.StartNew(() => {
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// new ImageCreatorSharp(fileData.File, fileData.Directory).CreaImmagineThread(
|
|
||||||
// fileData.File.Name);
|
|
||||||
// }
|
|
||||||
// finally
|
|
||||||
// {
|
|
||||||
// throttler.Release();
|
|
||||||
// }
|
|
||||||
// }, CancellationToken.None, TaskCreationOptions.None, scheduler));
|
|
||||||
//}
|
|
||||||
|
|
||||||
//await Task.WhenAll(test);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
var asdf = SplitList(dataToProcess.ToList(), dataToProcess.Count()).ToList();
|
var asdf = SplitList(dataToProcess.ToList(), options.ChunksSize).ToList();
|
||||||
//var sadf = asdf[0];
|
|
||||||
|
|
||||||
//var sadf1 = asdf[1];
|
|
||||||
|
|
||||||
foreach (var sdaf in asdf)
|
foreach (var sdaf in asdf)
|
||||||
{
|
{
|
||||||
|
|
@ -197,22 +177,9 @@ namespace MaddoShared
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//foreach (var chunk in asdf)
|
|
||||||
//{
|
|
||||||
// await Task.WhenAll(chunk);
|
|
||||||
// GC.Collect();
|
|
||||||
// //GC.WaitForPendingFinalizers();
|
|
||||||
// //GC.Collect();
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//foreach (var task in test)
|
|
||||||
//{
|
|
||||||
// await task;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,23 +150,22 @@ public class ImageCreatorSharp
|
||||||
{
|
{
|
||||||
using (var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName))
|
using (var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName))
|
||||||
{
|
{
|
||||||
ExifReader.Orientations finalOrientation;
|
_orientation = ExifReader.Orientations.TopLeft;
|
||||||
var rotation = img.Metadata?.ExifProfile?.GetValue(ExifTag.Orientation);
|
|
||||||
if (rotation == null)
|
IExifValue<ushort> rotation = null;
|
||||||
|
|
||||||
|
var found = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.Orientation, out rotation) ?? false;
|
||||||
|
|
||||||
|
if (found)
|
||||||
{
|
{
|
||||||
finalOrientation = ExifReader.Orientations.TopLeft;
|
_orientation = (ExifReader.Orientations)rotation.ToInt32();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
finalOrientation = (ExifReader.Orientations)rotation.Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_orientation = finalOrientation;
|
IExifValue<string> date = null;
|
||||||
|
var creationFound = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.DateTime, out date) ?? false;
|
||||||
var creation = img.Metadata?.ExifProfile?.GetValue(ExifTag.DateTime);
|
if (creationFound)
|
||||||
if (creation != null)
|
|
||||||
{
|
{
|
||||||
var succ = DateTime.TryParse(creation.Value, out var crDate);
|
var succ = DateTime.TryParse(date.ToString(), out var crDate);
|
||||||
if (succ)
|
if (succ)
|
||||||
{
|
{
|
||||||
_creationDate = crDate;
|
_creationDate = crDate;
|
||||||
|
|
|
||||||
|
|
@ -1,101 +1,30 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>net9.0-windows</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{AEBFE9E3-277C-4A7B-8448-145D1B11998B}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<RootNamespace>MaddoShared</RootNamespace>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<AssemblyName>MaddoShared</AssemblyName>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<Deterministic>true</Deterministic>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="AsyncEnumerable, Version=4.0.2.0, Culture=neutral, PublicKeyToken=0426b068161bd1d1, processorArchitecture=MSIL">
|
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
|
||||||
<HintPath>..\packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll</HintPath>
|
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
|
||||||
</Reference>
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.6" />
|
||||||
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.10" />
|
||||||
</Reference>
|
<PackageReference Include="System.Buffers" Version="4.6.1" />
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<PackageReference Include="System.Collections.Immutable" Version="9.0.6" />
|
||||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<PackageReference Include="System.Memory" Version="4.6.3" />
|
||||||
</Reference>
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||||
<Reference Include="SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
|
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
|
||||||
<HintPath>..\packages\SixLabors.ImageSharp.1.0.3\lib\net472\SixLabors.ImageSharp.dll</HintPath>
|
<PackageReference Include="Z.ExtensionMethods" Version="2.1.1" />
|
||||||
</Reference>
|
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
|
||||||
<Reference Include="System" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
</PackageReference>
|
||||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
<PackageReference Include="Microsoft.Windows.Compatibility" Version="9.0.6" />
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Numerics" />
|
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Z.ExtensionMethods, Version=2.1.1.0, Culture=neutral, PublicKeyToken=59b66d028979105b, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Z.ExtensionMethods.2.1.1\lib\net45\Z.ExtensionMethods.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ImageCreationStuff.cs" />
|
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj" />
|
||||||
<Compile Include="ImageCreatorSharp.cs" />
|
|
||||||
<Compile Include="ThreadingHelper.cs" />
|
|
||||||
<Compile Include="FileData.cs" />
|
|
||||||
<Compile Include="FileHelperSharp.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj">
|
|
||||||
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
|
||||||
<Name>CatalogVbLib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -20,11 +20,11 @@
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
|
@ -38,6 +38,14 @@
|
||||||
|
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
|
<dependentAssembly>
|
||||||
|
|
||||||
|
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||||
|
|
||||||
|
</dependentAssembly>
|
||||||
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,24 @@
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||||
|
xmlns:System="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:catalogLib="clr-namespace:CatalogLib;assembly=CatalogLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="900" d:DesignWidth="500"
|
d:DesignHeight="900" d:DesignWidth="500"
|
||||||
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}"
|
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}"
|
||||||
>
|
>
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ObjectDataProvider x:Key="ResizeEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
|
||||||
|
<ObjectDataProvider.MethodParameters>
|
||||||
|
<x:Type TypeName="catalogLib:ResizeModes" />
|
||||||
|
</ObjectDataProvider.MethodParameters>
|
||||||
|
</ObjectDataProvider>
|
||||||
|
<ObjectDataProvider x:Key="ResizeDimensionsEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
|
||||||
|
<ObjectDataProvider.MethodParameters>
|
||||||
|
<x:Type TypeName="catalogLib:ResizeDimensions" />
|
||||||
|
</ObjectDataProvider.MethodParameters>
|
||||||
|
</ObjectDataProvider>
|
||||||
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
|
|
@ -65,6 +79,7 @@
|
||||||
<CheckBox Content="Forza JPG" x:Name="chkForzaJPG" IsChecked="{Binding GeneraleForzaJPG}" Margin="2"/>
|
<CheckBox Content="Forza JPG" x:Name="chkForzaJPG" IsChecked="{Binding GeneraleForzaJPG}" Margin="2"/>
|
||||||
<CheckBox Content="Rotazione Automatica" x:Name="chkRotazioneAutomatica" IsChecked="{Binding GeneraleRotazioneAutomatica}" Margin="2"/>
|
<CheckBox Content="Rotazione Automatica" x:Name="chkRotazioneAutomatica" IsChecked="{Binding GeneraleRotazioneAutomatica}" Margin="2"/>
|
||||||
<CheckBox Content="Sovrascrivi File" x:Name="chkSovrascriviFile" IsChecked="{Binding GeneraleSovrascriviFile}" Margin="2"/>
|
<CheckBox Content="Sovrascrivi File" x:Name="chkSovrascriviFile" IsChecked="{Binding GeneraleSovrascriviFile}" Margin="2"/>
|
||||||
|
<CheckBox Content="MultiThreading" IsChecked="{Binding Threading}" Margin="2"></CheckBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Header="Sottocartelle" Margin="2">
|
<GroupBox Header="Sottocartelle" Margin="2">
|
||||||
|
|
@ -80,6 +95,7 @@
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<CheckBox Grid.Row="0" Grid.Column="1" Content="Crea Sottocartelle" x:Name="chkCreaSottocartelle" Margin="4,0,0,0" IsChecked="{Binding SubdirCreaSottoCartelle}"/>
|
<CheckBox Grid.Row="0" Grid.Column="1" Content="Crea Sottocartelle" x:Name="chkCreaSottocartelle" Margin="4,0,0,0" IsChecked="{Binding SubdirCreaSottoCartelle}"/>
|
||||||
|
|
@ -112,6 +128,8 @@
|
||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
|
|
@ -125,16 +143,19 @@
|
||||||
<ColumnDefinition Width="88*"/>
|
<ColumnDefinition Width="88*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Altezza" Grid.ColumnSpan="2" Margin="0,0,0,2" />
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Ridimensiona"></Label>
|
||||||
<TextBox Grid.Row="0" Grid.Column="2" Margin="4,4,4,6" Text="{Binding FotoAltezza}"/>
|
<CheckBox Grid.Row="0" Grid.Column="2" IsChecked="{Binding FotoRidimensiona}"></CheckBox>
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="Altezza" Grid.ColumnSpan="2" Margin="0,0,0,2" />
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="2" Margin="4,4,4,6" Text="{Binding FotoAltezza}"/>
|
||||||
|
|
||||||
|
|
||||||
<Label Grid.Column="0" Content="Larghezza" Grid.ColumnSpan="2" Margin="0,26,0,2" Grid.RowSpan="2" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Larghezza" Grid.ColumnSpan="2" Margin="0,26,0,2" Grid.RowSpan="2" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="2" Margin="4,2,4,6" Text="{Binding FotoLarghezza}"></TextBox>
|
<TextBox Grid.Row="2" Grid.Column="2" Margin="4,2,4,6" Text="{Binding FotoLarghezza}"></TextBox>
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Qualità" Grid.ColumnSpan="2" Margin="0,24,0,1" Grid.RowSpan="2" />
|
<Label Grid.Row="2" Grid.Column="0" Content="Qualità" Grid.ColumnSpan="2" Margin="0,24,0,1" Grid.RowSpan="2" />
|
||||||
<!--<TextBox Grid.Row="2" Grid.Column="2" Width="80" Margin="4,2,4,5" />-->
|
<!--<TextBox Grid.Row="2" Grid.Column="2" Width="80" Margin="4,2,4,5" />-->
|
||||||
<Grid Grid.Row="2" Grid.Column="2" >
|
<Grid Grid.Row="3" Grid.Column="2" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="20"/>
|
<ColumnDefinition Width="20"/>
|
||||||
|
|
@ -144,13 +165,19 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
<CheckBox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,16,0,17.88" IsChecked="{Binding FotoMantieniDimensioni}"/>
|
<CheckBox Grid.Row="4" Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,16,0,17.88" IsChecked="{Binding FotoMantieniDimensioni}"/>
|
||||||
<TextBlock Grid.Row="3" Grid.Column="2" Text="Mantieni Dimensioni Originali" TextWrapping="WrapWithOverflow" Width="80" Margin="4,0,4,25.88" Grid.RowSpan="2" />
|
<TextBlock Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Grid.ColumnSpan="2" HorizontalAlignment="Left" Text="Mantieni Rapporto di aspetto" TextWrapping="WrapWithOverflow" Margin="4,0,4,25.88" />
|
||||||
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="Suffisso" Grid.ColumnSpan="2" Margin="0,0.12,0,-0.12" />
|
<Label Grid.Row="5" Grid.Column="0" Content="Suffisso" Grid.ColumnSpan="2" Margin="0,0.12,0,-0.12" />
|
||||||
<TextBox Grid.Row="4" Grid.Column="2" Width="80" Margin="4,4.12,4,3.88" Text="{Binding FotoSuffisso}" />
|
<TextBox Grid.Row="5" Grid.Column="2" Margin="4,4.12,4,3.88" Text="{Binding FotoSuffisso}" />
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2">Algoritmo di ridimensionamento</Label>
|
||||||
|
<ComboBox Grid.Row="6" Grid.Column="2" ItemsSource="{Binding Source={StaticResource ResizeEnum}}" SelectedItem="{Binding ResizeMode}"></ComboBox>
|
||||||
|
|
||||||
|
<Label Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2">Lato ridimensionamento</Label>
|
||||||
|
<ComboBox Grid.Row="7" Grid.Column="2" ItemsSource="{Binding Source={StaticResource ResizeDimensionsEnum}}" SelectedItem="{Binding ResizeDimension}"></ComboBox>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,24 @@
|
||||||
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
|
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
mc:Ignorable="d"
|
xmlns:System="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:catalogLib="clr-namespace:CatalogLib;assembly=CatalogLib"
|
||||||
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="900" d:DesignWidth="500"
|
d:DesignHeight="900" d:DesignWidth="500"
|
||||||
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}" >
|
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}" >
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<wpfCatalog:FontFamilyStringConverter x:Key="FontFamilyConverter" />
|
<wpfCatalog:FontFamilyStringConverter x:Key="FontFamilyConverter" />
|
||||||
<wpfCatalog:MaddoColorConverter x:Key="ColorConverter" />
|
<wpfCatalog:MaddoColorConverter x:Key="ColorConverter" />
|
||||||
|
<ObjectDataProvider x:Key="PositionsEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
|
||||||
|
<ObjectDataProvider.MethodParameters>
|
||||||
|
<x:Type TypeName="catalogLib:Positions" />
|
||||||
|
</ObjectDataProvider.MethodParameters>
|
||||||
|
</ObjectDataProvider>
|
||||||
|
<ObjectDataProvider x:Key="AlignmentEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
|
||||||
|
<ObjectDataProvider.MethodParameters>
|
||||||
|
<x:Type TypeName="catalogLib:Alignments" />
|
||||||
|
</ObjectDataProvider.MethodParameters>
|
||||||
|
</ObjectDataProvider>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
|
|
@ -42,8 +54,8 @@
|
||||||
Text="{Binding FontName}"
|
Text="{Binding FontName}"
|
||||||
></TextBox>
|
></TextBox>
|
||||||
<Label Content="Grassetto" Grid.Row="2" Grid.Column="0"></Label>
|
<Label Content="Grassetto" Grid.Row="2" Grid.Column="0"></Label>
|
||||||
<CheckBox Grid.Row="2" Grid.Column="1"></CheckBox>
|
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding Grassetto}"></CheckBox>
|
||||||
|
|
||||||
<Label Content="Corsivo" Grid.Row="3" Grid.Column="0"></Label>
|
<Label Content="Corsivo" Grid.Row="3" Grid.Column="0"></Label>
|
||||||
<CheckBox Grid.Row="3" Grid.Column="1"></CheckBox>
|
<CheckBox Grid.Row="3" Grid.Column="1"></CheckBox>
|
||||||
|
|
||||||
|
|
@ -81,28 +93,8 @@
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
|
||||||
<GroupBox Header="Slide Show" VerticalAlignment="Stretch">
|
|
||||||
<StackPanel Orientation="Horizontal" >
|
|
||||||
<CheckBox Content="Data" Margin="5,0" IsChecked="{Binding SlideshowData}"/>
|
|
||||||
<CheckBox Content="Numero Foto" Margin="5,0" IsChecked="{Binding SlideshowNumeroFoto}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
<GroupBox Header="Testo foto verticali" VerticalAlignment="Stretch">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Dimensione Carattere"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoVertDimensioneCarattere}"/>
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Margine"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding TestoVertMargine}"/>
|
|
||||||
</Grid>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<GroupBox Header="Testo da applicare">
|
<GroupBox Header="Testo da applicare">
|
||||||
|
|
@ -117,9 +109,19 @@
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Orizzontale" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Orizzontale" />
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Verticale" />
|
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareOrizzontale}"/>
|
<TextBlock>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Height="50" MaxLines="4" AcceptsReturn="True" Text="{Binding TestoApplicareVerticale}"/>
|
Legenda:<LineBreak/>
|
||||||
|
$_ A capo verticale<LineBreak/>
|
||||||
|
$o Orario<LineBreak/>
|
||||||
|
$t Tempo gara<LineBreak/>
|
||||||
|
$n Nome File
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
|
||||||
|
</Label>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareOrizzontale}" AcceptsReturn="True"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|
@ -135,28 +137,28 @@
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Trasparenza(0-100%)" />
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Trasparenza(0-100%)" />
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareTrasparenza}" />
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareTrasparenza}" />
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Posizione" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Allineamento Verticale" />
|
||||||
<ComboBox Grid.Row="1" Grid.Column="1" />
|
<ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource PositionsEnum}}" SelectedItem="{Binding TextPosition}">
|
||||||
<!--ToDo-->
|
|
||||||
|
|
||||||
<CheckBox Grid.Row="2" Grid.Column="1" Content="Orario" IsChecked="{Binding TestoApplicareOrario}"/>
|
</ComboBox>
|
||||||
<CheckBox Grid.Row="3" Grid.Column="1" Content="Tempo Gara" IsChecked="{Binding TestoApplicareTempoGaraCheck}"/>
|
|
||||||
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding TestoApplicareTempoGara}"/>
|
<ComboBox Grid.Row="2" Grid.Column="2" ItemsSource="{Binding Source={StaticResource AlignmentEnum}}" SelectedItem="{Binding TextAlignment}"></ComboBox>
|
||||||
|
|
||||||
|
<Label Grid.Row="6" Grid.Column="0" >Formato tempo gara</Label>
|
||||||
|
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TestoApplicareTempoGara}"/>
|
||||||
|
|
||||||
<Label Grid.Row="5" Grid.Column="0" Content="Margine (pixel)" />
|
<Label Grid.Row="5" Grid.Column="0" Content="Margine (pixel)" />
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding TestoApplicareMargine}"/>
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Margine}"/>
|
||||||
|
|
||||||
<Label Grid.Row="6" Grid.Column="0" Content="Allineamento" />
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TestoApplicareAllineamento}"/>
|
|
||||||
|
|
||||||
<Label Grid.Row="7" Grid.Column="0" Content="Partenza" />
|
<Label Grid.Row="7" Grid.Column="0" Content="Partenza" />
|
||||||
<ComboBox Grid.Row="7" Grid.Column="1" />
|
<xctk:DateTimePicker Grid.Row="7" Grid.Column="1"></xctk:DateTimePicker>
|
||||||
|
|
||||||
<!--todo-->
|
<!--todo-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<Setter Property="Margin" Value="2,2,5,5" />
|
<Setter Property="Margin" Value="2,2,5,5" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="ComboBox" BasedOn="{StaticResource CommonStyle}"></Style>
|
<Style TargetType="ComboBox" BasedOn="{StaticResource CommonStyle}"></Style>
|
||||||
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<controls:TextSettingsControl></controls:TextSettingsControl>
|
<controls:TextSettingsControl></controls:TextSettingsControl>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem>
|
<TabItem>
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
|
|
@ -182,12 +182,15 @@
|
||||||
<GroupBox DockPanel.Dock="Right" Header="Statistiche">
|
<GroupBox DockPanel.Dock="Right" Header="Statistiche">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Content="Carica Impostazioni" Command="{Binding ImportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}"></Button>
|
<Button Content="Carica Impostazioni" Command="{Binding ImportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding IsUiActive}"></Button>
|
||||||
<Button Content="Salva Impostazioni" Command="{Binding ExportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}"></Button>
|
<Button Content="Salva Impostazioni" Command="{Binding ExportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}" IsEnabled="{Binding IsUiActive}"></Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button Content="Start" Command="{Binding StartCommand}" Style="{DynamicResource AccentedSquareButtonStyle}"></Button>
|
<Button Content="Start" Command="{Binding StartCommand}" Style="{DynamicResource AccentedSquareButtonStyle}" IsEnabled="{Binding IsUiActive}"></Button>
|
||||||
<Button Content="STOP" Command="{Binding StopCommand}" Style="{DynamicResource SquareButtonStyle}"/>
|
<Button Content="STOP" Command="{Binding StopCommand}" Style="{DynamicResource SquareButtonStyle}"/>
|
||||||
|
<TextBlock Text="{Binding CurrentImage}"></TextBlock>
|
||||||
|
<TextBlock Text="{Binding TotalPictures}"></TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CatalogLib;
|
using CatalogLib;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
using MaddoLibrary.Base.Log;
|
||||||
using MaddoLibrary.Helpers;
|
using MaddoLibrary.Helpers;
|
||||||
using WPFCatalog.Messages;
|
using WPFCatalog.Messages;
|
||||||
|
|
||||||
|
|
@ -40,6 +43,7 @@ namespace WPFCatalog
|
||||||
public RelayCommand OpenDestinationFolderCommand { get; private set; }
|
public RelayCommand OpenDestinationFolderCommand { get; private set; }
|
||||||
|
|
||||||
public RelayCommand StartCommand { get; private set; }
|
public RelayCommand StartCommand { get; private set; }
|
||||||
|
public RelayCommand StopCommand { get; private set; }
|
||||||
|
|
||||||
public RelayCommand PickFontCommand { get; private set; }
|
public RelayCommand PickFontCommand { get; private set; }
|
||||||
|
|
||||||
|
|
@ -55,6 +59,8 @@ namespace WPFCatalog
|
||||||
OpenDestinationFolderCommand = new RelayCommand(OpenDestinationFolder);
|
OpenDestinationFolderCommand = new RelayCommand(OpenDestinationFolder);
|
||||||
|
|
||||||
StartCommand = new RelayCommand(Start);
|
StartCommand = new RelayCommand(Start);
|
||||||
|
StopCommand = new RelayCommand(Stop);
|
||||||
|
|
||||||
|
|
||||||
PickFontCommand = new RelayCommand(PickFont);
|
PickFontCommand = new RelayCommand(PickFont);
|
||||||
}
|
}
|
||||||
|
|
@ -76,19 +82,179 @@ namespace WPFCatalog
|
||||||
//string s = d.Name;
|
//string s = d.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private struct ImageTask
|
||||||
|
{
|
||||||
|
public Task TaskImage;
|
||||||
|
public string ImageName;
|
||||||
|
public bool Completed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Task _workTask;
|
||||||
|
//private List<ImageTask> _tasks;
|
||||||
|
private async void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
//Task outerTask = new Task(() =>
|
||||||
|
//{
|
||||||
|
// Stopwatch s = new Stopwatch();
|
||||||
|
|
||||||
|
// var tasks = new List<Task>();
|
||||||
|
// // todo folder mode
|
||||||
|
// MaddoLogger.Log("Starting elaboration");
|
||||||
|
// foreach (var file in Directory.EnumerateFiles(PicSettings.DirectorySorgente))
|
||||||
|
// {
|
||||||
|
// //Task t = new Task(() =>
|
||||||
|
// //{
|
||||||
|
|
||||||
|
// // //CompleteFile(file);
|
||||||
|
// //});
|
||||||
|
// var t = FileTask(file);
|
||||||
|
// if (t != null)
|
||||||
|
// {
|
||||||
|
// tasks.Add(t);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// MaddoLogger.LogError("Task was null for file: {0}", file);
|
||||||
|
// }
|
||||||
|
// //_tasks.Add(new ImageTask() { ImageName = file, TaskImage = t, Completed = false });
|
||||||
|
// //t.Start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// s.Start();
|
||||||
|
|
||||||
|
// await Task.WhenAll(tasks);
|
||||||
|
|
||||||
|
// Task.WhenAll(tasks).Start();
|
||||||
|
// s.Stop();
|
||||||
|
// //tt.RunSynchronously();
|
||||||
|
// MaddoLogger.Log("Finished: {0}, {1}", s.Elapsed, s.ElapsedMilliseconds);
|
||||||
|
// DialogHelper.PopUpAlert($"Finished: {s.Elapsed}, {s.ElapsedMilliseconds}", "message");
|
||||||
|
//});
|
||||||
|
if (/*_workTask == null || _workTask.IsCanceled || _workTask.IsCompleted || _workTask.IsFaulted*/!_isRunning)
|
||||||
|
{
|
||||||
|
_workTask = OuterTask();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _workTask;
|
||||||
|
}
|
||||||
|
catch (TaskCanceledException e)
|
||||||
|
{
|
||||||
|
MaddoLogger.LogError(e);
|
||||||
|
MaddoLogger.LogError("Master Task cancelled");
|
||||||
|
//throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void Stop()
|
||||||
|
{
|
||||||
|
if (_isRunning)
|
||||||
|
{
|
||||||
|
_tokenSource.Cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private CancellationTokenSource _tokenSource;
|
||||||
|
private bool _isRunning = false;
|
||||||
|
private async Task OuterTask()
|
||||||
|
{
|
||||||
|
_isRunning = true;
|
||||||
|
_tokenSource = new CancellationTokenSource();
|
||||||
|
var token = _tokenSource.Token;
|
||||||
|
|
||||||
|
var tasks = new ConcurrentBag<Task>();
|
||||||
|
|
||||||
|
IsUiActive = false;
|
||||||
|
Stopwatch s = new Stopwatch();
|
||||||
|
|
||||||
|
//var tasks = new List<Task>();
|
||||||
|
// todo folder mode
|
||||||
|
MaddoLogger.Log("Starting elaboration");
|
||||||
|
var files = Directory.EnumerateFiles(PicSettings.DirectorySorgente).ToArray();
|
||||||
|
|
||||||
|
TotalPictures = files.Count();
|
||||||
|
|
||||||
|
IImageProcessor i = new ImgSharpCreator();
|
||||||
|
|
||||||
|
foreach (var file in files)
|
||||||
|
{
|
||||||
|
//Task t = new Task(() =>
|
||||||
|
//{
|
||||||
|
|
||||||
|
// //CompleteFile(file);
|
||||||
|
//});
|
||||||
|
var t = FileTask(file, i, token);
|
||||||
|
|
||||||
|
tasks.Add(t);
|
||||||
|
|
||||||
|
//_tasks.Add(new ImageTask() { ImageName = file, TaskImage = t, Completed = false });
|
||||||
|
//t.Start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
s.Start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Task.WhenAll(tasks);
|
||||||
|
}
|
||||||
|
catch (AggregateException e)
|
||||||
|
{
|
||||||
|
MaddoLogger.LogError(e);
|
||||||
|
MaddoLogger.LogError("Task cancelled");
|
||||||
|
//Console.WriteLine(e);
|
||||||
|
//Console.WriteLine("Task cancelled");
|
||||||
|
//throw;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_tokenSource.Dispose();
|
||||||
|
|
||||||
|
//Task.WhenAll(tasks).Start();
|
||||||
|
s.Stop();
|
||||||
|
//tt.RunSynchronously();
|
||||||
|
MaddoLogger.Log("Finished: {0}, {1}", s.Elapsed, s.ElapsedMilliseconds);
|
||||||
|
DialogHelper.PopUpAlert($"Finished: {s.Elapsed}, {s.ElapsedMilliseconds}", "message");
|
||||||
|
|
||||||
|
IsUiActive = true;
|
||||||
|
_isRunning = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private async Task FileTask(string file, IImageProcessor i, CancellationToken token)
|
||||||
|
{
|
||||||
|
if (token.IsCancellationRequested == true)
|
||||||
|
{
|
||||||
|
token.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
MaddoLogger.Log("Starting task for image {0}", file);
|
||||||
|
//IImageProcessor i = new ImgSharpCreator();
|
||||||
|
await Task.Run(() => i.Start(new FileInfo(file)), token);
|
||||||
|
CurrentImage = file;
|
||||||
|
TotalPictures--;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompleteFile(string file)
|
||||||
{
|
{
|
||||||
|
|
||||||
// todo folder mode
|
|
||||||
|
|
||||||
foreach (var file in Directory.EnumerateFiles(PicSettings.DirectorySorgente))
|
|
||||||
{
|
|
||||||
IImageProcessor i = new ImgSharpCreator();
|
|
||||||
|
|
||||||
//ImageCreator2 i = new ImageCreator2();
|
|
||||||
i.Start(new FileInfo(file));
|
|
||||||
}
|
|
||||||
DialogHelper.PopUpAlert("Finished", "message");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenSourceFolder()
|
private void OpenSourceFolder()
|
||||||
|
|
@ -164,6 +330,30 @@ namespace WPFCatalog
|
||||||
|
|
||||||
#region Proprietà
|
#region Proprietà
|
||||||
|
|
||||||
|
private bool _isUiActive = true;
|
||||||
|
public bool IsUiActive
|
||||||
|
{
|
||||||
|
get => _isUiActive;
|
||||||
|
set { _isUiActive = value; RaisePropertyChanged("IsUiActive"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _currentImage;
|
||||||
|
|
||||||
|
public string CurrentImage
|
||||||
|
{
|
||||||
|
get => _currentImage;
|
||||||
|
set { _currentImage = value; RaisePropertyChanged("CurrentImage"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private int _totalPictures;
|
||||||
|
|
||||||
|
public int TotalPictures
|
||||||
|
{
|
||||||
|
get => _totalPictures;
|
||||||
|
set { _totalPictures = value; RaisePropertyChanged("TotalPictures"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public PicSettings SettingsString
|
public PicSettings SettingsString
|
||||||
{
|
{
|
||||||
get { return PicSettings; }
|
get { return PicSettings; }
|
||||||
|
|
@ -291,6 +481,16 @@ namespace WPFCatalog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool FotoRidimensiona
|
||||||
|
{
|
||||||
|
get { return PicSettings.FotoRidimensiona; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
PicSettings.FotoRidimensiona = value;
|
||||||
|
RaisePropertyChanged("FotoRidimensiona");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int FotoAltezza
|
public int FotoAltezza
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -671,7 +871,52 @@ namespace WPFCatalog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Threading
|
||||||
|
{
|
||||||
|
get => PicSettings.Threading;
|
||||||
|
set { PicSettings.Threading = value; RaisePropertyChanged("Threading"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Margine
|
||||||
|
{
|
||||||
|
get => PicSettings.Margine;
|
||||||
|
set { PicSettings.Margine = value; RaisePropertyChanged("Margine"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Positions TextPosition
|
||||||
|
{
|
||||||
|
get => PicSettings.TextPosition;
|
||||||
|
set { PicSettings.TextPosition = value; RaisePropertyChanged("TextPosition"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Alignments TextAlignment
|
||||||
|
{
|
||||||
|
get => PicSettings.TextAlignment;
|
||||||
|
set { PicSettings.TextAlignment = value; RaisePropertyChanged("TextAlignment"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResizeModes ResizeMode
|
||||||
|
{
|
||||||
|
get => PicSettings.ResizeMode;
|
||||||
|
set { PicSettings.ResizeMode = value; RaisePropertyChanged("ResizeMode"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResizeDimensions ResizeDimension
|
||||||
|
{
|
||||||
|
get => PicSettings.ResizeDimension;
|
||||||
|
set { PicSettings.ResizeDimension = value; RaisePropertyChanged("ResizeDimension"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Grassetto
|
||||||
|
{
|
||||||
|
get => PicSettings.Grassetto;
|
||||||
|
set { PicSettings.Grassetto = value; RaisePropertyChanged("Grassetto"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
//public PicSettings.Positions Positions
|
||||||
|
//{
|
||||||
|
// get => PicSettings.Positions;
|
||||||
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -687,7 +932,7 @@ namespace WPFCatalog
|
||||||
|
|
||||||
|
|
||||||
public string ColoreTestoRGB
|
public string ColoreTestoRGB
|
||||||
{
|
{
|
||||||
get { return PicSettings.ColoreTestoRGB; }
|
get { return PicSettings.ColoreTestoRGB; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -66,14 +66,6 @@
|
||||||
<Reference Include="GalaSoft.MvvmLight.WPF45">
|
<Reference Include="GalaSoft.MvvmLight.WPF45">
|
||||||
<HintPath>..\packages\MvvmLightLibs.4.1.27.1\lib\net45\GalaSoft.MvvmLight.WPF45.dll</HintPath>
|
<HintPath>..\packages\MvvmLightLibs.4.1.27.1\lib\net45\GalaSoft.MvvmLight.WPF45.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MaddoLibrary.Base.NET45, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\lib\MaddoLibrary.Base.NET45.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="MaddoLibrary.WPF.NET46, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\lib\MaddoLibrary.WPF.NET46.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
|
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
|
<HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
@ -86,9 +78,8 @@
|
||||||
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="ReachFramework" />
|
<Reference Include="ReachFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
<HintPath>..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
|
@ -233,6 +224,14 @@
|
||||||
<Project>{d27accf2-80fc-4de8-aeb8-351ff076e6d5}</Project>
|
<Project>{d27accf2-80fc-4de8-aeb8-351ff076e6d5}</Project>
|
||||||
<Name>CatalogLib</Name>
|
<Name>CatalogLib</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj">
|
||||||
|
<Project>{e93daae6-4aa9-4a45-afb6-58209b3ad3c9}</Project>
|
||||||
|
<Name>MaddoLibrary.Base.NET46</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj">
|
||||||
|
<Project>{73da19d7-196d-4b16-b610-93250978a607}</Project>
|
||||||
|
<Name>MaddoLibrary.WPF.NET46</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Icons\document-open-folder.png" />
|
<Resource Include="Icons\document-open-folder.png" />
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@
|
||||||
<package id="MahApps.Metro.IconPacks" version="1.9.0" targetFramework="net46" />
|
<package id="MahApps.Metro.IconPacks" version="1.9.0" targetFramework="net46" />
|
||||||
<package id="MvvmLight" version="4.1.27.1" targetFramework="net45" />
|
<package id="MvvmLight" version="4.1.27.1" targetFramework="net45" />
|
||||||
<package id="MvvmLightLibs" version="4.1.27.1" targetFramework="net45" />
|
<package id="MvvmLightLibs" version="4.1.27.1" targetFramework="net45" />
|
||||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
|
<package id="System.Collections.Immutable" version="1.4.0" targetFramework="net46" />
|
||||||
</packages>
|
</packages>
|
||||||
32
imagecatalog.backup/AssemblyInfo.cs
Normal file
32
imagecatalog.backup/AssemblyInfo.cs
Normal file
|
|
@ -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.*")]
|
||||||
31
imagecatalog.backup/AssemblyInfo.vb
Normal file
31
imagecatalog.backup/AssemblyInfo.vb
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' General Information about an assembly is controlled through the following
|
||||||
|
' set of attributes. Change these attribute values to modify the information
|
||||||
|
' associated with an assembly.
|
||||||
|
|
||||||
|
' Review the values of the assembly attributes
|
||||||
|
|
||||||
|
<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.*")>
|
||||||
1
imagecatalog.backup/ClassDiagram1.cd
Normal file
1
imagecatalog.backup/ClassDiagram1.cd
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
1255
imagecatalog.backup/CreaImmagineSeparateMultiCore.cs
Normal file
1255
imagecatalog.backup/CreaImmagineSeparateMultiCore.cs
Normal file
File diff suppressed because it is too large
Load diff
943
imagecatalog.backup/CreaImmagineSeparateMultiCore.vb
Normal file
943
imagecatalog.backup/CreaImmagineSeparateMultiCore.vb
Normal file
|
|
@ -0,0 +1,943 @@
|
||||||
|
Imports System.IO
|
||||||
|
'Imports System.Drawing.Drawing2D
|
||||||
|
'Imports System.Drawing.Imaging
|
||||||
|
'Imports System.Threading
|
||||||
|
|
||||||
|
Public Class CreaImmagineSeparateMultiCore
|
||||||
|
|
||||||
|
Private _DirectorySorgente As String
|
||||||
|
Private _DirectoryDestinazione As String
|
||||||
|
|
||||||
|
|
||||||
|
Private _SourceDir As DirectoryInfo
|
||||||
|
Private _DestDirStart As DirectoryInfo
|
||||||
|
Private _DimStandard As Integer
|
||||||
|
Private _DimStandardMiniatura As Integer
|
||||||
|
|
||||||
|
|
||||||
|
Private _UsaOrarioMiniatura As Boolean
|
||||||
|
Private _UsaOrarioTestoApplicare As Boolean
|
||||||
|
Private _UsaTempoGaraTestoApplicare As Boolean
|
||||||
|
Private _TestoFirmaStart As String
|
||||||
|
Private _TestoFirmaStartV As String
|
||||||
|
Private _DataPartenza As DateTime
|
||||||
|
Private _TestoOrario As String
|
||||||
|
|
||||||
|
Private _UsaRotazioneAutomatica As Boolean
|
||||||
|
Private _UsaForzaJpg As Boolean
|
||||||
|
|
||||||
|
Private _LarghezzaSmall As Integer
|
||||||
|
Private _AltezzaSmall As Integer
|
||||||
|
|
||||||
|
Private _CreaMiniature As Boolean
|
||||||
|
Private _AggiungiScritteMiniature As Boolean
|
||||||
|
|
||||||
|
Private _NomeFileChild As String
|
||||||
|
Private _Suffisso As String
|
||||||
|
Private _Codice As String
|
||||||
|
|
||||||
|
Private _Trasparenza As Integer
|
||||||
|
Private _IlFont As String
|
||||||
|
Private _Grassetto As Boolean
|
||||||
|
|
||||||
|
Private _Posizione As String
|
||||||
|
Private _Allineamento As String
|
||||||
|
Private _Margine As Integer
|
||||||
|
|
||||||
|
Private _LogoAltezza As Integer
|
||||||
|
Private _LogoLarghezza As Integer
|
||||||
|
|
||||||
|
Private _FontColoreR As Integer
|
||||||
|
Private _FontColoreG As Integer
|
||||||
|
Private _FontColoreB As Integer
|
||||||
|
|
||||||
|
Private _LogoAggiungi As Boolean
|
||||||
|
Private _LogoNomeFile As String
|
||||||
|
Private _LogoTrasparenza As String
|
||||||
|
Private _LogoMargine As String
|
||||||
|
Private _LogoPosizioneH As String
|
||||||
|
Private _LogoPosizioneV As String
|
||||||
|
|
||||||
|
Private _FotoGrandeDimOrigina As Boolean
|
||||||
|
Private _AltezzaBig As Integer
|
||||||
|
Private _LarghezzaBig As Integer
|
||||||
|
Private _DestDir As DirectoryInfo
|
||||||
|
|
||||||
|
Public Sub CreaImmagine(ByVal InfoImg As PicInfo)
|
||||||
|
Dim TestoFirma As String = ""
|
||||||
|
|
||||||
|
_DestDir = InfoImg.DirDest
|
||||||
|
_SourceDir = InfoImg.DirSource
|
||||||
|
_DestDirStart = InfoImg.DirDestStart
|
||||||
|
_NomeFileChild = InfoImg.NomeImmagine
|
||||||
|
|
||||||
|
Dim AlphaScelta As Integer = CType((255 * (100 - _Trasparenza) / 100), Integer)
|
||||||
|
|
||||||
|
Dim DimensioneStandard As Integer
|
||||||
|
Dim DimensioneStandardMiniatura As Integer
|
||||||
|
|
||||||
|
Dim DataFoto As DateTime
|
||||||
|
Dim DataPartenzaI As DateTime = _DataPartenza
|
||||||
|
If _TestoOrario.Length > 0 Then
|
||||||
|
_TestoOrario &= " "
|
||||||
|
End If
|
||||||
|
Dim TestoFirmaPiccola As String = ""
|
||||||
|
|
||||||
|
Dim FileConta As Integer = 0
|
||||||
|
Dim ContaFileXDir As Integer = 0
|
||||||
|
Dim ContaDirXDir As Integer = 0
|
||||||
|
Dim TestoTemp As String = ""
|
||||||
|
Dim ContaTemp As Integer = 0
|
||||||
|
|
||||||
|
DimensioneStandard = _DimStandard
|
||||||
|
DimensioneStandardMiniatura = _DimStandardMiniatura
|
||||||
|
|
||||||
|
Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_SourceDir.FullName, _NomeFileChild))
|
||||||
|
|
||||||
|
If _UsaOrarioTestoApplicare = True Or _UsaTempoGaraTestoApplicare = True Or _UsaOrarioMiniatura = True Then
|
||||||
|
If g.PropertyIdList.Length > 0 Then ' ci sono dati exif
|
||||||
|
Dim DatiExif As New ExifReader(CType(g, Bitmap))
|
||||||
|
DataFoto = DatiExif.DateTimeOriginal
|
||||||
|
TestoFirma = _TestoFirmaStart
|
||||||
|
If DataFoto.Year <> 1 Then
|
||||||
|
TestoFirmaPiccola = DataFoto.ToShortTimeString
|
||||||
|
If _UsaOrarioTestoApplicare = True Then
|
||||||
|
TestoFirma &= " - " & DataFoto.ToShortDateString & " " & DataFoto.ToLongTimeString
|
||||||
|
End If
|
||||||
|
If _UsaTempoGaraTestoApplicare = True Then
|
||||||
|
Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, DataPartenzaI, DataFoto) * 10000000)
|
||||||
|
TestoFirma &= " - " & _TestoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TestoFirma = _TestoFirmaStart
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim FotoRuotaADestra As Boolean = False
|
||||||
|
Dim FotoRuotaASinistra As Boolean = False
|
||||||
|
|
||||||
|
If _UsaRotazioneAutomatica = True Then
|
||||||
|
If g.PropertyIdList.Length > 0 Then ' ci sono dati exif
|
||||||
|
Dim DatiExif As New ExifReader(CType(g, Bitmap))
|
||||||
|
|
||||||
|
Select Case DatiExif.Orientation
|
||||||
|
Case ExifReader.Orientations.BottomLeft
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.BottomRight
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.LeftTop
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.LftBottom
|
||||||
|
FotoRuotaASinistra = True
|
||||||
|
Case ExifReader.Orientations.RightBottom
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.RightTop
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.TopLeft
|
||||||
|
|
||||||
|
Case ExifReader.Orientations.TopRight
|
||||||
|
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'rotazione
|
||||||
|
If FotoRuotaASinistra = True Then
|
||||||
|
g.RotateFlip(RotateFlipType.Rotate270FlipNone)
|
||||||
|
End If
|
||||||
|
If FotoRuotaADestra = True Then
|
||||||
|
g.RotateFlip(RotateFlipType.Rotate90FlipNone)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim thisFormat As System.Drawing.Imaging.ImageFormat = g.RawFormat
|
||||||
|
If _UsaForzaJpg = True Then
|
||||||
|
thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim thumbSizeSmall As New Size
|
||||||
|
Dim thumbSizeBig As New Size
|
||||||
|
Dim NomeFileSmall As String = ""
|
||||||
|
Dim NomeFileBig As String = ""
|
||||||
|
Dim NomeFileBig2 As String = ""
|
||||||
|
|
||||||
|
If g.Width > g.Height Then
|
||||||
|
thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza")
|
||||||
|
Dim SizeOrig As New Size(g.Width, g.Height)
|
||||||
|
thumbSizeBig = SizeOrig
|
||||||
|
Else
|
||||||
|
thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza")
|
||||||
|
Dim SizeOrig As New Size(g.Width, g.Height)
|
||||||
|
thumbSizeBig = SizeOrig
|
||||||
|
End If
|
||||||
|
|
||||||
|
NomeFileSmall = Suffisso & _NomeFileChild
|
||||||
|
NomeFileBig = _NomeFileChild
|
||||||
|
|
||||||
|
Dim imgOutputBig As New Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height)
|
||||||
|
imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution)
|
||||||
|
|
||||||
|
If _CreaMiniature = True Then
|
||||||
|
If _AggiungiScritteMiniature = False Then
|
||||||
|
If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then
|
||||||
|
NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4)
|
||||||
|
End If
|
||||||
|
If _UsaOrarioMiniatura = True Then
|
||||||
|
If TestoFirmaPiccola.Length > 0 Then
|
||||||
|
Dim imgOutputSmall As Bitmap
|
||||||
|
imgOutputSmall = CType(imgOutputBig.Clone, Bitmap)
|
||||||
|
|
||||||
|
Dim grPhoto1 As Graphics
|
||||||
|
grPhoto1 = Graphics.FromImage(imgOutputSmall)
|
||||||
|
grPhoto1.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
|
||||||
|
|
||||||
|
Dim crFont1 As Font = Nothing
|
||||||
|
Dim crSize1 As SizeF = New SizeF
|
||||||
|
Dim LarghezzaStandard1 As Integer
|
||||||
|
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont1 = New Font(IlFont, DimensioneStandardMiniatura, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont1 = New Font(_IlFont, DimensioneStandardMiniatura)
|
||||||
|
End If
|
||||||
|
|
||||||
|
crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1)
|
||||||
|
LarghezzaStandard1 = CType(crSize1.Width, Integer)
|
||||||
|
|
||||||
|
If crSize1.Width > CType(g.Width, Single) Then
|
||||||
|
Dim Conta As Integer = DimensioneStandardMiniatura
|
||||||
|
Do
|
||||||
|
If Conta > 20 Then
|
||||||
|
Conta -= 5
|
||||||
|
Else
|
||||||
|
Conta -= 1
|
||||||
|
End If
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont1 = New Font(_IlFont, Conta, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont1 = New Font(_IlFont, Conta)
|
||||||
|
End If
|
||||||
|
crSize1 = grPhoto1.MeasureString(TestoFirmaPiccola, crFont1)
|
||||||
|
If crSize1.Width < CType(g.Width, Single) Then
|
||||||
|
LarghezzaStandard1 = CType(crSize1.Width, Integer)
|
||||||
|
Exit Do
|
||||||
|
End If
|
||||||
|
If Conta <= 5 Then Exit Do
|
||||||
|
Loop
|
||||||
|
DimensioneStandardMiniatura = Conta
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim yPosFromBottom1 As Single
|
||||||
|
Select Case _Posizione.ToUpper
|
||||||
|
Case "ALTO"
|
||||||
|
yPosFromBottom1 = (_Margine)
|
||||||
|
|
||||||
|
Case "BASSO"
|
||||||
|
'yPosFromBottom = (g.Height - _Margine - DimensioneStandard)
|
||||||
|
'yPosFromBottom1 = CType((g.Height - crFont1.Height - (g.Height * _Margine / 100) - (crFont1.Height * 0.3)), Single)
|
||||||
|
yPosFromBottom1 = CType((g.Height - crSize1.Height - (g.Height * _Margine / 100)), Single)
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim xCenterOfImg1 As Single
|
||||||
|
Dim StrFormat1 As StringFormat = New StringFormat
|
||||||
|
Select Case _Allineamento.ToUpper
|
||||||
|
Case "SINISTRA"
|
||||||
|
xCenterOfImg1 = CType((_Margine + (LarghezzaStandard1 / 2)), Single)
|
||||||
|
If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then
|
||||||
|
xCenterOfImg1 = CType((g.Width / 2), Single)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "CENTRO"
|
||||||
|
xCenterOfImg1 = CType((g.Width / 2), Single)
|
||||||
|
|
||||||
|
Case "DESTRA"
|
||||||
|
xCenterOfImg1 = CType((g.Width - _Margine - (LarghezzaStandard1 / 2)), Single)
|
||||||
|
If (LarghezzaStandard1 / 2) > (g.Width / 2) - _Margine Then
|
||||||
|
xCenterOfImg1 = CType((g.Width / 2), Single)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
StrFormat1.Alignment = StringAlignment.Center
|
||||||
|
|
||||||
|
Dim semiTransBrush21 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0))
|
||||||
|
Dim semiTransBrush1 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB))
|
||||||
|
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont1 = New Font(_IlFont, DimensioneStandardMiniatura, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont1 = New Font(_IlFont, DimensioneStandardMiniatura)
|
||||||
|
End If
|
||||||
|
|
||||||
|
grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1)
|
||||||
|
grPhoto1.DrawString(TestoFirmaPiccola, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1)
|
||||||
|
|
||||||
|
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall), thisFormat)
|
||||||
|
Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall))
|
||||||
|
Dim imgOutputSmall2 As New Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
||||||
|
imgOutputSmall2.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat)
|
||||||
|
|
||||||
|
imgOutputSmall2.Dispose()
|
||||||
|
imgOutputSmall.Dispose()
|
||||||
|
g2.Dispose()
|
||||||
|
Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileSmall))
|
||||||
|
Else
|
||||||
|
Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
||||||
|
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat)
|
||||||
|
imgOutputSmall.Dispose()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
||||||
|
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat)
|
||||||
|
imgOutputSmall.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim grPhoto As Graphics
|
||||||
|
grPhoto = Graphics.FromImage(imgOutputBig)
|
||||||
|
grPhoto.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
|
||||||
|
|
||||||
|
Dim crFont As Font = Nothing
|
||||||
|
Dim crSize As SizeF = New SizeF
|
||||||
|
Dim LarghezzaStandard As Integer
|
||||||
|
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont = New Font(_IlFont, DimensioneStandard)
|
||||||
|
End If
|
||||||
|
crSize = grPhoto.MeasureString(TestoFirma, crFont)
|
||||||
|
LarghezzaStandard = CType(crSize.Width, Integer)
|
||||||
|
|
||||||
|
If crSize.Width > CType(g.Width, Single) Then
|
||||||
|
Dim Conta As Integer = DimensioneStandard
|
||||||
|
Do
|
||||||
|
If Conta > 20 Then
|
||||||
|
Conta -= 5
|
||||||
|
Else
|
||||||
|
Conta -= 1
|
||||||
|
End If
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont = New Font(_IlFont, Conta, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont = New Font(_IlFont, Conta)
|
||||||
|
End If
|
||||||
|
crSize = grPhoto.MeasureString(TestoFirma, crFont)
|
||||||
|
If crSize.Width < CType(g.Width, Single) Then
|
||||||
|
LarghezzaStandard = CType(crSize.Width, Integer)
|
||||||
|
Exit Do
|
||||||
|
End If
|
||||||
|
If Conta <= 5 Then Exit Do
|
||||||
|
Loop
|
||||||
|
DimensioneStandard = Conta
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim yPosFromBottom As Single
|
||||||
|
Select Case _Posizione.ToUpper
|
||||||
|
Case "ALTO"
|
||||||
|
yPosFromBottom = (_Margine)
|
||||||
|
|
||||||
|
Case "BASSO"
|
||||||
|
'yPosFromBottom = (g.Height - _Margine - DimensioneStandard)
|
||||||
|
'yPosFromBottom = CType((g.Height - DimensioneStandard - (g.Height * _Margine / 100) - (DimensioneStandard * 0.3)), Single)
|
||||||
|
yPosFromBottom = CType((g.Height - crSize.Height - (g.Height * _Margine / 100)), Single)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim xCenterOfImg As Single
|
||||||
|
Dim StrFormat As StringFormat = New StringFormat
|
||||||
|
Select Case _Allineamento.ToUpper
|
||||||
|
Case "SINISTRA"
|
||||||
|
xCenterOfImg = CType((_Margine + (LarghezzaStandard / 2)), Single)
|
||||||
|
If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then
|
||||||
|
xCenterOfImg = CType((g.Width / 2), Single)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "CENTRO"
|
||||||
|
xCenterOfImg = CType((g.Width / 2), Single)
|
||||||
|
|
||||||
|
Case "DESTRA"
|
||||||
|
xCenterOfImg = CType((g.Width - _Margine - (LarghezzaStandard / 2)), Single)
|
||||||
|
If (LarghezzaStandard / 2) > (g.Width / 2) - _Margine Then
|
||||||
|
xCenterOfImg = CType((g.Width / 2), Single)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
StrFormat.Alignment = StringAlignment.Center
|
||||||
|
|
||||||
|
Dim semiTransBrush2 As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, 0, 0, 0))
|
||||||
|
Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB))
|
||||||
|
|
||||||
|
If _Grassetto = True Then
|
||||||
|
crFont = New Font(_IlFont, DimensioneStandard, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
crFont = New Font(_IlFont, DimensioneStandard)
|
||||||
|
End If
|
||||||
|
|
||||||
|
grPhoto.DrawString(TestoFirma, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat)
|
||||||
|
grPhoto.DrawString(TestoFirma, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat)
|
||||||
|
|
||||||
|
If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then
|
||||||
|
NomeFileBig2 = NomeFileBig
|
||||||
|
NomeFileBig = NomeFileBig.Substring(0, NomeFileBig.Length - 4) & Codice & NomeFileBig.Substring(NomeFileBig.Length - 4)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'imgOutputBig
|
||||||
|
If _LogoAggiungi = True And File.Exists(_LogoNomeFile) Then
|
||||||
|
|
||||||
|
Dim ImmagineLogo As Image = Image.FromFile(_LogoNomeFile)
|
||||||
|
|
||||||
|
Dim LogoColoreTrasparente As Color = Color.White
|
||||||
|
'Dim bmWatermark As Bitmap
|
||||||
|
|
||||||
|
'* Create a Bitmap based on the previously modified photograph Bitmap
|
||||||
|
'bmWatermark = New Bitmap(imgOutputBig)
|
||||||
|
'bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution)
|
||||||
|
|
||||||
|
'* Load this Bitmap into a new Graphic Object
|
||||||
|
Dim grWatermark As Graphics = Graphics.FromImage(imgOutputBig)
|
||||||
|
|
||||||
|
'* To achieve a transulcent watermark we will apply (2) color manipulations
|
||||||
|
Dim imageAttributes As Imaging.ImageAttributes = New Imaging.ImageAttributes
|
||||||
|
|
||||||
|
'* The first step replace the background color with one that is trasparent (Alpha=0, R=0, G=0, B=0)
|
||||||
|
Dim colorMap As Imaging.ColorMap = New Imaging.ColorMap
|
||||||
|
|
||||||
|
'* background this will be the color we search for and replace with transparency
|
||||||
|
colorMap.OldColor = LogoColoreTrasparente
|
||||||
|
colorMap.NewColor = Color.FromArgb(0, 0, 0, 0)
|
||||||
|
|
||||||
|
Dim remapTable As Imaging.ColorMap() = {colorMap}
|
||||||
|
imageAttributes.SetRemapTable(remapTable, Imaging.ColorAdjustType.Bitmap)
|
||||||
|
|
||||||
|
'* The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f
|
||||||
|
Dim colorMatrixElements As Single()() = {New Single() {1.0F, 0.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 1.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 1.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, CType(_LogoTrasparenza, Single) / 100, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, 0.0F, 1.0F}}
|
||||||
|
Dim wmColorMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(colorMatrixElements)
|
||||||
|
imageAttributes.SetColorMatrix(wmColorMatrix, Imaging.ColorMatrixFlag.Default, Imaging.ColorAdjustType.Bitmap)
|
||||||
|
|
||||||
|
Dim FotoLogoH As Integer = _LogoAltezza
|
||||||
|
Dim FotoLogoW As Integer = _LogoLarghezza
|
||||||
|
Dim FattoreAlt As Double = ImmagineLogo.Height / FotoLogoH
|
||||||
|
Dim FattoreLarg As Double = ImmagineLogo.Width / FotoLogoW
|
||||||
|
Dim NuovaSize As Size
|
||||||
|
If FattoreLarg > FattoreAlt Then
|
||||||
|
NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza")
|
||||||
|
Else
|
||||||
|
NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim MargineUsato As Integer
|
||||||
|
Dim MargineL As Integer
|
||||||
|
Dim InPercentualeL As Boolean
|
||||||
|
If _LogoMargine.EndsWith("%") = True Then
|
||||||
|
InPercentualeL = True
|
||||||
|
Else
|
||||||
|
InPercentualeL = False
|
||||||
|
End If
|
||||||
|
MargineL = CType(Val(_LogoMargine), Integer)
|
||||||
|
If InPercentualeL = True Then
|
||||||
|
MargineUsato = CType(imgOutputBig.Height * MargineL / 100, Integer)
|
||||||
|
Else
|
||||||
|
MargineUsato = MargineL
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim xPosOfWm As Integer
|
||||||
|
Dim yPosOfWm As Integer
|
||||||
|
Select Case _LogoPosizioneH.ToUpper
|
||||||
|
Case "SINISTRA", "NESSUNA"
|
||||||
|
xPosOfWm = MargineUsato
|
||||||
|
|
||||||
|
Case "CENTRO"
|
||||||
|
xPosOfWm = CType((imgOutputBig.Width - NuovaSize.Width) / 2, Integer)
|
||||||
|
|
||||||
|
Case "DESTRA"
|
||||||
|
xPosOfWm = ((imgOutputBig.Width - NuovaSize.Width) - MargineUsato)
|
||||||
|
End Select
|
||||||
|
Select Case _LogoPosizioneV.ToUpper
|
||||||
|
Case "ALTO", "NESSUNA"
|
||||||
|
yPosOfWm = MargineUsato
|
||||||
|
|
||||||
|
Case "CENTRO"
|
||||||
|
yPosOfWm = CType((imgOutputBig.Height - NuovaSize.Height) / 2, Integer)
|
||||||
|
|
||||||
|
Case "BASSO"
|
||||||
|
yPosOfWm = ((imgOutputBig.Height - NuovaSize.Height) - MargineUsato)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
grWatermark.DrawImage(ImmagineLogo, New Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes)
|
||||||
|
grWatermark.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If _FotoGrandeDimOrigina = False Then
|
||||||
|
imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat)
|
||||||
|
Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig))
|
||||||
|
If g2.Width > g2.Height Then
|
||||||
|
thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _LarghezzaBig, "Larghezza")
|
||||||
|
Else
|
||||||
|
thumbSizeBig = NewthumbSize(g2.Width, g2.Height, _AltezzaBig, "Altezza")
|
||||||
|
End If
|
||||||
|
Dim imgOutputBig2 As New Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height)
|
||||||
|
imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat)
|
||||||
|
imgOutputBig2.Dispose()
|
||||||
|
imgOutputBig.Dispose()
|
||||||
|
g2.Dispose()
|
||||||
|
Else
|
||||||
|
imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat)
|
||||||
|
imgOutputBig.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If _CreaMiniature = True Then
|
||||||
|
If _AggiungiScritteMiniature = True Then
|
||||||
|
Dim g1 As System.Drawing.Image
|
||||||
|
If _FotoGrandeDimOrigina = False Then
|
||||||
|
g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig))
|
||||||
|
Else
|
||||||
|
g1 = System.Drawing.Image.FromFile(Path.Combine(_DestDir.FullName, NomeFileBig))
|
||||||
|
End If
|
||||||
|
Dim imgOutputSmall As New Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
||||||
|
If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then
|
||||||
|
NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4)
|
||||||
|
End If
|
||||||
|
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat)
|
||||||
|
imgOutputSmall.Dispose()
|
||||||
|
g1.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If File.Exists(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig)) = True Then
|
||||||
|
Kill(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig))
|
||||||
|
End If
|
||||||
|
|
||||||
|
g.Dispose()
|
||||||
|
grPhoto.Dispose()
|
||||||
|
|
||||||
|
If _DirectorySorgente.ToUpper = _DirectoryDestinazione.ToUpper Then
|
||||||
|
Kill(Path.Combine(_SourceDir.FullName, NomeFileBig2))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size
|
||||||
|
' Calculate the Size of the New image
|
||||||
|
'*** Larghezza, Altezza, Auto
|
||||||
|
|
||||||
|
Dim tempMultiplier As Double
|
||||||
|
|
||||||
|
If TipoSize.ToUpper = "Larghezza".ToUpper Then
|
||||||
|
tempMultiplier = MaxPixel / currentwidth
|
||||||
|
ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then
|
||||||
|
tempMultiplier = MaxPixel / currentheight
|
||||||
|
Else
|
||||||
|
If currentheight > currentwidth Then ' portrait
|
||||||
|
tempMultiplier = MaxPixel / currentheight
|
||||||
|
Else
|
||||||
|
tempMultiplier = MaxPixel / currentwidth
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier))
|
||||||
|
|
||||||
|
Return NewSize
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Property DirectorySorgente() As String
|
||||||
|
Get
|
||||||
|
Return _DirectorySorgente
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_DirectorySorgente = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DirectoryDestinazione() As String
|
||||||
|
Get
|
||||||
|
Return _DirectoryDestinazione
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_DirectoryDestinazione = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property SourceDir() As DirectoryInfo
|
||||||
|
Get
|
||||||
|
Return _SourceDir
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As DirectoryInfo)
|
||||||
|
_SourceDir = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DestDirStart() As DirectoryInfo
|
||||||
|
Get
|
||||||
|
Return _DestDirStart
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As DirectoryInfo)
|
||||||
|
_DestDirStart = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Property TestoFirmaStart() As String
|
||||||
|
Get
|
||||||
|
Return _TestoFirmaStart
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_TestoFirmaStart = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property TestoFirmaStartV() As String
|
||||||
|
Get
|
||||||
|
Return _TestoFirmaStartV
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_TestoFirmaStartV = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DataPartenza() As DateTime
|
||||||
|
Get
|
||||||
|
Return _DataPartenza
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As DateTime)
|
||||||
|
_DataPartenza = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property TestoOrario() As String
|
||||||
|
Get
|
||||||
|
Return _TestoOrario
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_TestoOrario = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DimStandard() As Integer
|
||||||
|
Get
|
||||||
|
Return _DimStandard
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_DimStandard = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DimStandardMiniatura() As Integer
|
||||||
|
Get
|
||||||
|
Return _DimStandardMiniatura
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_DimStandardMiniatura = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property UsaOrarioMiniatura() As Boolean
|
||||||
|
Get
|
||||||
|
Return _UsaOrarioMiniatura
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_UsaOrarioMiniatura = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property UsaOrarioTestoApplicare() As Boolean
|
||||||
|
Get
|
||||||
|
Return _UsaOrarioTestoApplicare
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_UsaOrarioTestoApplicare = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property UsaTempoGaraTestoApplicare() As Boolean
|
||||||
|
Get
|
||||||
|
Return _UsaTempoGaraTestoApplicare
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_UsaTempoGaraTestoApplicare = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property UsaRotazioneAutomatica() As Boolean
|
||||||
|
Get
|
||||||
|
Return _UsaRotazioneAutomatica
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_UsaRotazioneAutomatica = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property UsaForzaJpg() As Boolean
|
||||||
|
Get
|
||||||
|
Return _UsaForzaJpg
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_UsaForzaJpg = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Property LarghezzaSmall() As Integer
|
||||||
|
Get
|
||||||
|
Return _LarghezzaSmall
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_LarghezzaSmall = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property AltezzaSmall() As Integer
|
||||||
|
Get
|
||||||
|
Return _AltezzaSmall
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_AltezzaSmall = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property CreaMiniature() As Boolean
|
||||||
|
Get
|
||||||
|
Return _CreaMiniature
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_CreaMiniature = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property AggiungiScritteMiniature() As Boolean
|
||||||
|
Get
|
||||||
|
Return _AggiungiScritteMiniature
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_AggiungiScritteMiniature = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property NomeFileChild() As String
|
||||||
|
Get
|
||||||
|
Return _NomeFileChild
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_NomeFileChild = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Suffisso() As String
|
||||||
|
Get
|
||||||
|
Return _Suffisso
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_Suffisso = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Codice() As String
|
||||||
|
Get
|
||||||
|
Return _Codice
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_Codice = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property Trasparenza() As Integer
|
||||||
|
Get
|
||||||
|
Return _Trasparenza
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_Trasparenza = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property IlFont() As String
|
||||||
|
Get
|
||||||
|
Return _IlFont
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_IlFont = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Grassetto() As Boolean
|
||||||
|
Get
|
||||||
|
Return _Grassetto
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_Grassetto = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Posizione() As String
|
||||||
|
Get
|
||||||
|
Return _Posizione
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_Posizione = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Allineamento() As String
|
||||||
|
Get
|
||||||
|
Return _Allineamento
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_Allineamento = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Margine() As Integer
|
||||||
|
Get
|
||||||
|
Return _Margine
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_Margine = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoAltezza() As Integer
|
||||||
|
Get
|
||||||
|
Return _LogoAltezza
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_LogoAltezza = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoLarghezza() As Integer
|
||||||
|
Get
|
||||||
|
Return _LogoLarghezza
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_LogoLarghezza = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FontColoreR() As Integer
|
||||||
|
Get
|
||||||
|
Return _FontColoreR
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_FontColoreR = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FontColoreG() As Integer
|
||||||
|
Get
|
||||||
|
Return _FontColoreG
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_FontColoreG = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FontColoreB() As Integer
|
||||||
|
Get
|
||||||
|
Return _FontColoreB
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_FontColoreB = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoAggiungi() As Boolean
|
||||||
|
Get
|
||||||
|
Return _LogoAggiungi
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_LogoAggiungi = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoNomeFile() As String
|
||||||
|
Get
|
||||||
|
Return _LogoNomeFile
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_LogoNomeFile = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoTrasparenza() As String
|
||||||
|
Get
|
||||||
|
Return _LogoTrasparenza
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_LogoTrasparenza = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoMargine() As String
|
||||||
|
Get
|
||||||
|
Return _LogoMargine
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_LogoMargine = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoPosizioneH() As String
|
||||||
|
Get
|
||||||
|
Return _LogoPosizioneH
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_LogoPosizioneH = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LogoPosizioneV() As String
|
||||||
|
Get
|
||||||
|
Return _LogoPosizioneV
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_LogoPosizioneV = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FotoGrandeDimOrigina() As Boolean
|
||||||
|
Get
|
||||||
|
Return _FotoGrandeDimOrigina
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Boolean)
|
||||||
|
_FotoGrandeDimOrigina = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property AltezzaBig() As Integer
|
||||||
|
Get
|
||||||
|
Return _AltezzaBig
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_AltezzaBig = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property LarghezzaBig() As Integer
|
||||||
|
Get
|
||||||
|
Return _LarghezzaBig
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Integer)
|
||||||
|
_LarghezzaBig = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DestDir() As DirectoryInfo
|
||||||
|
Get
|
||||||
|
Return _DestDir
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As DirectoryInfo)
|
||||||
|
_DestDir = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
1721
imagecatalog.backup/CreaImmagineSeparateThread.cs
Normal file
1721
imagecatalog.backup/CreaImmagineSeparateThread.cs
Normal file
File diff suppressed because it is too large
Load diff
1409
imagecatalog.backup/CreaImmagineSeparateThread.vb
Normal file
1409
imagecatalog.backup/CreaImmagineSeparateThread.vb
Normal file
File diff suppressed because it is too large
Load diff
1190
imagecatalog.backup/ExifReader.cs
Normal file
1190
imagecatalog.backup/ExifReader.cs
Normal file
File diff suppressed because it is too large
Load diff
1068
imagecatalog.backup/ExifReader.vb
Normal file
1068
imagecatalog.backup/ExifReader.vb
Normal file
File diff suppressed because it is too large
Load diff
261
imagecatalog.backup/FileHelper.cs
Normal file
261
imagecatalog.backup/FileHelper.cs
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Preparazione per la separazione
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filesPerFolder"></param>
|
||||||
|
/// <param name="suffix"></param>
|
||||||
|
/// <param name="counterSize"></param>
|
||||||
|
/// <param name="numerationType"></param>
|
||||||
|
/// <remarks></remarks>
|
||||||
|
public FileHelper(int filesPerFolder, string suffix, int counterSize, int numerationType)
|
||||||
|
{
|
||||||
|
this.filesPerFolder = filesPerFolder;
|
||||||
|
this.suffix = suffix;
|
||||||
|
this.counterSize = counterSize;
|
||||||
|
this.numerationType = numerationType;
|
||||||
|
separateFiles = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// nessuna separazione
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks></remarks>
|
||||||
|
public FileHelper()
|
||||||
|
{
|
||||||
|
separateFiles = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<FileInfo, DirectoryInfo> GetFilesRecursive(DirectoryInfo root, DirectoryInfo destRoot, string filter)
|
||||||
|
{
|
||||||
|
var dirSourceDest = new Dictionary<FileInfo, DirectoryInfo>();
|
||||||
|
var result = new List<FileInfo>();
|
||||||
|
|
||||||
|
// Dim stack As New Stack(Of DirectoryInfo)
|
||||||
|
var stack = new Stack<KeyValuePair<DirectoryInfo, DirectoryInfo>>();
|
||||||
|
this.filter = filter;
|
||||||
|
var pair = new KeyValuePair<DirectoryInfo, DirectoryInfo>();
|
||||||
|
|
||||||
|
|
||||||
|
// stack.Push(root)
|
||||||
|
stack.Push(new KeyValuePair<DirectoryInfo, DirectoryInfo>(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<DirectoryInfo, DirectoryInfo>(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<FileInfo, DirectoryInfo> appendDictionary(Dictionary<FileInfo, DirectoryInfo> dictA, Dictionary<FileInfo, DirectoryInfo> dictB)
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<FileInfo, DirectoryInfo> 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<FileInfo, DirectoryInfo> getAllFilesInDir(DirectoryInfo dir, DirectoryInfo dirDest)
|
||||||
|
{
|
||||||
|
var dict = new Dictionary<FileInfo, DirectoryInfo>();
|
||||||
|
foreach (FileInfo File in dir.GetFiles(filter))
|
||||||
|
dict.Add(File, new DirectoryInfo(Path.Combine(dirDest.FullName, File.Name)));
|
||||||
|
return dict;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<FileInfo, DirectoryInfo> 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<FileInfo, DirectoryInfo>();
|
||||||
|
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<FileInfo, DirectoryInfo> 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<FileInfo, DirectoryInfo>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
252
imagecatalog.backup/FileHelper.vb
Normal file
252
imagecatalog.backup/FileHelper.vb
Normal file
|
|
@ -0,0 +1,252 @@
|
||||||
|
Imports System.Collections.Concurrent
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Collections.Generic
|
||||||
|
Imports MaddoShared
|
||||||
|
|
||||||
|
Public Class FileHelper
|
||||||
|
'Private dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Private filesPerFolder As Integer
|
||||||
|
Private suffix As String
|
||||||
|
Private counterSize As Integer
|
||||||
|
Private numerationType As Integer
|
||||||
|
Private filter As String
|
||||||
|
Private separateFiles As Boolean
|
||||||
|
Private extensions As String = "*.jpg,*.png,*.gif"
|
||||||
|
|
||||||
|
|
||||||
|
Public Enum numerazione
|
||||||
|
Progressiva
|
||||||
|
Files
|
||||||
|
End Enum
|
||||||
|
''' <summary>
|
||||||
|
''' Preparazione per la separazione
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="filesPerFolder"></param>
|
||||||
|
''' <param name="suffix"></param>
|
||||||
|
''' <param name="counterSize"></param>
|
||||||
|
''' <param name="numerationType"></param>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Sub New(ByVal filesPerFolder As Integer, ByVal suffix As String, ByVal counterSize As Integer, ByVal numerationType As Integer)
|
||||||
|
Me.filesPerFolder = filesPerFolder
|
||||||
|
Me.suffix = suffix
|
||||||
|
Me.counterSize = counterSize
|
||||||
|
Me.numerationType = numerationType
|
||||||
|
Me.separateFiles = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' nessuna separazione
|
||||||
|
''' </summary>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Sub New()
|
||||||
|
Me.separateFiles = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetFilesRecursive(ByVal root As DirectoryInfo, ByVal destRoot As DirectoryInfo, ByVal filter As String) As Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Dim dirSourceDest As New Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Dim result As New List(Of FileInfo)
|
||||||
|
|
||||||
|
'Dim stack As New Stack(Of DirectoryInfo)
|
||||||
|
Dim stack As New Stack(Of KeyValuePair(Of DirectoryInfo, DirectoryInfo))
|
||||||
|
|
||||||
|
|
||||||
|
Me.filter = filter
|
||||||
|
Dim pair As New KeyValuePair(Of DirectoryInfo, DirectoryInfo)
|
||||||
|
|
||||||
|
|
||||||
|
'stack.Push(root)
|
||||||
|
stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(root, destRoot))
|
||||||
|
|
||||||
|
Do While (stack.Count > 0)
|
||||||
|
Dim curDirKV As KeyValuePair(Of DirectoryInfo, DirectoryInfo) = stack.Pop
|
||||||
|
'curDirKP = stack.Pop()
|
||||||
|
Dim dir As DirectoryInfo = curDirKV.Key
|
||||||
|
Dim dDir As DirectoryInfo = curDirKV.Value
|
||||||
|
Try
|
||||||
|
'result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly))
|
||||||
|
' dividere file qui
|
||||||
|
If filesPerFolder > 0 And separateFiles Then
|
||||||
|
appendDictionary(dirSourceDest, dividiFilesInDir(dir, dDir))
|
||||||
|
Else
|
||||||
|
appendDictionary(dirSourceDest, getAllFilesInDir(dir, dDir))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Each subDirectory As DirectoryInfo In dir.GetDirectories
|
||||||
|
stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(subDirectory, New DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name))))
|
||||||
|
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
Dim e As Exception = ex.Demystify()
|
||||||
|
Console.WriteLine(e)
|
||||||
|
Console.WriteLine(e.Message)
|
||||||
|
Console.WriteLine(e.StackTrace)
|
||||||
|
End Try
|
||||||
|
Loop
|
||||||
|
|
||||||
|
Return dirSourceDest
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Public Class FileData
|
||||||
|
' Public File As FileInfo
|
||||||
|
' Public Directory As DirectoryInfo
|
||||||
|
' Public Sub New(newFile As FileInfo, newDirectory As DirectoryInfo)
|
||||||
|
' File = newFile
|
||||||
|
' Directory = newDirectory
|
||||||
|
' End Sub
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
'Public Function GetFilesRecursiveParallel(ByVal root As DirectoryInfo, ByVal destRoot As DirectoryInfo, ByVal filter As String) As List(Of FileData)
|
||||||
|
|
||||||
|
|
||||||
|
' Dim dirSourceDest As New ConcurrentDictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
' Dim result As New List(Of FileInfo)
|
||||||
|
|
||||||
|
' 'Dim stack As New Stack(Of DirectoryInfo)
|
||||||
|
' Dim stack As New Stack(Of KeyValuePair(Of DirectoryInfo, DirectoryInfo))
|
||||||
|
|
||||||
|
|
||||||
|
' Me.filter = filter
|
||||||
|
' Dim pair As New KeyValuePair(Of DirectoryInfo, DirectoryInfo)
|
||||||
|
|
||||||
|
|
||||||
|
' 'stack.Push(root)
|
||||||
|
' stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(root, destRoot))
|
||||||
|
|
||||||
|
' Do While (stack.Count > 0)
|
||||||
|
' Dim curDirKV As KeyValuePair(Of DirectoryInfo, DirectoryInfo) = stack.Pop
|
||||||
|
' 'curDirKP = stack.Pop()
|
||||||
|
' Dim dir As DirectoryInfo = curDirKV.Key
|
||||||
|
' Dim dDir As DirectoryInfo = curDirKV.Value
|
||||||
|
' Try
|
||||||
|
' 'result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly))
|
||||||
|
' ' dividere file qui
|
||||||
|
' If filesPerFolder > 0 And separateFiles Then
|
||||||
|
' AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir))
|
||||||
|
' Else
|
||||||
|
' AppendDictionaryConcurrent(dirSourceDest, DividiFilesInDirConcurrent(dir, dDir))
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' For Each subDirectory As DirectoryInfo In dir.GetDirectories
|
||||||
|
' stack.Push(New KeyValuePair(Of DirectoryInfo, DirectoryInfo)(subDirectory, New DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name))))
|
||||||
|
|
||||||
|
' Next
|
||||||
|
' Catch ex As Exception
|
||||||
|
' ' TODO: FARE QUALCOSA
|
||||||
|
' End Try
|
||||||
|
' Loop
|
||||||
|
|
||||||
|
' Dim resultData As New List(Of FileData)
|
||||||
|
' resultData.AddRange(From p In dirSourceDest Select New FileData(p.Key, p.Value))
|
||||||
|
' Return resultData
|
||||||
|
' 'Return dirSourceDest
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Public Function appendDictionary(ByVal dictA As Dictionary(Of FileInfo, DirectoryInfo), ByVal dictB As Dictionary(Of FileInfo, DirectoryInfo)) As Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
For Each pair As KeyValuePair(Of FileInfo, DirectoryInfo) In dictB
|
||||||
|
dictA.Add(pair.Key, pair.Value)
|
||||||
|
Next
|
||||||
|
Return dictA
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Public Function AppendDictionaryConcurrent(ByVal dictA As ConcurrentDictionary(Of FileInfo, DirectoryInfo), ByVal dictB As ConcurrentDictionary(Of FileInfo, DirectoryInfo)) As ConcurrentDictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
' For Each pair As KeyValuePair(Of FileInfo, DirectoryInfo) In dictB
|
||||||
|
' dictA.TryAdd(pair.Key, pair.Value)
|
||||||
|
' 'dictA.Add(pair.Key, pair.Value)
|
||||||
|
' Next
|
||||||
|
' Return dictA
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Public Function getAllFilesInDir(dir As DirectoryInfo, dirDest As DirectoryInfo) As Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Dim dict As New Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
For Each File As FileInfo In dir.GetFiles(filter)
|
||||||
|
dict.Add(File, New DirectoryInfo(Path.Combine(dirDest.FullName, File.Name)))
|
||||||
|
|
||||||
|
Next
|
||||||
|
Return dict
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function dividiFilesInDir(dir As DirectoryInfo, dirDest As DirectoryInfo) As Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Dim filesCount As Integer = dir.GetFiles(filter).Count
|
||||||
|
Dim contaFilePerDir As Integer = 0
|
||||||
|
Dim contaDirPerDir As Integer = 0
|
||||||
|
Dim tempText As String = String.Empty
|
||||||
|
Dim foldersDict As New Dictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
|
||||||
|
Dim destDir As DirectoryInfo
|
||||||
|
destDir = New DirectoryInfo(Path.Combine(dirDest.FullName))
|
||||||
|
For Each file As FileInfo In dir.GetFiles(filter)
|
||||||
|
|
||||||
|
contaFilePerDir += 1
|
||||||
|
|
||||||
|
If contaFilePerDir = (contaDirPerDir * filesPerFolder) + 1 Then
|
||||||
|
contaDirPerDir += 1
|
||||||
|
|
||||||
|
If numerationType = numerazione.Progressiva Then
|
||||||
|
tempText = contaDirPerDir.ToString
|
||||||
|
Else
|
||||||
|
tempText = (contaDirPerDir * filesPerFolder).ToString
|
||||||
|
End If
|
||||||
|
Dim i As Integer
|
||||||
|
For i = 1 To (counterSize - tempText.Length)
|
||||||
|
tempText = "0" & tempText
|
||||||
|
Next
|
||||||
|
destDir = New DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not destDir.Exists Then
|
||||||
|
destDir.Create()
|
||||||
|
End If
|
||||||
|
|
||||||
|
foldersDict.Add(file, destDir)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return foldersDict
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function DividiFilesInDirConcurrent(dir As DirectoryInfo, dirDest As DirectoryInfo) As ConcurrentDictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
Dim filesCount As Integer = dir.GetFiles(filter).Count
|
||||||
|
Dim contaFilePerDir As Integer = 0
|
||||||
|
Dim contaDirPerDir As Integer = 0
|
||||||
|
Dim tempText As String = String.Empty
|
||||||
|
Dim foldersDict As New ConcurrentDictionary(Of FileInfo, DirectoryInfo)
|
||||||
|
|
||||||
|
Dim destDir As DirectoryInfo
|
||||||
|
destDir = New DirectoryInfo(Path.Combine(dirDest.FullName))
|
||||||
|
For Each file As FileInfo In dir.GetFiles(filter)
|
||||||
|
|
||||||
|
contaFilePerDir += 1
|
||||||
|
|
||||||
|
If contaFilePerDir = (contaDirPerDir * filesPerFolder) + 1 Then
|
||||||
|
contaDirPerDir += 1
|
||||||
|
|
||||||
|
If numerationType = numerazione.Progressiva Then
|
||||||
|
tempText = contaDirPerDir.ToString
|
||||||
|
Else
|
||||||
|
tempText = (contaDirPerDir * filesPerFolder).ToString
|
||||||
|
End If
|
||||||
|
Dim i As Integer
|
||||||
|
For i = 1 To (counterSize - tempText.Length)
|
||||||
|
tempText = "0" & tempText
|
||||||
|
Next
|
||||||
|
destDir = New DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not destDir.Exists Then
|
||||||
|
destDir.Create()
|
||||||
|
End If
|
||||||
|
|
||||||
|
foldersDict.TryAdd(file, destDir)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return foldersDict
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
4
imagecatalog.backup/FodyWeavers.xml
Normal file
4
imagecatalog.backup/FodyWeavers.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||||
|
<Costura />
|
||||||
|
</Weavers>
|
||||||
111
imagecatalog.backup/FodyWeavers.xsd
Normal file
111
imagecatalog.backup/FodyWeavers.xsd
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||||
|
<xs:element name="Weavers">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
3281
imagecatalog.backup/Form1.cs
Normal file
3281
imagecatalog.backup/Form1.cs
Normal file
File diff suppressed because it is too large
Load diff
120
imagecatalog.backup/Form1.resx
Normal file
120
imagecatalog.backup/Form1.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
2946
imagecatalog.backup/Form1.vb
Normal file
2946
imagecatalog.backup/Form1.vb
Normal file
File diff suppressed because it is too large
Load diff
371
imagecatalog.backup/ImageCatalog 2.csproj
Normal file
371
imagecatalog.backup/ImageCatalog 2.csproj
Normal file
|
|
@ -0,0 +1,371 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectType>Local</ProjectType>
|
||||||
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{3F1E23DB-435E-0590-1EF5-735E898DBA3C}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon>
|
||||||
|
</ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>ImageCatalog</AssemblyName>
|
||||||
|
<AssemblyOriginatorKeyFile>
|
||||||
|
</AssemblyOriginatorKeyFile>
|
||||||
|
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
<OptionStrict>On</OptionStrict>
|
||||||
|
<RootNamespace>ImageCatalog</RootNamespace>
|
||||||
|
<StartupObject>ImageCatalog.My.MyApplication</StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<MyType>WindowsForms</MyType>
|
||||||
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||||
|
<TargetFrameworkProfile>
|
||||||
|
</TargetFrameworkProfile>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<PublishUrl>\\casa-storage\Foto\catolg\parallel2.0\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Unc</InstallFrom>
|
||||||
|
<UpdateEnabled>true</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
|
<WebPage>publish.htm</WebPage>
|
||||||
|
<ApplicationRevision>1</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.8.0.%2a</ApplicationVersion>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>bin\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<RegisterForComInterop>false</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>bin\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<DebugSymbols>false</DebugSymbols>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<RegisterForComInterop>false</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>bin\x64\Debug\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>bin\x64\Release\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>bin\x86\Debug\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Release\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>bin\x86\Release\ImageCatalog.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestCertificateThumbprint>6BFA075A69837045D051A6F7B6CAD4961D53335E</ManifestCertificateThumbprint>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestKeyFile>ImageCatalog 2_TemporaryKey.pfx</ManifestKeyFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<GenerateManifests>true</GenerateManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SignManifests>true</SignManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0" />
|
||||||
|
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System">
|
||||||
|
<Name>System</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data">
|
||||||
|
<Name>System.Data</Name>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing">
|
||||||
|
<Name>System.Drawing</Name>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms">
|
||||||
|
<Name>System.Windows.Forms</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Name>System.XML</Name>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Windows.Forms" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="My Project\MyNamespace.Dynamic.Designer.cs" />
|
||||||
|
<Compile Include="My Project\MyNamespace.Static.1.Designer.cs" />
|
||||||
|
<Compile Include="AssemblyInfo.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FileHelper.cs" />
|
||||||
|
<Compile Include="CreaImmagineSeparateMultiCore.cs" />
|
||||||
|
<Compile Include="CreaImmagineSeparateThread.cs" />
|
||||||
|
<Compile Include="ExifReader.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LoadBuffer.cs" />
|
||||||
|
<Compile Include="MainForm.Designer.cs">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Module2.cs" />
|
||||||
|
<Compile Include="My Project\Application.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PicSettings.cs" />
|
||||||
|
<Compile Include="XYThreadPool.cs" />
|
||||||
|
<Compile Include="Module1.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ParametriSetup.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="ImageCatalog 2_TemporaryKey.pfx" />
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="ClassDiagram1.cd" />
|
||||||
|
<None Include="My Project\app.manifest" />
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<CustomToolNamespace>ImageCatalog.My</CustomToolNamespace>
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Windows Installer 3.1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Sorgenti\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj">
|
||||||
|
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
||||||
|
<Name>CatalogVbLib</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj">
|
||||||
|
<Project>{aebfe9e3-277c-4a7b-8448-145d1b11998b}</Project>
|
||||||
|
<Name>MaddoShared</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
341
imagecatalog.backup/ImageCatalog 2.vbproj
Normal file
341
imagecatalog.backup/ImageCatalog 2.vbproj
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectType>Local</ProjectType>
|
||||||
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon>
|
||||||
|
</ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>ImageCatalog</AssemblyName>
|
||||||
|
<AssemblyOriginatorKeyFile>
|
||||||
|
</AssemblyOriginatorKeyFile>
|
||||||
|
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
<OptionStrict>On</OptionStrict>
|
||||||
|
<RootNamespace>ImageCatalog</RootNamespace>
|
||||||
|
<StartupObject>ImageCatalog.My.MyApplication</StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<MyType>WindowsForms</MyType>
|
||||||
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||||
|
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||||
|
<TargetFrameworkProfile>
|
||||||
|
</TargetFrameworkProfile>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
<PublishUrl>http://localhost/ImageCatalog/</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Web</InstallFrom>
|
||||||
|
<UpdateEnabled>true</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.8.0.%2a</ApplicationVersion>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<RegisterForComInterop>false</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<DebugSymbols>false</DebugSymbols>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<RegisterForComInterop>false</RegisterForComInterop>
|
||||||
|
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.vb</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Release\</OutputPath>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<DocumentationFile>ImageCatalog.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<WarningLevel>1</WarningLevel>
|
||||||
|
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.vb</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0" />
|
||||||
|
<Reference Include="System">
|
||||||
|
<Name>System</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data">
|
||||||
|
<Name>System.Data</Name>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing">
|
||||||
|
<Name>System.Drawing</Name>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms">
|
||||||
|
<Name>System.Windows.Forms</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Name>System.XML</Name>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Windows.Forms" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssemblyInfo.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FileHelper.vb" />
|
||||||
|
<Compile Include="CreaImmagineSeparateMultiCore.vb" />
|
||||||
|
<Compile Include="CreaImmagineSeparateThread.vb" />
|
||||||
|
<Compile Include="ExifReader.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LoadBuffer.vb" />
|
||||||
|
<Compile Include="MainForm.Designer.vb">
|
||||||
|
<DependentUpon>MainForm.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Module2.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PicSettings.vb" />
|
||||||
|
<Compile Include="XYThreadPool.vb" />
|
||||||
|
<Compile Include="Module1.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ParametriSetup.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.vb</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
|
<DependentUpon>MainForm.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="ClassDiagram1.cd" />
|
||||||
|
<None Include="My Project\app.manifest" />
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Windows Installer 3.1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Sorgenti\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj">
|
||||||
|
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
||||||
|
<Name>CatalogVbLib</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj">
|
||||||
|
<Project>{aebfe9e3-277c-4a7b-8448-145d1b11998b}</Project>
|
||||||
|
<Name>MaddoShared</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
13
imagecatalog.backup/LoadBuffer.cs
Normal file
13
imagecatalog.backup/LoadBuffer.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace ImageCatalog
|
||||||
|
{
|
||||||
|
public class LoadBuffer
|
||||||
|
{
|
||||||
|
public List<Image> imageList = new List<Image>();
|
||||||
|
public List<FileInfo> picSourceList = new List<FileInfo>();
|
||||||
|
public List<List<FileInfo>> dirSourceList = new List<List<FileInfo>>();
|
||||||
|
}
|
||||||
|
}
|
||||||
9
imagecatalog.backup/LoadBuffer.vb
Normal file
9
imagecatalog.backup/LoadBuffer.vb
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
Imports System.Collections.Generic
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class LoadBuffer
|
||||||
|
Public imageList As New List(Of System.Drawing.Image)
|
||||||
|
Public picSourceList As New List(Of FileInfo)
|
||||||
|
Public dirSourceList As New List(Of List(Of FileInfo))
|
||||||
|
|
||||||
|
End Class
|
||||||
2159
imagecatalog.backup/MainForm.Designer.cs
generated
Normal file
2159
imagecatalog.backup/MainForm.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
1798
imagecatalog.backup/MainForm.Designer.vb
generated
Normal file
1798
imagecatalog.backup/MainForm.Designer.vb
generated
Normal file
File diff suppressed because it is too large
Load diff
1704
imagecatalog.backup/MainForm.cs
Normal file
1704
imagecatalog.backup/MainForm.cs
Normal file
File diff suppressed because it is too large
Load diff
123
imagecatalog.backup/MainForm.resx
Normal file
123
imagecatalog.backup/MainForm.resx
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
1502
imagecatalog.backup/MainForm.vb
Normal file
1502
imagecatalog.backup/MainForm.vb
Normal file
File diff suppressed because it is too large
Load diff
158
imagecatalog.backup/Module1.cs
Normal file
158
imagecatalog.backup/Module1.cs
Normal file
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
155
imagecatalog.backup/Module1.vb
Normal file
155
imagecatalog.backup/Module1.vb
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
Module Module1
|
||||||
|
|
||||||
|
'Sub CaricaIni()
|
||||||
|
' Dim Parola As String
|
||||||
|
' Dim i As Integer
|
||||||
|
' Dim p As Integer
|
||||||
|
|
||||||
|
' If Dir$(NomeIni) <> "" Then
|
||||||
|
' Open NomeIni For Input As #1
|
||||||
|
' Input #1, NumeroMacchine
|
||||||
|
' For i = 1 To NumeroMacchine
|
||||||
|
' Input #1, NomeMacchina(i)
|
||||||
|
' Input #1, CodiceMacchina(i)
|
||||||
|
' Input #1, TempoMacchinaFerma(i)
|
||||||
|
' Input #1, LunghezzaImpulso(i)
|
||||||
|
' Input #1, TempoRegistrazioneDati(i)
|
||||||
|
' Input #1, RangoVelocita(i)
|
||||||
|
' Input #1, MaxVelocita(i)
|
||||||
|
' Input #1, NumeroRulli(i)
|
||||||
|
' Input #1, NumeroFili(i)
|
||||||
|
' Input #1, IndirizzoMacchina(i)
|
||||||
|
' Input #1, StampaAutoMacchina(i)
|
||||||
|
' Next i
|
||||||
|
' Input #1, SettimanaInizio
|
||||||
|
' Input #1, SettimanaFine
|
||||||
|
' Input #1, Chiusura
|
||||||
|
' Input #1, OrarioStampa
|
||||||
|
' Input #1, OrarioStampaSecondi
|
||||||
|
' Input #1, OrarioAccendiProg
|
||||||
|
' Input #1, OrarioSpengiProg
|
||||||
|
' Input #1, NomeDitta
|
||||||
|
' Input #1, StampaAutoGiorno
|
||||||
|
' Input #1, StampaAutoWeek
|
||||||
|
' Input #1, StampaGiornoRiepilogo
|
||||||
|
' Input #1, StampaGiornoGrafTMFA
|
||||||
|
' Input #1, StampaGiornoGrafVel
|
||||||
|
' Input #1, StampaWeekRiepilogo
|
||||||
|
' Input #1, StampaWeekGrafTMFA
|
||||||
|
' Input #1, StampaWeekGrafVel
|
||||||
|
' Input #1, StampanteManuale
|
||||||
|
' Input #1, StampanteAutomatica
|
||||||
|
' Input #1, StampanteNomeAghi
|
||||||
|
' Input #1, StampanteNomeLaser
|
||||||
|
' Input #1, NomePortaComm
|
||||||
|
|
||||||
|
' Input #1, TurniTotali
|
||||||
|
' For p = 1 To TurniTotali
|
||||||
|
' Input #1, TurnoNumero(p)
|
||||||
|
' Input #1, TurnoInizioMinuti(p)
|
||||||
|
' Input #1, TurnoFineMinuti(p)
|
||||||
|
' Input #1, TurnoInizioSecondi(p)
|
||||||
|
' Input #1, TurnoFineSecondi(p)
|
||||||
|
' Next p
|
||||||
|
' Input #1, Parola
|
||||||
|
' Close #1
|
||||||
|
' PassWordAmm = Trim$(Cripta(Parola, ChiaveCriDecri))
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Sub SalvaIni()
|
||||||
|
' Dim Conto As Single
|
||||||
|
' Dim Nomefile As String
|
||||||
|
' Dim NomeDir As String
|
||||||
|
' Dim Testo As String
|
||||||
|
' Dim TestoA As String
|
||||||
|
' Dim i As Integer
|
||||||
|
' Dim k As Integer
|
||||||
|
' Dim p As Integer
|
||||||
|
' Dim Lungo As Integer
|
||||||
|
' Dim Resto As Integer
|
||||||
|
' Dim Primo(3) As String
|
||||||
|
|
||||||
|
' For i = 1 To NumeroMacchine
|
||||||
|
' If Right$(DirectoryProgramma, 1) = "\" Then
|
||||||
|
' NomeDir = DirectoryProgramma + NomeMacchina(i)
|
||||||
|
' Else
|
||||||
|
' NomeDir = DirectoryProgramma + "\" + NomeMacchina(i)
|
||||||
|
' End If
|
||||||
|
' Nomefile = NomeDir + "\" + NomeMacchina(i) + ".SYS"
|
||||||
|
' If Dir$(Nomefile) = "" Then MkDir(NomeDir)
|
||||||
|
' Next i
|
||||||
|
|
||||||
|
'Open NomeIni For Output As #3
|
||||||
|
' Print #3, NumeroMacchine
|
||||||
|
' For i = 1 To NumeroMacchine
|
||||||
|
' If Right$(DirectoryProgramma, 1) = "\" Then
|
||||||
|
' Nomefile = DirectoryProgramma + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS"
|
||||||
|
' Else
|
||||||
|
' Nomefile = DirectoryProgramma + "\" + NomeMacchina(i) + "\" + NomeMacchina(i) + ".SYS"
|
||||||
|
' End If
|
||||||
|
' Open Nomefile For Output As #4
|
||||||
|
' Write #4, NomeMacchina(i)
|
||||||
|
' Write #4, CodiceMacchina(i)
|
||||||
|
' Print #4, TempoMacchinaFerma(i)
|
||||||
|
' Print #4, LunghezzaImpulso(i)
|
||||||
|
' Print #4, TempoRegistrazioneDati(i)
|
||||||
|
' Print #4, RangoVelocita(i)
|
||||||
|
' Print #4, MaxVelocita(i)
|
||||||
|
' Print #4, NumeroRulli(i)
|
||||||
|
' Print #4, NumeroFili(i)
|
||||||
|
' Print #4, IndirizzoMacchina(i)
|
||||||
|
' Write #4, StampaAutoMacchina(i)
|
||||||
|
' Close #4
|
||||||
|
' Write #3, NomeMacchina(i)
|
||||||
|
' Write #3, CodiceMacchina(i)
|
||||||
|
' Print #3, TempoMacchinaFerma(i)
|
||||||
|
' Print #3, LunghezzaImpulso(i)
|
||||||
|
' Print #3, TempoRegistrazioneDati(i)
|
||||||
|
' Print #3, RangoVelocita(i)
|
||||||
|
' Print #3, MaxVelocita(i)
|
||||||
|
' Print #3, NumeroRulli(i)
|
||||||
|
' Print #3, NumeroFili(i)
|
||||||
|
' Print #3, IndirizzoMacchina(i)
|
||||||
|
' Write #3, StampaAutoMacchina(i)
|
||||||
|
' Next i
|
||||||
|
' Print #3, SettimanaInizio
|
||||||
|
' Print #3, SettimanaFine
|
||||||
|
' Write #3, Chiusura
|
||||||
|
' Write #3, OrarioStampa
|
||||||
|
' Print #3, OrarioStampaSecondi
|
||||||
|
' Write #3, OrarioAccendiProg
|
||||||
|
' Write #3, OrarioSpengiProg
|
||||||
|
' Write #3, NomeDitta
|
||||||
|
' Write #3, StampaAutoGiorno
|
||||||
|
' Write #3, StampaAutoWeek
|
||||||
|
' Write #3, StampaGiornoRiepilogo
|
||||||
|
' Write #3, StampaGiornoGrafTMFA
|
||||||
|
' Write #3, StampaGiornoGrafVel
|
||||||
|
' Write #3, StampaWeekRiepilogo
|
||||||
|
' Write #3, StampaWeekGrafTMFA
|
||||||
|
' Write #3, StampaWeekGrafVel
|
||||||
|
' Write #3, StampanteManuale
|
||||||
|
' Write #3, StampanteAutomatica
|
||||||
|
' Write #3, StampanteNomeAghi
|
||||||
|
' Write #3, StampanteNomeLaser
|
||||||
|
' Write #3, NomePortaComm
|
||||||
|
|
||||||
|
' Print #3, TurniTotali
|
||||||
|
' For p = 1 To TurniTotali
|
||||||
|
' Print #3, TurnoNumero(p)
|
||||||
|
' Print #3, TurnoInizioMinuti(p)
|
||||||
|
' Print #3, TurnoFineMinuti(p)
|
||||||
|
' Print #3, TurnoInizioSecondi(p)
|
||||||
|
' Print #3, TurnoFineSecondi(p)
|
||||||
|
' Next p
|
||||||
|
' Testo = Cripta(PassWordAmm, ChiaveCriDecri)
|
||||||
|
' Write #3, Testo
|
||||||
|
'Close #3
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public SetupIni As New ParametriSetup
|
||||||
|
|
||||||
|
|
||||||
|
End Module
|
||||||
7
imagecatalog.backup/Module2.cs
Normal file
7
imagecatalog.backup/Module2.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
namespace ImageCatalog
|
||||||
|
{
|
||||||
|
static class Module2
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
3
imagecatalog.backup/Module2.vb
Normal file
3
imagecatalog.backup/Module2.vb
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
Module Module2
|
||||||
|
|
||||||
|
End Module
|
||||||
38
imagecatalog.backup/My Project/Application.Designer.cs
generated
Normal file
38
imagecatalog.backup/My Project/Application.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 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.
|
||||||
|
// </auto-generated>
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
38
imagecatalog.backup/My Project/Application.Designer.vb
generated
Normal file
38
imagecatalog.backup/My Project/Application.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 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.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict Off
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||||
|
' or if you encounter build errors in this file, go to the Project Designer
|
||||||
|
' (go to Project Properties or double-click the My Project node in
|
||||||
|
' Solution Explorer), and make changes on the Application tab.
|
||||||
|
'
|
||||||
|
Partial Friend Class MyApplication
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||||
|
Me.IsSingleInstance = false
|
||||||
|
Me.EnableVisualStyles = true
|
||||||
|
Me.SaveMySettingsOnExit = true
|
||||||
|
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Protected Overrides Sub OnCreateMainForm()
|
||||||
|
Me.MainForm = Global.ImageCatalog.MainForm
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
10
imagecatalog.backup/My Project/Application.myapp
Normal file
10
imagecatalog.backup/My Project/Application.myapp
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<MySubMain>true</MySubMain>
|
||||||
|
<MainForm>MainForm</MainForm>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
58
imagecatalog.backup/My Project/MyNamespace.Dynamic.Designer.cs
generated
Normal file
58
imagecatalog.backup/My Project/MyNamespace.Dynamic.Designer.cs
generated
Normal file
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
305
imagecatalog.backup/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
305
imagecatalog.backup/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
|
|
@ -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<MyComputer> m_ComputerObjectProvider = new ThreadSafeObjectProvider<MyComputer>();
|
||||||
|
/* 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<MyApplication> m_AppObjectProvider = new ThreadSafeObjectProvider<MyApplication>();
|
||||||
|
/* 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<Microsoft.VisualBasic.ApplicationServices.User> m_UserObjectProvider = new ThreadSafeObjectProvider<Microsoft.VisualBasic.ApplicationServices.User>();
|
||||||
|
/* 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>(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__<T>(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<MyForms> m_MyFormsObjectProvider = new ThreadSafeObjectProvider<MyForms>();
|
||||||
|
|
||||||
|
/* 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>(T instance) where T : new()
|
||||||
|
{
|
||||||
|
if (instance is null)
|
||||||
|
{
|
||||||
|
return new T();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DebuggerHidden()]
|
||||||
|
private void Dispose__Instance__<T>(ref T instance)
|
||||||
|
{
|
||||||
|
instance = default;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DebuggerHidden()]
|
||||||
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
public MyWebServices() : base()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly static ThreadSafeObjectProvider<MyWebServices> m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider<MyWebServices>();
|
||||||
|
/* 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<T> 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 */
|
||||||
26
imagecatalog.backup/My Project/Settings.Designer.cs
generated
Normal file
26
imagecatalog.backup/My Project/Settings.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 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.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
73
imagecatalog.backup/My Project/Settings.Designer.vb
generated
Normal file
73
imagecatalog.backup/My Project/Settings.Designer.vb
generated
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 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.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict Off
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
|
#Region "My.Settings Auto-Save Functionality"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.ImageCatalog.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.ImageCatalog.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
6
imagecatalog.backup/My Project/Settings.settings
Normal file
6
imagecatalog.backup/My Project/Settings.settings
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
</SettingsFile>
|
||||||
22
imagecatalog.backup/My Project/app.manifest
Normal file
22
imagecatalog.backup/My Project/app.manifest
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC Manifest Options
|
||||||
|
If you want to change the Windows User Account Control level replace the
|
||||||
|
requestedExecutionLevel node with one of the following.
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
If you want to utilize File and Registry Virtualization for backward
|
||||||
|
compatibility then delete the requestedExecutionLevel node.
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</asmv1:assembly>
|
||||||
179
imagecatalog.backup/ParametriSetup.cs
Normal file
179
imagecatalog.backup/ParametriSetup.cs
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
148
imagecatalog.backup/ParametriSetup.vb
Normal file
148
imagecatalog.backup/ParametriSetup.vb
Normal file
|
|
@ -0,0 +1,148 @@
|
||||||
|
Public Class ParametriSetup
|
||||||
|
|
||||||
|
|
||||||
|
Private _ElencoParametri As DataSet
|
||||||
|
Private _NomeFileSetup As String
|
||||||
|
|
||||||
|
Public Sub New(ByVal FileSetup As String)
|
||||||
|
_ElencoParametri = New DataSet
|
||||||
|
_NomeFileSetup = FileSetup
|
||||||
|
|
||||||
|
If FileSetup <> "" Then
|
||||||
|
CaricaParametriSetup()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
_ElencoParametri = New DataSet
|
||||||
|
_NomeFileSetup = ""
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CaricaParametriSetup()
|
||||||
|
_ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SalvaParametriSetup()
|
||||||
|
If System.IO.File.Exists(_NomeFileSetup) = True Then
|
||||||
|
Kill(_NomeFileSetup)
|
||||||
|
End If
|
||||||
|
_ElencoParametri.WriteXml(_NomeFileSetup)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function LeggiParametroString(ByVal NomeParametro As String) As String
|
||||||
|
Dim Risposta As String = ""
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'")
|
||||||
|
|
||||||
|
Dim LaRiga As DataRow
|
||||||
|
For Each LaRiga In LElenco
|
||||||
|
Risposta = LaRiga("Valore").ToString
|
||||||
|
Next
|
||||||
|
Catch
|
||||||
|
Risposta = ""
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Risposta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function LeggiParametroBoolean(ByVal NomeParametro As String) As Boolean
|
||||||
|
Dim Risposta As String = ""
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'")
|
||||||
|
|
||||||
|
Dim LaRiga As DataRow
|
||||||
|
For Each LaRiga In LElenco
|
||||||
|
Risposta = LaRiga("Valore").ToString
|
||||||
|
Next
|
||||||
|
Catch
|
||||||
|
Risposta = ""
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Select Case Risposta.ToUpper
|
||||||
|
Case "TRUE", "OK", "SI", "1", "YES", "VERO"
|
||||||
|
Return True
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub AggiornaParametro(ByVal NomeParametro As String, ByVal ValoreParametro As Object)
|
||||||
|
Try
|
||||||
|
If _ElencoParametri.Tables("Setup") Is Nothing Then
|
||||||
|
Dim TabellaTmp As New DataTable("Setup")
|
||||||
|
Dim RigaTmp As DataRow
|
||||||
|
|
||||||
|
Dim LaColonna As DataColumn
|
||||||
|
LaColonna = TabellaTmp.Columns.Add("Nome", System.Type.GetType("System.String"))
|
||||||
|
LaColonna = TabellaTmp.Columns.Add("Valore", System.Type.GetType("System.String"))
|
||||||
|
|
||||||
|
'* Aggiunge alla tabella tutte le righe
|
||||||
|
RigaTmp = TabellaTmp.NewRow
|
||||||
|
RigaTmp("Nome") = NomeParametro
|
||||||
|
RigaTmp("Valore") = ValoreParametro
|
||||||
|
TabellaTmp.Rows.Add(RigaTmp)
|
||||||
|
|
||||||
|
_ElencoParametri.Tables.Add(TabellaTmp)
|
||||||
|
Else
|
||||||
|
Dim LElenco As DataRow() = _ElencoParametri.Tables("Setup").Select("Nome='" & NomeParametro & "'")
|
||||||
|
|
||||||
|
If LElenco.Length = 0 Then
|
||||||
|
Dim LaRiga As DataRow
|
||||||
|
LaRiga = _ElencoParametri.Tables("Setup").NewRow
|
||||||
|
LaRiga("Nome") = NomeParametro
|
||||||
|
LaRiga("Valore") = ValoreParametro
|
||||||
|
_ElencoParametri.Tables("Setup").Rows.Add(LaRiga)
|
||||||
|
Else
|
||||||
|
LElenco(0).Item("Valore") = ValoreParametro
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Function LeggiXmlDataTable(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataTable
|
||||||
|
'* Crea e Legge il dataset dal file xml
|
||||||
|
Dim DataSetXml As New System.Data.DataSet
|
||||||
|
DataSetXml.ReadXml(NomeFileXml)
|
||||||
|
|
||||||
|
'* Aggiunge il campo chiave
|
||||||
|
If NomeColonnaChiave <> "" Then
|
||||||
|
DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'* Restituisce la risposta
|
||||||
|
Return DataSetXml.Tables(NomeTabella)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function LeggiXmlDataSet(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataSet
|
||||||
|
'* Crea e Legge il dataset dal file xml
|
||||||
|
Dim DataSetXml As New System.Data.DataSet
|
||||||
|
DataSetXml.ReadXml(NomeFileXml)
|
||||||
|
|
||||||
|
'* Aggiunge il campo chiave
|
||||||
|
If NomeColonnaChiave <> "" Then
|
||||||
|
DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'* Restituisce la risposta
|
||||||
|
Return DataSetXml
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Property NomeFileSetup() As String
|
||||||
|
Get
|
||||||
|
Return _NomeFileSetup
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
_NomeFileSetup = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
602
imagecatalog.backup/PicSettings.cs
Normal file
602
imagecatalog.backup/PicSettings.cs
Normal file
|
|
@ -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
|
||||||
604
imagecatalog.backup/PicSettings.vb
Normal file
604
imagecatalog.backup/PicSettings.vb
Normal file
|
|
@ -0,0 +1,604 @@
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Drawing.Drawing2D
|
||||||
|
Imports System.Drawing.Imaging
|
||||||
|
|
||||||
|
'Module PicSettings
|
||||||
|
|
||||||
|
' Private _DirectorySorgente As String
|
||||||
|
' Private _DirectoryDestinazione As String
|
||||||
|
|
||||||
|
' Private _DimVert As Integer
|
||||||
|
' Private _MargVert As Integer
|
||||||
|
|
||||||
|
|
||||||
|
' Private _DimStandard As Integer
|
||||||
|
' Private _DimStandardMiniatura As Integer
|
||||||
|
|
||||||
|
' Private _NomeData As Boolean
|
||||||
|
' Private _TestoNome As Boolean
|
||||||
|
' Private _UsaOrarioMiniatura As Boolean
|
||||||
|
' Private _UsaOrarioTestoApplicare As Boolean
|
||||||
|
' Private _UsaTempoGaraTestoApplicare As Boolean
|
||||||
|
' Private _TestoFirmaStart As String
|
||||||
|
' Private _TestoFirmaStartV As String
|
||||||
|
' Private _DataPartenza As DateTime
|
||||||
|
' Private _TestoOrario As String
|
||||||
|
|
||||||
|
' Private _UsaRotazioneAutomatica As Boolean
|
||||||
|
' Private _UsaForzaJpg As Boolean
|
||||||
|
|
||||||
|
' Private _LarghezzaSmall As Integer
|
||||||
|
' Private _AltezzaSmall As Integer
|
||||||
|
|
||||||
|
' Private _CreaMiniature As Boolean
|
||||||
|
' Private _AggiungiScritteMiniature As Boolean
|
||||||
|
' Private _AggTempoGaraMin As Boolean
|
||||||
|
' Private _AggNumTempMin As Boolean
|
||||||
|
|
||||||
|
' Private _Suffisso As String
|
||||||
|
' Private _Codice As String
|
||||||
|
|
||||||
|
' Private _Trasparenza As Integer
|
||||||
|
' Private _IlFont As String
|
||||||
|
' Private _Grassetto As Boolean
|
||||||
|
|
||||||
|
' Private _Posizione As String
|
||||||
|
' Private _Allineamento As String
|
||||||
|
' Private _Margine As Integer
|
||||||
|
|
||||||
|
' Private _LogoAltezza As Integer
|
||||||
|
' Private _LogoLarghezza As Integer
|
||||||
|
|
||||||
|
' Private _fontColoreRGB As Color
|
||||||
|
|
||||||
|
' Private _LogoAggiungi As Boolean
|
||||||
|
' Private _LogoNomeFile As String
|
||||||
|
' Private _LogoTrasparenza As String
|
||||||
|
' Private _LogoMargine As String
|
||||||
|
' Private _LogoPosizioneH As String
|
||||||
|
' Private _LogoPosizioneV As String
|
||||||
|
|
||||||
|
' Private _FotoGrandeDimOrigina As Boolean
|
||||||
|
' Private _AltezzaBig As Integer
|
||||||
|
' Private _LarghezzaBig As Integer
|
||||||
|
' Private _DestDir As DirectoryInfo
|
||||||
|
' Private _DimMin As Integer
|
||||||
|
|
||||||
|
' Private _TestoMin As Boolean
|
||||||
|
|
||||||
|
' Private _SecretDefault As Boolean
|
||||||
|
' Private _SecretBig As Boolean
|
||||||
|
' Private _SecretSmall As Boolean
|
||||||
|
|
||||||
|
' Private _SecretPathSmall As String
|
||||||
|
' Private _SecretPathBig As String
|
||||||
|
|
||||||
|
' Private _jpegQuality As Long
|
||||||
|
' Private _jpegQualityMin As Long
|
||||||
|
|
||||||
|
' Private FotoRuotaADestra As Boolean = False
|
||||||
|
' Private FotoRuotaASinistra As Boolean = False
|
||||||
|
|
||||||
|
' Private TempMinText As String = ""
|
||||||
|
|
||||||
|
' Private _mainForm As MainForm
|
||||||
|
|
||||||
|
' 'Private progressBar As System.Windows.Forms.ProgressBar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' Public Property mainForm() As MainForm
|
||||||
|
' Get
|
||||||
|
' Return _mainForm
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As MainForm)
|
||||||
|
' _mainForm = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DirectorySorgente() As String
|
||||||
|
' Get
|
||||||
|
' Return _DirectorySorgente
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _DirectorySorgente = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DirectoryDestinazione() As String
|
||||||
|
' Get
|
||||||
|
' Return _DirectoryDestinazione
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _DirectoryDestinazione = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property TestoFirmaStart() As String
|
||||||
|
' Get
|
||||||
|
' Return _TestoFirmaStart
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _TestoFirmaStart = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property TestoFirmaStartV() As String
|
||||||
|
' Get
|
||||||
|
' Return _TestoFirmaStartV
|
||||||
|
' End Get
|
||||||
|
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _TestoFirmaStartV = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DataPartenza() As DateTime
|
||||||
|
' Get
|
||||||
|
' Return _DataPartenza
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As DateTime)
|
||||||
|
' _DataPartenza = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property TestoOrario() As String
|
||||||
|
' Get
|
||||||
|
' Return _TestoOrario
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _TestoOrario = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DimStandard() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _DimStandard
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _DimStandard = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DimStandardMiniatura() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _DimStandardMiniatura
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _DimStandardMiniatura = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property NomeData() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _NomeData
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _NomeData = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property TestoNome() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _TestoNome
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _TestoNome = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property UsaOrarioMiniatura() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _UsaOrarioMiniatura
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _UsaOrarioMiniatura = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property UsaOrarioTestoApplicare() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _UsaOrarioTestoApplicare
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _UsaOrarioTestoApplicare = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property UsaTempoGaraTestoApplicare() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _UsaTempoGaraTestoApplicare
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _UsaTempoGaraTestoApplicare = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property UsaRotazioneAutomatica() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _UsaRotazioneAutomatica
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _UsaRotazioneAutomatica = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property UsaForzaJpg() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _UsaForzaJpg
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _UsaForzaJpg = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' Public Property LarghezzaSmall() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _LarghezzaSmall
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _LarghezzaSmall = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property AltezzaSmall() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _AltezzaSmall
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _AltezzaSmall = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
|
||||||
|
' Public Property CreaMiniature() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _CreaMiniature
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _CreaMiniature = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property AggiungiScritteMiniature() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _AggiungiScritteMiniature
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _AggiungiScritteMiniature = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
|
||||||
|
' Public Property Suffisso() As String
|
||||||
|
' Get
|
||||||
|
' Return _Suffisso
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _Suffisso = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Codice() As String
|
||||||
|
' Get
|
||||||
|
' Return _Codice
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _Codice = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
|
||||||
|
' Public Property Trasparenza() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _Trasparenza
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _Trasparenza = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property IlFont() As String
|
||||||
|
' Get
|
||||||
|
' Return _IlFont
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _IlFont = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Grassetto() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _Grassetto
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _Grassetto = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Posizione() As String
|
||||||
|
' Get
|
||||||
|
' Return _Posizione
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _Posizione = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Allineamento() As String
|
||||||
|
' Get
|
||||||
|
' Return _Allineamento
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _Allineamento = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Margine() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _Margine
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _Margine = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoAltezza() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _LogoAltezza
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _LogoAltezza = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoLarghezza() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _LogoLarghezza
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _LogoLarghezza = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property fontColoreRGB() As Color
|
||||||
|
' Get
|
||||||
|
' Return _fontColoreRGB
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Color)
|
||||||
|
' _fontColoreRGB = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoAggiungi() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _LogoAggiungi
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _LogoAggiungi = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoNomeFile() As String
|
||||||
|
' Get
|
||||||
|
' Return _LogoNomeFile
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _LogoNomeFile = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoTrasparenza() As String
|
||||||
|
' Get
|
||||||
|
' Return _LogoTrasparenza
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _LogoTrasparenza = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoMargine() As String
|
||||||
|
' Get
|
||||||
|
' Return _LogoMargine
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _LogoMargine = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoPosizioneH() As String
|
||||||
|
' Get
|
||||||
|
' Return _LogoPosizioneH
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _LogoPosizioneH = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LogoPosizioneV() As String
|
||||||
|
' Get
|
||||||
|
' Return _LogoPosizioneV
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _LogoPosizioneV = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property FotoGrandeDimOrigina() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _FotoGrandeDimOrigina
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _FotoGrandeDimOrigina = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property AltezzaBig() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _AltezzaBig
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _AltezzaBig = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property LarghezzaBig() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _LarghezzaBig
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _LarghezzaBig = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DestDir() As DirectoryInfo
|
||||||
|
' Get
|
||||||
|
' Return _DestDir
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As DirectoryInfo)
|
||||||
|
' _DestDir = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DimVert() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _DimVert
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _DimVert = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property MargVert() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _MargVert
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _MargVert = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property TestoMin() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _TestoMin
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _TestoMin = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property DimMin() As Integer
|
||||||
|
' Get
|
||||||
|
' Return _DimMin
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Integer)
|
||||||
|
' _DimMin = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property SecretDefault() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _SecretDefault
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _SecretDefault = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property SecretBig() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _SecretBig
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _SecretBig = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property SecretSmall() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _SecretSmall
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _SecretSmall = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property SecretPathSmall() As String
|
||||||
|
' Get
|
||||||
|
' Return _SecretPathSmall
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _SecretPathSmall = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property SecretPathBig() As String
|
||||||
|
' Get
|
||||||
|
' Return _SecretPathBig
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As String)
|
||||||
|
' _SecretPathBig = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property AggTempoGaraMin() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _AggTempoGaraMin
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _AggTempoGaraMin = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property AggNumTempMin() As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _AggNumTempMin
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Boolean)
|
||||||
|
' _AggNumTempMin = value
|
||||||
|
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property jpegQuality() As Long
|
||||||
|
' Get
|
||||||
|
' Return _jpegQuality
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Long)
|
||||||
|
' _jpegQuality = value
|
||||||
|
' End Set
|
||||||
|
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property jpegQualityMin() As Long
|
||||||
|
' Get
|
||||||
|
' Return _jpegQualityMin
|
||||||
|
' End Get
|
||||||
|
' Set(ByVal value As Long)
|
||||||
|
' _jpegQualityMin = value
|
||||||
|
' End Set
|
||||||
|
|
||||||
|
' End Property
|
||||||
|
'End Module
|
||||||
273
imagecatalog.backup/XYThreadPool.cs
Normal file
273
imagecatalog.backup/XYThreadPool.cs
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
185
imagecatalog.backup/XYThreadPool.vb
Normal file
185
imagecatalog.backup/XYThreadPool.vb
Normal file
|
|
@ -0,0 +1,185 @@
|
||||||
|
Option Explicit On
|
||||||
|
Option Strict Off
|
||||||
|
|
||||||
|
Imports System.Threading
|
||||||
|
Imports System.Collections
|
||||||
|
|
||||||
|
Public Delegate Sub ThreadErrorHandlerDelegate(ByVal oWorkItem As ThreadPoolWorkItem, ByVal oError As Exception)
|
||||||
|
|
||||||
|
Public Class ThreadPoolWorkItem
|
||||||
|
Public m_bStoreOutput As Boolean = False
|
||||||
|
Public m_sName As String = ""
|
||||||
|
Public m_pMethod As [Delegate] = Nothing
|
||||||
|
Public m_pInput As Object() = Nothing
|
||||||
|
Public m_oOutput As Object = Nothing
|
||||||
|
Public m_oException As Exception = Nothing
|
||||||
|
Public Sub New()
|
||||||
|
End Sub
|
||||||
|
Public Sub New(ByVal sName As String, ByVal pMethod As [Delegate], ByVal pInput As Object(), ByVal bStoreOutput As Boolean)
|
||||||
|
m_sName = sName
|
||||||
|
m_pMethod = pMethod
|
||||||
|
m_pInput = pInput
|
||||||
|
m_bStoreOutput = bStoreOutput
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class XYThreadPool
|
||||||
|
Private m_htThreads As Hashtable = New Hashtable(256)
|
||||||
|
Private m_nMinThreadCount As Integer = 5
|
||||||
|
Private m_nMaxThreadCount As Integer = 10
|
||||||
|
Private m_nShutdownPause As Integer = 200
|
||||||
|
Private m_nServerPause As Integer = 25
|
||||||
|
Private m_bContinue As Boolean = False
|
||||||
|
Private m_oException As Exception = Nothing
|
||||||
|
Private m_qInput As Queue = New Queue(1024)
|
||||||
|
Private m_qOutput As Queue = New Queue(1024)
|
||||||
|
Private m_delegateThreadErrorHandler As [Delegate] = New ThreadErrorHandlerDelegate(AddressOf OnThreadError)
|
||||||
|
Private Sub ThreadProc()
|
||||||
|
While m_bContinue
|
||||||
|
Dim obj As Object = Nothing
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
If m_qInput.Count > 0 Then obj = m_qInput.Dequeue()
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
If obj Is Nothing Then
|
||||||
|
Dim bQuit As Boolean = False
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
If m_htThreads.Count > m_nMinThreadCount Then
|
||||||
|
m_htThreads.Remove(Thread.CurrentThread.Name)
|
||||||
|
bQuit = True
|
||||||
|
End If
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
If bQuit Then Return
|
||||||
|
Thread.Sleep(10 * m_nServerPause)
|
||||||
|
Else
|
||||||
|
Dim oWorkItem As ThreadPoolWorkItem = CType(obj, ThreadPoolWorkItem)
|
||||||
|
'oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput)
|
||||||
|
Try
|
||||||
|
oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput)
|
||||||
|
Catch oBug As Exception
|
||||||
|
If Not m_delegateThreadErrorHandler Is Nothing Then
|
||||||
|
Try
|
||||||
|
Dim pInput As Object() = {oWorkItem, oBug}
|
||||||
|
m_delegateThreadErrorHandler.DynamicInvoke(pInput)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
If oWorkItem.m_bStoreOutput Then
|
||||||
|
Monitor.Enter(m_qOutput)
|
||||||
|
m_qOutput.Enqueue(oWorkItem)
|
||||||
|
Monitor.Exit(m_qOutput)
|
||||||
|
End If
|
||||||
|
Thread.Sleep(m_nServerPause)
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
Private Sub OnThreadError(ByVal oWorkItem As ThreadPoolWorkItem, ByVal oError As Exception)
|
||||||
|
If oWorkItem Is Nothing Then
|
||||||
|
m_oException = oError
|
||||||
|
Else
|
||||||
|
oWorkItem.m_oException = oError
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public Sub SetThreadErrorHandler(ByVal pMethod As ThreadErrorHandlerDelegate)
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
m_delegateThreadErrorHandler = pMethod
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Sub
|
||||||
|
Public Sub SetServerPause(ByVal nMilliseconds As Integer)
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
If nMilliseconds > 9 And nMilliseconds < 101 Then m_nServerPause = nMilliseconds
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Sub
|
||||||
|
Public Sub SetShutdownPause(ByVal nMilliseconds As Integer)
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
m_nShutdownPause = nMilliseconds
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Sub
|
||||||
|
Public Function GetException() As Exception
|
||||||
|
Return m_oException
|
||||||
|
End Function
|
||||||
|
Public Sub InsertWorkItem(ByVal oWorkItem As ThreadPoolWorkItem)
|
||||||
|
Try
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
m_qInput.Enqueue(oWorkItem)
|
||||||
|
If m_bContinue AndAlso m_qInput.Count > m_htThreads.Count AndAlso m_htThreads.Count < m_nMaxThreadCount Then
|
||||||
|
Dim th As Thread = New Thread(AddressOf ThreadProc)
|
||||||
|
th.Name = Guid.NewGuid.ToString()
|
||||||
|
m_htThreads.Add(th.Name, th)
|
||||||
|
th.Start()
|
||||||
|
End If
|
||||||
|
Catch oBug As Exception
|
||||||
|
m_oException = oBug
|
||||||
|
Finally
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Public Sub InsertWorkItem(ByVal sName As String, ByVal pMethod As [Delegate], ByVal pArgs As Object(), ByVal bStoreOutput As Boolean)
|
||||||
|
InsertWorkItem(New ThreadPoolWorkItem(sName, pMethod, pArgs, bStoreOutput))
|
||||||
|
End Sub
|
||||||
|
Public Function ExtractWorkItem() As ThreadPoolWorkItem
|
||||||
|
Dim oWorkItem As Object = Nothing
|
||||||
|
Monitor.Enter(m_qOutput)
|
||||||
|
If m_qOutput.Count > 0 Then oWorkItem = m_qOutput.Dequeue()
|
||||||
|
Monitor.Exit(m_qOutput)
|
||||||
|
If oWorkItem Is Nothing Then Return Nothing
|
||||||
|
Return CType(oWorkItem, ThreadPoolWorkItem)
|
||||||
|
End Function
|
||||||
|
Public Function StartThreadPool(Optional ByVal nMinThreadCount As Integer = 5, Optional ByVal nMaxThreadCount As Integer = 10) As Boolean
|
||||||
|
Try
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
If m_bContinue = False Then
|
||||||
|
m_bContinue = True
|
||||||
|
If nMinThreadCount > 0 Then
|
||||||
|
m_nMinThreadCount = nMinThreadCount
|
||||||
|
End If
|
||||||
|
If nMaxThreadCount > m_nMinThreadCount Then
|
||||||
|
m_nMaxThreadCount = nMaxThreadCount
|
||||||
|
Else
|
||||||
|
m_nMaxThreadCount = 2 * m_nMinThreadCount
|
||||||
|
End If
|
||||||
|
Dim i As Integer
|
||||||
|
For i = 1 To m_nMinThreadCount
|
||||||
|
Dim th As Thread = New Thread(AddressOf ThreadProc)
|
||||||
|
th.Name = Guid.NewGuid.ToString()
|
||||||
|
m_htThreads.Add(th.Name, th)
|
||||||
|
th.Start()
|
||||||
|
Next i
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Catch oBug As Exception
|
||||||
|
m_bContinue = False
|
||||||
|
m_oException = oBug
|
||||||
|
Return False
|
||||||
|
Finally
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
Public Sub StopThreadPool()
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
m_bContinue = False
|
||||||
|
Thread.Sleep(Math.Max(200, m_nShutdownPause))
|
||||||
|
If (m_nShutdownPause > 0) Then
|
||||||
|
Dim dict As IDictionaryEnumerator = m_htThreads.GetEnumerator()
|
||||||
|
While dict.MoveNext()
|
||||||
|
Dim th As Thread = CType(dict.Value(), Thread)
|
||||||
|
If th.IsAlive Then
|
||||||
|
Try
|
||||||
|
th.Abort()
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
m_htThreads.Clear()
|
||||||
|
m_qInput.Clear()
|
||||||
|
' m_qOutput.Clear()
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
End Sub
|
||||||
|
Public Function GetThreadCount() As Integer
|
||||||
|
Monitor.Enter(Me)
|
||||||
|
Dim nCount As Integer = m_htThreads.Count
|
||||||
|
Monitor.Exit(Me)
|
||||||
|
Return nCount
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
40
imagecatalog.backup/app.config
Normal file
40
imagecatalog.backup/app.config
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.diagnostics>
|
||||||
|
<sources>
|
||||||
|
<!-- Questa sezione definisce la configurazione di registrazione per My.Application.Log -->
|
||||||
|
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||||
|
<listeners>
|
||||||
|
<add name="FileLog"/>
|
||||||
|
<!-- Per scrivere nel log eventi dell'applicazione, rimuovere il commento dalla sezione sottostante -->
|
||||||
|
<!--<add name="EventLog"/>-->
|
||||||
|
</listeners>
|
||||||
|
</source>
|
||||||
|
</sources>
|
||||||
|
<switches>
|
||||||
|
<add name="DefaultSwitch" value="Information"/>
|
||||||
|
</switches>
|
||||||
|
<sharedListeners>
|
||||||
|
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
|
||||||
|
<!-- Per scrivere nel log eventi dell'applicazione, rimuovere il commento dalla sezione sottostante e sostituire APPLICATION_NAME con il nome dell'applicazione -->
|
||||||
|
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||||
|
</sharedListeners>
|
||||||
|
</system.diagnostics>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
1
imagecatalog.backup/upgrade.backup
Normal file
1
imagecatalog.backup/upgrade.backup
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Backup created at 1615021897 (06/03/2021 09:11:37 +00:00)
|
||||||
|
|
@ -8,10 +8,9 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// Review the values of the assembly attributes
|
// Review the values of the assembly attributes
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Image Catalog")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyCompany("FornaSoft")]
|
|
||||||
[assembly: AssemblyProduct("")]
|
|
||||||
[assembly: AssemblyCopyright("(C) 2002-08")]
|
[assembly: AssemblyCopyright("(C) 2002-08")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|
@ -29,4 +28,4 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.74.*")]
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
@ -51,6 +52,7 @@ namespace ImageCatalog
|
||||||
// Do not modify it using the code editor.
|
// Do not modify it using the code editor.
|
||||||
private Button _Button1;
|
private Button _Button1;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal Button Button1
|
internal Button Button1
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -82,6 +84,7 @@ namespace ImageCatalog
|
||||||
internal Label Label20;
|
internal Label Label20;
|
||||||
private Button _Button6;
|
private Button _Button6;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal Button Button6
|
internal Button Button6
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -108,6 +111,7 @@ namespace ImageCatalog
|
||||||
|
|
||||||
private Button _Button5;
|
private Button _Button5;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal Button Button5
|
internal Button Button5
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -134,6 +138,7 @@ namespace ImageCatalog
|
||||||
|
|
||||||
private Button _Button7;
|
private Button _Button7;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal Button Button7
|
internal Button Button7
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -173,6 +178,7 @@ namespace ImageCatalog
|
||||||
internal PictureBox PictureBox2;
|
internal PictureBox PictureBox2;
|
||||||
private PictureBox _PictureBox1;
|
private PictureBox _PictureBox1;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal PictureBox PictureBox1
|
internal PictureBox PictureBox1
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -213,6 +219,7 @@ namespace ImageCatalog
|
||||||
internal Label Label23;
|
internal Label Label23;
|
||||||
private Button _Button4;
|
private Button _Button4;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal Button Button4
|
internal Button Button4
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -277,6 +284,7 @@ namespace ImageCatalog
|
||||||
internal GroupBox GroupBox5;
|
internal GroupBox GroupBox5;
|
||||||
private Button _Button8;
|
private Button _Button8;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal Button Button8
|
internal Button Button8
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -332,6 +340,7 @@ namespace ImageCatalog
|
||||||
internal CheckBox CheckBox6;
|
internal CheckBox CheckBox6;
|
||||||
private Button _Button3;
|
private Button _Button3;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal Button Button3
|
internal Button Button3
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -358,6 +367,7 @@ namespace ImageCatalog
|
||||||
|
|
||||||
private Button _Button2;
|
private Button _Button2;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
internal Button Button2
|
internal Button Button2
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -410,6 +420,7 @@ namespace ImageCatalog
|
||||||
internal Panel Panel1;
|
internal Panel Panel1;
|
||||||
private CheckBox _CheckBox18;
|
private CheckBox _CheckBox18;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal CheckBox CheckBox18
|
internal CheckBox CheckBox18
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -436,6 +447,7 @@ namespace ImageCatalog
|
||||||
|
|
||||||
private CheckBox _CheckBox4;
|
private CheckBox _CheckBox4;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal CheckBox CheckBox4
|
internal CheckBox CheckBox4
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
@ -462,6 +474,7 @@ namespace ImageCatalog
|
||||||
|
|
||||||
private CheckBox _CheckBox12;
|
private CheckBox _CheckBox12;
|
||||||
|
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||||
internal CheckBox CheckBox12
|
internal CheckBox CheckBox12
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
|
|
||||||
|
|
@ -1,355 +1,52 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<PropertyGroup>
|
||||||
<PropertyGroup>
|
<OutputType>WinExe</OutputType>
|
||||||
<ProjectType>Local</ProjectType>
|
<TargetFramework>net9.0-windows</TargetFramework>
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
<Nullable>enable</Nullable>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ProjectGuid>{3F1E23DB-435E-0590-1EF5-735E898DBA3C}</ProjectGuid>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<ApplicationIcon>
|
</PropertyGroup>
|
||||||
</ApplicationIcon>
|
|
||||||
<AssemblyKeyContainerName>
|
|
||||||
</AssemblyKeyContainerName>
|
|
||||||
<AssemblyName>ImageCatalog</AssemblyName>
|
|
||||||
<AssemblyOriginatorKeyFile>
|
|
||||||
</AssemblyOriginatorKeyFile>
|
|
||||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
|
||||||
<DefaultClientScript>JScript</DefaultClientScript>
|
|
||||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
|
||||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
|
||||||
<DelaySign>false</DelaySign>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<OptionCompare>Binary</OptionCompare>
|
|
||||||
<OptionExplicit>On</OptionExplicit>
|
|
||||||
<OptionStrict>On</OptionStrict>
|
|
||||||
<RootNamespace>ImageCatalog</RootNamespace>
|
|
||||||
<StartupObject>ImageCatalog.My.MyApplication</StartupObject>
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<MyType>WindowsForms</MyType>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
|
||||||
<IsWebBootstrapper>true</IsWebBootstrapper>
|
|
||||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
|
||||||
<TargetFrameworkProfile>
|
|
||||||
</TargetFrameworkProfile>
|
|
||||||
<SccProjectName>SAK</SccProjectName>
|
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
|
||||||
<SccProvider>SAK</SccProvider>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<PublishUrl>http://localhost/ImageCatalog/</PublishUrl>
|
|
||||||
<Install>true</Install>
|
|
||||||
<InstallFrom>Web</InstallFrom>
|
|
||||||
<UpdateEnabled>true</UpdateEnabled>
|
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
|
||||||
<UpdateInterval>7</UpdateInterval>
|
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
|
||||||
<UpdateRequired>false</UpdateRequired>
|
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
|
||||||
<ApplicationVersion>1.8.0.%2a</ApplicationVersion>
|
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<OutputPath>bin\</OutputPath>
|
<DebugType>embedded</DebugType>
|
||||||
<DocumentationFile>bin\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<ConfigurationOverrideFile>
|
|
||||||
</ConfigurationOverrideFile>
|
|
||||||
<DefineConstants>
|
|
||||||
</DefineConstants>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<RegisterForComInterop>false</RegisterForComInterop>
|
|
||||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<OutputPath>bin\</OutputPath>
|
|
||||||
<DocumentationFile>bin\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<ConfigurationOverrideFile>
|
|
||||||
</ConfigurationOverrideFile>
|
|
||||||
<DefineConstants>
|
|
||||||
</DefineConstants>
|
|
||||||
<DefineDebug>false</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<DebugSymbols>false</DebugSymbols>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<RegisterForComInterop>false</RegisterForComInterop>
|
|
||||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<DocumentationFile>bin\x64\Debug\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x64\Release\</OutputPath>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<DocumentationFile>bin\x64\Release\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<DocumentationFile>bin\x86\Debug\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
|
||||||
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>bin\x86\Release\</OutputPath>
|
|
||||||
<BaseAddress>285212672</BaseAddress>
|
|
||||||
<DocumentationFile>bin\x86\Release\ImageCatalog.xml</DocumentationFile>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<WarningLevel>1</WarningLevel>
|
|
||||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\ImageCatalog.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
|
||||||
<CodeAnalysisRuleDirectories>;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
<DebugType>embedded</DebugType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<None Update="My Project\Application.myapp">
|
||||||
<Reference Include="Ben.Demystifier, Version=0.3.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Ben.Demystifier.0.3.0\lib\net45\Ben.Demystifier.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0" />
|
|
||||||
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System">
|
|
||||||
<Name>System</Name>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Core">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data">
|
|
||||||
<Name>System.Data</Name>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing">
|
|
||||||
<Name>System.Drawing</Name>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Numerics" />
|
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Windows.Forms">
|
|
||||||
<Name>System.Windows.Forms</Name>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml">
|
|
||||||
<Name>System.XML</Name>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
|
||||||
<Import Include="System" />
|
|
||||||
<Import Include="System.Collections" />
|
|
||||||
<Import Include="System.Data" />
|
|
||||||
<Import Include="System.Diagnostics" />
|
|
||||||
<Import Include="System.Drawing" />
|
|
||||||
<Import Include="System.Linq" />
|
|
||||||
<Import Include="System.Windows.Forms" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="My Project\MyNamespace.Dynamic.Designer.cs" />
|
|
||||||
<Compile Include="My Project\MyNamespace.Static.1.Designer.cs" />
|
|
||||||
<Compile Include="AssemblyInfo.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="FileHelper.cs" />
|
|
||||||
<Compile Include="CreaImmagineSeparateMultiCore.cs" />
|
|
||||||
<Compile Include="CreaImmagineSeparateThread.cs" />
|
|
||||||
<Compile Include="ExifReader.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Form1.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="LoadBuffer.cs" />
|
|
||||||
<Compile Include="MainForm.Designer.cs">
|
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Module2.cs" />
|
|
||||||
<Compile Include="My Project\Application.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="My Project\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="PicSettings.cs" />
|
|
||||||
<Compile Include="XYThreadPool.cs" />
|
|
||||||
<Compile Include="Module1.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ParametriSetup.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="Form1.resx">
|
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="MainForm.resx">
|
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="My Project\Application.myapp">
|
|
||||||
<Generator>MyApplicationCodeGenerator</Generator>
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="app.config" />
|
<None Update="Properties\Settings.settings">
|
||||||
<None Include="ClassDiagram1.cd" />
|
|
||||||
<None Include="My Project\app.manifest" />
|
|
||||||
<None Include="My Project\Settings.settings">
|
|
||||||
<CustomToolNamespace>ImageCatalog.My</CustomToolNamespace>
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>Windows Installer 3.1</ProductName>
|
|
||||||
<Install>true</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Sorgenti\" />
|
<Folder Include="Sorgenti\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj">
|
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj" />
|
||||||
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" />
|
||||||
<Name>CatalogVbLib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj">
|
|
||||||
<Project>{aebfe9e3-277c-4a7b-8448-145d1b11998b}</Project>
|
|
||||||
<Name>MaddoShared</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<ItemGroup>
|
||||||
<PropertyGroup>
|
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
|
||||||
<PreBuildEvent>
|
<PackageReference Include="Microsoft.WindowsAPICodePack-Core" Version="1.1.0.2" />
|
||||||
</PreBuildEvent>
|
<PackageReference Include="Microsoft.WindowsAPICodePack-Shell" Version="1.1.0.0" />
|
||||||
<PostBuildEvent>
|
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
|
||||||
</PostBuildEvent>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PropertyGroup>
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Settings.Designer.cs">
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -331,6 +331,12 @@
|
||||||
<Name>MaddoShared</Name>
|
<Name>MaddoShared</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="collini_canon.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="LOG_ITA.jpg" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
|
|
|
||||||
BIN
imagecatalog/LOG_ITA.jpg
Normal file
BIN
imagecatalog/LOG_ITA.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 313 KiB |
28
imagecatalog/MainForm.Designer.cs
generated
28
imagecatalog/MainForm.Designer.cs
generated
|
|
@ -37,6 +37,7 @@ namespace ImageCatalog
|
||||||
[DebuggerStepThrough()]
|
[DebuggerStepThrough()]
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
this.ProgressBar1 = new System.Windows.Forms.ProgressBar();
|
this.ProgressBar1 = new System.Windows.Forms.ProgressBar();
|
||||||
this.CheckBox22 = new System.Windows.Forms.CheckBox();
|
this.CheckBox22 = new System.Windows.Forms.CheckBox();
|
||||||
this.Label43 = new System.Windows.Forms.Label();
|
this.Label43 = new System.Windows.Forms.Label();
|
||||||
|
|
@ -74,7 +75,6 @@ namespace ImageCatalog
|
||||||
this.chkRotazioneAutomatica = new System.Windows.Forms.CheckBox();
|
this.chkRotazioneAutomatica = new System.Windows.Forms.CheckBox();
|
||||||
this.chkForzaJpg = new System.Windows.Forms.CheckBox();
|
this.chkForzaJpg = new System.Windows.Forms.CheckBox();
|
||||||
this.TabPage3 = new System.Windows.Forms.TabPage();
|
this.TabPage3 = new System.Windows.Forms.TabPage();
|
||||||
this.CheckBox2 = new System.Windows.Forms.CheckBox();
|
|
||||||
this.GroupBox10 = new System.Windows.Forms.GroupBox();
|
this.GroupBox10 = new System.Windows.Forms.GroupBox();
|
||||||
this.Label42 = new System.Windows.Forms.Label();
|
this.Label42 = new System.Windows.Forms.Label();
|
||||||
this.Label41 = new System.Windows.Forms.Label();
|
this.Label41 = new System.Windows.Forms.Label();
|
||||||
|
|
@ -175,6 +175,7 @@ namespace ImageCatalog
|
||||||
this.Label10 = new System.Windows.Forms.Label();
|
this.Label10 = new System.Windows.Forms.Label();
|
||||||
this._Button6 = new System.Windows.Forms.Button();
|
this._Button6 = new System.Windows.Forms.Button();
|
||||||
this._btnCreaCatalogoAsync = new System.Windows.Forms.Button();
|
this._btnCreaCatalogoAsync = new System.Windows.Forms.Button();
|
||||||
|
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||||
this.TabControl1.SuspendLayout();
|
this.TabControl1.SuspendLayout();
|
||||||
this.TabPage5.SuspendLayout();
|
this.TabPage5.SuspendLayout();
|
||||||
this.GroupBox11.SuspendLayout();
|
this.GroupBox11.SuspendLayout();
|
||||||
|
|
@ -283,10 +284,10 @@ namespace ImageCatalog
|
||||||
this.rdbNuovoMetodo.Checked = true;
|
this.rdbNuovoMetodo.Checked = true;
|
||||||
this.rdbNuovoMetodo.Location = new System.Drawing.Point(8, 28);
|
this.rdbNuovoMetodo.Location = new System.Drawing.Point(8, 28);
|
||||||
this.rdbNuovoMetodo.Name = "rdbNuovoMetodo";
|
this.rdbNuovoMetodo.Name = "rdbNuovoMetodo";
|
||||||
this.rdbNuovoMetodo.Size = new System.Drawing.Size(95, 17);
|
this.rdbNuovoMetodo.Size = new System.Drawing.Size(65, 17);
|
||||||
this.rdbNuovoMetodo.TabIndex = 1;
|
this.rdbNuovoMetodo.TabIndex = 1;
|
||||||
this.rdbNuovoMetodo.TabStop = true;
|
this.rdbNuovoMetodo.TabStop = true;
|
||||||
this.rdbNuovoMetodo.Text = "Nuovo metodo";
|
this.rdbNuovoMetodo.Text = "Parallelo";
|
||||||
this.rdbNuovoMetodo.UseVisualStyleBackColor = true;
|
this.rdbNuovoMetodo.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// rdbVecchioMetodo
|
// rdbVecchioMetodo
|
||||||
|
|
@ -294,9 +295,9 @@ namespace ImageCatalog
|
||||||
this.rdbVecchioMetodo.AutoSize = true;
|
this.rdbVecchioMetodo.AutoSize = true;
|
||||||
this.rdbVecchioMetodo.Location = new System.Drawing.Point(8, 4);
|
this.rdbVecchioMetodo.Location = new System.Drawing.Point(8, 4);
|
||||||
this.rdbVecchioMetodo.Name = "rdbVecchioMetodo";
|
this.rdbVecchioMetodo.Name = "rdbVecchioMetodo";
|
||||||
this.rdbVecchioMetodo.Size = new System.Drawing.Size(102, 17);
|
this.rdbVecchioMetodo.Size = new System.Drawing.Size(60, 17);
|
||||||
this.rdbVecchioMetodo.TabIndex = 0;
|
this.rdbVecchioMetodo.TabIndex = 0;
|
||||||
this.rdbVecchioMetodo.Text = "Vecchio metodo";
|
this.rdbVecchioMetodo.Text = "Lineare";
|
||||||
this.rdbVecchioMetodo.UseVisualStyleBackColor = true;
|
this.rdbVecchioMetodo.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// Label8
|
// Label8
|
||||||
|
|
@ -568,7 +569,6 @@ namespace ImageCatalog
|
||||||
//
|
//
|
||||||
// TabPage3
|
// TabPage3
|
||||||
//
|
//
|
||||||
this.TabPage3.Controls.Add(this.CheckBox2);
|
|
||||||
this.TabPage3.Controls.Add(this.GroupBox10);
|
this.TabPage3.Controls.Add(this.GroupBox10);
|
||||||
this.TabPage3.Controls.Add(this.GroupBox9);
|
this.TabPage3.Controls.Add(this.GroupBox9);
|
||||||
this.TabPage3.Controls.Add(this.GroupBox5);
|
this.TabPage3.Controls.Add(this.GroupBox5);
|
||||||
|
|
@ -581,16 +581,6 @@ namespace ImageCatalog
|
||||||
this.TabPage3.Text = "Testo";
|
this.TabPage3.Text = "Testo";
|
||||||
this.TabPage3.UseVisualStyleBackColor = true;
|
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
|
// GroupBox10
|
||||||
//
|
//
|
||||||
this.GroupBox10.Controls.Add(this.Label42);
|
this.GroupBox10.Controls.Add(this.Label42);
|
||||||
|
|
@ -1602,11 +1592,12 @@ namespace ImageCatalog
|
||||||
//
|
//
|
||||||
// _btnCreaCatalogoAsync
|
// _btnCreaCatalogoAsync
|
||||||
//
|
//
|
||||||
|
this._btnCreaCatalogoAsync.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this._btnCreaCatalogoAsync.Location = new System.Drawing.Point(539, 78);
|
this._btnCreaCatalogoAsync.Location = new System.Drawing.Point(539, 78);
|
||||||
this._btnCreaCatalogoAsync.Name = "_btnCreaCatalogoAsync";
|
this._btnCreaCatalogoAsync.Name = "_btnCreaCatalogoAsync";
|
||||||
this._btnCreaCatalogoAsync.Size = new System.Drawing.Size(192, 38);
|
this._btnCreaCatalogoAsync.Size = new System.Drawing.Size(192, 38);
|
||||||
this._btnCreaCatalogoAsync.TabIndex = 68;
|
this._btnCreaCatalogoAsync.TabIndex = 68;
|
||||||
this._btnCreaCatalogoAsync.Text = "Inizia";
|
this._btnCreaCatalogoAsync.Text = "CREA";
|
||||||
this._btnCreaCatalogoAsync.UseVisualStyleBackColor = true;
|
this._btnCreaCatalogoAsync.UseVisualStyleBackColor = true;
|
||||||
this._btnCreaCatalogoAsync.Click += new System.EventHandler(this.Button1_Click);
|
this._btnCreaCatalogoAsync.Click += new System.EventHandler(this.Button1_Click);
|
||||||
//
|
//
|
||||||
|
|
@ -1646,7 +1637,6 @@ namespace ImageCatalog
|
||||||
this.GroupBox7.ResumeLayout(false);
|
this.GroupBox7.ResumeLayout(false);
|
||||||
this.GroupBox7.PerformLayout();
|
this.GroupBox7.PerformLayout();
|
||||||
this.TabPage3.ResumeLayout(false);
|
this.TabPage3.ResumeLayout(false);
|
||||||
this.TabPage3.PerformLayout();
|
|
||||||
this.GroupBox10.ResumeLayout(false);
|
this.GroupBox10.ResumeLayout(false);
|
||||||
this.GroupBox10.PerformLayout();
|
this.GroupBox10.PerformLayout();
|
||||||
this.GroupBox9.ResumeLayout(false);
|
this.GroupBox9.ResumeLayout(false);
|
||||||
|
|
@ -2138,9 +2128,9 @@ namespace ImageCatalog
|
||||||
internal Panel Panel3;
|
internal Panel Panel3;
|
||||||
internal RadioButton rdbNuovoMetodo;
|
internal RadioButton rdbNuovoMetodo;
|
||||||
internal RadioButton rdbVecchioMetodo;
|
internal RadioButton rdbVecchioMetodo;
|
||||||
internal CheckBox CheckBox2;
|
|
||||||
internal CheckBox chkSovrascriviFile;
|
internal CheckBox chkSovrascriviFile;
|
||||||
private Button _btnCreaCatalogoAsync;
|
private Button _btnCreaCatalogoAsync;
|
||||||
|
private System.Windows.Forms.Timer timer1;
|
||||||
|
|
||||||
internal Button btnCreaCatalogoAsync
|
internal Button btnCreaCatalogoAsync
|
||||||
{
|
{
|
||||||
|
|
|
||||||
1086
imagecatalog/MainForm.Designer.vb
generated
1086
imagecatalog/MainForm.Designer.vb
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,6 +5,7 @@ using System.Drawing;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -39,6 +40,9 @@ namespace ImageCatalog
|
||||||
_Button6.Name = "Button6";
|
_Button6.Name = "Button6";
|
||||||
_btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync";
|
_btnCreaCatalogoAsync.Name = "btnCreaCatalogoAsync";
|
||||||
|
|
||||||
|
var version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
_Label27.Text = $"Version: {version.Major}.{version.Minor}.{version.Build}";
|
||||||
|
|
||||||
_results = new ConcurrentBag<string>();
|
_results = new ConcurrentBag<string>();
|
||||||
UiUpdateEvent += OnUiUpdateEvent;
|
UiUpdateEvent += OnUiUpdateEvent;
|
||||||
|
|
||||||
|
|
@ -500,6 +504,9 @@ namespace ImageCatalog
|
||||||
Module1.SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked);
|
Module1.SetupIni.AggiornaParametro("NumTempoSmall", RadioButton7.Checked);
|
||||||
Module1.SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text);
|
Module1.SetupIni.AggiornaParametro("CompressioneJpeg", TextBox32.Text);
|
||||||
Module1.SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text);
|
Module1.SetupIni.AggiornaParametro("CompressioneJpegMiniatura", TextBox33.Text);
|
||||||
|
// 2021
|
||||||
|
Module1.SetupIni.AggiornaParametro("ChunkSize", TextBox8.Text);
|
||||||
|
Module1.SetupIni.AggiornaParametro("ThreadsCount", TextBox7.Text);
|
||||||
Module1.SetupIni.SalvaParametriSetup();
|
Module1.SetupIni.SalvaParametriSetup();
|
||||||
Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome);
|
Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome);
|
||||||
}
|
}
|
||||||
|
|
@ -601,6 +608,11 @@ namespace ImageCatalog
|
||||||
}
|
}
|
||||||
|
|
||||||
Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome);
|
Text = "Image Catalog - " + LeggiSoloNomeFile(IlNome);
|
||||||
|
|
||||||
|
// 2021
|
||||||
|
TextBox8.Text = Module1.SetupIni.LeggiParametroString("ChunkSize");
|
||||||
|
TextBox7.Text = Module1.SetupIni.LeggiParametroString("ThreadsCount");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -867,7 +879,7 @@ namespace ImageCatalog
|
||||||
{
|
{
|
||||||
if (ProgressBar1.InvokeRequired)
|
if (ProgressBar1.InvokeRequired)
|
||||||
{
|
{
|
||||||
ProgressBar1.Invoke(new MethodInvoker(ProgressBar1.PerformStep));
|
ProgressBar1.Invoke(new System.Windows.Forms.MethodInvoker(ProgressBar1.PerformStep));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1534,12 +1546,21 @@ namespace ImageCatalog
|
||||||
imageCreationOptions.ChunksSize = Conversions.ToInteger(TextBox8.Text);
|
imageCreationOptions.ChunksSize = Conversions.ToInteger(TextBox8.Text);
|
||||||
imageCreationOptions.LinearExecution = rdbVecchioMetodo.Checked;
|
imageCreationOptions.LinearExecution = rdbVecchioMetodo.Checked;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_results = new ConcurrentBag<string>();
|
_results = new ConcurrentBag<string>();
|
||||||
|
_currentAmount = 0;
|
||||||
|
_previousAmount = 0;
|
||||||
|
timer1.Tick += Timer1OnTick;
|
||||||
|
|
||||||
|
timer1.Interval = 1000 * 60;
|
||||||
|
timer1.Enabled = true;
|
||||||
|
|
||||||
string time = await imgStf.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token);
|
string time = await imgStf.CreaCatalogoParallel(imageCreationOptions, _results, UiUpdateEvent, token);
|
||||||
Label43.Text = time;
|
Label43.Text = time;
|
||||||
|
timer1.Enabled = false;
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException operationCanceledException)
|
catch (OperationCanceledException operationCanceledException)
|
||||||
{
|
{
|
||||||
|
|
@ -1548,11 +1569,23 @@ namespace ImageCatalog
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_mainToken.Dispose();
|
_mainToken.Dispose();
|
||||||
|
|
||||||
|
timer1.Tick -= Timer1OnTick;
|
||||||
}
|
}
|
||||||
Label10.Text = "Finito";
|
Label10.Text = "Finito";
|
||||||
unlockUI();
|
unlockUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int _currentAmount = 0;
|
||||||
|
private int _previousAmount = 0;
|
||||||
|
private void Timer1OnTick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_previousAmount = _currentAmount;
|
||||||
|
_currentAmount = _results.Count;
|
||||||
|
int diff = _currentAmount - _previousAmount;
|
||||||
|
SetText(Label43, $"{diff} f/m");
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateCounter(string text)
|
private void UpdateCounter(string text)
|
||||||
{
|
{
|
||||||
Label10.Invoke(new Action(() => Label10.Text = text));
|
Label10.Invoke(new Action(() => Label10.Text = text));
|
||||||
|
|
|
||||||
|
|
@ -117,4 +117,7 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class ParametriSetup
|
Public Class ParametriSetup
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,6 +24,10 @@ Public Class ParametriSetup
|
||||||
_ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome")
|
_ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
public sub CaricaParametriSetupStream(ByVal stream As Stream)
|
||||||
|
_ElencoParametri = LeggiXmlDataSetStream("Setup", stream, "Nome")
|
||||||
|
End sub
|
||||||
|
|
||||||
Public Sub SalvaParametriSetup()
|
Public Sub SalvaParametriSetup()
|
||||||
If System.IO.File.Exists(_NomeFileSetup) = True Then
|
If System.IO.File.Exists(_NomeFileSetup) = True Then
|
||||||
Kill(_NomeFileSetup)
|
Kill(_NomeFileSetup)
|
||||||
|
|
@ -118,11 +124,12 @@ Public Class ParametriSetup
|
||||||
Return DataSetXml.Tables(NomeTabella)
|
Return DataSetXml.Tables(NomeTabella)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Shared Function LeggiXmlDataSet(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataSet
|
Private Shared Function LeggiXmlDataSetStream(ByVal NomeTabella As String, ByVal stream As Stream, Optional ByVal NomeColonnaChiave As String = "") As DataSet
|
||||||
'* Crea e Legge il dataset dal file xml
|
'* Crea e Legge il dataset dal file xml
|
||||||
Dim DataSetXml As New System.Data.DataSet
|
Dim DataSetXml As New System.Data.DataSet
|
||||||
DataSetXml.ReadXml(NomeFileXml)
|
'DataSetXml.ReadXml(NomeFileXml)
|
||||||
|
DataSetXml.ReadXml(stream)
|
||||||
|
|
||||||
'* Aggiunge il campo chiave
|
'* Aggiunge il campo chiave
|
||||||
If NomeColonnaChiave <> "" Then
|
If NomeColonnaChiave <> "" Then
|
||||||
DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True)
|
DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True)
|
||||||
|
|
@ -132,7 +139,19 @@ Public Class ParametriSetup
|
||||||
Return DataSetXml
|
Return DataSetXml
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function LeggiXmlDataSet(ByVal NomeTabella As String, ByVal NomeFileXml As String, Optional ByVal NomeColonnaChiave As String = "") As DataSet
|
||||||
|
'* Crea e Legge il dataset dal file xml
|
||||||
|
Dim DataSetXml As New System.Data.DataSet
|
||||||
|
DataSetXml.ReadXml(NomeFileXml)
|
||||||
|
|
||||||
|
'* Aggiunge il campo chiave
|
||||||
|
If NomeColonnaChiave <> "" Then
|
||||||
|
DataSetXml.Tables(NomeTabella).Constraints.Add(NomeColonnaChiave, DataSetXml.Tables(NomeTabella).Columns(NomeColonnaChiave), True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'* Restituisce la risposta
|
||||||
|
Return DataSetXml
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Property NomeFileSetup() As String
|
Public Property NomeFileSetup() As String
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue