DLL windream resultHandler Version 2.5

Service.exe 2.1
This commit is contained in:
SchreiberM 2021-09-16 12:55:02 +02:00
parent 24a67e0778
commit b2e60a19ac
43 changed files with 287293 additions and 117 deletions

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.1.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyVersion("2.5.0.0")>
<Assembly: AssemblyFileVersion("1.5.0.0")>

View File

@ -1,8 +1,9 @@
Public Class clsCURRENT
Public Shared EXPORTED_FILENAME As String
Public Shared FILE_Extension As String
Public Shared WDLAUFWERK, _profObjekttyp, _profwdSuche, _profDay, _profRunType, _Profilname As String
Public Shared SQLSERVER_CS As String = ""
Public Shared LOG_ERRORS_ONLY As Boolean = True
Public Shared DEBUG As Boolean = False
Public Shared PROFILE_HandledFiles() = Nothing
Public Shared DT_TBWMRH_KONFIGURATION As DataTable = Nothing
Public Shared DT_TBDD_EMAIL As DataTable = Nothing

View File

@ -133,31 +133,39 @@ Public Class clsDateiverarbeitung
Return String.Empty
End Try
End Function
' Neu geschriebene version 25.03.19
Public Function Export_WMFile2HDD(WMObject As WMObject, ExportPath As String) As Boolean
Public Function Export_WMFile2HDD(pWMObject As WMObject, pExportPath As String, Optional pFilename As String = "") As Boolean
Try
Dim oWMObject As IWMObject6 = DirectCast(WMObject, IWMObject6)
Dim oWMObject As IWMObject6 = DirectCast(pWMObject, IWMObject6)
Dim oFilenameFull As String = oWMObject.aName
Dim oFilenameWM As String = oWMObject.aName
Dim oFilenameExport As String
Dim oSplitIndex = oFilenameFull.LastIndexOf(".")
Dim oSplitIndex
If pFilename = String.Empty Then
oSplitIndex = oFilenameWM.LastIndexOf(".")
Else
oSplitIndex = pFilename.LastIndexOf(".")
End If
Dim oVersion = 1
Dim oFilename As String
If pFilename <> String.Empty Then
oFilename = pFilename.Substring(0, oSplitIndex)
Else
oFilename = oFilenameWM.Substring(0, oSplitIndex)
End If
Dim oFilename = oFilenameFull.Substring(0, oSplitIndex)
Dim oExtension = oFilenameFull.Substring(oSplitIndex)
Logger.Debug("Preparing export of file {0}..", oFilenameFull)
Logger.Debug("Preparing export of WMFile {0}..", oFilenameWM)
Logger.Debug("Filename: {0}", oFilename)
Logger.Debug("Extension: {0}", oExtension)
Logger.Debug("Extension: {0}", clsCURRENT.FILE_Extension)
' build the file path in case the exported file doesn't already exist
oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension)
oFilenameExport = BuildExportPath(pExportPath, oFilename, clsCURRENT.FILE_Extension)
' Add version until we find the version that does NOT exist
Do While File.Exists(oFilenameExport)
oVersion += 1
oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension, oVersion)
oFilenameExport = BuildExportPath(pExportPath, oFilename, clsCURRENT.FILE_Extension, oVersion)
Loop
Logger.Debug("File will be exported to {0}", oFilenameExport)
@ -647,7 +655,7 @@ Public Class clsDateiverarbeitung
End Function
Public Function REGEX_REPLACE(WMFile As WMObject, _STRING As String)
Try
Logger.Debug("REGEX_String before replacing: '" & _STRING & "'")
Logger.Debug("REGEX_REPLACE before replacing: '" & _STRING & "'")
' Regulären Ausdruck zum Auslesen der windream-Indexe definieren
Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
' einen Regulären Ausdruck laden
@ -668,7 +676,6 @@ Public Class clsDateiverarbeitung
ElseIf reg_element_Ohne_SZ = "ENV_USERNAME" Then
_STRING = _STRING.Replace(reg_element.Value, Environment.UserName)
Else
Dim wdIndexwert
' den Wert des Indexes für das aktuelle Dokument auslesen
wdIndexwert = WMFile.GetVariableValue(reg_element_Ohne_SZ)
@ -706,9 +713,8 @@ Public Class clsDateiverarbeitung
_STRING = _STRING.Replace(reg_element.Value, "0")
End If
End If
Next
Logger.Debug("REGEX_REPLACE AFTER replacing: '" & _STRING & "'")
Return _STRING
Catch ex As Exception
Logger.Error(ex)

