EMailProfiler: Config-Daten in zentraler Klasse. abfrage der GDPicture Lizenz über Config-Modul
This commit is contained in:
@@ -19,4 +19,11 @@ Public Class Config
|
||||
|
||||
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
|
||||
|
||||
@@ -62,27 +62,27 @@
|
||||
<Reference Include="DevExpress.XtraPrinting.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DigitalData.GUIs.Common, Version=2.5.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||
<HintPath>..\..\..\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Base, Version=1.3.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||
<HintPath>..\..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
<HintPath>..\..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Database, Version=2.3.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
<HintPath>..\..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
<HintPath>..\..\..\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports EmailProfiler.Common
|
||||
Public Class frmMain
|
||||
Private Logger As Logger
|
||||
Private LogConfig As LogConfig
|
||||
Private ConfigManager As ConfigManager(Of Config)
|
||||
Private ConfigManager As ConfigManager(Of ConfigData)
|
||||
Private _database As MSSQLServer
|
||||
Private _Encryption As clsEncryption
|
||||
Private _windream As clsWindream_allgemein
|
||||
@@ -21,7 +21,6 @@ Public Class frmMain
|
||||
Private _SQLServerConString As String
|
||||
Private _Worklist As List(Of String)
|
||||
Private _limilab As Limilab
|
||||
Private _ConfigManager As ClassDBConfig
|
||||
Private _DBConfig As ClassDBConfig.Config
|
||||
Private MyConnectionString As String
|
||||
|
||||
@@ -29,7 +28,7 @@ Public Class frmMain
|
||||
Try
|
||||
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)
|
||||
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
|
||||
ConfigManager = New ConfigManager(Of ConfigData)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
|
||||
|
||||
Logger = LogConfig.GetLogger()
|
||||
If ConfigManager.Config.Debug = True Then
|
||||
@@ -47,8 +46,6 @@ Public Class frmMain
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in FormLoad")
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
If Set_ConnectionStrings() Then
|
||||
Load_AllData()
|
||||
Check_Steps()
|
||||
@@ -210,8 +207,8 @@ Public Class frmMain
|
||||
_database = New MSSQLServer(LogConfig, _SQLServerConString)
|
||||
|
||||
Logger.Debug("Inititalizing Configuration")
|
||||
_ConfigManager = New ClassDBConfig(LogConfig, _database)
|
||||
_DBConfig = _ConfigManager.GetConfig()
|
||||
Dim oConfigManager As ClassDBConfig = New ClassDBConfig(LogConfig, _database)
|
||||
_DBConfig = oConfigManager.GetConfig()
|
||||
|
||||
If _DBConfig Is Nothing Then
|
||||
MsgBox("Configuration could not be loaded. Please check the Logfile.", MsgBoxStyle.Critical, Text)
|
||||
@@ -251,7 +248,6 @@ Public Class frmMain
|
||||
If chkbxUserAut.Checked Then
|
||||
con = "Data Source=" & Me.txtServer.Text & ";Trusted_Connection=True;"
|
||||
Else
|
||||
'con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & Me.txtPasswort.Text & ";"
|
||||
con = "Server=" & Me.txtServer.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & Me.txtPasswort.Text & ";"
|
||||
End If
|
||||
Dim connection As New SqlClient.SqlConnection(con) 'csb.ConnectionString)
|
||||
@@ -299,9 +295,6 @@ Public Class frmMain
|
||||
'DialogResult = Windows.Forms.DialogResult.OK
|
||||
Dim result As MsgBoxResult
|
||||
Dim msg = "Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?"
|
||||
'If USER_LANGUAGE <> "de-DE" Then
|
||||
' msg = "Connection was successfully opened!" & vbNewLine & "Would You like to save it?"
|
||||
'End If
|
||||
result = MessageBox.Show(msg, "Database-Connection", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
'Set the construction string
|
||||
@@ -309,7 +302,7 @@ Public Class frmMain
|
||||
ConfigManager.Config.ConnectionString = MyConnectionString
|
||||
|
||||
_database = New MSSQLServer(LogConfig, MyConnectionString)
|
||||
_ConfigManager = New ClassDBConfig(LogConfig, _database)
|
||||
Dim oConfigManager As ClassDBConfig = New ClassDBConfig(LogConfig, _database)
|
||||
|
||||
'csb.ConnectionString
|
||||
'_database.Init(MyConnectionString)
|
||||
@@ -336,20 +329,20 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
||||
|
||||
ConfigManager.Config.EmailTitlePrefix = "EmailProfilerTestClient"
|
||||
ConfigManager.Config.EmailAccountId = ToolStripEmailAccountID2.Text
|
||||
|
||||
If _RunwithLocalemail = False Then
|
||||
|
||||
LogConfig.Debug = True
|
||||
Dim _work As New clsWorker(LogConfig, _SQLServerConString, _DBConfig.WindreamConnectionString, GUIDTextBox.Text,
|
||||
ConfigManager.Config.UseWindream, ToolStripEmailAccountID2.Text, "EmailProfilerTestClient",
|
||||
ConfigManager.Config.EmailSenderLimitation, ConfigManager.Config.RejectionTemplateId, ConfigManager.Config.InfoTemplateId)
|
||||
Dim _work As New clsWorker(LogConfig, _SQLServerConString, _DBConfig.WindreamConnectionString, GUIDTextBox.Text, ConfigManager.Config)
|
||||
_work.Start_WorkingProfiles()
|
||||
|
||||
Else
|
||||
For Each ofile As String In _Worklist
|
||||
Logger.Info($"## Manual working on file {ofile} ... ")
|
||||
Dim _work As New clsWorker(LogConfig, _SQLServerConString, _DBConfig.WindreamConnectionString, GUIDTextBox.Text,
|
||||
ConfigManager.Config.UseWindream, ToolStripEmailAccountID2.Text, "EmailProfilerTestClient",
|
||||
ConfigManager.Config.EmailSenderLimitation, ConfigManager.Config.RejectionTemplateId, ConfigManager.Config.InfoTemplateId, ofile.ToString)
|
||||
Dim _work As New clsWorker(LogConfig, _SQLServerConString, _DBConfig.WindreamConnectionString, GUIDTextBox.Text, ConfigManager.Config, ofile.ToString)
|
||||
_work.Start_WorkingProfiles(True)
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user