From 3a7a04920df86b74a54cfa6c09dd4dc64c802134 Mon Sep 17 00:00:00 2001 From: MaddoScientisto Date: Mon, 14 Oct 2024 19:54:29 +0200 Subject: [PATCH] Fixed Build --- Catalog.sln | 12 +- MaddoShared/ImageCreatorSharp.cs | 25 +- MaddoShared/MaddoShared.csproj | 17 +- imagecatalog/AssemblyInfo.cs | 7 +- imagecatalog/ImageCatalog 2.csproj | 228 +++---------------- imagecatalog/MainForm.Designer.cs | 2 +- imagecatalog/Properties/Settings.Designer.cs | 26 +++ imagecatalog/Properties/Settings.settings | 6 + imagecatalog/Properties/launchSettings.json | 7 + 9 files changed, 97 insertions(+), 233 deletions(-) create mode 100644 imagecatalog/Properties/Settings.Designer.cs create mode 100644 imagecatalog/Properties/Settings.settings create mode 100644 imagecatalog/Properties/launchSettings.json diff --git a/Catalog.sln b/Catalog.sln index fb8ac9a..44e4a30 100644 --- a/Catalog.sln +++ b/Catalog.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31005.135 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35312.102 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 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalog 3", "ImageCatalogCS\ImageCatalog 3.csproj", "{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}" EndProject @@ -15,7 +15,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CatalogVbLib", "CatalogVbLi EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaddoShared", "MaddoShared\MaddoShared.csproj", "{AEBFE9E3-277C-4A7B-8448-145D1B11998B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageCatalogParallel", "ImageCatalogParallel\ImageCatalogParallel.csproj", "{0F42DA5C-2788-48BD-BACA-01625C3CFFBB}" EndProject @@ -31,8 +31,8 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.ActiveCfg = Debug|x64 - {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.Build.0 = Debug|x64 + {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Debug|x64.ActiveCfg = Debug|Any CPU + {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.Build.0 = Debug|x86 {3F1E23DB-435E-0590-1EF5-735E898DBA3C}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/MaddoShared/ImageCreatorSharp.cs b/MaddoShared/ImageCreatorSharp.cs index 13f0d8e..84a4c21 100644 --- a/MaddoShared/ImageCreatorSharp.cs +++ b/MaddoShared/ImageCreatorSharp.cs @@ -150,23 +150,22 @@ public class ImageCreatorSharp { using (var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName)) { - ExifReader.Orientations finalOrientation; - var rotation = img.Metadata?.ExifProfile?.GetValue(ExifTag.Orientation); - if (rotation == null) + _orientation = ExifReader.Orientations.TopLeft; + + IExifValue rotation = null; + + var found = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.Orientation, out rotation) ?? false; + + if (found) { - finalOrientation = ExifReader.Orientations.TopLeft; - } - else - { - finalOrientation = (ExifReader.Orientations)rotation.Value; + _orientation = (ExifReader.Orientations)rotation.ToInt32(); } - _orientation = finalOrientation; - - var creation = img.Metadata?.ExifProfile?.GetValue(ExifTag.DateTime); - if (creation != null) + IExifValue date = null; + var creationFound = img.Metadata?.ExifProfile?.TryGetValue(ExifTag.DateTime, out date) ?? false; + if (creationFound) { - var succ = DateTime.TryParse(creation.Value, out var crDate); + var succ = DateTime.TryParse(date.ToString(), out var crDate); if (succ) { _creationDate = crDate; diff --git a/MaddoShared/MaddoShared.csproj b/MaddoShared/MaddoShared.csproj index 7fb81a2..ca1c727 100644 --- a/MaddoShared/MaddoShared.csproj +++ b/MaddoShared/MaddoShared.csproj @@ -5,25 +5,26 @@ false true true + x64 - - + + - + - - - + + + - + all - + \ No newline at end of file diff --git a/imagecatalog/AssemblyInfo.cs b/imagecatalog/AssemblyInfo.cs index 70c63ca..4767298 100644 --- a/imagecatalog/AssemblyInfo.cs +++ b/imagecatalog/AssemblyInfo.cs @@ -8,10 +8,9 @@ using System.Runtime.InteropServices; // 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)] @@ -29,4 +28,4 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.74.*")] + diff --git a/imagecatalog/ImageCatalog 2.csproj b/imagecatalog/ImageCatalog 2.csproj index da406d7..6707bc9 100644 --- a/imagecatalog/ImageCatalog 2.csproj +++ b/imagecatalog/ImageCatalog 2.csproj @@ -1,211 +1,30 @@  - - net5.0-windows - Local - - - ImageCatalog - - - None - JScript - Grid - IE50 - false - WinExe - Binary - On - On - ImageCatalog - ImageCatalog.My.MyApplication - WindowsForms - false - My Project\app.manifest - SAK - SAK - SAK - SAK - $(DefaultItemExcludes);$(ProjectDir)**\*.vb - latest - \\casa-storage\Foto\catolg\parallel2.0\ - true - Unc - true - Foreground - 7 - Days - false - false - true - true - publish.htm - 1 - 1.8.0.%2a - false - true - true - false - true - true - + + WinExe + net8.0-windows + enable + enable + true + + False + + - bin\ - bin\ImageCatalog.xml - 285212672 - - - - - true - true - false - false - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - AllRules.ruleset + embedded - - bin\ - bin\ImageCatalog.xml - 285212672 - - - - - false - true - false - false - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - none - AllRules.ruleset - - - true - true - bin\x64\Debug\ - 285212672 - bin\x64\Debug\ImageCatalog.xml - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - AllRules.ruleset - - - true - bin\x64\Release\ - 285212672 - bin\x64\Release\ImageCatalog.xml - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - AllRules.ruleset - - - true - true - bin\x86\Debug\ - 285212672 - bin\x86\Debug\ImageCatalog.xml - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - bin\ImageCatalog.exe.CodeAnalysisLog.xml - AllRules.ruleset - ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets - true - ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules - true - - - true - bin\x86\Release\ - 285212672 - bin\x86\Release\ImageCatalog.xml - 1 - 42016,42017,42018,42019,42032,42353,42354,42355 - bin\ImageCatalog.exe.CodeAnalysisLog.xml - AllRules.ruleset - ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets - true - ;F:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules - true - - - 6BFA075A69837045D051A6F7B6CAD4961D53335E - - - ImageCatalog 2_TemporaryKey.pfx - - - true - - - true - - - - System - - - 3.5 - True - - - System.Data - True - - - System.Drawing - True - - - System.XML - - - - - - - - - - + + embedded + + MyApplicationCodeGenerator Application.Designer.cs - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - true - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - + + SettingsSingleFileGenerator + Settings.Designer.cs + @@ -219,9 +38,16 @@ - + all + + + True + True + Settings.settings + + \ No newline at end of file diff --git a/imagecatalog/MainForm.Designer.cs b/imagecatalog/MainForm.Designer.cs index 644be9b..ee6590c 100644 --- a/imagecatalog/MainForm.Designer.cs +++ b/imagecatalog/MainForm.Designer.cs @@ -2130,7 +2130,7 @@ namespace ImageCatalog internal RadioButton rdbVecchioMetodo; internal CheckBox chkSovrascriviFile; private Button _btnCreaCatalogoAsync; - private Timer timer1; + private System.Windows.Forms.Timer timer1; internal Button btnCreaCatalogoAsync { diff --git a/imagecatalog/Properties/Settings.Designer.cs b/imagecatalog/Properties/Settings.Designer.cs new file mode 100644 index 0000000..eaebe74 --- /dev/null +++ b/imagecatalog/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ImageCatalog_2.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/imagecatalog/Properties/Settings.settings b/imagecatalog/Properties/Settings.settings new file mode 100644 index 0000000..049245f --- /dev/null +++ b/imagecatalog/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/imagecatalog/Properties/launchSettings.json b/imagecatalog/Properties/launchSettings.json new file mode 100644 index 0000000..641af8b --- /dev/null +++ b/imagecatalog/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "Profile 1": { + "commandName": "Project" + } + } +} \ No newline at end of file