EMailProfiler: Config-Daten in zentraler Klasse. abfrage der GDPicture Lizenz über Config-Modul
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Net.Mail
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports GdPicture14
|
||||
Imports Independentsoft.Email.Mime
|
||||
Imports Attachment = Independentsoft.Email.Mime.Attachment
|
||||
Imports LicenseManager = GdPicture14.LicenseManager
|
||||
|
||||
Public Class Form1
|
||||
Private _logger As DigitalData.Modules.Logging.Logger
|
||||
Private Shared MyLogger As LogConfig
|
||||
Private _logger As Logger
|
||||
Private Shared _MyLogger As LogConfig
|
||||
Private _Worklist As List(Of String)
|
||||
Private MyDatabase As MSSQLServer
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName)
|
||||
_logger = MyLogger.GetLogger()
|
||||
MyLogger.Debug = True
|
||||
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName)
|
||||
_logger = _MyLogger.GetLogger()
|
||||
_MyLogger.Debug = True
|
||||
|
||||
Dim dbResult As Boolean
|
||||
|
||||
@@ -27,7 +26,7 @@ Public Class Form1
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
MyDatabase = New MSSQLServer(MyLogger, My.Settings.DD_ECM_CONSTRING)
|
||||
MyDatabase = New MSSQLServer(_MyLogger, My.Settings.DD_ECM_CONSTRING)
|
||||
If MyDatabase.DBInitialized = True Then
|
||||
|
||||
dbResult = True
|
||||
@@ -112,7 +111,7 @@ Public Class Form1
|
||||
If oCount = 1 Then
|
||||
Continue For
|
||||
End If
|
||||
Dim oAttachmentFileString
|
||||
Dim oAttachmentFileString As String = ""
|
||||
oString = String.Format(" Working on Attachment [{0}]", oAttachment.GetFileName)
|
||||
_logger.Info(oString)
|
||||
ListBox1.Items.Add(oString)
|
||||
@@ -206,8 +205,9 @@ Public Class Form1
|
||||
End Sub
|
||||
Private Sub ExtractEmbeddedPDFAttachments(pFilename As String)
|
||||
Try
|
||||
Dim oSQLGDPicture = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE ACTIVE = 1"
|
||||
Dim GDPictureLicense As String = "21182889975216572111813147150675976632"
|
||||
|
||||
Dim GDPictureLicense As String = ConfigDbFunct.GetProductLicense("GDPICTURE", "11.2024", _MyLogger, My.Settings.DD_ECM_CONSTRING)
|
||||
|
||||
Dim oValidExtensions = New List(Of String) From {"pdf", "xls", "xlsx", "doc", "docx", "ppt", "pptx"}
|
||||
Dim oGraphicExtensions = New List(Of String) From {"jpg", "bmp", "jpeg", "gif", "png", "xml"}
|
||||
|
||||
@@ -236,7 +236,7 @@ Public Class Form1
|
||||
Dim oValidExt = oValidExtensions.Any(Function(ext) oEmbAttName.EndsWith(ext))
|
||||
|
||||
If oValidExt = False Then
|
||||
_Logger.Info("Invalid FileExtension of embedded file [{0}]", oEmbAttName)
|
||||
_logger.Info("Invalid FileExtension of embedded file [{0}]", oEmbAttName)
|
||||
Dim GraphicExt = oGraphicExtensions.Any(Function(ext) oEmbAttName.EndsWith(ext))
|
||||
If GraphicExt = False Then
|
||||
Dim oInfo = $"Consistency or extension of attached file [{oEmbAttName}] is not ok."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="GdPicture" version="14.2.90" targetFramework="net48" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.2.90" targetFramework="net48" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
</packages>
|
||||
@@ -15,6 +15,8 @@
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -54,14 +56,17 @@
|
||||
<Reference Include="DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DigitalData.Modules.Config">
|
||||
<HintPath>..\..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Database">
|
||||
<HintPath>..\..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14">
|
||||
<HintPath>D:\ProgramFiles\GdPicture.net 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Email">
|
||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Email .NET\Bin\Independentsoft.Email.dll</HintPath>
|
||||
@@ -150,4 +155,11 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user