BIG CLEANUP

This commit is contained in:
Jonathan Jenne 2022-02-15 16:28:43 +01:00
parent 8d42a486ed
commit 1b7675a1b4
29 changed files with 1117 additions and 2113 deletions

View File

@ -1,490 +0,0 @@
Imports System.Data.SqlClient
Imports Oracle.ManagedDataAccess.Client
Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Language
Public Class ClassControls
Private Property Form As frmIndex
Private Property Panel As Panel
Public Class ControlMeta
Public Property IndexName As String
Public Property IndexType As String
Public Property MultipleValues As Boolean = False
End Class
Public Sub New(Panel As Panel, Form As frmIndex)
Me.Form = Form
Me.Panel = Panel
End Sub
Public Function AddCheckBox(indexname As String, y As Integer, vorbelegung As String, caption As String)
Try
Dim value As Boolean = False
Dim chk As New CheckBox
chk.Name = "chk" & indexname
chk.Size = New Size(100, 27)
chk.Location = New Point(11, y)
chk.Tag = New ControlMeta() With {
.IndexName = indexname,
.IndexType = ClassConstants.INDEX_TYPE_BOOLEAN
}
If caption <> "" Then
chk.Text = caption
chk.Size = New Size(CInt(caption.Length * 15), 27)
End If
If Boolean.TryParse(vorbelegung, value) = False Then
If vorbelegung = "1" Or vorbelegung = "0" Then
chk.Checked = CBool(vorbelegung)
Else
chk.Checked = False
End If
Else
chk.Checked = value
End If
AddHandler chk.CheckedChanged, AddressOf Checkbox_CheckedChanged
Return chk
Catch ex As Exception
LOGGER.Info("Unhandled Exception in AddCheckBox: " & ex.Message)
LOGGER.Error(ex)
Return Nothing
End Try
End Function
Public Sub Checkbox_CheckedChanged(sender As CheckBox, e As EventArgs)
PrepareDependingControl(sender)
End Sub
'Public Function AddVorschlag_ComboBox(indexname As String, y As Integer, conid As Integer, sql_Vorschlag As String, Multiselect As Boolean, DataType As String, Optional Vorgabe As String = "", Optional AddNewValues As Boolean = False, Optional PreventDuplicateValues As Boolean = False, Optional SQLSuggestion As Boolean = False) As Control
' Try
' Dim oSql As String = sql_Vorschlag
' Dim oConnectionString As String
' Dim oControl As New DigitalData.Controls.LookupGrid.LookupControl3 With {
' .MultiSelect = Multiselect,
' .AllowAddNewValues = AddNewValues,
' .PreventDuplicates = PreventDuplicateValues,
' .Location = New Point(11, y),
' .Size = New Size(300, 27),
' .Name = "cmbMulti" & indexname,
' .Tag = New ControlMeta() With {
' .IndexName = indexname,
' .IndexType = DataType
' }
' }
' oControl.Properties.AppearanceFocused.BackColor = Color.FromArgb(255, 214, 49)
' If Not String.IsNullOrEmpty(Vorgabe) Then
' Dim oDefaultValues As New List(Of String)
' If Vorgabe.Contains(",") Then
' oDefaultValues = Vorgabe.
' Split(",").ToList().
' Select(Function(item) item.Trim()).
' ToList()
' Else
' oDefaultValues = Vorgabe.
' Split(ClassConstants.VECTORSEPARATOR).ToList().
' Select(Function(item) item.Trim()).
' ToList()
' End If
' oControl.SelectedValues = oDefaultValues
' End If
' AddHandler oControl.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
' oConnectionString = ClassFormFunctions.GetConnectionString(conid)
' If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
' LOGGER.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
' If ClassPatterns.HasComplexPatterns(oSql) Then
' LOGGER.Debug(" >>sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
' Else
' oSql = ClassPatterns.ReplaceInternalValues(oSql)
' oSql = ClassPatterns.ReplaceUserValues(oSql, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
' Dim oDatatable = DATABASE_ECM.GetDatatable(.Return_Datatable_Combined(oSql, oConnectionString, False)
' oControl.DataSource = oDatatable
' End If
' Else
' LOGGER.Warn("Connection String for control [{0}] is empty!", oControl.Name)
' End If
' Return oControl
' Catch ex As Exception
' LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)
' LOGGER.Error(ex)
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in AddVorschlag_ComboBox:")
' Return Nothing
' End Try
'End Function
Private Sub Lookup_SelectedValuesChanged(sender As LookupControl3, SelectedValues As List(Of String))
PrepareDependingControl(sender)
End Sub
Function AddCombobox(indexname As String, y As Integer)
Dim cmb As New ComboBox
cmb.Name = "cmb" & indexname
cmb.AutoSize = True
cmb.Size = New Size(300, 27)
cmb.Location = New Point(11, y)
cmb.Tag = New ControlMeta() With {
.IndexName = indexname
}
AddHandler cmb.SelectedIndexChanged, AddressOf OncmbSIndexChanged
AddHandler cmb.GotFocus, AddressOf OncmbGotFocus
AddHandler cmb.LostFocus, AddressOf OncmbLostFocus
AddHandler cmb.KeyDown, AddressOf OncmbKeyDown
Return cmb
End Function
Public Sub OncmbKeyDown(sender As System.Object, e As System.EventArgs)
Dim cmb As ComboBox = sender
' Verhindert, dass Auswahlliste und Autocompleteliste übereinander liegen
If cmb.DroppedDown = True Then
cmb.DroppedDown = False
End If
End Sub
Public Sub OncmbGotFocus(sender As System.Object, e As System.EventArgs)
Dim cmb As ComboBox = sender
cmb.BackColor = Color.FromArgb(255, 214, 49)
End Sub
Public Sub OncmbLostFocus(sender As System.Object, e As System.EventArgs)
Dim cmb As ComboBox = sender
cmb.BackColor = Color.White
End Sub
Public Sub OncmbSIndexChanged(sender As System.Object, e As System.EventArgs)
If Form.FormLoaded = False Then
Exit Sub
End If
Dim cmb As ComboBox = sender
If cmb.SelectedIndex <> -1 Then
If cmb.Text.Length > 15 Then
Dim g As Graphics = cmb.CreateGraphics
cmb.Width = g.MeasureString(cmb.Text, cmb.Font).Width + 30
g.Dispose()
End If
Get_NextComboBoxResults(cmb)
SendKeys.Send("{TAB}")
End If
End Sub
Private Sub Get_NextComboBoxResults(cmb As ComboBox)
Try
Dim indexname = cmb.Name.Replace("cmb", "")
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & CURRENT_DOKART_ID & " ORDER BY SEQUENCE"
Dim DT As DataTable = DATABASE_ECM.GetDatatable(sql)
If Not IsNothing(DT) Then
If DT.Rows.Count > 0 Then
Dim cmbname = "cmb" & DT.Rows(0).Item("NAME")
Renew_ComboboxResults(DT.Rows(0).Item("GUID"), indexname, cmb.Text)
End If
End If
Catch ex As Exception
MsgBox("Error in Get_NextComboBoxResults:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub Renew_ComboboxResults(INDEX_GUID As Integer, SearchString As String, Resultvalue As String)
Try
Dim connectionString As String
Dim sqlCnn As SqlConnection
Dim sqlCmd As SqlCommand
Dim adapter As New SqlDataAdapter
Dim oracleConn As OracleConnection
Dim oracleCmd As OracleCommand
Dim oracleadapter As New OracleDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
Dim DT_INDEX As DataTable = DATABASE_ECM.GetDatatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID)
If IsNothing(DT_INDEX) Then
Exit Sub
End If
Dim conid = DT_INDEX.Rows(0).Item("CONNECTION_ID")
Dim sql_result = DT_INDEX.Rows(0).Item("SQL_RESULT")
Dim NAME = DT_INDEX.Rows(0).Item("NAME")
If Not IsNothing(conid) And Not IsNothing(sql_result) And Not IsNothing(NAME) Then
For Each ctrl As Control In Me.Panel.Controls
If ctrl.Name = "cmb" & NAME.ToString Then
Dim cmb As ComboBox = ctrl
Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue)
connectionString = DATABASE_ECM.Get_ConnectionStringforID(conid)
If connectionString Is Nothing = False Then
'SQL Befehl füllt die Auswahlliste
If connectionString.Contains("Initial Catalog=") Then
sqlCnn = New SqlConnection(connectionString)
sqlCnn.Open()
sqlCmd = New SqlCommand(sql, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
ElseIf connectionString.StartsWith("Data Source=") And connectionString.Contains("SERVICE_NAME") Then
oracleConn = New OracleConnection(connectionString)
' Try
oracleConn.Open()
oracleCmd = New OracleCommand(sql, oracleConn)
oracleadapter.SelectCommand = oracleCmd
oracleadapter.Fill(NewDataset)
End If
If NewDataset.Tables(0).Rows.Count > 0 Then
cmb.Items.Clear()
'Die Standargrösse definieren
Dim newWidth As Integer = 300
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
'MsgBox(NewDataset.Tables(0).Rows(i).Item(0))
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Try
Dim text As String = NewDataset.Tables(0).Rows(i).Item(0)
If text.Length > 15 Then
Dim g As Graphics = cmb.CreateGraphics
If g.MeasureString(text, cmb.Font).Width + 30 > newWidth Then
newWidth = g.MeasureString(text, cmb.Font).Width + 30
End If
g.Dispose()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Anpassung Breite ComboBox:")
End Try
Next
cmb.Size = New Size(newWidth, 27)
cmb.AutoCompleteSource = AutoCompleteSource.ListItems
cmb.AutoCompleteMode = AutoCompleteMode.Suggest
End If
If connectionString.Contains("Initial Catalog=") Then
Try
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
Catch ex As Exception
End Try
Else
Try
oracleadapter.Dispose()
oracleCmd.Dispose()
oracleConn.Close()
Catch ex As Exception
End Try
End If
End If
End If
Next
End If
Catch ex As Exception
LOGGER.Info(" - Unvorhergesehener Unexpected error in Renew_ComboboxResults - Fehler: " & vbNewLine & ex.Message)
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Renew_ComboboxResults:")
End Try
End Sub
Public Function AddTextBox(indexname As String, y As Integer, text As String, DataType As String) As DevExpress.XtraEditors.TextEdit
Dim oEdit As New DevExpress.XtraEditors.TextEdit With {
.Name = "txt" & indexname,
.Size = New Size(260, 27),
.Location = New Point(11, y),
.Tag = New ControlMeta() With {
.IndexName = indexname,
.IndexType = DataType
}
}
Select Case DataType
Case ClassConstants.INDEX_TYPE_INTEGER
oEdit.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric
oEdit.Properties.Mask.EditMask = "d"
Console.WriteLine()
End Select
If text IsNot Nothing Then
oEdit.Text = text
oEdit.SelectAll()
End If
AddHandler oEdit.GotFocus, AddressOf OnTextBoxFocus
AddHandler oEdit.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler oEdit.KeyUp, AddressOf OnTextBoxKeyUp
AddHandler oEdit.TextChanged, AddressOf OnTextBoxTextChanged
Return oEdit
End Function
Public Sub OnTextBoxFocus(sender As System.Object, e As System.EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender
oTextbox.BackColor = Color.FromArgb(255, 214, 49)
oTextbox.SelectAll()
End Sub
Public Sub OnTextBoxTextChanged(sender As System.Object, e As System.EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender
Using oGraphics As Graphics = oTextbox.CreateGraphics()
oTextbox.Width = oGraphics.MeasureString(oTextbox.Text, oTextbox.Font).Width + 15
End Using
End Sub
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender
oTextbox.BackColor = Color.White
End Sub
Public Sub OnTextBoxKeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender
If oTextbox.Text = String.Empty Then
Exit Sub
End If
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
PrepareDependingControl(oTextbox)
End If
If (e.KeyCode = Keys.Return) Then
SendKeys.Send("{TAB}")
End If
End Sub
Public Function AddDateTimePicker(indexname As String, y As Integer, DataType As String, Vorgabe As String) As DevExpress.XtraEditors.DateEdit
Dim oPicker As New DevExpress.XtraEditors.DateEdit With {
.Name = "dtp" & indexname,
.Size = New Size(260, 27),
.Location = New Point(11, y),
.Tag = New ControlMeta() With {
.IndexName = indexname,
.IndexType = DataType
}
}
If Vorgabe.ToUpper = "$NULL" Then
oPicker.EditValue = Nothing
ElseIf Vorgabe IsNot Nothing Then
oPicker.EditValue = Vorgabe
End If
oPicker.Properties.AppearanceFocused.BackColor = Color.FromArgb(255, 214, 49)
Return oPicker
End Function
Sub OndtpChanged()
'offen was hier zu tun ist
End Sub
Private Sub PrepareDependingControl(Control As Control)
If TypeOf Control Is Label Then
Exit Sub
End If
Try
Dim oMeta = DirectCast(Control.Tag, ClassControls.ControlMeta)
Dim oIndexName As String = oMeta.IndexName
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
Dim oDatatable As DataTable = DATABASE_ECM.GetDatatable(oSQL)
If Not IsNothing(oDatatable) Then
LOGGER.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name)
For Each oRow As DataRow In oDatatable.Rows
Dim oControlName As String = Utils.NotNull(oRow.Item("NAME"), "")
Dim oConnectionId As Integer = Utils.NotNull(oRow.Item("CONNECTION_ID"), -1)
Dim oControlSql As String = Utils.NotNull(oRow.Item("SQL_RESULT"), "")
If oConnectionId = -1 Or oControlSql = String.Empty Then
LOGGER.Warn("Missing SQL Query or ConnectionId for Control [{0}]! Continuing.", oControlName)
Continue For
End If
oControlSql = ClassPatterns.ReplaceUserValues(oControlSql, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
oControlSql = ClassPatterns.ReplaceInternalValues(oControlSql)
oControlSql = ClassPatterns.ReplaceControlValues(oControlSql, Panel)
LOGGER.Debug("SQL After Preparing: [{0}]", oControlSql)
LOGGER.Debug("Setting new value for [{0}]", oControlName)
SetDependingControlResult(oControlName, oControlSql, oConnectionId)
Next
End If
Catch ex As Exception
LOGGER.Error(ex)
End Try
End Sub
Private Sub SetDependingControlResult(IndexName As String, SqlCommand As String, SqlConnectionId As Integer)
Try
If SqlCommand Is Nothing OrElse SqlCommand = String.Empty Then
LOGGER.Warn("New Value for Index [{0}] could not be set. Supplied SQL is empty.")
Exit Sub
End If
Dim oConnectionString = DATABASE_ECM.Get_ConnectionStringforID(SqlConnectionId)
Dim oDatatable As DataTable = DATABASE_ECM.GetDatatable(SqlCommand)
Dim oFoundControl As Control = Nothing
For Each oControl As Control In Panel.Controls
If TypeOf oControl Is Label Then
Continue For
End If
Dim oMeta = DirectCast(oControl.Tag, ClassControls.ControlMeta)
Dim oIndex As String = oMeta.IndexName
If oIndex = IndexName Then
oFoundControl = oControl
Exit For
End If
Next
If oFoundControl Is Nothing Then
LOGGER.Warn("Depending Control for Index [{0}] not found!", IndexName)
End If
If oDatatable Is Nothing Then
LOGGER.Warn("Error in SQL Command: {0}", SqlCommand)
End If
Select Case oFoundControl.GetType.Name
Case GetType(DevExpress.XtraEditors.TextEdit).Name
If oDatatable.Rows.Count > 0 Then
Dim oFirstRow As DataRow = oDatatable.Rows.Item(0)
If oFirstRow.ItemArray.Length > 0 Then
Dim oValue = oFirstRow.Item(0).ToString()
LOGGER.Debug("Setting Value for TextEdit [{0}]: [{1}]", oFoundControl.Name, oValue)
DirectCast(oFoundControl, DevExpress.XtraEditors.TextEdit).Text = oValue
End If
End If
Case GetType(LookupControl3).Name
LOGGER.Debug("Setting Value for LookupControl [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
DirectCast(oFoundControl, LookupControl3).Properties.DataSource = oDatatable
Case GetType(ComboBox).Name
LOGGER.Debug("Setting Value for Combobox [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
DirectCast(oFoundControl, ComboBox).DataSource = oDatatable
Case Else
LOGGER.Debug("Could not set depending control result for [{0}]", oFoundControl.GetType.Name)
End Select
Catch ex As Exception
LOGGER.Error(ex)
End Try
End Sub
End Class

View File

@ -1,187 +0,0 @@
Imports System.Data.SqlClient
Imports Oracle.ManagedDataAccess.Client
Public Class ClassDatabase
Private Const NETWORK_TIMEOUT As Integer = -1
Private Shared SQLSERVERConnectionString As String
Private Shared OracleConnectionString As String
Public Shared DatabaseConnectionTimeout As Boolean = False
Public Shared Function Init()
Try
SQLSERVERConnectionString = MyConnectionString
Dim SQLconnect As New SqlConnection
SQLconnect.ConnectionString = SQLSERVERConnectionString
SQLconnect.Open()
SQLconnect.Close()
Return True
Catch ex As Exception
LOGGER.Info("Unexpected error in Database-Init: " & ex.Message)
LOGGER.Error(ex)
Return False
End Try
End Function
Public Shared Function Return_Datatable(sql_command As String, Optional userInput As Boolean = False) As DataTable
Try
Dim SQLconnect As New SqlConnection
Dim SQLcommand As SqlCommand
SQLconnect.ConnectionString = SQLSERVERConnectionString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = sql_command
Dim adapter1 As SqlDataAdapter = New SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
' Reset timeout counter when query was sucessful
DatabaseConnectionTimeout = False
Return dt
Catch ex As SqlException
Dim handled = CatchDatabaseTimeout(ex, sql_command)
If Not handled Then
If userInput = True Then
MsgBox("Error in Return_Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command)
End If
Return Nothing
Catch ex As Exception
If userInput = True Then
MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command)
Return Nothing
End Try
End Function
Public Shared Function Return_Datatable_CS(sql_command As String, ConString As String, Optional userInput As Boolean = False) As DataTable
Try
Dim SQLconnect As New SqlConnection
Dim SQLcommand As SqlCommand
SQLconnect.ConnectionString = ConString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = sql_command
Dim adapter1 As SqlDataAdapter = New SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
' Reset timeout counter when query was sucessful
DatabaseConnectionTimeout = False
Return dt
Catch ex As SqlException
Dim handled = CatchDatabaseTimeout(ex, sql_command)
If Not handled Then
If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command)
End If
Return Nothing
Catch ex As Exception
If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & sql_command, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & sql_command)
Return Nothing
End Try
End Function
Public Shared Function OracleExecute_Scalar(cmdscalar As String, OracleConnection As String)
Dim result
Try
Dim SQLconnect As New OracleConnection
Dim SQLcommand As New OracleCommand
SQLconnect.ConnectionString = OracleConnection
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = cmdscalar
result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose()
SQLconnect.Close()
Return result
Catch ex As Exception
LOGGER.Info("Unexpected error in OracleExecute_Scalar: " & ex.Message)
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & cmdscalar)
Return Nothing
End Try
End Function
Public Shared Function OracleExecute_non_Query(ExecuteCMD As String, OracleConnection As String, Optional userInput As Boolean = False)
Try
Dim SQLconnect As New OracleConnection
Dim SQLcommand As OracleCommand
SQLconnect.ConnectionString = OracleConnection
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = ExecuteCMD
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Return True
Catch ex As Exception
If userInput = True Then
MsgBox("Error in OracleExecute_non_Query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & ExecuteCMD)
Return False
End Try
End Function
Public Shared Function Oracle_Return_Datatable(Select_anweisung As String, OracleConnection As String, Optional userInput As Boolean = False)
Try
Dim SQLconnect As New OracleConnection
Dim SQLcommand As OracleCommand
SQLconnect.ConnectionString = OracleConnection
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = Select_anweisung
Dim adapter1 As OracleDataAdapter = New OracleDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
SQLconnect.Close()
Return dt
Catch ex As Exception
If userInput = True Then
MsgBox("Error in Oracle Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If
LOGGER.Error(ex)
LOGGER.Info("#SQL: " & Select_anweisung)
Return Nothing
End Try
End Function
Public Shared Function CatchDatabaseTimeout(ex As SqlException, sql_command As String)
Dim FatalErrors As New List(Of Integer) From {-1, -2, 121}
If FatalErrors.Contains(ex.Number) Then
DatabaseConnectionTimeout = True
LOGGER.Info("Network timeout error in Return_Datatable: " & ex.Message)
LOGGER.Info("#SQL: " & sql_command)
Return True
Else
Return False
End If
End Function
End Class

View File

@ -1,71 +0,0 @@
Imports System.Net.Mail
Public Class ClassEmail
Public Shared Function Send_Log_Mail(ByVal vBody As String, ByVal vBetreff As String, ByVal emailfrom As String, ByVal emailsmtp As String, ByVal emailuser As String, ByVal emailpw As String, ByVal email_empf As String, Optional test As Boolean = False, Optional Log As Boolean = False)
'#### E-MAIL NACHRICHT VERSENDEN
Try
Dim empfaenger As String()
If email_empf.Contains(";") Then
empfaenger = email_empf.Split(";")
Else
ReDim Preserve empfaenger(0)
empfaenger(0) = email_empf
End If
'Für jeden Empfänger eine Neue Mail erzeugen
For Each _mailempfaenger As String In empfaenger
' Neue Nachricht erzeugen:
Dim message As New MailMessage(emailfrom, _mailempfaenger, vBetreff & " - Domain: " & Environment.UserDomainName,
"<font face=""Arial"">" & vBody & "<br>>> Version: " & My.Application.Info.Version.ToString & "<br>>> Maschine: " & Environment.MachineName & "<br>" & "<br>>> Domain-Name: " & Environment.UserDomainName & "<br>" &
"<br>>> Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & " " &
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
If test = False Then
If Log = True Then
' create and add the attachment(s) */
If IO.File.Exists(LOGCONFIG.LogFile) Then
Dim Attachment As Attachment = New Attachment(LOGCONFIG.LogFile)
message.Attachments.Add(Attachment)
End If
End If
End If
With message
.IsBodyHtml = True
.Priority = MailPriority.High
End With
'Einen SMTP Client erzeugen und Anmeldungsinformationen hinterlegen
Dim emailClient As New SmtpClient(emailsmtp)
'Email mit Authentifizierung
Dim SMTPUserInfo As New System.Net.NetworkCredential(emailuser, emailpw)
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo
emailClient.Port = 25
'*Send the message */
emailClient.Send(message)
If USER_LANGUAGE = "de-DE" Then
If test = True Then
MsgBox("Die Test-Email wurde erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If
If Log = True Then
MsgBox("Die Support-Email wurde erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If
Else
If test = True Then
MsgBox("Test-Email sucessfully sent!", MsgBoxStyle.Information, "Success:")
End If
If Log = True Then
MsgBox("Support-Email sucessfully sent!", MsgBoxStyle.Information, "Success:")
End If
End If
'LOGGER.Info(">> Support/Log Email erfolgreich an " & _mailempfaenger & " versendet!")
Next
Return True
Catch ex As Exception
LOGGER.Info("### Fehler im Mailversand: " & ex.Message)
LOGGER.Error(ex)
Return False
End Try
End Function
End Class

View File

@ -1,314 +0,0 @@
Imports System.IO
Imports Microsoft.Office.Interop
Imports DigitalData.Modules.Language.Utils
Public Class ClassFileDrop
'Public Shared Property FilesDropped As String()
Public Shared Property FilesDropped As New List(Of String)
' Tobit David Drag Drop: https://www.david-forum.de/thread/12671-drag-and-drop-von-faxen-und-mails-in-net-anwendung/
'Private Declare Function DVEmlFromMailItem Lib "DvApi32" (ByVal oMailItem As MailItem, ByVal strFileName As String) As Long
Public Shared Function Drop_File(e As DragEventArgs)
Try
LOGGER.Info("Drop_File")
FilesDropped.Clear()
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim oFilesFromEvent() As String
Dim oIndex As Integer
' Assign the files to an array.
oFilesFromEvent = e.Data.GetData(DataFormats.FileDrop)
' Loop through the array and add the files to the list.
For oIndex = 0 To oFilesFromEvent.Length - 1
'Dim oFileName As String = e.Data.GetData("FileNameW")
Dim oFileName = oFilesFromEvent(oIndex)
If TestContainsInvalidCharacters(oFileName) Then
MsgBox($"Die Datei [{oFileName}] enthält ungültige Zeichen im Dateinamen. Bitte benennen Sie sie vor der Ablage um.", MsgBoxStyle.Critical, "Global Indexer")
Return False
End If
LOGGER.Info("Simple FileDrop - File: " & oFileName)
FilesDropped.Add("|DROPFROMFSYSTEM|" & oFileName)
'ReDim Preserve FilesDropped(oIndex)
'FilesDropped(oIndex) = "|DROPFROMFSYSTEM|" & oFilesFromEvent(oIndex)
' ListBox1.Items.Add(MyFiles(i))
Next
Return True
ElseIf (e.Data.GetDataPresent("FileGroupDescriptor")) AndAlso (e.Data.GetDataPresent("FileContents")) Then
'// the first step here is to get the stbFileName
'// of the attachment and
'// build a full-path name so we can store it
'// in the temporary folder
'//
'// set up to obtain the aryFileGroupDescriptor
'// and extract the file name
Dim stbFileName As System.Text.StringBuilder = New System.Text.StringBuilder("")
Using oStream As IO.Stream = CType(e.Data.GetData("FileGroupDescriptor"), IO.Stream)
Dim aryFileGroupDescriptor(512) As Byte ' = new byte[512]
oStream.Read(aryFileGroupDescriptor, 0, 512)
'// used to build the stbFileName from the aryFileGroupDescriptor block
'// this trick gets the stbFileName of the passed attached file
Dim intCnt As Integer = 76
Do While aryFileGroupDescriptor(intCnt) <> 0
stbFileName.Append(Convert.ToChar(aryFileGroupDescriptor(intCnt), System.Globalization.CultureInfo.CreateSpecificCulture("de-DE")))
intCnt += 1
Loop
oStream.Close()
End Using
'Sonderzeichen entfernen
Dim oTempFileName = DigitalData.Modules.Language.Utils.ConvertTextToSlug(stbFileName.ToString)
LOGGER.Info("Slug for Filename: [{0}]", oTempFileName)
Dim oAttachments = e.Data.GetDataPresent("FileContents")
Dim strOutFile As String = Path.Combine(Path.GetTempPath(), oTempFileName)
'// create the full-path name
'//
'// Second step: we have the file name.
'// Now we need to get the actual raw
'// data for the attached file and copy it to disk so we work on it.
'//
'// get the actual raw file into memory
'Dim oMemoryStreamInput As IO.MemoryStream = CType(e.Data.GetData("FileContents", True), IO.MemoryStream) 'This returns nothing for an Email
Using oStream As MemoryStream = CType(e.Data.GetData("FileContents", True), IO.MemoryStream)
If oStream Is Nothing = False Then
'// allocate enough bytes to hold the raw date
Dim aryFileBytes(CType(oStream.Length, Int32)) As Byte
'// set starting position at first byte and read in the raw data
oStream.Position = 0
oStream.Read(aryFileBytes, 0, CType(oStream.Length, Int32))
'// create a file and save the raw zip file to it
Dim fsOutput As IO.FileStream = New IO.FileStream(strOutFile, IO.FileMode.Create) ';
fsOutput.Write(aryFileBytes, 0, aryFileBytes.Length)
fsOutput.Close() ' // close the file
Dim resultVersion = ClassFilehandle.Versionierung_Datei(strOutFile)
If resultVersion <> "" Then
strOutFile = resultVersion
End If
Dim finTemp As IO.FileInfo = New IO.FileInfo(strOutFile)
'// always good to make sure we actually created the file
If (finTemp.Exists = True) Then
LOGGER.Info("Drop an Attachment - File: " & strOutFile)
FilesDropped.Add("|OUTLOOK_ATTACHMENT|" & strOutFile)
'ReDim Preserve FilesDropped(0)
'FilesDropped(0) = "|OUTLOOK_ATTACHMENT|" & strOutFile
Return True
Else
LOGGER.Info("Attachment File from Outlook could not be created")
End If
End If
End Using
End If
If e.Data.GetDataPresent("FileGroupDescriptor") Then
Dim oApp As Outlook.Application
Try
oApp = New Outlook.Application()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected error in Initialisieren von Outlook-API:" & vbNewLine & ex.Message & vbNewLine & vbNewLine & "Evtl ist Outlook nicht in der dafür vorgesehenen For")
Return False
End Try
LOGGER.Info(" Drop of msg")
'supports a drop of a Outlook message
Dim myobj As Outlook.MailItem
For i As Integer = 1 To oApp.ActiveExplorer.Selection.Count
myobj = oApp.ActiveExplorer.Selection.Item(i)
Dim subj As String = myobj.Subject
If subj = "" Then
subj = "NO_SUBJECT"
End If
'Sonderzeichen entfernen
Dim oSubjectSlug = DigitalData.Modules.Language.Utils.ConvertTextToSlug(subj)
LOGGER.Info("Subject Slug for Filename: [{0}]", oSubjectSlug)
'hardcode a destination path for testing
Dim oFilename As String = IO.Path.Combine(Path.GetTempPath, oSubjectSlug + ".msg")
oFilename = oFilename.Replace("?", "")
oFilename = oFilename.Replace("!", "")
oFilename = oFilename.Replace("%", "")
oFilename = oFilename.Replace("$", "")
LOGGER.Info("Drop of msg - File:" & oFilename)
Try
myobj.SaveAs(oFilename)
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Die Email konnte aufgrund einer Sicherheitseinstellung im Outlook nicht abgelegt werden! " &
"Bitte wenden Sie sich an Ihren Administrator, " &
"um den programmatischen Zugriff auf Outlook zuzulassen. " &
"Weitere Informationen finden Sie im Log.", MsgBoxStyle.Critical, "Global Indexer")
End Try
FilesDropped.Add("|OUTLOOK_MESSAGE|" & oFilename)
'ReDim Preserve FilesDropped(i)
'FilesDropped(i) = "|OUTLOOK_MESSAGE|" & oFilename
Next
Return True
'Drop eines Outlook Attachments
End If
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in Drop-File" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False
End Try
End Function
'Private Sub DragDrop_HandleTobit(e As DragEventArgs)
' If e.Data.GetDataPresent("#TobitMsgData") Then
' Dim Quellpfad As String = ""
' Dim Dateinamen As String()
' 'Quellpfad zu den David Dateien auslesen
' Using ms As MemoryStream = e.Data.GetData("#TobitMsgData")
' Dim bytes As Byte() = ms.ToArray()
' Dim n As Integer = 0
' Dim c As Char
' Do While True
' c = Convert.ToChar(bytes(n))
' If bytes(n) <> 0 Then
' Quellpfad &= c
' n += 1
' Else
' Exit Do
' End If
' Loop
' End Using
' 'Dateinamen der gedroppten Emails auslesen
' Using ms As MemoryStream = e.Data.GetData("FileGroupDescriptor")
' 'Header sind 4B
' 'Jeder Datensatz ist 332B
' 'Bei Index 72 des Datensatzes beginnt das "Dateiname.eml"
' Dim bytes As Byte() = ms.ToArray()
' ReDim Dateinamen(Int(bytes.Count / 332) - 1)
' ' Array mit so vielen Elementen wie Datensätze im FileGroupDescriptor sind
' Dim AnzahlMails As Integer = bytes(0)
' Dim Dateiname As String
' Dim n As Integer
' For i = 0 To AnzahlMails - 1
' Dateiname = ""
' n = 0
' Do While True
' 'Solange die Bytes auslesen, bis man einen vbNullChar liest
' If bytes(i * 332 + 4 + 72 + n) <> 0 Then
' Dateiname = Dateiname & Convert.ToChar(bytes(i * 332 + 4 + 72 + n))
' n += 1
' Else
' Exit Do
' End If
' Loop
' Dateinamen(i) = Dateiname
' Next
' End Using
' Using EntryDataEx As MemoryStream = e.Data.GetData("#TobitEntryDataEx")
' Dim bytes As Byte() = EntryDataEx.ToArray()
' 'Die Größe des Headers steht im ersten Byte
' Dim HeadExSize As Integer = bytes(0)
' 'Die Anzahl der Datensätze steht im 8. - 11. Byte
' Dim nCountEntries As Integer = BitConverter.ToInt32(bytes, 8)
' Dim nPositions(nCountEntries - 1) As Integer
' For i = 0 To nCountEntries - 1
' 'Datensätze in der #TobitEntryDataEx sind 269 Byte groß.
' 'In den ersten 4 Bytes steht die QID aus der archive.dat
' nPositions(i) = BitConverter.ToInt32(bytes, HeadExSize + i * 269)
' Next
' Using fs As New FileStream(Quellpfad & "\archive.dat", FileMode.Open, FileAccess.Read)
' 'archive.dat als MemoryStream kopieren
' Using ms As New MemoryStream
' fs.CopyTo(ms)
' 'MemoryStream in ein Byte-Array konvertieren
' Dim archiveBytes As Byte() = ms.ToArray()
' 'Datensätze in der archive.dat sind 430 Byte groß
' For i = 16 To archiveBytes.Length - 1 Step 430
' 'Das 17.-20. Byte ist die QID die wir suchen
' Dim QID As Integer = BitConverter.ToInt32(archiveBytes, i)
' 'Wenn die QID übereinstimmt mit einer der David-Mails, dann lies den Dateinamen im Archiv aus
' If nPositions.Contains(QID) Then
' 'Der Index der QID (0, ..., nCountEntries - 1)
' Dim nPosIndex As Integer = -1
' For j = 0 To nPositions.Length - 1
' If QID = nPositions(j) Then
' nPosIndex = j
' Exit For
' End If
' Next
' 'Alle Bytes ab dem 17. bis zum Ende des Datensatzes aus der archive.bat auslesen und als String konvertieren
' Dim byteString As String = ""
' For j = 0 To 429 - 17
' byteString &= Convert.ToChar(archiveBytes(i + j))
' Next
' 'Index der Id herausfinden (Index des Quellpfads im byteString + Länge des Quellpfads + 1 "\")
' Dim IdIndex As Integer = byteString.IndexOf(Quellpfad, StringComparison.OrdinalIgnoreCase) + Quellpfad.Length + 1
' 'Die Id sind dann die 8 Zeichen ab dem IdIndex
' Dim Id As String = byteString.Substring(IdIndex, 8)
' 'EML speichern
' DavidEmlSpeichern(Quellpfad, Dateinamen(nPosIndex), QID, Id)
' End If
' Next
' End Using
' End Using
' End Using
' End If
'End Sub
'Private Sub DavidEmlSpeichern(ArchivePfad As String, Dateiname As String, ID As String, FaxID As String)
' Dim oApp As DavidAPIClass
' Dim oAcc As Account
' Dim oArchive As Archive
' Dim oMessageItems As MessageItems
' Dim oMailItem As MailItem
' oApp = New DavidAPIClass()
' oApp.LoginOptions = DvLoginOptions.DvLoginForceAsyncDuplicate
' oAcc = oApp.Logon("DavidServer", "", "", "", "", "NOAUTH")
' oArchive = oAcc.ArchiveFromID(ArchivePfad)
' If FaxID.First() = "M" Then
' 'Faxe beginnen mit M
' 'Bei Faxen kann man einfach die .001 Datei kopieren und als TIF speichern
' File.Copy(ArchivePfad & "\" & FaxID & ".001", "C:\Temp\" & Dateiname, True)
' ListeAktualisieren()
' ElseIf FaxID.First() = "I" Then
' 'Emails beginnen mit I
' 'Bei Emails muss man die DVEmlFromMailItem mit dem richtigen oMailItem aufrufen
' oMessageItems = oArchive.MailItems
' For Each oMailItem In oMessageItems
' If oMailItem._ID = ID Then
' Dim fileName As String = Space(260)
' If DVEmlFromMailItem(oMailItem, fileName) <> 0 Then
' fileName = Trim(fileName)
' fileName = fileName.Substring(0, fileName.Length - 1)
' File.Copy(fileName, "C:\Temp\" & Dateiname, True)
' ListeAktualisieren()
' End If
' Exit For
' End If
' Next
' End If
'End Sub
End Class

View File

@ -1,12 +1,48 @@
Imports System.IO
Imports System.Guid
Imports System.Text.RegularExpressions
Imports DevExpress.XtraEditors
Imports DigitalData.Modules.Language
Imports Limilabs.Mail
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class ClassFilehandle
Public Shared Function Decide_FileHandle(pFilepath As String, pHandletype As String) As Boolean
Public Class ClassFileHandler
Inherits BaseClass
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Property TempFiles As New List(Of String)
Private Function GetTempPath(pSourceFilePath As String, pNewFileName As String, pSubfolder As String) As String
Try
Dim oTempDirectory = Path.GetTempPath()
Dim oTempSubDirectory As String = Path.Combine(oTempDirectory, pSubfolder)
' Try to create a subdirectory for all temp files so it will be easier to clean up
' these files by just deleting the whole fucking folder. 🤬
If Not Directory.Exists(oTempSubDirectory) Then
Try
Directory.CreateDirectory(oTempSubDirectory)
Catch ex As Exception
Logger.Error(ex)
' We could not create a subfolder
' Set the final directory to the default temp
oTempSubDirectory = oTempDirectory
End Try
End If
' Copy the file to the new location
Dim oNewPath = Path.Combine(oTempSubDirectory, pNewFileName)
File.Copy(pSourceFilePath, oNewPath)
Return oNewPath
Catch ex As Exception
Return Nothing
End Try
End Function
Public Function Decide_FileHandle(pFilepath As String, pHandletype As String) As Boolean
Try
''TODO: Before doing anything, clean the filename
'Dim oFilename = IO.Path.GetFileName(pFilepath)
@ -30,54 +66,56 @@ Public Class ClassFilehandle
Dim oInboxRegex As New Regex("\.INBOX\d+$")
If oInboxRegex.IsMatch(oTempFilePath) Then
LOGGER.Info("Renaming INBOX file to EML")
Logger.Info("Renaming INBOX file to EML")
Try
Dim oInfo As New FileInfo(oTempFilePath)
LOGGER.Info("Old Name: {0}", oInfo.Name)
Logger.Info("Old Name: {0}", oInfo.Name)
Dim oNewName = $"{oInfo.Name}.eml"
LOGGER.Info("New Name: {0}", oNewName)
Logger.Info("New Name: {0}", oNewName)
Dim oTempDirectory = IO.Path.GetTempPath()
Dim oNewPath = IO.Path.Combine(oTempDirectory, oNewName)
IO.File.Copy(oInfo.FullName, oNewPath)
TEMP_FILES.Add(oNewPath)
'TEMP_FILES.Add(oNewPath)
TempFiles.Add(oNewPath)
oTempFilePath = oNewPath
Catch ex As Exception
LOGGER.Error(ex)
Logger.Error(ex)
End Try
End If
If oTempFilePath.ToUpper.EndsWith(".MSG") Or oTempFilePath.ToUpper.EndsWith(".EML") Then
CURRENT_MESSAGEID = ""
Dim oMail As IMail = EMAIL.Load_Email(oTempFilePath)
If oMail.Attachments.Count > 0 Then
Dim oTitle As String
Dim oMessage As String
CURRENT_MESSAGEID = ""
Dim oMail As IMail = EMAIL.Load_Email(oTempFilePath)
If oMail.Attachments.Count > 0 Then
Dim oTitle As String
Dim oMessage As String
If USER_LANGUAGE = "de-DE" Then
oTitle = "Nachfrage zur Indexierung:"
oMessage = "Achtung: Die Email enthält Anhänge!" & vbNewLine & "Wollen Sie die Anhänge separat indexieren und herauslösen?"
Else
oTitle = "Question about Indexing:"
oMessage = "Attention: This Email contains Attachments!" & vbNewLine & "Do you want to extract the attachments and index them seperately?"
End If
Dim oResult As DialogResult
If USER_LANGUAGE = "de-DE" Then
oTitle = "Nachfrage zur Indexierung:"
oMessage = "Achtung: Die Email enthält Anhänge!" & vbNewLine & "Wollen Sie die Anhänge separat indexieren und herauslösen?"
Else
oTitle = "Question about Indexing:"
oMessage = "Attention: This Email contains Attachments!" & vbNewLine & "Do you want to extract the attachments and index them seperately?"
End If
Dim oResult As DialogResult
' Weird hack to force messagebox to be topmost
' https://stackoverflow.com/questions/1220882/keep-messagebox-show-on-top-of-other-application-using-c-sharp
oResult = MessageBox.Show(oMessage, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
' Weird hack to force messagebox to be topmost
' https://stackoverflow.com/questions/1220882/keep-messagebox-show-on-top-of-other-application-using-c-sharp
oResult = MessageBox.Show(oMessage, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
If oResult = MsgBoxResult.Yes Then
Dim oIsFolderWatch = pHandletype.StartsWith("|FW")
Return Save_EmailAndAttachmentsToDisk(oTempFilePath, oIsFolderWatch)
End If
If oResult = MsgBoxResult.Yes Then
Dim oIsFolderWatch = pHandletype.StartsWith("|FW")
Return Save_EmailAndAttachmentsToDisk(oTempFilePath, oIsFolderWatch)
End If
End If
End If
If oTempFilePath.ToUpper.EndsWith(".LNK") Then
If oTempFilePath.ToUpper.EndsWith(".LNK") Then
If USER_LANGUAGE = "de-DE" Then
MsgBox("Verknüpfungen können nicht abgelegt werden!", MsgBoxStyle.Critical, "Global Indexer")
Else
@ -93,7 +131,7 @@ Public Class ClassFilehandle
End Try
End Function
Private Shared Function Save_EmailAndAttachmentsToDisk(pEmailFilePath As String, Optional pFolderWatch As Boolean = False) As Boolean
Private Function Save_EmailAndAttachmentsToDisk(pEmailFilePath As String, Optional pFolderWatch As Boolean = False) As Boolean
Try
Dim oMessageOnlyMarker As String = "|MSGONLY|"
Dim oExtractedAttachmentMarker As String = "|ATTMNTEXTRACTED|"
@ -103,33 +141,37 @@ Public Class ClassFilehandle
End If
Dim oSuccess As Boolean = False
LOGGER.Info("Converting file to Eml if needed: [{0}]", pEmailFilePath)
Logger.Info("Converting file to Eml if needed: [{0}]", pEmailFilePath)
Dim oEmail As IMail = EMAIL.Load_Email(pEmailFilePath)
If oEmail.MessageID IsNot Nothing Then
CURRENT_MESSAGEID = oEmail.MessageID
Else
LOGGER.Info("Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
Logger.Info("Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
CURRENT_MESSAGEID = NewGuid.ToString()
End If
Dim oEmailFilePathWithoutAttachments = EMAIL.Remove_AttachmentsFromEmail(pEmailFilePath, "_excl_attachments")
TEMP_FILES.Add(oEmailFilePathWithoutAttachments)
TempFiles.Add(oEmailFilePathWithoutAttachments)
'TEMP_FILES.Add(oEmailFilePathWithoutAttachments)
If Insert_GI_File(oEmailFilePathWithoutAttachments, oMessageOnlyMarker) = True Then
oSuccess = True
Dim oAttachments As List(Of String) = EMAIL.Save_AttachmentsToDisk(pEmailFilePath)
LOGGER.Debug("Saved [{0}] attachments to disk.", oAttachments.Count)
Logger.Debug("Saved [{0}] attachments to disk.", oAttachments.Count)
For Each oAttachment In oAttachments
TEMP_FILES.Add(oAttachment)
LOGGER.Debug("Saved attachment [{0}].", oAttachment)
'TEMP_FILES.Add(oAttachment)
TempFiles.Add(oAttachment)
Logger.Debug("Saved attachment [{0}].", oAttachment)
oSuccess = Insert_GI_File(oAttachment, oExtractedAttachmentMarker)
If oSuccess = False Then
LOGGER.Warn("Saving attachment to disk failed: [{0}]", oAttachment)
Logger.Warn("Saving attachment to disk failed: [{0}]", oAttachment)
Exit For
End If
Next
@ -137,8 +179,8 @@ Public Class ClassFilehandle
Return oSuccess
Catch ex As Exception
LOGGER.Warn("Saving email to disk failed (Email_Decay)")
LOGGER.Error(ex)
Logger.Warn("Saving email to disk failed (Email_Decay)")
Logger.Error(ex)
Return False
End Try
@ -230,7 +272,7 @@ Public Class ClassFilehandle
' End Try
'End Function
Private Shared Function Insert_GI_File(filename As String, handleType As String)
Private Function Insert_GI_File(filename As String, handleType As String)
Try
filename = filename.Replace("'", "''")
@ -252,7 +294,7 @@ Public Class ClassFilehandle
Return False
End Try
End Function
Public Shared Function IsFileInUse(ByVal fullFilePath As String) As Boolean
Public Function IsFileInUse(ByVal fullFilePath As String) As Boolean
' Gibt zurück, ob die übergebene Datei momentan exklusiv zu haben ist.
' Prüft, ob die angegeben Datei aktuell durch eine
' andere Anwendung in Benutzung ist
@ -266,7 +308,7 @@ Public Class ClassFilehandle
' Ist ein Fehler aufgetreten, so wird nach außen hin generell
' davon ausgegangen, dass die Datei in Benutzung ist (obwohl
' auch andere Ursachen, etwa Rechteprobleme, möglich sind).
LOGGER.Info(">> FileInUse Message: " & ex.Message)
Logger.Info(">> FileInUse Message: " & ex.Message)
IsFileInUse = True
Finally
' Die eventuell geöffnete Datei schließen
@ -276,7 +318,7 @@ Public Class ClassFilehandle
End If
End Function
Public Shared Function Versionierung_Datei(Dateiname As String)
Public Function Versionierung_Datei(Dateiname As String)
Dim extension
Dim _NewFileString
Try
@ -292,15 +334,15 @@ Public Class ClassFilehandle
_NewFileString = _neuername
Else
Do While File.Exists(_neuername & extension)
version = version + 1
version += 1
_neuername = Stammname & "~" & version
_NewFileString = _neuername
Loop
End If
Return _NewFileString & extension
Catch ex As Exception
LOGGER.Info(" - Error in versioning file - error: " & vbNewLine & ex.Message)
LOGGER.Error(ex)
Logger.Info(" - Error in versioning file - error: " & vbNewLine & ex.Message)
Logger.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in versioning file:")
Return ""
End Try
@ -312,8 +354,8 @@ Public Class ClassFilehandle
''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
''' im Dateinamen</param>
Public Shared Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
LOGGER.Info(" >> Filename before CleanFilename: '" & sFilename & "'")
Public Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String
Logger.Info(" >> Filename before CleanFilename: '" & sFilename & "'")
If sFilename.Contains(".\") Then
sFilename = sFilename.Replace(".\", "\")
End If
@ -328,7 +370,7 @@ Public Class ClassFilehandle
sFilename = System.Text.RegularExpressions.Regex.Replace(sFilename, "[\\/:*?""<>|\r\n]", "", System.Text.RegularExpressions.RegexOptions.Singleline)
'Dim oCleanFileName As String = String.Join(REPLACEChar, sFilename.Split(Path.GetInvalidFileNameChars()))
Dim oCleanFileName As New System.IO.FileInfo(System.Text.RegularExpressions.Regex.Replace(sFilename, String.Format("[{0}]", String.Join(String.Empty, Path.GetInvalidFileNameChars)), REPLACEChar))
LOGGER.Info(" >> Filename after CleanFilename: '" & sFilename & "'")
Logger.Info(" >> Filename after CleanFilename: '" & sFilename & "'")
Return sFilename
End Function
End Class

View File

@ -1,10 +1,25 @@
Imports System.IO
Imports System.Threading
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class ClassFolderWatcher
Public Shared FolderWatcher As FileSystemWatcher
Public Shared FolderWatcher_SCAN As FileSystemWatcher
Public Shared Function Restart_FolderWatch()
Inherits BaseClass
Public FolderWatcher As FileSystemWatcher
Public FolderWatcher_SCAN As FileSystemWatcher
Public Event FileCreated As EventHandler(Of FileSystemEventArgs)
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Private Sub OnCreated(source As Object, e As IO.FileSystemEventArgs)
RaiseEvent FileCreated(source, e)
End Sub
Public Sub Restart_FolderWatch()
Try
If FolderWatcher.EnableRaisingEvents = True Then
'Gestartet also Stoppen
@ -12,41 +27,40 @@ Public Class ClassFolderWatcher
FW_started = False
'FolderWatch neu instanzieren
FolderWatcher = New System.IO.FileSystemWatcher(CURRENT_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatch neu instanziert")
Logger.Info(" >> FolderWatch neu instanziert")
FolderWatcher.IncludeSubdirectories = False
FolderWatcher.EnableRaisingEvents = True
AddHandler FolderWatcher.Created, AddressOf OnCreated
FW_started = True
'SaveConfigValue("FW_started", "True")
CONFIG.Config.FolderWatchStarted = True
CONFIG.Save()
End If
Catch ex As Exception
LOGGER.Info($"Error in Restart_FolderWatch: {ex.Message}")
LOGGER.Error(ex)
Logger.Info($"Error in Restart_FolderWatch: {ex.Message}")
Logger.Error(ex)
End Try
End Function
Public Shared Function Restart_FolderWatchSCAN()
End Sub
Public Sub Restart_FolderWatchSCAN()
Try
If FolderWatcher_SCAN.EnableRaisingEvents = True Then
'Gestartet also Stoppen
FolderWatcher_SCAN.EnableRaisingEvents = False
'FolderWatch neu instanzieren
FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatchScan neu instanziert")
Logger.Info(" >> FolderWatchScan neu instanziert")
FolderWatcher_SCAN.IncludeSubdirectories = False
FolderWatcher_SCAN.EnableRaisingEvents = True
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
'SaveConfigValue("FWSCAN_started", "True")
CONFIG.Config.FolderWatchScanStarted = True
CONFIG.Save()
End If
Catch ex As Exception
LOGGER.Info($"Error in Restart_FolderWatchSCAN: {ex.Message}")
LOGGER.Error(ex)
Logger.Info($"Error in Restart_FolderWatchSCAN: {ex.Message}")
Logger.Error(ex)
End Try
End Function
Public Shared Function StartStop_FolderWatch()
End Sub
Public Function StartStop_FolderWatch() As Integer
Try
If CURRENT_FOLDERWATCH = "" Then
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
@ -54,12 +68,11 @@ Public Class ClassFolderWatcher
End If
If FolderWatcher Is Nothing Then
FolderWatcher = New System.IO.FileSystemWatcher(CURRENT_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatch Gestartet")
Logger.Info(" >> FolderWatch Gestartet")
FolderWatcher.IncludeSubdirectories = False
FolderWatcher.EnableRaisingEvents = True
AddHandler FolderWatcher.Created, AddressOf OnCreated
FW_started = True
'SaveConfigValue("FW_started", "True")
CONFIG.Config.FolderWatchStarted = True
CONFIG.Save()
Return 1
@ -68,12 +81,11 @@ Public Class ClassFolderWatcher
' Dim watcher As New FileSystemWatcher()
' watcher.Path = CURRENT_FOLDERWATCH
FolderWatcher = New System.IO.FileSystemWatcher(CURRENT_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatch Gestartet")
Logger.Info(" >> FolderWatch Gestartet")
FolderWatcher.IncludeSubdirectories = False
FolderWatcher.EnableRaisingEvents = True
AddHandler FolderWatcher.Created, AddressOf OnCreated
FW_started = True
'SaveConfigValue("FW_started", "True")
CONFIG.Config.FolderWatchStarted = True
CONFIG.Save()
Return 1
@ -81,30 +93,17 @@ Public Class ClassFolderWatcher
'Gestartet also Stoppen
FolderWatcher.EnableRaisingEvents = False
FW_started = False
LOGGER.Info(" >> FolderWatch gestoppt")
'SaveConfigValue("FW_started", "False")
Logger.Info(" >> FolderWatch gestoppt")
CONFIG.Config.FolderWatchStarted = False
CONFIG.Save()
Return 0
End If
'If watcher.EnableRaisingEvents = False Then
' watcher = New System.IO.FileSystemWatcher(CURRENT_FOLDERWATCH, "*.*")
' LOGGER.Info(" - vFolderWatch.Gestartet")
' watcher.IncludeSubdirectories = False
' watcher.EnableRaisingEvents = True
' AddHandler watcher.Created, AddressOf OnCreated
' Return 1
'Else
' 'Gestartet also Stoppen
' watcher.EnableRaisingEvents = False
' Return 0
'End If
Catch ex As Exception
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return 99
End Try
End Function
Public Shared Function StartStop_FolderWatchSCAN()
Public Function StartStop_FolderWatchSCAN() As Integer
Try
If CURRENT_SCAN_FOLDERWATCH = "" Then
If FolderWatcher.EnableRaisingEvents = True Then
@ -122,7 +121,7 @@ Public Class ClassFolderWatcher
End If
If FolderWatcher_SCAN Is Nothing Then
FolderWatcher_SCAN = New FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatch Scan Gestartet")
Logger.Info(" >> FolderWatch Scan Gestartet")
FolderWatcher_SCAN.IncludeSubdirectories = False
FolderWatcher_SCAN.EnableRaisingEvents = True
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
@ -134,7 +133,7 @@ Public Class ClassFolderWatcher
' Dim watcher As New FileSystemWatcher()
' watcher.Path = CURRENT_FOLDERWATCH
FolderWatcher_SCAN = New FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
LOGGER.Info(" >> FolderWatch Scan Gestartet")
Logger.Info(" >> FolderWatch Scan Gestartet")
FolderWatcher_SCAN.IncludeSubdirectories = False
FolderWatcher_SCAN.EnableRaisingEvents = True
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
@ -144,8 +143,7 @@ Public Class ClassFolderWatcher
Else
'Gestartet also Stoppen
FolderWatcher_SCAN.EnableRaisingEvents = False
LOGGER.Info(" >> FolderWatch Scan gestoppt")
'SaveConfigValue("FWSCAN_started", "False")
Logger.Info(" >> FolderWatch Scan gestoppt")
CONFIG.Config.FolderWatchScanStarted = False
CONFIG.Save()
Return 0
@ -156,12 +154,12 @@ Public Class ClassFolderWatcher
Return 99
End Try
End Function
Public Shared Function Stop_FWSCAN()
Public Function Stop_FWSCAN() As Boolean
If FolderWatcher.EnableRaisingEvents = True Then
'Gestartet also Stoppen
FolderWatcher.EnableRaisingEvents = False
FW_started = False
LOGGER.Info(" >> FolderWatch gestoppt")
Logger.Info(" >> FolderWatch gestoppt")
'SaveConfigValue("FW_started", "False")
CONFIG.Config.FolderWatchStarted = True
CONFIG.Save()
@ -170,31 +168,31 @@ Public Class ClassFolderWatcher
Return False
End If
End Function
Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs)
Try
For Each row As DataRow In DTEXCLUDE_FILES.Rows
Dim content As String = row.Item(0).ToString.ToLower
If e.FullPath.ToLower.Contains(content) Then
Exit Sub
End If
Next
'Private Sub OnCreated(source As Object, e As FileSystemEventArgs)
' Try
' For Each row As DataRow In DTEXCLUDE_FILES.Rows
' Dim content As String = row.Item(0).ToString.ToLower
' If e.FullPath.ToLower.Contains(content) Then
' Exit Sub
' End If
' Next
Dim oHandleType As String
If e.FullPath.ToLower.EndsWith(".msg") Then
oHandleType = "|FW_OUTLOOK_MESSAGE|"
Else
oHandleType = "|FW_SIMPLEINDEXER|"
End If
'Die Datei übergeben
LOGGER.Info(">> OnCreated-File:" & e.FullPath)
' Dim oHandleType As String
' If e.FullPath.ToLower.EndsWith(".msg") Then
' oHandleType = "|FW_OUTLOOK_MESSAGE|"
' Else
' oHandleType = "|FW_SIMPLEINDEXER|"
' End If
' 'Die Datei übergeben
' Logger.Info(">> OnCreated-File:" & e.FullPath)
If ClassIndexFunctions.CheckDuplicateFiles(e.FullPath, "FolderWatch/Scan") Then
ClassFilehandle.Decide_FileHandle(e.FullPath, oHandleType)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
End Try
' If ClassIndexFunctions.CheckDuplicateFiles(e.FullPath, "FolderWatch/Scan") Then
' FileHandler.Decide_FileHandle(e.FullPath, oHandleType)
' End If
' Catch ex As Exception
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
' End Try
End Sub
'End Sub
End Class

View File

@ -216,7 +216,7 @@
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
Dim oSuccess As Boolean = False
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {IDB_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValueRow.Item(1).ToString}','{USER_LANGUAGE}',{IDB_DOC_ID},@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {IDB_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValueRow.Item(1)}','{USER_LANGUAGE}',{IDB_DOC_ID},@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
'oSuccess = DATABASE_ECM.ExecuteNonQuery_ConStr(oFNSQL, CONNECTION_STRING_IDB)
oSuccess = DATABASE_IDB.ExecuteNonQuery(oFNSQL)

View File

@ -6,7 +6,6 @@ Imports DigitalData.Modules.Filesystem
Imports DigitalData.Modules.Messaging
Imports DigitalData.Modules.Database
Imports DLLLicenseManager
Public Class ClassInit
Public Sub InitLogger()
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing,
@ -48,7 +47,7 @@ Public Class ClassInit
dbResult = DATABASE_ECM.DBInitialized
' === OLD ===
dbResult = ClassDatabase.Init()
'dbResult = ClassDatabase.Init()
Else
MsgBox("No Databaseconnection configured. (First Start or Appdata not accessible)" & vbNewLine & "Basic-Config will be loaded.", MsgBoxStyle.Information)
ERROR_STATE = "NO DB-CONNECTION"
@ -59,7 +58,7 @@ Public Class ClassInit
dbResult = DATABASE_ECM.DBInitialized
' === OLD ===
dbResult = ClassDatabase.Init()
'dbResult = ClassDatabase.Init()
End If
If dbResult = False Then
@ -107,7 +106,7 @@ Public Class ClassInit
Public Function Load_BasicConfig()
Try
ClassDatabase.Init()
'ClassDatabase.Init()
Dim oSql As String = "SELECT * FROM TBDD_MODULES WHERE NAME = 'Global-Indexer'"
Dim DT As DataTable = DATABASE_ECM.GetDatatable(oSql)
If DT.Rows.Count = 1 Then
@ -131,6 +130,10 @@ Public Class ClassInit
Public Sub Init_Folderwatch()
Try
FILE_HANDLER = New ClassFileHandler(LOGCONFIG)
FOLDER_WATCHER = New ClassFolderWatcher(LOGCONFIG)
AddHandler FOLDER_WATCHER.FileCreated, AddressOf OnCreated
Dim sql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & USER_ID
Dim folderwatchPath = DATABASE_ECM.GetScalarValue(sql)
@ -158,7 +161,7 @@ Public Class ClassInit
FW_started = True
FWFunction_STARTED = True
ClassFolderWatcher.StartStop_FolderWatch()
FOLDER_WATCHER.StartStop_FolderWatch()
Catch ex As Exception
MsgBox($"Init_Folderwatch: Unexpected error while starting FolderWatch: {ex.Message}", MsgBoxStyle.Critical)
LOGGER.Info($"Init_Folderwatch: Unexpected error: {ex.Message}")
@ -189,13 +192,41 @@ Public Class ClassInit
FWFunction_STARTED = True
ClassFolderWatcher.StartStop_FolderWatchSCAN()
FOLDER_WATCHER.StartStop_FolderWatchSCAN()
Catch ex As Exception
MsgBox($"Init_Folderwatch: Unexpected error while starting FolderWatchScan: {ex.Message}", MsgBoxStyle.Critical)
LOGGER.Info($"Init_Folderwatch: Unexpected error: {ex.Message}")
START_INCOMPLETE = True
End Try
End Sub
Private Sub OnCreated(source As Object, e As IO.FileSystemEventArgs)
Try
For Each row As DataRow In DTEXCLUDE_FILES.Rows
Dim content As String = row.Item(0).ToString.ToLower
If e.FullPath.ToLower.Contains(content) Then
Exit Sub
End If
Next
Dim oHandleType As String
If e.FullPath.ToLower.EndsWith(".msg") Then
oHandleType = "|FW_OUTLOOK_MESSAGE|"
Else
oHandleType = "|FW_SIMPLEINDEXER|"
End If
'Die Datei übergeben
LOGGER.Info(">> OnCreated-File:" & e.FullPath)
If ClassIndexFunctions.CheckDuplicateFiles(e.FullPath, "FolderWatch/Scan") Then
FILE_HANDLER.Decide_FileHandle(e.FullPath, oHandleType)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
End Try
End Sub
Public Sub InitUserLogin()
Try
Dim oSql As String

View File

@ -140,16 +140,17 @@ Public Class ClassSetting
End Class
Public Class ClassLayout
Private _filename As String
Private ReadOnly _filename As String
Private ReadOnly _settings As XmlWriterSettings
Private _reader As XmlReader
Private _settings As XmlWriterSettings
Public Sub New(filename As String)
_filename = filename
_settings = New XmlWriterSettings()
_settings.Encoding = System.Text.Encoding.UTF8
_settings.Indent = True
_settings = New XmlWriterSettings With {
.Encoding = System.Text.Encoding.UTF8,
.Indent = True
}
End Sub
Public Sub Save(settings As System.Collections.Generic.List(Of ClassSetting))

View File

@ -42,10 +42,10 @@ Public Class ClassPatterns
Public Const MAX_TRY_COUNT = 500
Private Shared regex As Regex = New Regex("{#(\w+)#([\.\w\d\s_-]+)}+")
Private Shared allPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_IDBA, PATTERN_USER, PATTERN_INT}
Private Shared complexPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_IDBA}
Private Shared simplePatterns As New List(Of String) From {PATTERN_USER, PATTERN_INT}
Private Shared ReadOnly regex As Regex = New Regex("{#(\w+)#([\.\w\d\s_-]+)}+")
Private Shared ReadOnly allPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_IDBA, PATTERN_USER, PATTERN_INT}
Private Shared ReadOnly complexPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_IDBA}
Private Shared ReadOnly simplePatterns As New List(Of String) From {PATTERN_USER, PATTERN_INT}
''' <summary>
''' Wraps a pattern-type and -value in the common format: {#type#value}

View File

@ -1,179 +0,0 @@
Imports System.Data
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Collections.Generic
Public Class ClassWindowAPI
Public Class ApiWindow
Public MainWindowTitle As String = ""
Public ClassName As String = ""
Public hWnd As Int32
End Class
Private Delegate Function EnumCallBackDelegate(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer
' Top-level windows.
Private Declare Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
' Child windows.
Private Declare Function EnumChildWindows Lib "user32" _
(ByVal hWndParent As Integer, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
' Get the window class.
Private Declare Function GetClassName _
Lib "user32" Alias "GetClassNameA" _
(ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer
' Test if the window is visible--only get visible ones.
Private Declare Function IsWindowVisible Lib "user32" _
(ByVal hwnd As Integer) As Integer
' Test if the window's parent--only get the one's without parents.
Private Declare Function GetParent Lib "user32" _
(ByVal hwnd As Integer) As Integer
' Get window text length signature.
Private Declare Function SendMessage _
Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
' Get window text signature.
Private Declare Function SendMessage _
Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As StringBuilder) As Int32
Private _listChildren As New List(Of ApiWindow)
Private _listTopLevel As New List(Of ApiWindow)
Private _topLevelClass As String = ""
Private _childClass As String = ""
''' <summary>
''' Get all top-level window information
''' </summary>
''' <returns>List of window information objects</returns>
Public Overloads Function GetTopLevelWindows() As List(Of ApiWindow)
EnumWindows(AddressOf EnumWindowProc, &H0)
Return _listTopLevel
End Function
Public Overloads Function GetTopLevelWindows(ByVal className As String) As List(Of ApiWindow)
_topLevelClass = className
Return Me.GetTopLevelWindows()
End Function
''' <summary>
''' Get all child windows for the specific windows handle (hwnd).
''' </summary>
''' <returns>List of child windows for parent window</returns>
Public Overloads Function GetChildWindows(ByVal hwnd As Int32) As List(Of ApiWindow)
' Clear the window list.
_listChildren = New List(Of ApiWindow)
' Start the enumeration process.
EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
' Return the children list when the process is completed.
Return _listChildren
End Function
Public Overloads Function GetChildWindows(ByVal hwnd As Int32, ByVal childClass As String) As List(Of ApiWindow)
' Set the search
_childClass = childClass
Return Me.GetChildWindows(hwnd)
End Function
''' <summary>
''' Callback function that does the work of enumerating top-level windows.
''' </summary>
''' <param name="hwnd">Discovered Window handle</param>
''' <returns>1=keep going, 0=stop</returns>
Private Function EnumWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
' Eliminate windows that are not top-level.
If GetParent(hwnd) = 0 AndAlso CBool(IsWindowVisible(hwnd)) Then
' Get the window title / class name.
Dim window As ApiWindow = GetWindowIdentification(hwnd)
' Match the class name if searching for a specific window class.
If _topLevelClass.Length = 0 OrElse window.ClassName.ToLower() = _topLevelClass.ToLower() Then
_listTopLevel.Add(window)
End If
End If
' To continue enumeration, return True (1), and to stop enumeration
' return False (0).
' When 1 is returned, enumeration continues until there are no
' more windows left.
Return 1
End Function
''' <summary>
''' Callback function that does the work of enumerating child windows.
''' </summary>
''' <param name="hwnd">Discovered Window handle</param>
''' <returns>1=keep going, 0=stop</returns>
Private Function EnumChildWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
Dim window As ApiWindow = GetWindowIdentification(hwnd)
' Attempt to match the child class, if one was specified, otherwise
' enumerate all the child windows.
If _childClass.Length = 0 OrElse window.ClassName.ToLower() = _childClass.ToLower() Then
_listChildren.Add(window)
End If
Return 1
End Function
''' <summary>
''' Build the ApiWindow object to hold information about the Window object.
''' </summary>
Private Function GetWindowIdentification(ByVal hwnd As Integer) As ApiWindow
Const WM_GETTEXT As Int32 = &HD
Const WM_GETTEXTLENGTH As Int32 = &HE
Dim window As New ApiWindow()
Dim title As New StringBuilder()
' Get the size of the string required to hold the window title.
Dim size As Int32 = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0)
' If the return is 0, there is no title.
If size > 0 Then
title = New StringBuilder(size + 1)
SendMessage(hwnd, WM_GETTEXT, title.Capacity, title)
End If
' Get the class name for the window.
Dim classBuilder As New StringBuilder(64)
GetClassName(hwnd, classBuilder, 64)
' Set the properties for the ApiWindow object.
window.ClassName = classBuilder.ToString()
window.MainWindowTitle = title.ToString()
window.hWnd = hwnd
Return window
End Function
End Class

View File

@ -166,6 +166,10 @@
<Reference Include="DigitalData.GUIs.GlobalIndexer">
<HintPath>..\..\DDMonorepo\GUIs.GlobalIndexer\bin\Debug\DigitalData.GUIs.GlobalIndexer.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Base\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
@ -252,22 +256,18 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="AboutBox1.Designer.vb">
<DependentUpon>AboutBox1.vb</DependentUpon>
<Compile Include="frmAbout.Designer.vb">
<DependentUpon>frmAbout.vb</DependentUpon>
</Compile>
<Compile Include="AboutBox1.vb">
<Compile Include="frmAbout.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="ClassConfig.vb" />
<Compile Include="ClassConstants.vb" />
<Compile Include="ClassControls.vb" />
<Compile Include="ClassDatabase.vb" />
<Compile Include="ClassDatatables.vb" />
<Compile Include="ClassDragDrop.vb" />
<Compile Include="ClassFileDrop.vb" />
<Compile Include="ClassEmail.vb" />
<Compile Include="ClassEncryption.vb" />
<Compile Include="ClassFilehandle.vb" />
<Compile Include="ClassFileHandler.vb" />
<Compile Include="ClassFolderWatcher.vb" />
<Compile Include="ClassIDBData.vb" />
<Compile Include="ClassIndexFunctions.vb" />
@ -277,8 +277,6 @@
<Compile Include="ClassParamRefresh.vb" />
<Compile Include="ClassPatterns.vb" />
<Compile Include="ClassPostprocessing.vb" />
<Compile Include="ClassWindowAPI.vb" />
<Compile Include="clsHotkey.vb" />
<Compile Include="frmAdministration.Designer.vb">
<DependentUpon>frmAdministration.vb</DependentUpon>
</Compile>
@ -426,8 +424,8 @@
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AboutBox1.resx">
<DependentUpon>AboutBox1.vb</DependentUpon>
<EmbeddedResource Include="frmAbout.resx">
<DependentUpon>frmAbout.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAdministration.en-US.resx">
<DependentUpon>frmAdministration.vb</DependentUpon>

View File

@ -4,8 +4,6 @@ Imports DigitalData.Modules.Filesystem
Imports DigitalData.Modules.Messaging
Module ModuleCURRENT
Public Property TEMP_FILES As List(Of String) = New List(Of String)
Public Property ERROR_STATE As String
Public Property START_INCOMPLETE As Boolean = False
Public Property CURRENT_FILENAME As String
@ -21,6 +19,9 @@ Module ModuleCURRENT
Public Property FILESYSTEM As File
Public Property EMAIL As Email2
Public Property FILE_HANDLER As ClassFileHandler
Public Property FOLDER_WATCHER As ClassFolderWatcher
Public Property CURRENT_DOKART_ID As Integer
Public Property CURRENT_DOKART_DUPLICATE_HANDLING As String = "Default"
Public Property CURRENT_LASTDOKART As String = ""

View File

@ -13,7 +13,7 @@ Module ModuleRuntime
Public GI_withWindream As Boolean = False
Public WMDrive As String = "W"
'Public myPreviewActive As Boolean = True
Public FW_started As Boolean = False
Public Property FW_started As Boolean = False
Public IDB_ACTIVE As Boolean = False
Public WORKING_MODE As String
Public Property CONNECTION_STRING_IDB As String

View File

@ -1,127 +0,0 @@
Public Class clsHotkey
Implements IMessageFilter
Private Declare Function RegisterHotKey Lib "user32" ( _
ByVal Hwnd As IntPtr, _
ByVal ID As Integer, _
ByVal Modifiers As Integer, _
ByVal Key As Integer) _
As Integer
Private Declare Function UnregisterHotKey Lib "user32" ( _
ByVal Hwnd As IntPtr, _
ByVal ID As Integer) _
As Integer
Private Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" ( _
ByVal IDString As String) _
As Short
Private Declare Function GlobalDeleteAtom Lib "kernel32" ( _
ByVal Atom As Short) _
As Short
Public Class HotKeyObject
Private mHotKey As Keys
Private mModifier As MODKEY
Private mHotKeyID As String
Private mAtomID As Short
Public Property HotKey() As Keys
Get
Return mHotKey
End Get
Set(ByVal value As Keys)
mHotKey = value
End Set
End Property
Public Property Modifier() As MODKEY
Get
Return mModifier
End Get
Set(ByVal value As MODKEY)
mModifier = value
End Set
End Property
Public Property HotKeyID() As String
Get
Return mHotKeyID
End Get
Set(ByVal value As String)
mHotKeyID = value
End Set
End Property
Public Property AtomID() As Short
Get
Return mAtomID
End Get
Set(ByVal value As Short)
mAtomID = value
End Set
End Property
Sub New(ByVal NewHotKey As Keys, ByVal NewModifier As MODKEY, ByVal NewHotKeyID As String)
mHotKey = NewHotKey
mModifier = NewModifier
mHotKeyID = NewHotKeyID
End Sub
End Class
Private mForm As Form
Private Const WM_HOTKEY As Integer = &H312
Private mHotKeyList As New System.Collections.Generic.Dictionary(Of Short, HotKeyObject)
Private mHotKeyIDList As New System.Collections.Generic.Dictionary(Of String, Short)
''' <summary>
''' Diesem Event wird immer die zugewiesene HotKeyID übergeben wenn eine HotKey Kombination gedrückt wurde.
''' </summary>
Public Event HotKeyPressed(ByVal HotKeyID As String)
Public Enum MODKEY As Integer
MOD_ALT = 1
MOD_CONTROL = 2
MOD_SHIFT = 4
MOD_WIN = 8
End Enum
Sub New(ByVal OwnerForm As Form)
mForm = OwnerForm
Application.AddMessageFilter(Me)
End Sub
''' <summary>
''' Diese Funktion fügt einen Hotkey hinzu und registriert ihn auch sofort
''' </summary>
''' <param name="KeyCode">Den KeyCode für die Taste</param>
''' <param name="Modifiers">Die Zusatztasten wie z.B. Strg oder Alt, diese können auch mit OR kombiniert werden</param>
''' <param name="HotKeyID">Die ID die der Hotkey bekommen soll um diesen zu identifizieren</param>
Public Sub AddHotKey(ByVal KeyCode As Keys, ByVal Modifiers As MODKEY, ByVal HotKeyID As String)
If mHotKeyIDList.ContainsKey(HotKeyID) = True Then Exit Sub
Dim ID As Short = GlobalAddAtom(HotKeyID)
mHotKeyIDList.Add(HotKeyID, ID)
mHotKeyList.Add(ID, New HotKeyObject(KeyCode, Modifiers, HotKeyID))
RegisterHotKey(mForm.Handle, ID, mHotKeyList(ID).Modifier, mHotKeyList(ID).HotKey)
End Sub
''' <summary>
''' Diese Funktion entfernt einen Hotkey und deregistriert ihn auch sofort
''' </summary>
''' <param name="HotKeyID">Gibt die HotkeyID an welche entfernt werden soll</param>
Public Sub RemoveHotKey(ByVal HotKeyID As String)
If mHotKeyIDList.ContainsKey(HotKeyID) = False Then Exit Sub
Dim ID As Short = mHotKeyIDList(HotKeyID)
mHotKeyIDList.Remove(HotKeyID)
mHotKeyList.Remove(ID)
UnregisterHotKey(mForm.Handle, CInt(ID))
GlobalDeleteAtom(ID)
End Sub
Private Function PreFilterMessage(ByRef m As System.Windows.Forms.Message) As Boolean Implements System.Windows.Forms.IMessageFilter.PreFilterMessage
If m.Msg = WM_HOTKEY Then
RaiseEvent HotKeyPressed(mHotKeyList(CShort(m.WParam)).HotKeyID)
End If
End Function
End Class

View File

@ -1,5 +1,5 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class AboutBox1
Partial Class frmAbout
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.

View File

@ -1,4 +1,4 @@
Public NotInheritable Class AboutBox1
Public NotInheritable Class frmAbout
Private Sub AboutBox1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Legen Sie den Titel des Formulars fest.

View File

@ -23,7 +23,7 @@ Partial Class frmConfig_Basic
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic))
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.chkbxUserAut = New System.Windows.Forms.CheckBox()
@ -46,7 +46,6 @@ Partial Class frmConfig_Basic
Me.CheckBoxPreviewDocs = New System.Windows.Forms.CheckBox()
Me.CheckBoxIndexResult = New System.Windows.Forms.CheckBox()
Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox()
Me.btnLogMail = New System.Windows.Forms.Button()
Me.btnApplicationFolder = New System.Windows.Forms.Button()
Me.btnopenlog = New System.Windows.Forms.Button()
Me.TabPage3 = New System.Windows.Forms.TabPage()
@ -177,7 +176,6 @@ Partial Class frmConfig_Basic
Me.TabPage2.Controls.Add(Me.CheckBoxPreviewDocs)
Me.TabPage2.Controls.Add(Me.CheckBoxIndexResult)
Me.TabPage2.Controls.Add(Me.chkLogErrorsOnly)
Me.TabPage2.Controls.Add(Me.btnLogMail)
Me.TabPage2.Controls.Add(Me.btnApplicationFolder)
Me.TabPage2.Controls.Add(Me.btnopenlog)
resources.ApplyResources(Me.TabPage2, "TabPage2")
@ -228,13 +226,6 @@ Partial Class frmConfig_Basic
Me.chkLogErrorsOnly.Name = "chkLogErrorsOnly"
Me.chkLogErrorsOnly.UseVisualStyleBackColor = True
'
'btnLogMail
'
Me.btnLogMail.Image = Global.Global_Indexer.My.Resources.Resources.email
resources.ApplyResources(Me.btnLogMail, "btnLogMail")
Me.btnLogMail.Name = "btnLogMail"
Me.btnLogMail.UseVisualStyleBackColor = True
'
'btnApplicationFolder
'
Me.btnApplicationFolder.Image = Global.Global_Indexer.My.Resources.Resources.folder_go
@ -275,8 +266,8 @@ Partial Class frmConfig_Basic
'
'DataGridView1
'
DataGridViewCellStyle1.BackColor = System.Drawing.Color.Aqua
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
DataGridViewCellStyle2.BackColor = System.Drawing.Color.Aqua
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
resources.ApplyResources(Me.DataGridView1, "DataGridView1")
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView1.Name = "DataGridView1"
@ -406,7 +397,6 @@ Partial Class frmConfig_Basic
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Friend WithEvents btnSaveExclusionFiles As System.Windows.Forms.Button
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents btnLogMail As System.Windows.Forms.Button
Friend WithEvents cmbLanguage As System.Windows.Forms.ComboBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Button3 As System.Windows.Forms.Button

View File

@ -117,23 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="chkbxUserAut.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkbxUserAut.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 58</value>
</data>
<data name="chkbxUserAut.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 17</value>
</data>
<data name="chkbxUserAut.TabIndex" type="System.Int32, mscorlib">
<value>47</value>
</data>
<data name="chkbxUserAut.Text" xml:space="preserve">
<value>Windows-Authentifizierung</value>
</data>
<data name="&gt;&gt;chkbxUserAut.Name" xml:space="preserve">
<value>chkbxUserAut</value>
</data>
@ -146,21 +129,6 @@
<data name="&gt;&gt;chkbxUserAut.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="Label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label5.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 115</value>
</data>
<data name="Label5.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 13</value>
</data>
<data name="Label5.TabIndex" type="System.Int32, mscorlib">
<value>46</value>
</data>
<data name="Label5.Text" xml:space="preserve">
<value>Aktueller ConnectionString:</value>
</data>
<data name="&gt;&gt;Label5.Name" xml:space="preserve">
<value>Label5</value>
</data>
@ -173,15 +141,6 @@
<data name="&gt;&gt;Label5.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="cmbDatenbank.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 78</value>
</data>
<data name="cmbDatenbank.Size" type="System.Drawing.Size, System.Drawing">
<value>244, 21</value>
</data>
<data name="cmbDatenbank.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="&gt;&gt;cmbDatenbank.Name" xml:space="preserve">
<value>cmbDatenbank</value>
</data>
@ -194,21 +153,6 @@
<data name="&gt;&gt;cmbDatenbank.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="Label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label4.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 62</value>
</data>
<data name="Label4.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 13</value>
</data>
<data name="Label4.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="Label4.Text" xml:space="preserve">
<value>Datenbank:</value>
</data>
<data name="&gt;&gt;Label4.Name" xml:space="preserve">
<value>Label4</value>
</data>
@ -221,21 +165,6 @@
<data name="&gt;&gt;Label4.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="Label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label1.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 14</value>
</data>
<data name="Label1.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 13</value>
</data>
<data name="Label1.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="Label1.Text" xml:space="preserve">
<value>Server-Name:</value>
</data>
<data name="&gt;&gt;Label1.Name" xml:space="preserve">
<value>Label1</value>
</data>
@ -248,21 +177,6 @@
<data name="&gt;&gt;Label1.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="Label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label2.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 14</value>
</data>
<data name="Label2.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 13</value>
</data>
<data name="Label2.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="Label2.Text" xml:space="preserve">
<value>Benutzername:</value>
</data>
<data name="&gt;&gt;Label2.Name" xml:space="preserve">
<value>Label2</value>
</data>
@ -275,21 +189,6 @@
<data name="&gt;&gt;Label2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="Label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label3.Location" type="System.Drawing.Point, System.Drawing">
<value>379, 14</value>
</data>
<data name="Label3.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
</data>
<data name="Label3.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
</data>
<data name="Label3.Text" xml:space="preserve">
<value>Passwort:</value>
</data>
<data name="&gt;&gt;Label3.Name" xml:space="preserve">
<value>Label3</value>
</data>
@ -302,19 +201,6 @@
<data name="&gt;&gt;Label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtActualConnection.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="txtActualConnection.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 131</value>
</data>
<data name="txtActualConnection.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 22</value>
</data>
<data name="txtActualConnection.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="&gt;&gt;txtActualConnection.Name" xml:space="preserve">
<value>txtActualConnection</value>
</data>
@ -327,15 +213,6 @@
<data name="&gt;&gt;txtActualConnection.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="txtServer.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 30</value>
</data>
<data name="txtServer.Size" type="System.Drawing.Size, System.Drawing">
<value>246, 22</value>
</data>
<data name="txtServer.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="&gt;&gt;txtServer.Name" xml:space="preserve">
<value>txtServer</value>
</data>
@ -348,15 +225,6 @@
<data name="&gt;&gt;txtServer.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtUser.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 30</value>
</data>
<data name="txtUser.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 22</value>
</data>
<data name="txtUser.TabIndex" type="System.Int32, mscorlib">
<value>37</value>
</data>
<data name="&gt;&gt;txtUser.Name" xml:space="preserve">
<value>txtUser</value>
</data>
@ -369,15 +237,6 @@
<data name="&gt;&gt;txtUser.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="txtPasswort.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 30</value>
</data>
<data name="txtPasswort.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 22</value>
</data>
<data name="txtPasswort.TabIndex" type="System.Int32, mscorlib">
<value>38</value>
</data>
<data name="&gt;&gt;txtPasswort.Name" xml:space="preserve">
<value>txtPasswort</value>
</data>
@ -390,24 +249,6 @@
<data name="&gt;&gt;txtPasswort.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="BtnConnect.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="BtnConnect.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 75</value>
</data>
<data name="BtnConnect.Size" type="System.Drawing.Size, System.Drawing">
<value>253, 25</value>
</data>
<data name="BtnConnect.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="BtnConnect.Text" xml:space="preserve">
<value>Verbindung zur Datenbank herstellen</value>
</data>
<data name="BtnConnect.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="&gt;&gt;BtnConnect.Name" xml:space="preserve">
<value>BtnConnect</value>
</data>
@ -420,15 +261,18 @@
<data name="&gt;&gt;BtnConnect.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="TabPage1.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TabPage1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="TabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>582, 280</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TabPage1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
@ -451,7 +295,7 @@
<value>True</value>
</data>
<data name="LinkLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>224, 178</value>
<value>8, 166</value>
</data>
<data name="LinkLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>153, 13</value>
@ -634,36 +478,6 @@
<data name="&gt;&gt;chkLogErrorsOnly.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="btnLogMail.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="btnLogMail.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 171</value>
</data>
<data name="btnLogMail.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 26</value>
</data>
<data name="btnLogMail.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="btnLogMail.Text" xml:space="preserve">
<value>Log/Support Mail erzeugen</value>
</data>
<data name="btnLogMail.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="&gt;&gt;btnLogMail.Name" xml:space="preserve">
<value>btnLogMail</value>
</data>
<data name="&gt;&gt;btnLogMail.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnLogMail.Parent" xml:space="preserve">
<value>TabPage2</value>
</data>
<data name="&gt;&gt;btnLogMail.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="btnApplicationFolder.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
@ -692,7 +506,7 @@
<value>TabPage2</value>
</data>
<data name="&gt;&gt;btnApplicationFolder.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="btnopenlog.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@ -725,7 +539,7 @@
<value>TabPage2</value>
</data>
<data name="&gt;&gt;btnopenlog.ZOrder" xml:space="preserve">
<value>9</value>
<value>8</value>
</data>
<data name="TabPage2.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -754,6 +568,513 @@
<data name="&gt;&gt;TabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;Label8.Name" xml:space="preserve">
<value>Label8</value>
</data>
<data name="&gt;&gt;Label8.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label8.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;Label8.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;DataGridView1.Name" xml:space="preserve">
<value>DataGridView1</value>
</data>
<data name="&gt;&gt;DataGridView1.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;DataGridView1.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;DataGridView1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;Button2.Name" xml:space="preserve">
<value>Button2</value>
</data>
<data name="&gt;&gt;Button2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Button2.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;Button2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;txtScanFolderWatch.Name" xml:space="preserve">
<value>txtScanFolderWatch</value>
</data>
<data name="&gt;&gt;txtScanFolderWatch.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtScanFolderWatch.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;txtScanFolderWatch.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;Label7.Name" xml:space="preserve">
<value>Label7</value>
</data>
<data name="&gt;&gt;Label7.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label7.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;Label7.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;btnsetFW_Folder.Name" xml:space="preserve">
<value>btnsetFW_Folder</value>
</data>
<data name="&gt;&gt;btnsetFW_Folder.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnsetFW_Folder.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnsetFW_Folder.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;btnFW_OwnFiles.Name" xml:space="preserve">
<value>btnFW_OwnFiles</value>
</data>
<data name="&gt;&gt;btnFW_OwnFiles.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnFW_OwnFiles.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnFW_OwnFiles.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;btnFW_Desktop.Name" xml:space="preserve">
<value>btnFW_Desktop</value>
</data>
<data name="&gt;&gt;btnFW_Desktop.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnFW_Desktop.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnFW_Desktop.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;txtFolderWatch.Name" xml:space="preserve">
<value>txtFolderWatch</value>
</data>
<data name="&gt;&gt;txtFolderWatch.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtFolderWatch.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;txtFolderWatch.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;Label6.Name" xml:space="preserve">
<value>Label6</value>
</data>
<data name="&gt;&gt;Label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label6.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;Label6.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;btnSaveExclusionFiles.Name" xml:space="preserve">
<value>btnSaveExclusionFiles</value>
</data>
<data name="&gt;&gt;btnSaveExclusionFiles.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnSaveExclusionFiles.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnSaveExclusionFiles.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;btnstartstop2.Name" xml:space="preserve">
<value>btnstartstop2</value>
</data>
<data name="&gt;&gt;btnstartstop2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnstartstop2.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnstartstop2.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="&gt;&gt;btnstartstop1.Name" xml:space="preserve">
<value>btnstartstop1</value>
</data>
<data name="&gt;&gt;btnstartstop1.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnstartstop1.Parent" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;btnstartstop1.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="TabPage3.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="TabPage3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="TabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>582, 280</value>
</data>
<data name="TabPage3.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="TabPage3.Text" xml:space="preserve">
<value>Überwachte Ordner - Folderwatch</value>
</data>
<data name="&gt;&gt;TabPage3.Name" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;TabPage3.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabPage3.Parent" xml:space="preserve">
<value>TabControl1</value>
</data>
<data name="&gt;&gt;TabPage3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="TabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="TabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="TabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>590, 306</value>
</data>
<data name="TabControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;TabControl1.Name" xml:space="preserve">
<value>TabControl1</value>
</data>
<data name="&gt;&gt;TabControl1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;TabControl1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="chkbxUserAut.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkbxUserAut.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 58</value>
</data>
<data name="chkbxUserAut.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 17</value>
</data>
<data name="chkbxUserAut.TabIndex" type="System.Int32, mscorlib">
<value>47</value>
</data>
<data name="chkbxUserAut.Text" xml:space="preserve">
<value>Windows-Authentifizierung</value>
</data>
<data name="&gt;&gt;chkbxUserAut.Name" xml:space="preserve">
<value>chkbxUserAut</value>
</data>
<data name="&gt;&gt;chkbxUserAut.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkbxUserAut.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;chkbxUserAut.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="Label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label5.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 115</value>
</data>
<data name="Label5.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 13</value>
</data>
<data name="Label5.TabIndex" type="System.Int32, mscorlib">
<value>46</value>
</data>
<data name="Label5.Text" xml:space="preserve">
<value>Aktueller ConnectionString:</value>
</data>
<data name="&gt;&gt;Label5.Name" xml:space="preserve">
<value>Label5</value>
</data>
<data name="&gt;&gt;Label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label5.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;Label5.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="cmbDatenbank.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 78</value>
</data>
<data name="cmbDatenbank.Size" type="System.Drawing.Size, System.Drawing">
<value>244, 21</value>
</data>
<data name="cmbDatenbank.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="&gt;&gt;cmbDatenbank.Name" xml:space="preserve">
<value>cmbDatenbank</value>
</data>
<data name="&gt;&gt;cmbDatenbank.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbDatenbank.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;cmbDatenbank.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="Label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label4.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 62</value>
</data>
<data name="Label4.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 13</value>
</data>
<data name="Label4.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="Label4.Text" xml:space="preserve">
<value>Datenbank:</value>
</data>
<data name="&gt;&gt;Label4.Name" xml:space="preserve">
<value>Label4</value>
</data>
<data name="&gt;&gt;Label4.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label4.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;Label4.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="Label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label1.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 14</value>
</data>
<data name="Label1.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 13</value>
</data>
<data name="Label1.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="Label1.Text" xml:space="preserve">
<value>Server-Name:</value>
</data>
<data name="&gt;&gt;Label1.Name" xml:space="preserve">
<value>Label1</value>
</data>
<data name="&gt;&gt;Label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label1.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;Label1.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="Label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label2.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 14</value>
</data>
<data name="Label2.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 13</value>
</data>
<data name="Label2.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="Label2.Text" xml:space="preserve">
<value>Benutzername:</value>
</data>
<data name="&gt;&gt;Label2.Name" xml:space="preserve">
<value>Label2</value>
</data>
<data name="&gt;&gt;Label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label2.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;Label2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="Label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Label3.Location" type="System.Drawing.Point, System.Drawing">
<value>379, 14</value>
</data>
<data name="Label3.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
</data>
<data name="Label3.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
</data>
<data name="Label3.Text" xml:space="preserve">
<value>Passwort:</value>
</data>
<data name="&gt;&gt;Label3.Name" xml:space="preserve">
<value>Label3</value>
</data>
<data name="&gt;&gt;Label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Label3.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;Label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtActualConnection.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="txtActualConnection.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 131</value>
</data>
<data name="txtActualConnection.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 22</value>
</data>
<data name="txtActualConnection.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="&gt;&gt;txtActualConnection.Name" xml:space="preserve">
<value>txtActualConnection</value>
</data>
<data name="&gt;&gt;txtActualConnection.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtActualConnection.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;txtActualConnection.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="txtServer.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 30</value>
</data>
<data name="txtServer.Size" type="System.Drawing.Size, System.Drawing">
<value>246, 22</value>
</data>
<data name="txtServer.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="&gt;&gt;txtServer.Name" xml:space="preserve">
<value>txtServer</value>
</data>
<data name="&gt;&gt;txtServer.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtServer.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;txtServer.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtUser.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 30</value>
</data>
<data name="txtUser.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 22</value>
</data>
<data name="txtUser.TabIndex" type="System.Int32, mscorlib">
<value>37</value>
</data>
<data name="&gt;&gt;txtUser.Name" xml:space="preserve">
<value>txtUser</value>
</data>
<data name="&gt;&gt;txtUser.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUser.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;txtUser.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="txtPasswort.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 30</value>
</data>
<data name="txtPasswort.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 22</value>
</data>
<data name="txtPasswort.TabIndex" type="System.Int32, mscorlib">
<value>38</value>
</data>
<data name="&gt;&gt;txtPasswort.Name" xml:space="preserve">
<value>txtPasswort</value>
</data>
<data name="&gt;&gt;txtPasswort.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPasswort.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;txtPasswort.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="BtnConnect.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="BtnConnect.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 75</value>
</data>
<data name="BtnConnect.Size" type="System.Drawing.Size, System.Drawing">
<value>253, 25</value>
</data>
<data name="BtnConnect.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="BtnConnect.Text" xml:space="preserve">
<value>Verbindung zur Datenbank herstellen</value>
</data>
<data name="BtnConnect.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="&gt;&gt;BtnConnect.Name" xml:space="preserve">
<value>BtnConnect</value>
</data>
<data name="&gt;&gt;BtnConnect.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;BtnConnect.Parent" xml:space="preserve">
<value>TabPage1</value>
</data>
<data name="&gt;&gt;BtnConnect.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="Label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -1094,57 +1415,6 @@ ausgenommen werden sollen:</value>
<data name="&gt;&gt;btnstartstop1.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="TabPage3.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="TabPage3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="TabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>582, 280</value>
</data>
<data name="TabPage3.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="TabPage3.Text" xml:space="preserve">
<value>Überwachte Ordner - Folderwatch</value>
</data>
<data name="&gt;&gt;TabPage3.Name" xml:space="preserve">
<value>TabPage3</value>
</data>
<data name="&gt;&gt;TabPage3.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabPage3.Parent" xml:space="preserve">
<value>TabControl1</value>
</data>
<data name="&gt;&gt;TabPage3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="TabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="TabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="TabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>590, 306</value>
</data>
<data name="TabControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;TabControl1.Name" xml:space="preserve">
<value>TabControl1</value>
</data>
<data name="&gt;&gt;TabControl1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;TabControl1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>

View File

@ -92,11 +92,12 @@ Public Class frmConfig_Basic
Exit Sub
End If
Me.Cursor = Cursors.WaitCursor
Dim csb As New SqlClient.SqlConnectionStringBuilder
csb.DataSource = Me.txtServer.Text
csb.IntegratedSecurity = False
csb.UserID = Me.txtUser.Text
csb.Password = Me.txtPasswort.Text
Dim csb As New SqlClient.SqlConnectionStringBuilder With {
.DataSource = Me.txtServer.Text,
.IntegratedSecurity = False,
.UserID = Me.txtUser.Text,
.Password = Me.txtPasswort.Text
}
Dim con As String
If chkbxUserAut.Checked Then
@ -106,8 +107,9 @@ Public Class frmConfig_Basic
End If
Dim connection As New SqlClient.SqlConnection(con) 'csb.ConnectionString)
connection.Open()
Dim cmd As New SqlClient.SqlCommand("sp_databases", connection)
cmd.CommandType = CommandType.StoredProcedure
Dim cmd As New SqlClient.SqlCommand("sp_databases", connection) With {
.CommandType = CommandType.StoredProcedure
}
' Ausführen und Ergebnis in einer ListBox anzeigen
Dim dr As SqlClient.SqlDataReader = cmd.ExecuteReader
If dr.HasRows Then
@ -151,19 +153,19 @@ Public Class frmConfig_Basic
End If
reload = True
Dim folderwatch = DATABASE_ECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & USER_ID)
If Not folderwatch Is Nothing Then
If folderwatch IsNot Nothing Then
CURRENT_FOLDERWATCH = folderwatch
End If
Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH
Dim SCAN_folderwatch = DATABASE_ECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & USER_ID)
If Not SCAN_folderwatch Is Nothing Then
If SCAN_folderwatch IsNot Nothing Then
CURRENT_SCAN_FOLDERWATCH = SCAN_folderwatch
End If
Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH
Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH
If Not ClassFolderWatcher.FolderWatcher Is Nothing Then
If ClassFolderWatcher.FolderWatcher.EnableRaisingEvents = True Then
If FOLDER_WATCHER.FolderWatcher IsNot Nothing Then
If FOLDER_WATCHER.FolderWatcher.EnableRaisingEvents = True Then
If USER_LANGUAGE = "de-DE" Then
btnstartstop1.Text = "Überwachung stoppen"
Else
@ -191,8 +193,8 @@ Public Class frmConfig_Basic
btnstartstop1.Image = My.Resources.bell_go
End If
If Not ClassFolderWatcher.FolderWatcher_SCAN Is Nothing Then
If ClassFolderWatcher.FolderWatcher_SCAN.EnableRaisingEvents = True Then
If FOLDER_WATCHER.FolderWatcher_SCAN IsNot Nothing Then
If FOLDER_WATCHER.FolderWatcher_SCAN.EnableRaisingEvents = True Then
If USER_LANGUAGE = "de-DE" Then
btnstartstop2.Text = "Überwachung stoppen"
Else
@ -281,10 +283,10 @@ Public Class frmConfig_Basic
End If
End If
If FW_started = True And FOLDER_TYPE = "DEFAULT" Then
ClassFolderWatcher.Restart_FolderWatch()
FOLDER_WATCHER.Restart_FolderWatch()
End If
If CONFIG.Config.FolderWatchScanStarted = True And FOLDER_TYPE = "SCAN" Then
ClassFolderWatcher.Restart_FolderWatchSCAN()
FOLDER_WATCHER.Restart_FolderWatchSCAN()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:")
@ -304,7 +306,7 @@ Public Class frmConfig_Basic
End Sub
Sub CheckFW_State()
Select Case ClassFolderWatcher.StartStop_FolderWatch()
Select Case FOLDER_WATCHER.StartStop_FolderWatch()
Case 1
If USER_LANGUAGE = "de-DE" Then
btnstartstop1.Text = "Überwachung stoppen"
@ -324,7 +326,7 @@ Public Class frmConfig_Basic
End Select
End Sub
Sub CheckFWSCAN_State()
Select Case ClassFolderWatcher.StartStop_FolderWatchSCAN()
Select Case FOLDER_WATCHER.StartStop_FolderWatchSCAN()
Case 1
If USER_LANGUAGE = "de-DE" Then
btnstartstop2.Text = "Überwachung stoppen"
@ -373,8 +375,9 @@ Public Class frmConfig_Basic
chkLogErrorsOnly.Checked = CONFIG.Config.LogErrorsOnly
If Not MyConnectionString = String.Empty Then
Dim csb As New SqlClient.SqlConnectionStringBuilder
csb.ConnectionString = MyConnectionString
Dim csb As New SqlClient.SqlConnectionStringBuilder With {
.ConnectionString = MyConnectionString
}
Dim constr = MyConnectionString
Try
If Not constr.Contains("Trusted_Connection") Then
@ -452,15 +455,6 @@ Public Class frmConfig_Basic
MsgBox("Changes saved.", MsgBoxStyle.Information)
End Sub
Private Sub btnLogMail_Click(sender As Object, e As EventArgs) Handles btnLogMail.Click
ClassEmail.Send_Log_Mail("<b> Log-/SupportMail von DD GLOBIX.</b> <p>",
"Support-Mail GLOBIX", "support@didalog.de", "mail.triplew.de", "support@didalog.de", "ddemail40", "support@didalog.de", False, True)
End Sub
Private Sub cmbLanguage_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbLanguage.SelectedIndexChanged
End Sub
Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles Button3.Click
Dim result As MsgBoxResult
If USER_LANGUAGE = "de-DE" Then
@ -514,6 +508,6 @@ Public Class frmConfig_Basic
' Specify that the link was visited.
Me.LinkLabel1.LinkVisited = True
' Navigate to a URL.
System.Diagnostics.Process.Start("http://www.didalog.de/Support")
Process.Start("https://digitaldata.works/support")
End Sub
End Class

View File

@ -17,10 +17,10 @@ Public Class frmIndex
#Region "+++++ Variablen ++++++"
Public vPathFile As String
Private MULTIFILES As Integer
Private akttxtbox As TextBox
Private ReadOnly akttxtbox As TextBox
Dim DT_INDEXEMAN As DataTable
Public FormLoaded As Boolean = False
Private Shared _Instance As frmIndex = Nothing
Private Shared ReadOnly _Instance As frmIndex = Nothing
Dim DropType As String
Private Shared WDDirect As Boolean = False
@ -46,7 +46,7 @@ Public Class frmIndex
Private Property DocTypes As New List(Of DocType)
Private _Logger As Logger
Private ReadOnly _Logger As Logger
#End Region
@ -292,7 +292,10 @@ Public Class frmIndex
Dim oErgebnis
'Welcher Provider?
If vProvider.ToLower = "oracle" Then
oErgebnis = ClassDatabase.OracleExecute_Scalar(SQLCommand, oConnectionString)
'oErgebnis = ClassDatabase.OracleExecute_Scalar(SQLCommand, oConnectionString)
LOGGER.Warn("Oracle Database Queries are not supported")
Else 'im Moment nur SQL-Server
oErgebnis = DATABASE_ECM.GetScalarValueWithConnection(SQLCommand, oConnectionString)
End If
@ -680,7 +683,7 @@ Public Class frmIndex
NewFileString = _neuername
Else
Do While File.Exists(_neuername)
version = version + 1
version += 1
_neuername = Stammname.Replace(extension, "") & VERSION_DELIMITER & version & extension
NewFileString = _neuername
Loop
@ -755,13 +758,13 @@ Public Class frmIndex
End If
End If
_Logger.Debug($"Manueller Indexvalue [{idxvalue.ToString}]...NOW THE INDEXING...")
_Logger.Debug($"Manueller Indexvalue [{idxvalue}]...NOW THE INDEXING...")
Count += 1
' den Typ des Zielindexes auslesen
Dim oIndexType As Integer = WINDREAM.GetIndexType(indexname)
_Logger.Debug($"oIndexType [{oIndexType.ToString}]...")
_Logger.Debug($"oIndexType [{oIndexType}]...")
If oIndexType < WINDREAM.WMObjectVariableValueTypeVector Then
_Logger.Debug($"Indexing oIndexType < WINDREAM.WMObjectVariableValueTypeVector...")
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE)
@ -863,7 +866,7 @@ Public Class frmIndex
End Function
Private Function WriteIndex2File(pIndexName As String, pIndexValue As String)
Try
_Logger.Info($"Indexing with Name {pIndexName} and Value: {pIndexValue.ToString}")
_Logger.Info($"Indexing with Name {pIndexName} and Value: {pIndexValue}")
Return WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, pIndexName, pIndexValue, CURR_DOKART_OBJECTTYPE)
Catch ex As Exception
ShowErrorMessage(ex, "WriteIndex2File")
@ -1381,7 +1384,7 @@ Public Class frmIndex
Dim Stammname As String = _NewFilename
Dim neuername As String = _NewFilename
Do While File.Exists(neuername)
version = version + 1
version += 1
neuername = Stammname.Replace(extension, "") & _versionTz & version & extension
CURRENT_NEWFILENAME = neuername
Loop
@ -1440,7 +1443,7 @@ Public Class frmIndex
Else
MsgBox($"Please Index file completely{vbNewLine}(Abort 1 of Indexdialog)", MsgBoxStyle.Information)
End If
CancelAttempts = CancelAttempts + 1
CancelAttempts += 1
e.Cancel = True
Case 1
Dim result As MsgBoxResult
@ -1768,7 +1771,7 @@ Public Class frmIndex
Dim oNewDestination = Path.Combine(WINDREAM.ClientBasePath, oNormalized)
If Directory.Exists(oDestination) = False Then
Dim oMessage = ""
Dim oMessage As String
If USER_LANGUAGE = "de-DE" Then
oMessage = $"Der Pfad für das ausgewählte Profil ist nicht erreichbar:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Bitte wählen Sie ein anderes Profil."
@ -2648,7 +2651,7 @@ Public Class frmIndex
Else
MsgBox("Please Index file completely" & vbNewLine & "(Abort 1 of Indexdialog)", MsgBoxStyle.Information)
End If
CancelAttempts = CancelAttempts + 1
CancelAttempts += 1
Case 1
Dim result As MsgBoxResult
If USER_LANGUAGE = LANG_DE Then
@ -2750,7 +2753,7 @@ Public Class frmIndex
If WORK_FILE() = True Then
'Und nun die folgenden
Dim DTFiles2Work As DataTable = DATABASE_ECM.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
If Not DTFiles2Work Is Nothing Then
If DTFiles2Work IsNot Nothing Then
Dim err = False
For Each filerow As DataRow In DTFiles2Work.Rows
CURRENT_WORKFILE_GUID = filerow.Item("GUID")

View File

@ -26,13 +26,14 @@ Public Class SQLConfigAutoIndex
End If
Next
Dim typeCS As String = DATABASE_ECM.GetScalarValue("SELECT SQL_PROVIDER FROM TBDD_CONNECTION WHERE GUID = " & cmbConnection.SelectedValue)
Dim typeCS As String = DATABASE_ECM.GetScalarValue("SELECT SQL_PROVIDER FROM TBDD_CONNECTION WHERE GUID = " & conid)
Dim dt As DataTable
If typeCS.Length > 0 Then
Dim CS As String
CS = DATABASE_ECM.Get_ConnectionStringforID(cmbConnection.SelectedValue)
If typeCS.ToUpper = "Oracle".ToUpper Then
dt = ClassDatabase.Oracle_Return_Datatable(query, CS, True)
LOGGER.Warn("Oracle is not supported!")
'dt = ClassDatabase.Oracle_Return_Datatable(query, CS, True)
Else
'dt = ClassDatabase.Return_Datatable_CS(query, CS, True)
dt = DATABASE_ECM.GetDatatableWithConnection(query, CS)
@ -208,7 +209,8 @@ Public Class SQLConfigAutoIndex
End If
End If
End Sub
Dim AtPlaceholderPattern As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
ReadOnly AtPlaceholderPattern As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
Private Sub SQL_ERGEBNISTextBox_KeyUp(sender As Object, e As KeyEventArgs) Handles SQL_ERGEBNISTextBox.KeyUp
CurrentPosition = SQL_ERGEBNISTextBox.SelectionStart
@ -235,7 +237,6 @@ Public Class SQLConfigAutoIndex
End Set
End Property
Private Sub CheckForPlaceholders()
Dim count As Integer = 0
Dim text As String = Me.Value
Dim atPlaceholderRegex = New Regex(AtPlaceholderPattern, RegexOptions.IgnoreCase)
Dim matches As MatchCollection = atPlaceholderRegex.Matches(text)
@ -330,14 +331,15 @@ Public Class SQLConfigAutoIndex
If typeCS.ToUpper = "Oracle".ToUpper Then
If type = "'VIEW'" Then
'DB-Abfrage für alle Views definieren
oSQL = "select VIEW_NAME from USER_VIEWS"
Else
'DB-Abfrage für alle Tables definieren
oSQL = "select TABLE_NAME from USER_TABLES"
End If
dt = ClassDatabase.Oracle_Return_Datatable(oSQL, CS, True)
'If type = "'VIEW'" Then
' 'DB-Abfrage für alle Views definieren
' oSQL = "select VIEW_NAME from USER_VIEWS"
'Else
' 'DB-Abfrage für alle Tables definieren
' oSQL = "select TABLE_NAME from USER_TABLES"
'End If
'dt = ClassDatabase.Oracle_Return_Datatable(oSQL, CS, True)
LOGGER.Warn("Oracle is not supported!")
Else
oSQL = "SELECT TABLE_NAME from information_schema.tables where TABLE_TYPE = " & type & " ORDER BY TABLE_NAME"
'dt = ClassDatabase.Return_Datatable_CS(SQL, CS, True)
@ -367,8 +369,9 @@ Public Class SQLConfigAutoIndex
Dim SQL As String
Dim DT As DataTable
If typeCS.ToUpper = "Oracle".ToUpper Then
SQL = "select COLUMN_NAME from USER_TAB_COLS where TABLE_NAME='" & tableName & "' order by COLUMN_NAME"
DT = ClassDatabase.Oracle_Return_Datatable(SQL, CS, True)
'SQL = "select COLUMN_NAME from USER_TAB_COLS where TABLE_NAME='" & tableName & "' order by COLUMN_NAME"
'DT = ClassDatabase.Oracle_Return_Datatable(SQL, CS, True)
LOGGER.Warn("Oracle is not supported!")
Else
SQL = "SELECT name FROM sys.columns WHERE object_id = OBJECT_ID('" & tableName & "') ORDER BY name"
'DT = ClassDatabase.Return_Datatable_CS(SQL, CS, True)

View File

@ -1,6 +1,5 @@
Imports Oracle.ManagedDataAccess.Client
Public Class frmSQLSuggestion
Dim isinsert As Boolean = False
Private Sub btnVorschlag_Click(sender As Object, e As EventArgs) Handles btnVorschlag.Click
TestSQL(cmbConnection.SelectedValue, SQL_ERGEBNISTextBox.Text)
End Sub
@ -105,8 +104,6 @@ Public Class frmSQLSuggestion
Me.cmbConnection.SelectedValue = DT.Rows(0).Item("CONNECTION_ID")
SQL_ERGEBNISTextBox.Text = DT.Rows(0).Item("SQL_RESULT")
SQL_UEBERPRUEFUNGTextBox.Text = DT.Rows(0).Item("SQL_CHECK")
Else
isinsert = True
End If
lblSave.Visible = False
Catch ex As Exception
@ -128,7 +125,7 @@ Public Class frmSQLSuggestion
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Try
ClassDatabase.Init()
'ClassDatabase.Init()
Dim origresultstring = DATABASE_ECM.GetScalarValue("SELECT SQL_RESULT FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN)
Dim origcheckstring = DATABASE_ECM.GetScalarValue("SELECT SQL_CHECK FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN)
Dim origConnection = DATABASE_ECM.GetScalarValue("SELECT CONNECTION_ID FROM TBDD_INDEX_MAN WHERE GUID = " & CURRENT_INDEXMAN)

View File

@ -7,8 +7,8 @@ Public NotInheritable Class frmSplash
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
Private InitSteps As Integer = 5
Private bw As New BackgroundWorker()
Private ReadOnly InitSteps As Integer = 5
Private ReadOnly bw As New BackgroundWorker()
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Anwendungstitel

View File

@ -36,7 +36,6 @@ Partial Class frmStart
Me.TimerFolderWatch = New System.Windows.Forms.Timer(Me.components)
Me.TimerClose3Minutes = New System.Windows.Forms.Timer(Me.components)
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.TimerCheckDroppedFiles = New System.Windows.Forms.Timer(Me.components)
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.LabelMachine = New DevExpress.XtraBars.BarStaticItem()
@ -119,10 +118,6 @@ Partial Class frmStart
'
resources.ApplyResources(Me.NotifyIcon1, "NotifyIcon1")
'
'TimerCheckDroppedFiles
'
Me.TimerCheckDroppedFiles.Interval = 500
'
'LabelControl1
'
Me.LabelControl1.AllowDrop = True
@ -232,7 +227,6 @@ Partial Class frmStart
Friend WithEvents NotifyIcon1 As System.Windows.Forms.NotifyIcon
Friend WithEvents HistoryIndexierteDateienToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents InfoToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents TimerCheckDroppedFiles As System.Windows.Forms.Timer
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
Friend WithEvents btnChoosefiles As System.Windows.Forms.Button
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog

View File

@ -121,37 +121,6 @@
<value>400, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="MenuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="MenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>294, 24</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="MenuStrip1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="MenuStrip1.Text" xml:space="preserve">
<value>MenuStrip1</value>
</data>
<data name="&gt;&gt;MenuStrip1.Name" xml:space="preserve">
<value>MenuStrip1</value>
</data>
<data name="&gt;&gt;MenuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;MenuStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;MenuStrip1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="KonfigurationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 20</value>
</data>
<data name="KonfigurationToolStripMenuItem.Text" xml:space="preserve">
<value>Konfiguration</value>
</data>
<data name="AdministrationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
@ -179,9 +148,49 @@
<data name="InfoToolStripMenuItem.Text" xml:space="preserve">
<value>Info</value>
</data>
<data name="KonfigurationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 20</value>
</data>
<data name="KonfigurationToolStripMenuItem.Text" xml:space="preserve">
<value>Konfiguration</value>
</data>
<data name="MenuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="MenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>294, 24</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="MenuStrip1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="MenuStrip1.Text" xml:space="preserve">
<value>MenuStrip1</value>
</data>
<data name="&gt;&gt;MenuStrip1.Name" xml:space="preserve">
<value>MenuStrip1</value>
</data>
<data name="&gt;&gt;MenuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;MenuStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;MenuStrip1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>515, 17</value>
</metadata>
<data name="tslblFW.Size" type="System.Drawing.Size, System.Drawing">
<value>133, 17</value>
</data>
<data name="tslblFW.Text" xml:space="preserve">
<value>FolderWatch ist aktiv</value>
</data>
<data name="tslblFW.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="StatusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 139</value>
</data>
@ -206,15 +215,6 @@
<data name="&gt;&gt;StatusStrip1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tslblFW.Size" type="System.Drawing.Size, System.Drawing">
<value>133, 17</value>
</data>
<data name="tslblFW.Text" xml:space="preserve">
<value>FolderWatch ist aktiv</value>
</data>
<data name="tslblFW.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<metadata name="TimerFolderWatch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1072, 17</value>
</metadata>
@ -514,9 +514,6 @@
<data name="NotifyIcon1.Text" xml:space="preserve">
<value>GlobalIndexer</value>
</data>
<metadata name="TimerCheckDroppedFiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 56</value>
</metadata>
<data name="LabelControl1.Appearance.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 11.25pt</value>
</data>
@ -950,12 +947,6 @@
<data name="&gt;&gt;NotifyIcon1.Type" xml:space="preserve">
<value>System.Windows.Forms.NotifyIcon, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TimerCheckDroppedFiles.Name" xml:space="preserve">
<value>TimerCheckDroppedFiles</value>
</data>
<data name="&gt;&gt;TimerCheckDroppedFiles.Type" xml:space="preserve">
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;OpenFileDialog1.Name" xml:space="preserve">
<value>OpenFileDialog1</value>
</data>

View File

@ -10,11 +10,15 @@ Imports DigitalData.Modules.Windows
Imports DigitalData.Modules.License
Public Class frmStart
Public _lizenzManager As LicenseManagerLegacy
Public LicenseManager As LicenseManagerLegacy
Private Const WM_WINDOWPOSCHANGING As Integer = &H46
Private IndexForm As frmIndex
Private FileDrop As FileDrop
'Private DroppedFiles As List(Of FileDrop.DroppedFile)
Protected Overrides Sub WndProc(ByRef m As Message)
' Listen for operating system messages
Select Case m.Msg
@ -25,10 +29,136 @@ Public Class frmStart
MyBase.WndProc(m)
End Sub
Public Sub New()
Dim splash As New frmSplash()
splash.ShowDialog()
Thread.CurrentThread.CurrentUICulture = New CultureInfo(USER_LANGUAGE)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub
#Region "=== FORM EVENTS ==="
Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles Me.Load
Cursor = Cursors.WaitCursor
Try
IndexForm = New frmIndex()
FileDrop = New FileDrop(LOGCONFIG)
'Lizenz abgellaufen, überprüfen ob User Admin ist
If LICENSE_COUNT < USERCOUNT_LOGGED_IN Then
If USER_IS_ADMIN = True Then
LOGGER.Info(">> User is Admin - Timer will be started")
If USER_LANGUAGE = "de-DE" Then
MsgBox("Sie haben nun 3 Minuten Zeit eine neue Lizenz zu vergeben!", MsgBoxStyle.Information)
Else
MsgBox("You now got 3 minutes to update the license!", MsgBoxStyle.Information)
End If
'Timer starten
If TimerClose3Minutes.Enabled = False Then
TimerClose3Minutes.Start()
End If
End If
End If
If DOCTYPE_COUNT_ACTUAL > LICENSE_DOCTYPE_COUNT Then
If USER_IS_ADMIN = True Then
LOGGER.Info(">> User is Admin - Timer will be started")
If USER_LANGUAGE = "de-DE" Then
MsgBox("Sie haben nun 3 Minuten Zeit eine neue Lizenz zu vergeben!", MsgBoxStyle.Information)
Else
MsgBox("You now got 3 minutes to update the license!", MsgBoxStyle.Information)
End If
'Timer starten
If TimerClose3Minutes.Enabled = False Then
TimerClose3Minutes.Start()
End If
End If
End If
' SetLanguage()
If USER_IS_ADMIN = True Then
ToolStripSeparator1.Visible = True
AdministrationToolStripMenuItem.Visible = True
Else
ToolStripSeparator1.Visible = False
AdministrationToolStripMenuItem.Visible = False
End If
DATABASE_ECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
TopMost = True
Catch ex As Exception
MsgBox("Unexpected Error in Load-Form" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Cursor = Cursors.Default
End Sub
Private Sub frmStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
' SetLanguage()
If START_INCOMPLETE = True Then
If LICENSE_COUNT = 0 And LICENSE_EXPIRED = True Then
Else
Me.Close()
End If
Else
TimerFolderWatch.Start()
End If
Opacity = 0.7
CURRENT_DT_REGEX = DATABASE_ECM.GetDatatable("SELECT * FROM TBGI_FUNCTION_REGEX")
Start_Folderwatch()
ClassWindowLocation.LoadFormLocationSize(Me, LoadSize:=False)
Try
Me.LabelControl1.Location = New Point(13, 37)
Catch ex As Exception
Me.btnChoosefiles.Location = New Point(269, 37)
End Try
End Sub
Private Sub frmStart_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try
If START_INCOMPLETE = False Then
Dim Sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Global-Indexer')"
DATABASE_ECM.ExecuteNonQuery(Sql)
End If
ClassWindowLocation.SaveFormLocationSize(Me)
Catch ex As Exception
MsgBox("Unexpected Error in Closing Application: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Try
IndexForm.DisposeViewer()
IndexForm.Dispose()
Catch ex As Exception
LOGGER.Error(ex)
End Try
End Sub
#End Region
#Region "=== DRAG DROP ==="
Private Sub frmMain_DragDrop(sender As Object, e As DragEventArgs) Handles MyBase.DragDrop
DragDropForm(e)
End Sub
Private Sub LabelControl1_DragDrop(sender As Object, e As DragEventArgs) Handles LabelControl1.DragDrop, btnChoosefiles.DragDrop
DragDropForm(e)
End Sub
Private Sub frmMain_DragEnter(sender As Object, e As DragEventArgs) Handles Me.DragEnter
Drag_Enter(sender, e)
End Sub
Private Sub LabelControl1_DragEnter(sender As Object, e As DragEventArgs) Handles LabelControl1.DragEnter, btnChoosefiles.DragEnter
Drag_Enter(sender, e)
End Sub
Sub DragDropForm(e As DragEventArgs)
Dim frmCollection = Application.OpenForms
If frmCollection.OfType(Of frmIndexFileList).Any Then
@ -37,14 +167,18 @@ Public Class frmStart
End If
'Erstmal alles löschen
DATABASE_ECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
If ClassFileDrop.Drop_File(e) = True Then
TimerCheckDroppedFiles.Start()
Dim oDroppedFiles = FileDrop.GetFiles(e)
If oDroppedFiles.Count > 0 Then
Check_Dropped_Files(oDroppedFiles)
End If
' TODO: REMOVE
'If ClassFileDrop.Drop_File(e) = True Then
' TimerCheckDroppedFiles.Start()
'End If
End Sub
Private Sub frmMain_DragEnter(sender As Object, e As DragEventArgs) Handles Me.DragEnter
Drag_Enter(sender, e)
End Sub
Sub Drag_Enter(sender As Object, e As DragEventArgs)
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All
@ -62,23 +196,35 @@ Public Class frmStart
End If
End Sub
Sub Check_Dropped_Files()
Sub Check_Dropped_Files(pDroppedFiles As List(Of FileDrop.DroppedFile))
Try
DATABASE_ECM.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('{Environment.UserName}')")
For Each oFiledropString As String In ClassFileDrop.FilesDropped
If oFiledropString IsNot Nothing Then
LOGGER.Info(">> Check Drop-File: " & oFiledropString.ToString)
Dim oLastPipe = oFiledropString.LastIndexOf("|")
Dim oHandleType As String = oFiledropString.Substring(0, oLastPipe + 1)
Dim oFilename As String = oFiledropString.Substring(oLastPipe + 1)
If ClassIndexFunctions.CheckDuplicateFiles(oFilename, "Manuelle Ablage", oHandleType) Then
ClassFilehandle.Decide_FileHandle(oFilename, oHandleType)
End If
'TODO: finish
For Each oDroppedFile In pDroppedFiles
LOGGER.Info("Checking Dropped File: [{0}]", oDroppedFile.FilePath)
Dim oDropType = oDroppedFile.DropType
Dim oFileName = oDroppedFile.FilePath
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "Manuelle Ablage", oDropType) Then
FILE_HANDLER.Decide_FileHandle(oFileName, oDropType)
End If
Next
'For Each oFiledropString As String In ClassFileDrop.FilesDropped
' If oFiledropString IsNot Nothing Then
' LOGGER.Info(">> Check Drop-File: " & oFiledropString.ToString)
' Dim oLastPipe = oFiledropString.LastIndexOf("|")
' Dim oHandleType As String = oFiledropString.Substring(0, oLastPipe + 1)
' Dim oFilename As String = oFiledropString.Substring(oLastPipe + 1)
' If ClassIndexFunctions.CheckDuplicateFiles(oFilename, "Manuelle Ablage", oHandleType) Then
' ClassFilehandle.Decide_FileHandle(oFilename, oHandleType)
' End If
' End If
'Next
Dim sql As String = $"SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('{Environment.UserName}')"
DTACTUAL_FILES = Nothing
DTACTUAL_FILES = DATABASE_ECM.GetDatatable(sql)
@ -146,112 +292,103 @@ Public Class frmStart
End Try
End Sub
Private Sub Clear_Tempfiles()
'TempDateien löschen
For Each oFile In TEMP_FILES
'Private Sub TimerCheckDroppedFiles_Tick(sender As Object, e As EventArgs) Handles TimerCheckDroppedFiles.Tick
' TimerCheckDroppedFiles.Stop()
' Check_Dropped_Files()
'End Sub
Private Sub btnChoosefiles_Click(sender As Object, e As EventArgs) Handles btnChoosefiles.Click
Try
Dim oFileName As String
Dim oOpenFileDialog As New OpenFileDialog With {
.RestoreDirectory = True,
.Multiselect = True
}
If oOpenFileDialog.ShowDialog() = DialogResult.OK Then
'TODO: REMOVE
'ClassFileDrop.FilesDropped.Clear()
Dim oDroppedFiles As New List(Of FileDrop.DroppedFile)
For Each oFileName In oOpenFileDialog.FileNames
LOGGER.Info(">> Chosen File: " & oFileName)
'TODO: REMOVE
'ClassFileDrop.FilesDropped.Add("|DROPFROMFSYSTEM|" & oFileName)
Dim oFile = New FileDrop.DroppedFile(oFileName) With {
.FileFormat = FileDrop.FileFormat.LocalFile
}
oDroppedFiles.Add(oFile)
Next
'TimerCheckDroppedFiles.Start()
Check_Dropped_Files(oDroppedFiles)
End If
Catch ex As Exception
MsgBox("Unexpected Error in Choose Files for Indexing:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
#End Region
#Region "=== MENU ==="
Private Sub GlobalIndexerEinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs)
Try
Me.Hide()
frmAdministration.ShowDialog()
Me.Show()
Catch ex As Exception
MsgBox("Fehler in der Administration:" & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, Text)
LOGGER.Error(ex)
End Try
End Sub
Private Sub HistoryIndexierteDateienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HistoryIndexierteDateienToolStripMenuItem.Click
frmHistory.ShowDialog()
End Sub
Private Sub InfoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles InfoToolStripMenuItem.Click
Me.TopMost = False
frmAbout.ShowDialog()
Me.TopMost = True
End Sub
Private Sub AdministrationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AdministrationToolStripMenuItem.Click
Try
Me.Hide()
frmAdministration.ShowDialog()
Me.Show()
Catch ex As Exception
MsgBox("Fehler in der Administration:" & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, Text)
LOGGER.Error(ex)
End Try
End Sub
Private Sub GrundeinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GrundeinstellungenToolStripMenuItem.Click
Me.TopMost = False
frmConfig_Basic.ShowDialog()
'Wurde die Sprache in der Konfiguration geändert
If LANGUAGE_CHANGED = True Then
Try
System.IO.File.Delete(oFile)
If USER_LANGUAGE = "de-DE" Then
MsgBox("Zur letzendlichen Neukonfiguration der Sprache ist ein Neustart notwendig!", MsgBoxStyle.Information, Text)
Else
MsgBox("For the final changing of language, a restart is required!", MsgBoxStyle.Information, Text)
End If
Application.Restart()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Please restart the application manually.", MsgBoxStyle.Information, Text)
End Try
Next
Else
Start_Folderwatch()
Me.TopMost = True
End If
End Sub
#End Region
Sub Open_IndexDialog()
Try
Hide()
IndexForm.ShowDialog()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical)
Finally
Show()
End Try
End Sub
Private Sub frmStart_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try
If START_INCOMPLETE = False Then
Dim Sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Global-Indexer')"
DATABASE_ECM.ExecuteNonQuery(Sql)
End If
ClassWindowLocation.SaveFormLocationSize(Me)
Catch ex As Exception
MsgBox("Unexpected Error in Closing Application: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Try
IndexForm.DisposeViewer()
IndexForm.Dispose()
Catch ex As Exception
LOGGER.Error(ex)
End Try
End Sub
Public Sub New()
Dim splash As New frmSplash()
splash.ShowDialog()
Thread.CurrentThread.CurrentUICulture = New CultureInfo(USER_LANGUAGE)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub
Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles Me.Load
Cursor = Cursors.WaitCursor
Try
IndexForm = New frmIndex()
'Lizenz abgellaufen, überprüfen ob User Admin ist
If LICENSE_COUNT < USERCOUNT_LOGGED_IN Then
If USER_IS_ADMIN = True Then
LOGGER.Info(">> User is Admin - Timer will be started")
If USER_LANGUAGE = "de-DE" Then
MsgBox("Sie haben nun 3 Minuten Zeit eine neue Lizenz zu vergeben!", MsgBoxStyle.Information)
Else
MsgBox("You now got 3 minutes to update the license!", MsgBoxStyle.Information)
End If
'Timer starten
If TimerClose3Minutes.Enabled = False Then
TimerClose3Minutes.Start()
End If
End If
End If
If DOCTYPE_COUNT_ACTUAL > LICENSE_DOCTYPE_COUNT Then
If USER_IS_ADMIN = True Then
LOGGER.Info(">> User is Admin - Timer will be started")
If USER_LANGUAGE = "de-DE" Then
MsgBox("Sie haben nun 3 Minuten Zeit eine neue Lizenz zu vergeben!", MsgBoxStyle.Information)
Else
MsgBox("You now got 3 minutes to update the license!", MsgBoxStyle.Information)
End If
'Timer starten
If TimerClose3Minutes.Enabled = False Then
TimerClose3Minutes.Start()
End If
End If
End If
' SetLanguage()
If USER_IS_ADMIN = True Then
ToolStripSeparator1.Visible = True
AdministrationToolStripMenuItem.Visible = True
Else
ToolStripSeparator1.Visible = False
AdministrationToolStripMenuItem.Visible = False
End If
DATABASE_ECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
TopMost = True
Catch ex As Exception
MsgBox("Unexpected Error in Load-Form" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Cursor = Cursors.Default
End Sub
#Region "=== FOLDERWATCH ==="
Sub Start_Folderwatch()
If CURRENT_FOLDERWATCH = String.Empty Then
FW_started = False
@ -293,7 +430,7 @@ Public Class frmStart
LOGGER.Info(">> Adding file from Scanfolder after startup:" & oFileName)
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "FolderWatch/Scan") Then
ClassFilehandle.Decide_FileHandle(oFileName, oHandleType)
FILE_HANDLER.Decide_FileHandle(oFileName, oHandleType)
End If
Next oFileName
@ -329,7 +466,7 @@ Public Class frmStart
LOGGER.Info(">> Adding file from Folderwatch after startup:" & oFileName)
If ClassIndexFunctions.CheckDuplicateFiles(oFileName, "FolderWatch/Scan") Then
ClassFilehandle.Decide_FileHandle(oFileName, handleType)
FILE_HANDLER.Decide_FileHandle(oFileName, handleType)
End If
Next oFileName
Else
@ -347,38 +484,7 @@ Public Class frmStart
End Sub
Private Sub GlobalIndexerEinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs)
Try
Me.Hide()
frmAdministration.ShowDialog()
Me.Show()
Catch ex As Exception
MsgBox("Fehler in der Administration:" & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, Text)
LOGGER.Error(ex)
End Try
End Sub
Private Sub GrundeinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GrundeinstellungenToolStripMenuItem.Click
Me.TopMost = False
frmConfig_Basic.ShowDialog()
'Wurde die Sprache in der Konfiguration geändert
If LANGUAGE_CHANGED = True Then
Try
If USER_LANGUAGE = "de-DE" Then
MsgBox("Zur letzendlichen Neukonfiguration der Sprache ist ein Neustart notwendig!", MsgBoxStyle.Information, Text)
Else
MsgBox("For the final changing of language, a restart is required!", MsgBoxStyle.Information, Text)
End If
Application.Restart()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Please restart the application manually.", MsgBoxStyle.Information, Text)
End Try
Else
Start_Folderwatch()
Me.TopMost = True
End If
End Sub
Private Sub TimerFolderWatch_Tick(sender As Object, e As EventArgs) Handles TimerFolderWatch.Tick
If DATABASE_ECM.DBInitialized = False Then
@ -423,7 +529,7 @@ Public Class frmStart
End If
Dim FileForWork As String = row.Item(1)
LOGGER.Info(">> In Timer Folderwatch - File: " & FileForWork)
Dim fileInUse As Boolean = ClassFilehandle.IsFileInUse(FileForWork)
Dim fileInUse As Boolean = FILE_HANDLER.IsFileInUse(FileForWork)
Dim fileexists As Boolean = System.IO.File.Exists(FileForWork)
If fileInUse = False Then
If fileexists = True Then
@ -459,6 +565,33 @@ Public Class frmStart
End Try
End If
End Sub
#End Region
Private Sub Clear_Tempfiles()
'TempDateien löschen
For Each oFile In FILE_HANDLER.TempFiles
Try
System.IO.File.Delete(oFile)
Catch ex As Exception
LOGGER.Error(ex)
End Try
Next
End Sub
Sub Open_IndexDialog()
Try
Hide()
IndexForm.ShowDialog()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical)
Finally
Show()
End Try
End Sub
Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick
If LICENSE_EXPIRED = True Or LICENSE_COUNT < USERCOUNT_LOGGED_IN Then
If USER_LANGUAGE = "de-DE" Then
@ -472,74 +605,8 @@ Public Class frmStart
TimerClose3Minutes.Stop()
End If
End Sub
Private Sub frmStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
' SetLanguage()
If START_INCOMPLETE = True Then
If LICENSE_COUNT = 0 And LICENSE_EXPIRED = True Then
Else
Me.Close()
End If
Else
TimerFolderWatch.Start()
End If
Opacity = 0.7
CURRENT_DT_REGEX = DATABASE_ECM.GetDatatable("SELECT * FROM TBGI_FUNCTION_REGEX")
Start_Folderwatch()
ClassWindowLocation.LoadFormLocationSize(Me, LoadSize:=False)
Try
Me.LabelControl1.Location = New Point(13, 37)
Catch ex As Exception
Me.btnChoosefiles.Location = New Point(269, 37)
End Try
End Sub
Private Sub HistoryIndexierteDateienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HistoryIndexierteDateienToolStripMenuItem.Click
frmHistory.ShowDialog()
End Sub
Private Sub InfoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles InfoToolStripMenuItem.Click
Me.TopMost = False
AboutBox1.ShowDialog()
Me.TopMost = True
End Sub
Private Sub TimerCheckDroppedFiles_Tick(sender As Object, e As EventArgs) Handles TimerCheckDroppedFiles.Tick
TimerCheckDroppedFiles.Stop()
Check_Dropped_Files()
End Sub
Private Sub LabelControl1_DragDrop(sender As Object, e As DragEventArgs) Handles LabelControl1.DragDrop, btnChoosefiles.DragDrop
DragDropForm(e)
End Sub
Private Sub LabelControl1_DragEnter(sender As Object, e As DragEventArgs) Handles LabelControl1.DragEnter, btnChoosefiles.DragEnter
Drag_Enter(sender, e)
End Sub
Private Sub btnChoosefiles_Click(sender As Object, e As EventArgs) Handles btnChoosefiles.Click
Try
Dim oFileName As String
Dim oOpenFileDialog As New OpenFileDialog With {
.RestoreDirectory = True,
.Multiselect = True
}
If oOpenFileDialog.ShowDialog() = DialogResult.OK Then
ClassFileDrop.FilesDropped.Clear()
For Each oFileName In oOpenFileDialog.FileNames
LOGGER.Info(">> Chosen File: " & oFileName)
ClassFileDrop.FilesDropped.Add("|DROPFROMFSYSTEM|" & oFileName)
Next
TimerCheckDroppedFiles.Start()
End If
Catch ex As Exception
MsgBox("Unexpected Error in Choose Files for Indexing:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub frmStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.F12 Then
@ -549,14 +616,5 @@ Public Class frmStart
End If
End Sub
Private Sub AdministrationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AdministrationToolStripMenuItem.Click
Try
Me.Hide()
frmAdministration.ShowDialog()
Me.Show()
Catch ex As Exception
MsgBox("Fehler in der Administration:" & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, Text)
LOGGER.Error(ex)
End Try
End Sub
End Class

View File

@ -109,6 +109,7 @@
<!--Digital Data Bibliotheken-->
<Component Id="DigitalDataLibs" Guid="e68a6a14-3917-4989-abec-d30c521a3431">
<File Id="Base" Name="DigitalData.Modules.Base.dll" Source="DigitalData.Modules.Base.dll" KeyPath="no" />
<File Id="Config" Name="DigitalData.Modules.Config.dll" Source="DigitalData.Modules.Config.dll" KeyPath="no" />
<File Id="Database" Name="DigitalData.Modules.Database.dll" Source="DigitalData.Modules.Database.dll" KeyPath="no" />
<File Id="Filesystem" Name="DigitalData.Modules.Filesystem.dll" Source="DigitalData.Modules.Filesystem.dll" KeyPath="no" />