4, 22
@@ -754,6 +568,513 @@
1
+
+ Label8
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 0
+
+
+ DataGridView1
+
+
+ System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 1
+
+
+ Button2
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 2
+
+
+ txtScanFolderWatch
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 3
+
+
+ Label7
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 4
+
+
+ btnsetFW_Folder
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 5
+
+
+ btnFW_OwnFiles
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 6
+
+
+ btnFW_Desktop
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 7
+
+
+ txtFolderWatch
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 8
+
+
+ Label6
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 9
+
+
+ btnSaveExclusionFiles
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 10
+
+
+ btnstartstop2
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 11
+
+
+ btnstartstop1
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage3
+
+
+ 12
+
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 582, 280
+
+
+ 2
+
+
+ Überwachte Ordner - Folderwatch
+
+
+ TabPage3
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabControl1
+
+
+ 2
+
+
+ Fill
+
+
+ 0, 0
+
+
+ 590, 306
+
+
+ 0
+
+
+ TabControl1
+
+
+ System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 0
+
+
+ True
+
+
+ 255, 58
+
+
+ 170, 17
+
+
+ 47
+
+
+ Windows-Authentifizierung
+
+
+ chkbxUserAut
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 0
+
+
+ True
+
+
+ 5, 115
+
+
+ 150, 13
+
+
+ 46
+
+
+ Aktueller ConnectionString:
+
+
+ Label5
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 1
+
+
+ 8, 78
+
+
+ 244, 21
+
+
+ 39
+
+
+ cmbDatenbank
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 2
+
+
+ True
+
+
+ 5, 62
+
+
+ 67, 13
+
+
+ 44
+
+
+ Datenbank:
+
+
+ Label4
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 3
+
+
+ True
+
+
+ 5, 14
+
+
+ 74, 13
+
+
+ 41
+
+
+ Server-Name:
+
+
+ Label1
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 4
+
+
+ True
+
+
+ 255, 14
+
+
+ 83, 13
+
+
+ 42
+
+
+ Benutzername:
+
+
+ Label2
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 5
+
+
+ True
+
+
+ 379, 14
+
+
+ 56, 13
+
+
+ 43
+
+
+ Passwort:
+
+
+ Label3
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 6
+
+
+ Top, Left, Right
+
+
+ 8, 131
+
+
+ 370, 22
+
+
+ 45
+
+
+ txtActualConnection
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 7
+
+
+ 6, 30
+
+
+ 246, 22
+
+
+ 36
+
+
+ txtServer
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 8
+
+
+ 255, 30
+
+
+ 118, 22
+
+
+ 37
+
+
+ txtUser
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 9
+
+
+ 382, 30
+
+
+ 64, 22
+
+
+ 38
+
+
+ txtPasswort
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 10
+
+
+ MiddleLeft
+
+
+ 255, 75
+
+
+ 253, 25
+
+
+ 40
+
+
+ Verbindung zur Datenbank herstellen
+
+
+ MiddleRight
+
+
+ BtnConnect
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ TabPage1
+
+
+ 11
+
True
@@ -1094,57 +1415,6 @@ ausgenommen werden sollen:
12
-
- 4, 22
-
-
- 3, 3, 3, 3
-
-
- 582, 280
-
-
- 2
-
-
- Überwachte Ordner - Folderwatch
-
-
- TabPage3
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- TabControl1
-
-
- 2
-
-
- Fill
-
-
- 0, 0
-
-
- 590, 306
-
-
- 0
-
-
- TabControl1
-
-
- System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 0
-
17, 17
diff --git a/Global_Indexer/frmConfig_Basic.vb b/Global_Indexer/frmConfig_Basic.vb
index 1ee6c01..4a9d569 100644
--- a/Global_Indexer/frmConfig_Basic.vb
+++ b/Global_Indexer/frmConfig_Basic.vb
@@ -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(" Log-/SupportMail von DD GLOBIX. ",
- "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
\ No newline at end of file
diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb
index 92ba26a..29fad4b 100644
--- a/Global_Indexer/frmIndex.vb
+++ b/Global_Indexer/frmIndex.vb
@@ -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")
diff --git a/Global_Indexer/frmSQLConfigAutoIndex.vb b/Global_Indexer/frmSQLConfigAutoIndex.vb
index 3ee8d7d..8b29106 100644
--- a/Global_Indexer/frmSQLConfigAutoIndex.vb
+++ b/Global_Indexer/frmSQLConfigAutoIndex.vb
@@ -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)
diff --git a/Global_Indexer/frmSQLSuggestion.vb b/Global_Indexer/frmSQLSuggestion.vb
index aaebaa7..27f7e29 100644
--- a/Global_Indexer/frmSQLSuggestion.vb
+++ b/Global_Indexer/frmSQLSuggestion.vb
@@ -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)
diff --git a/Global_Indexer/frmSplash.vb b/Global_Indexer/frmSplash.vb
index 78054f8..51a6b4d 100644
--- a/Global_Indexer/frmSplash.vb
+++ b/Global_Indexer/frmSplash.vb
@@ -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
diff --git a/Global_Indexer/frmStart.Designer.vb b/Global_Indexer/frmStart.Designer.vb
index 645249e..61f6e70 100644
--- a/Global_Indexer/frmStart.Designer.vb
+++ b/Global_Indexer/frmStart.Designer.vb
@@ -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
diff --git a/Global_Indexer/frmStart.resx b/Global_Indexer/frmStart.resx
index f80cd45..e590b5b 100644
--- a/Global_Indexer/frmStart.resx
+++ b/Global_Indexer/frmStart.resx
@@ -121,37 +121,6 @@
400, 17
-
- 0, 0
-
-
- 294, 24
-
-
-
- 5
-
-
- MenuStrip1
-
-
- MenuStrip1
-
-
- System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 3
-
-
- 108, 20
-
-
- Konfiguration
-
221, 22
@@ -179,9 +148,49 @@
Info
+
+ 108, 20
+
+
+ Konfiguration
+
+
+ 0, 0
+
+
+ 294, 24
+
+
+
+ 5
+
+
+ MenuStrip1
+
+
+ MenuStrip1
+
+
+ System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 3
+
515, 17
+
+ 133, 17
+
+
+ FolderWatch ist aktiv
+
+
+ False
+
0, 139
@@ -206,15 +215,6 @@
2
-
- 133, 17
-
-
- FolderWatch ist aktiv
-
-
- False
-
1072, 17
@@ -514,9 +514,6 @@
GlobalIndexer
-
- 132, 56
-
Segoe UI, 11.25pt
@@ -950,12 +947,6 @@
System.Windows.Forms.NotifyIcon, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- TimerCheckDroppedFiles
-
-
- System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
OpenFileDialog1
diff --git a/Global_Indexer/frmStart.vb b/Global_Indexer/frmStart.vb
index e490b75..674d0bc 100644
--- a/Global_Indexer/frmStart.vb
+++ b/Global_Indexer/frmStart.vb
@@ -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
\ No newline at end of file
diff --git a/SetupVS19/Product.wxs b/SetupVS19/Product.wxs
index 355c0fd..dea79a5 100644
--- a/SetupVS19/Product.wxs
+++ b/SetupVS19/Product.wxs
@@ -109,6 +109,7 @@
+