View File

@ -14,67 +14,60 @@ Public Class clsEmail
Sub New(MyLogger As LogConfig)
Logger = MyLogger.GetLogger()
End Sub
Public Function Email_Send(ByVal mailSubject As String, ByVal mailBody As String, mailto As String,
mailfrom As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String,
AUTH_TYPE As String, Optional attment As String = "", Optional Test As Boolean = False)
Public Function Email_Send(ByVal pMailSubject As String, ByVal pMailBody As String, pMailto As String,
pMailfrom As String, pMailSmtp As String, pMailport As Integer, pMailUser As String, pMailPW As String,
pAUTH_TYPE As String, Optional pAttment As String = "", Optional pTest As Boolean = False)
Try
Dim oError As Boolean = False
Dim oReceipiants As String()
If mailto.Contains(";") Then
oReceipiants = mailto.Split(";")
If pMailto.Contains(";") Then
oReceipiants = pMailto.Split(";")
Else
ReDim Preserve oReceipiants(0)
oReceipiants(0) = mailto
oReceipiants(0) = pMailto
End If
For Each oMailReceipiant As String In oReceipiants
Dim sClient = New Net.Mail.SmtpClient(mailsmtp)
Dim sClient = New Net.Mail.SmtpClient(pMailSmtp)
Dim mymesssage As New MailMessage
sClient.Port = mailport
If AUTH_TYPE = "SSL" Then
sClient.Port = pMailport
If pAUTH_TYPE = "SSL" Then
sClient.EnableSsl = True
Else
sClient.EnableSsl = False
End If
sClient.Credentials = New NetworkCredential(mailUser, mailPW)
sClient.Credentials = New NetworkCredential(pMailUser, pMailPW)
sClient.UseDefaultCredentials = False
If Test = True Then
mymesssage.Body = $"This is the body (text will be replaced within profile)! <br> mailsmtp: {mailsmtp} <br> mailport: {mailport} <br> mailUser: {mailUser} <br> mailPW: XXXX <br> AUTH_TYPE: {AUTH_TYPE}"
If pTest = True Then
mymesssage.Body = $"This is the body (text will be replaced within profile)! <br> mailsmtp: {pMailSmtp} <br> mailport: {pMailport} <br> mailUser: {pMailUser} <br> mailPW: XXXX <br> AUTH_TYPE: {pAUTH_TYPE}"
Else
mymesssage.Body = mailBody
mymesssage.Body = pMailBody
End If
'mymesssage.IsBodyHtml = True
Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(mymesssage.Body)
htmlView.ContentType = New System.Net.Mime.ContentType("text/html")
mymesssage.AlternateViews.Add(htmlView)
attment = attment.Replace("W:\", "\\windream\objects\")
If attment <> String.Empty Then
If System.IO.File.Exists(attment) Then
Logger.Info($"working on attachment {attment.ToString}...")
Dim oAttachment As New System.Net.Mail.Attachment(attment)
'If attment.ToLower.EndsWith("pdf") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "pdf")
'ElseIf attment.ToLower.EndsWith("jpg") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "jpg")
'ElseIf attment.ToLower.EndsWith("docx") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "MS-word")
'End If
pAttment = pAttment.Replace("W:\", "\\windream\objects\")
If pAttment <> String.Empty Then
If System.IO.File.Exists(pAttment) Then
Logger.Debug($"working on attachment {pAttment.ToString}...")
Dim oAttachment As New System.Net.Mail.Attachment(pAttment)
mymesssage.Attachments.Add(oAttachment)
Else
Logger.Warn($"Attachment {attment.ToString} is not existing - Mail won't be send!")
Logger.Warn($"Attachment {pAttment.ToString} is not existing - Mail won't be send!")
oError = True
End If
End If
mymesssage.From = New MailAddress(mailfrom)
mymesssage.Subject = mailSubject
mymesssage.From = New MailAddress(pMailfrom)
mymesssage.Subject = pMailSubject
mymesssage.To.Add(New MailAddress(oMailReceipiant))
sClient.Send(mymesssage)
Logger.Info($"Email successfully send to: [{oMailReceipiant}]!")
Logger.Debug($"Email successfully send to: [{oMailReceipiant}]!")
Next
If oError = False Then
Return True

View File

@ -167,7 +167,11 @@ Public Class clsProfil
Dim oCountDocs As Integer = 0
For Each WMdok As WMObject In windreamSucheErgebnisse
oCountDocs += 1
oFileRunNo = "#DocRun" & oCountDocs.ToString
Logger.Debug($"Working on Doc {oCountDocs.ToString}/{windreamSucheErgebnisse.Count}")
oFileRunNo = "#Doc " & oCountDocs.ToString
Dim oPointIndex = WMdok.aName.LastIndexOf(".")
clsCURRENT.FILE_Extension = WMdok.aName.Substring(oPointIndex)
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
Case "Create Mail Attachment".ToUpper
@ -182,12 +186,21 @@ Public Class clsProfil
Logger.Debug("Email_Body: " & Email_Body)
Dim EMAIL_PROFIL = DR_PR_JB.Item("STRING4")
Logger.Debug("EMAIL_PROFIL: " & EMAIL_PROFIL)
Dim oRENAMEFILE = DR_PR_JB.Item("STRING5")
Dim oAttachment_FullFilename As String = ""
If Not IsDBNull(oRENAMEFILE) Then
If oRENAMEFILE.ToString <> String.Empty Then
Logger.Debug("Attached file shall be renamed...")
oRENAMEFILE = _dateiverarbeitung.REGEX_REPLACE(WMdok, oRENAMEFILE)
oAttachment_FullFilename = oRENAMEFILE & clsCURRENT.FILE_Extension
Logger.Debug($"oAttachment: {oAttachment_FullFilename}")
End If
End If
If Not IsNothing(clsCURRENT.DT_TBDD_EMAIL) And clsCURRENT.DT_TBDD_EMAIL.Rows.Count >= 1 Then
Dim oAttachment = clsCURRENT.WDLAUFWERK & ":" & WMdok.aPath
If _dateiverarbeitung.Export_WMFile2HDD(WMdok, Path.GetTempPath()) = True Then
oAttachment = clsCURRENT.EXPORTED_FILENAME
If _dateiverarbeitung.Export_WMFile2HDD(WMdok, Path.GetTempPath(), oAttachment_FullFilename) = True Then
oAttachment_FullFilename = clsCURRENT.EXPORTED_FILENAME
Else
Logger.Warn($"Could not create a tempfile...")
FileJobSuccessful = False
@ -212,18 +225,21 @@ Public Class clsProfil
MAIL_PORT = emailrow.Item("PORT")
End If
Next
Dim wrapper As New clsEncryption("!35452didalog=")
Dim PWPlain = wrapper.DecryptData(MAIL_USER_PW)
If Not IsNothing(PWPlain) Then
MAIL_USER_PW = PWPlain
Logger.Debug("Email-Profil Used: " & EMAIL_PROFIL)
Logger.Debug("EMAIL_AUTH_TYPE: " & MAIL_AUTH_TYPE)
If MAIL_AUTH_TYPE.ToUpper <> "NONE" Then
Dim wrapper As New clsEncryption("!35452didalog=")
Dim PWPlain = wrapper.DecryptData(MAIL_USER_PW)
If Not IsNothing(PWPlain) Then
MAIL_USER_PW = PWPlain
Else
Logger.Warn("PWPlain is Nothing - Could not decrypt passwort188")
Return False
End If
Else
Logger.Warn("PWPlain is Nothing - Could not decrypt passwort188")
Return False
Logger.Debug("## No AUTHENTIFICATION in EMail...!##")
End If
If Email_Empfänger.ToString.Contains("[%") Then
Email_Empfänger = _dateiverarbeitung.REGEX_REPLACE(WMdok, Email_Empfänger)
Logger.Debug("Email_Empfänger: " & Email_Empfänger)
@ -233,7 +249,8 @@ Public Class clsProfil
Email_Body = _dateiverarbeitung.REGEX_REPLACE(WMdok, Email_Body)
oEmail_Betreff = $"{oEmail_Betreff} [eMail {oCountDocs} von {oGesamtFiles}]"
If _email.Email_Send(oEmail_Betreff, Email_Body, Email_Empfänger, MAILFROM, MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE, oAttachment) = True Then
If _email.Email_Send(oEmail_Betreff, Email_Body, Email_Empfänger, MAILFROM, MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE, oAttachment_FullFilename) = True Then
FileJobSuccessful = True
Else
@ -612,13 +629,13 @@ Public Class clsProfil
End If
Case "Send to printer".ToUpper
Logger.Info("Working on CASE Send to printer.... ")
Dim printername = DR_PR_JB.Item("STRING1")
Dim oPrintername = DR_PR_JB.Item("STRING1")
For Each oFileString As String In clsCURRENT.PROFILE_HandledFiles
Try
Dim myproc As Process = New Process()
myproc.StartInfo.FileName = """" & oFileString & """"
myproc.StartInfo.Verb = "printto"
myproc.StartInfo.Arguments = printername
myproc.StartInfo.Arguments = oPrintername
myproc.StartInfo.UseShellExecute = True
myproc.Start()
Dim p As Process
@ -634,6 +651,7 @@ Public Class clsProfil
End If
Loop
Logger.Debug("...process has exited: ")
Logger.Info($"Send2Printer [{ myproc.StartInfo.FileName} # Verb:{myproc.StartInfo.Verb} # Arguments: {myproc.StartInfo.Arguments}]successfull! ")
FileJobSuccessful = True
sw.Stop()
' myproc.Kill()

View File

@ -48,11 +48,10 @@ Public Class DDWDResultHandler
' Logger.Warn("Achtung: Es konnte keine Verbindung zur Datenbank '" & My.Settings.SQLSERVER_CS_RH & "' hergestellt werden!")
' Else
If clsCURRENT.LOG_ERRORS_ONLY = False Then
MyLogger.Debug = True
Else
MyLogger.Debug = False
End If
MyLogger.Debug = clsCURRENT.DEBUG
oFirstRun = True
' '#Thread für Durchlauf generieren
DDWDResultHandler.threadResultHandler = New BackgroundWorker()
@ -135,7 +134,7 @@ Public Class DDWDResultHandler
_database = New clsDatabase(MyLogger)
If My.Settings.SQLSERVER_CS_RH = "" Then
Logger.Debug("RESULT HANDLER ConString not configured... No Run")
Logger.Warn("RESULT HANDLER ConString not configured... No Run")
Exit Sub
End If
@ -154,10 +153,10 @@ Public Class DDWDResultHandler
If DT.Rows.Count = 1 Then
clsCURRENT.DT_TBWMRH_KONFIGURATION = DT
clsCURRENT.WDLAUFWERK = clsCURRENT.DT_TBWMRH_KONFIGURATION.Rows(0).Item("WD_LAUFWERK")
DD_WMResulthandler.clsCURRENT.LOG_ERRORS_ONLY = DT.Rows(0).Item("LOG_ERRORS_ONLY")
MyLogger.Debug = DT.Rows(0).Item("LOG_ERRORS_ONLY")
If DD_WMResulthandler.clsCURRENT.LOG_ERRORS_ONLY = False Then
Logger.Debug("Detaillog is ON!")
DD_WMResulthandler.clsCURRENT.DEBUG = Not (DT.Rows(0).Item("LOG_ERRORS_ONLY"))
MyLogger.Debug = Not (DT.Rows(0).Item("LOG_ERRORS_ONLY"))
If DD_WMResulthandler.clsCURRENT.DEBUG = True Then
Logger.Info("Detaillog is ON!")
End If
DD_WMResulthandler.clsCURRENT.WDLAUFWERK = DT.Rows(0).Item("WD_LAUFWERK")
End If
@ -184,7 +183,7 @@ Public Class DDWDResultHandler
End If
Next
Else
Logger.Info("Keine aktiven Profile für WMResulthandler vorhanden")
Logger.Warn("Keine aktiven Profile für WMResulthandler vorhanden")
notcompleted = True
End If
'Try

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyVersion("2.1.0.0")>
<Assembly: AssemblyFileVersion("2.1.0.0")>

View File

@ -69,7 +69,7 @@
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.8\lib\net45\NLog.dll</HintPath>
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />

View File

@ -10,7 +10,7 @@ Public Class clsPMRefresh
Private oConfigIDXName_DocID
Private oConfigIDXName_Created
'Private oConfigWMDrive
Private oConfigLOGERRONLY As Boolean
Private oConfigLOG_DEBUG As Boolean
Sub New(theLogger As LogConfig)
MyLogger = theLogger
Logger = MyLogger.GetLogger()
@ -32,12 +32,12 @@ Public Class clsPMRefresh
oConfigIDXName_DocID = oDTPM_CONFIG.Rows(0).Item("SERVICE_IDXNAME_DOCID").ToString
oConfigIDXName_Created = oDTPM_CONFIG.Rows(0).Item("SERVICE_IDXNAME_CREATED").ToString
'oConfigWMDrive = oDTPM_CONFIG.Rows(0).Item("SERVICE_WMDRIVE_LETTER").ToString
oConfigLOGERRONLY = oDTPM_CONFIG.Rows(0).Item("SERVICE_LOG_ERRORS_ONLY")
oConfigLOG_DEBUG = Not (oDTPM_CONFIG.Rows(0).Item("SERVICE_LOG_ERRORS_ONLY"))
Dim oSplit As String()
oSplit = oConfigschedule.Split(";")
Dim oTimespan = oSplit(0)
Dim oDays = oSplit(1)
If oConfigLOGERRONLY = False Then
If oConfigLOG_DEBUG = True Then
MyLogger.Debug = True
Logger.Info("Detaillog Service PMRefresh is ON!")
Else

View File

@ -2,5 +2,5 @@
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
<package id="NLog" version="4.5.8" targetFramework="net461" />
<package id="NLog" version="4.7.10" targetFramework="net461" />
</packages>

View File

@ -22,6 +22,9 @@
<setting name="EmailTestReceipiant" serializeAs="String">
<value />
</setting>
<setting name="Debug_Active" serializeAs="String">
<value>False</value>
</setting>
</ResultHandler_Konfig.My.MySettings>
</userSettings>
<system.data>

View File

@ -88,6 +88,18 @@ Namespace My
Me("EmailTestReceipiant") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public Property Debug_Active() As Boolean
Get
Return CType(Me("Debug_Active"),Boolean)
End Get
Set
Me("Debug_Active") = value
End Set
End Property
End Class
End Namespace

View File

@ -16,5 +16,8 @@
<Setting Name="EmailTestReceipiant" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Debug_Active" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -220,7 +220,6 @@ Partial Class frmMain
Me.TBWMRH_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource(Me.components)
Me.PDF_TK_LOCATIONTextBox = New System.Windows.Forms.TextBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.WD_LAUFWERKTextBox = New System.Windows.Forms.TextBox()
Me.GEAENDERTWANNTextBox3 = New System.Windows.Forms.TextBox()
Me.GEAENDERT_WERTextBox = New System.Windows.Forms.TextBox()
@ -833,6 +832,7 @@ Partial Class frmMain
Me.ListViewProfile.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ListViewProfile.FullRowSelect = True
Me.ListViewProfile.GridLines = True
Me.ListViewProfile.HideSelection = False
Me.ListViewProfile.Location = New System.Drawing.Point(3, 31)
Me.ListViewProfile.Name = "ListViewProfile"
Me.ListViewProfile.Size = New System.Drawing.Size(987, 465)
@ -1083,6 +1083,7 @@ Partial Class frmMain
'
Me.ToolStripTextBox1.AccessibleName = "Position"
Me.ToolStripTextBox1.AutoSize = False
Me.ToolStripTextBox1.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.ToolStripTextBox1.Name = "ToolStripTextBox1"
Me.ToolStripTextBox1.Size = New System.Drawing.Size(50, 23)
Me.ToolStripTextBox1.Text = "0"
@ -1474,6 +1475,7 @@ Partial Class frmMain
'
Me.ToolStripTextBox2.AccessibleName = "Position"
Me.ToolStripTextBox2.AutoSize = False
Me.ToolStripTextBox2.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.ToolStripTextBox2.Name = "ToolStripTextBox2"
Me.ToolStripTextBox2.Size = New System.Drawing.Size(50, 23)
Me.ToolStripTextBox2.Text = "0"
@ -2060,6 +2062,7 @@ Partial Class frmMain
'
Me.BindingNavigatorPositionItem.AccessibleName = "Position"
Me.BindingNavigatorPositionItem.AutoSize = False
Me.BindingNavigatorPositionItem.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem"
Me.BindingNavigatorPositionItem.Size = New System.Drawing.Size(50, 23)
Me.BindingNavigatorPositionItem.Text = "0"
@ -2223,7 +2226,6 @@ Partial Class frmMain
Me.GroupBox2.Controls.Add(PDF_TK_LOCATIONLabel)
Me.GroupBox2.Controls.Add(Me.PDF_TK_LOCATIONTextBox)
Me.GroupBox2.Controls.Add(Me.Button3)
Me.GroupBox2.Controls.Add(Me.Button1)
Me.GroupBox2.Controls.Add(WD_LAUFWERKLabel)
Me.GroupBox2.Controls.Add(Me.WD_LAUFWERKTextBox)
Me.GroupBox2.Controls.Add(Me.GEAENDERTWANNTextBox3)
@ -2292,18 +2294,6 @@ Partial Class frmMain
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button3.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Image = Global.ResultHandler_Konfig.My.Resources.Resources.book_open
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(221, 159)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(110, 23)
Me.Button1.TabIndex = 10
Me.Button1.Text = "Open LogFile"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'WD_LAUFWERKTextBox
'
Me.WD_LAUFWERKTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBWMRH_KONFIGURATIONBindingSource, "WD_LAUFWERK", True))
@ -2344,7 +2334,9 @@ Partial Class frmMain
'
'LOG_ERRORS_ONLYCheckBox
'
Me.LOG_ERRORS_ONLYCheckBox.Checked = Global.ResultHandler_Konfig.My.MySettings.Default.Debug_Active
Me.LOG_ERRORS_ONLYCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBWMRH_KONFIGURATIONBindingSource, "LOG_ERRORS_ONLY", True))
Me.LOG_ERRORS_ONLYCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("Checked", Global.ResultHandler_Konfig.My.MySettings.Default, "Debug_Active", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.LOG_ERRORS_ONLYCheckBox.Location = New System.Drawing.Point(9, 158)
Me.LOG_ERRORS_ONLYCheckBox.Name = "LOG_ERRORS_ONLYCheckBox"
Me.LOG_ERRORS_ONLYCheckBox.Size = New System.Drawing.Size(129, 24)
@ -2409,7 +2401,7 @@ Partial Class frmMain
'
'Button6
'
Me.Button6.Location = New System.Drawing.Point(872, 347)
Me.Button6.Location = New System.Drawing.Point(555, 357)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(30, 23)
Me.Button6.TabIndex = 38
@ -2418,7 +2410,7 @@ Partial Class frmMain
'
'txtAttachment
'
Me.txtAttachment.Location = New System.Drawing.Point(395, 347)
Me.txtAttachment.Location = New System.Drawing.Point(78, 357)
Me.txtAttachment.Name = "txtAttachment"
Me.txtAttachment.Size = New System.Drawing.Size(471, 22)
Me.txtAttachment.TabIndex = 37
@ -2426,7 +2418,7 @@ Partial Class frmMain
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(392, 331)
Me.Label6.Location = New System.Drawing.Point(75, 341)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(91, 13)
Me.Label6.TabIndex = 36
@ -2434,7 +2426,7 @@ Partial Class frmMain
'
'Button5
'
Me.Button5.Location = New System.Drawing.Point(294, 381)
Me.Button5.Location = New System.Drawing.Point(284, 391)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(95, 23)
Me.Button5.TabIndex = 35
@ -2449,7 +2441,7 @@ Partial Class frmMain
Me.AUTH_TYPEComboBox.Items.AddRange(New Object() {"SSL", "TLS", "None"})
Me.AUTH_TYPEComboBox.Location = New System.Drawing.Point(688, 95)
Me.AUTH_TYPEComboBox.Name = "AUTH_TYPEComboBox"
Me.AUTH_TYPEComboBox.Size = New System.Drawing.Size(121, 21)
Me.AUTH_TYPEComboBox.Size = New System.Drawing.Size(178, 21)
Me.AUTH_TYPEComboBox.TabIndex = 34
'
'TBDD_EMAIL_ACCOUNTBindingSource
@ -2492,17 +2484,20 @@ Partial Class frmMain
'
'txtTestmailTo
'
Me.txtTestmailTo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtTestmailTo.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ResultHandler_Konfig.My.MySettings.Default, "EmailTestReceipiant", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtTestmailTo.Location = New System.Drawing.Point(78, 347)
Me.txtTestmailTo.Location = New System.Drawing.Point(78, 315)
Me.txtTestmailTo.Multiline = True
Me.txtTestmailTo.Name = "txtTestmailTo"
Me.txtTestmailTo.Size = New System.Drawing.Size(311, 22)
Me.txtTestmailTo.Size = New System.Drawing.Size(1300, 23)
Me.txtTestmailTo.TabIndex = 29
Me.txtTestmailTo.Text = Global.ResultHandler_Konfig.My.MySettings.Default.EmailTestReceipiant
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(75, 331)
Me.Label1.Location = New System.Drawing.Point(75, 299)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(85, 13)
Me.Label1.TabIndex = 28
@ -2512,7 +2507,7 @@ Partial Class frmMain
'
Me.btnsendtestmail.Image = Global.ResultHandler_Konfig.My.Resources.Resources.email_go
Me.btnsendtestmail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnsendtestmail.Location = New System.Drawing.Point(78, 375)
Me.btnsendtestmail.Location = New System.Drawing.Point(78, 385)
Me.btnsendtestmail.Name = "btnsendtestmail"
Me.btnsendtestmail.Size = New System.Drawing.Size(200, 35)
Me.btnsendtestmail.TabIndex = 27
@ -2535,7 +2530,7 @@ Partial Class frmMain
Me.NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_EMAIL_ACCOUNTBindingSource, "NAME", True))
Me.NAMETextBox.Location = New System.Drawing.Point(78, 54)
Me.NAMETextBox.Name = "NAMETextBox"
Me.NAMETextBox.Size = New System.Drawing.Size(276, 22)
Me.NAMETextBox.Size = New System.Drawing.Size(588, 22)
Me.NAMETextBox.TabIndex = 6
'
'EMAIL_FROMTextBox
@ -2692,6 +2687,7 @@ Partial Class frmMain
'
Me.ToolStripTextBox3.AccessibleName = "Position"
Me.ToolStripTextBox3.AutoSize = False
Me.ToolStripTextBox3.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.ToolStripTextBox3.Name = "ToolStripTextBox3"
Me.ToolStripTextBox3.Size = New System.Drawing.Size(50, 23)
Me.ToolStripTextBox3.Text = "0"
@ -2987,7 +2983,6 @@ Partial Class frmMain
Friend WithEvents TBWMRH_PROFIL_FILE_JOBTableAdapter As MyDatasetTableAdapters.TBWMRH_PROFIL_FILE_JOBTableAdapter
Friend WithEvents TBWMRH_PROFIL_JOBTableAdapter As MyDatasetTableAdapters.TBWMRH_PROFIL_JOBTableAdapter
Friend WithEvents WD_LAUFWERKTextBox As TextBox
Friend WithEvents Button1 As Button
Friend WithEvents lblString2 As Label
Friend WithEvents btnTestCon As Button
Friend WithEvents lblndexname As Label

