EMailProfiler.Common: Die Config-Klasse MUSS Config heißen
This commit is contained in:
parent
c42440968f
commit
a73b8f5a16
@ -5,9 +5,13 @@ Public Class Config
|
|||||||
Public Property ConnectionString As String = ""
|
Public Property ConnectionString As String = ""
|
||||||
|
|
||||||
Public Property Debug As Boolean = False
|
Public Property Debug As Boolean = False
|
||||||
|
|
||||||
Public Property EmailAccountId As Integer = 0
|
Public Property EmailAccountId As Integer = 0
|
||||||
|
|
||||||
Public Property EmailTitlePrefix As String = "EmailProfiler"
|
Public Property EmailTitlePrefix As String = "EmailProfiler"
|
||||||
|
|
||||||
Public Property EmailSenderLimitation As String = ""
|
Public Property EmailSenderLimitation As String = ""
|
||||||
|
|
||||||
Public Property UseWindream As Boolean = False
|
Public Property UseWindream As Boolean = False
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -23,6 +27,7 @@ Public Class Config
|
|||||||
Public Property InfoTemplateId As Integer = 0
|
Public Property InfoTemplateId As Integer = 0
|
||||||
|
|
||||||
Public Property EmailTestReceiver As String = ""
|
Public Property EmailTestReceiver As String = ""
|
||||||
|
|
||||||
Public Property EmailTestHTML As String = ""
|
Public Property EmailTestHTML As String = ""
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -1,39 +0,0 @@
|
|||||||
Imports DigitalData.Modules.Config.ConfigAttributes
|
|
||||||
|
|
||||||
Public Class ConfigData
|
|
||||||
<ConnectionString>
|
|
||||||
Public Property ConnectionString As String = ""
|
|
||||||
|
|
||||||
Public Property Debug As Boolean = False
|
|
||||||
|
|
||||||
Public Property EmailAccountId As Integer = 0
|
|
||||||
|
|
||||||
Public Property EmailTitlePrefix As String = "EmailProfiler"
|
|
||||||
|
|
||||||
Public Property EmailSenderLimitation As String = ""
|
|
||||||
|
|
||||||
Public Property UseWindream As Boolean = False
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' GUID des EMail Templates das bei Ablehnungsmails verwendet wird.
|
|
||||||
''' Siehe Tabelle DD_ECM.dbo.TBDD_EMAIL_TEMPLATE
|
|
||||||
''' </summary>
|
|
||||||
Public Property RejectionTemplateId As Integer = 0
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' GUID des EMail Templates das bei Info-Mails verwendet wird.
|
|
||||||
''' Siehe Tabelle DD_ECM.dbo.TBDD_EMAIL_TEMPLATE
|
|
||||||
''' </summary>
|
|
||||||
Public Property InfoTemplateId As Integer = 0
|
|
||||||
|
|
||||||
Public Property EmailTestReceiver As String = ""
|
|
||||||
|
|
||||||
Public Property EmailTestHTML As String = ""
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Enthält die Version des GDPicture Modules,
|
|
||||||
''' für das der Lizenzschlüssel aus TBDD_3RD_PARTY_MODULES
|
|
||||||
''' gelesen werden soll.
|
|
||||||
''' </summary>
|
|
||||||
Public Property GDPictureVersion As String = ""
|
|
||||||
End Class
|
|
||||||
@ -120,7 +120,7 @@
|
|||||||
<Compile Include="ClassDBConfig.vb" />
|
<Compile Include="ClassDBConfig.vb" />
|
||||||
<Compile Include="ClassCurrent.vb" />
|
<Compile Include="ClassCurrent.vb" />
|
||||||
<Compile Include="clsEmail.IMAP.vb" />
|
<Compile Include="clsEmail.IMAP.vb" />
|
||||||
<Compile Include="Data\ConfigData.vb" />
|
<Compile Include="Data\Config.vb" />
|
||||||
<Compile Include="Data\EmailAttachment.vb" />
|
<Compile Include="Data\EmailAttachment.vb" />
|
||||||
<Compile Include="Enum\EmailStrings.vb" />
|
<Compile Include="Enum\EmailStrings.vb" />
|
||||||
<Compile Include="clsEncryption.vb" />
|
<Compile Include="clsEncryption.vb" />
|
||||||
|
|||||||
@ -55,7 +55,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
Private _worked_email As Boolean = False
|
Private _worked_email As Boolean = False
|
||||||
|
|
||||||
Sub New(LogConf As LogConfig, ConStr As String, WmConStr As String, pConfigData As ConfigData)
|
Sub New(LogConf As LogConfig, ConStr As String, WmConStr As String, pConfigData As Config)
|
||||||
Try
|
Try
|
||||||
_Logger = LogConf.GetLogger
|
_Logger = LogConf.GetLogger
|
||||||
_LogConfig = LogConf
|
_LogConfig = LogConf
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Public Class clsWorker
|
|||||||
|
|
||||||
Private ReadOnly LocalEmlFile As String = ""
|
Private ReadOnly LocalEmlFile As String = ""
|
||||||
|
|
||||||
Sub New(pLogConfig As LogConfig, pConnectionString As String, pWindreamConnectionString As String, pPollProfileId As Integer, pConfigData As ConfigData, Optional pLocalEML As String = "")
|
Sub New(pLogConfig As LogConfig, pConnectionString As String, pWindreamConnectionString As String, pPollProfileId As Integer, pConfigData As Config, Optional pLocalEML As String = "")
|
||||||
_Logger = pLogConfig.GetLogger
|
_Logger = pLogConfig.GetLogger
|
||||||
'ClassEmailImap = New clsEmailIMAP(pLogConfig)
|
'ClassEmailImap = New clsEmailIMAP(pLogConfig)
|
||||||
_Fetcher = New MailFetcher(pLogConfig)
|
_Fetcher = New MailFetcher(pLogConfig)
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
Imports DigitalData.Modules.Config.ConfigAttributes
|
|
||||||
|
|
||||||
Public Class Config
|
|
||||||
<ConnectionString>
|
|
||||||
Public Property ConnectionString As String = ""
|
|
||||||
|
|
||||||
Public Property Debug As Boolean = False
|
|
||||||
Public Property EmailAccountId As Integer = 0
|
|
||||||
Public Property EmailTitlePrefix As String = "EmailProfiler"
|
|
||||||
Public Property EmailSenderLimitation As String = ""
|
|
||||||
Public Property UseWindream As Boolean = False
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' GUID des EMail Templates das bei Ablehnungsmails verwendet wird.
|
|
||||||
''' Siehe Tabelle DD_ECM.dbo.TBDD_EMAIL_TEMPLATE
|
|
||||||
''' </summary>
|
|
||||||
Public Property RejectionTemplateId As Integer = 0
|
|
||||||
Public Property InfoTemplateId As Integer = 0
|
|
||||||
|
|
||||||
Public Property EmailTestReceiver As String = ""
|
|
||||||
Public Property EmailTestHTML As String = ""
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Enthält die Version des GDPicture Modules,
|
|
||||||
''' für das der Lizenzschlüssel aus TBDD_3RD_PARTY_MODULES
|
|
||||||
''' gelesen werden soll.
|
|
||||||
''' </summary>
|
|
||||||
Public Property GDPictureVersion As String = ""
|
|
||||||
End Class
|
|
||||||
@ -119,7 +119,6 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Config.vb" />
|
|
||||||
<Compile Include="frmMain.vb">
|
<Compile Include="frmMain.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Imports EmailProfiler.Common
|
|||||||
Public Class frmMain
|
Public Class frmMain
|
||||||
Private Logger As Logger
|
Private Logger As Logger
|
||||||
Private LogConfig As LogConfig
|
Private LogConfig As LogConfig
|
||||||
Private ConfigManager As ConfigManager(Of ConfigData)
|
Private ConfigManager As ConfigManager(Of Config)
|
||||||
Private _database As MSSQLServer
|
Private _database As MSSQLServer
|
||||||
Private _Encryption As clsEncryption
|
Private _Encryption As clsEncryption
|
||||||
Private _windream As clsWindream_allgemein
|
Private _windream As clsWindream_allgemein
|
||||||
@ -28,7 +28,7 @@ Public Class frmMain
|
|||||||
Try
|
Try
|
||||||
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName)
|
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName)
|
||||||
_limilab = New Limilab(LogConfig)
|
_limilab = New Limilab(LogConfig)
|
||||||
ConfigManager = New ConfigManager(Of ConfigData)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
|
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
|
||||||
|
|
||||||
Logger = LogConfig.GetLogger()
|
Logger = LogConfig.GetLogger()
|
||||||
If ConfigManager.Config.Debug = True Then
|
If ConfigManager.Config.Debug = True Then
|
||||||
|
|||||||
@ -96,7 +96,6 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Config.vb" />
|
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
|||||||
@ -17,8 +17,8 @@ Public Class MyService
|
|||||||
|
|
||||||
Private _DBConfig As ClassDBConfig.Config
|
Private _DBConfig As ClassDBConfig.Config
|
||||||
|
|
||||||
Private ConfigManager As ConfigManager(Of ConfigData)
|
Private ConfigManager As ConfigManager(Of Config)
|
||||||
Private _ConfigData As ConfigData
|
Private _ConfigData As Config
|
||||||
|
|
||||||
Private Database As MSSQLServer
|
Private Database As MSSQLServer
|
||||||
#End Region
|
#End Region
|
||||||
@ -31,7 +31,7 @@ Public Class MyService
|
|||||||
|
|
||||||
Logger.Info("Service started.")
|
Logger.Info("Service started.")
|
||||||
|
|
||||||
ConfigManager = New ConfigManager(Of ConfigData)(LogConfig, My.Application.Info.DirectoryPath)
|
ConfigManager = New ConfigManager(Of Config)(LogConfig, My.Application.Info.DirectoryPath)
|
||||||
_ConfigData = ConfigManager.Config
|
_ConfigData = ConfigManager.Config
|
||||||
|
|
||||||
If _ConfigData.ConnectionString = String.Empty Then
|
If _ConfigData.ConnectionString = String.Empty Then
|
||||||
|
|||||||
@ -281,7 +281,7 @@ Public Class Form1
|
|||||||
|
|
||||||
Dim connectionString As String = "Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd"
|
Dim connectionString As String = "Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd"
|
||||||
|
|
||||||
Dim oConfigData As ConfigData = New ConfigData() With {
|
Dim oConfigData As Config = New Config() With {
|
||||||
.Debug = False,
|
.Debug = False,
|
||||||
.GDPictureVersion = "11.2024",
|
.GDPictureVersion = "11.2024",
|
||||||
.UseWindream = False,
|
.UseWindream = False,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Public Class ExtractAttachmentsFromEMLFile
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CallWorkerProcess(pEMLFilename As String, pConfigData As ConfigData)
|
Public Sub CallWorkerProcess(pEMLFilename As String, pConfigData As Config)
|
||||||
|
|
||||||
Dim oProfileIdForPolling = 1
|
Dim oProfileIdForPolling = 1
|
||||||
Dim oWorker As New clsWorker(_LogConfig,
|
Dim oWorker As New clsWorker(_LogConfig,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user