View File

@ -260,7 +260,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAI
DAAAAk1TRnQBSQFMAgEBAwEAAYABAwGAAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DAAAAk1TRnQBSQFMAgEBAwEAAZgBAwGYAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -30,11 +30,16 @@ Public Class frmMain
' DB_Path()
' End If
'End If
MyLogger = New LogConfig(LogConfig.PathType.AppData, Nothing, "Log")
MyLogger = New LogConfig(LogConfig.PathType.CustomPath,
Application.LocalUserAppDataPath & "\Log",
Nothing,
My.Application.Info.CompanyName,
My.Application.Info.ProductName)
MyLogger.Debug = True
Logger = MyLogger.GetLogger()
Load_Constring()
_database = New clsDatabase(MyLogger)
Logger.Info("Konfig started: " & Now.ToString)
Logger.Info("WMKonfig started: " & Now.ToString)
Try
' Windream instanziieren
_windream = New clsWindream_allgemein(MyLogger)
@ -502,8 +507,10 @@ Public Class frmMain
lblString4.Visible = True
STRING3TextBox.Visible = False
STRING3TextBox1.Visible = True
STRING4TextBox.Visible = True
STRING5TextBox.Visible = True
lblString5.Text = "Benennung Datei:"
lblString5.Visible = True
Case "BNS json Download".ToUpper 'json BNS
lblString1.Text = "User Kunde:"
STRING1TextBox.Visible = True
@ -675,7 +682,7 @@ Public Class frmMain
clsCURRENT.DT_TBWMRH_KONFIGURATION = DT
clsCURRENT.WDLAUFWERK = clsCURRENT.DT_TBWMRH_KONFIGURATION.Rows(0).Item("WD_LAUFWERK")
DD_WMResulthandler.clsCURRENT.LOG_ERRORS_ONLY = DT.Rows(0).Item("LOG_ERRORS_ONLY")
MyLogger.Debug = DT.Rows(0).Item("LOG_ERRORS_ONLY")
'MyLogger.Debug = DT.Rows(0).Item("LOG_ERRORS_ONLY")
If DD_WMResulthandler.clsCURRENT.LOG_ERRORS_ONLY = False Then
Logger.Debug("Detaillog is ON!")
End If
@ -740,7 +747,7 @@ Public Class frmMain
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Private Sub Button1_Click(sender As Object, e As EventArgs)
Try
Process.Start(MyLogger.LogFile)
Catch ex As Exception
@ -985,7 +992,8 @@ Public Class frmMain
End Sub
Private Sub LOG_ERRORS_ONLYCheckBox_CheckedChanged(sender As Object, e As EventArgs) Handles LOG_ERRORS_ONLYCheckBox.CheckedChanged
My.Settings.Debug_Active = LOG_ERRORS_ONLYCheckBox.Checked
My.Settings.Save()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click

BIN
app/packages/NLog.4.7.10/.signature.p7s vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

29217
app/packages/NLog.4.7.10/lib/net35/NLog.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

29646
app/packages/NLog.4.7.10/lib/net45/NLog.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

21926
app/packages/NLog.4.7.10/lib/sl4/NLog.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

22092
app/packages/NLog.4.7.10/lib/sl5/NLog.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

21268
app/packages/NLog.4.7.10/lib/wp8/NLog.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff