From 828ee2a37f556ed24c8fe9bbacce33b84b6a4c37 Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Fri, 2 Jun 2017 12:22:27 +0200 Subject: [PATCH] =?UTF-8?q?jj=20f=C3=BCr=20MS=2002.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Global_Indexer.sln | 4 +- Global_Indexer/App.config | 3 + Global_Indexer/ClassFilehandle.vb | 21 +- Global_Indexer/ClassHelper.vb | 3 + Global_Indexer/ClassIndexFunctions.vb | 3 + Global_Indexer/ClassLogger.vb | 8 +- Global_Indexer/Global_Indexer.vbproj | 2 +- Global_Indexer/ModuleCURRENT.vb | 3 + .../My Project/Settings.Designer.vb | 20 +- Global_Indexer/MyDataset.Designer.vb | 2 +- Global_Indexer/MyDataset.xss | 18 +- Global_Indexer/frmConfig_Basic.designer.vb | 20 +- Global_Indexer/frmConfig_Basic.resx | 906 ++++++------------ Global_Indexer/frmIndex.vb | 26 +- Global_Indexer/frmStart.vb | 2 +- 15 files changed, 394 insertions(+), 647 deletions(-) diff --git a/Global_Indexer.sln b/Global_Indexer.sln index 976acf0..d75a80d 100644 --- a/Global_Indexer.sln +++ b/Global_Indexer.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.9 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Global_Indexer", "Global_Indexer\Global_Indexer.vbproj", "{7474B1D2-49A4-4D12-B544-C8674D3F7231}" EndProject diff --git a/Global_Indexer/App.config b/Global_Indexer/App.config index 2b4f5b6..9c35da8 100644 --- a/Global_Indexer/App.config +++ b/Global_Indexer/App.config @@ -36,6 +36,9 @@ False + + + diff --git a/Global_Indexer/ClassFilehandle.vb b/Global_Indexer/ClassFilehandle.vb index b5dcabb..515ad24 100644 --- a/Global_Indexer/ClassFilehandle.vb +++ b/Global_Indexer/ClassFilehandle.vb @@ -113,6 +113,8 @@ Public Class ClassFilehandle Private Shared Function Insert_GI_File(filename As String, handleType As String) Try + filename = filename.Replace("'", "''") + Dim filename_only As String = Path.GetFileName(filename) Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')" @@ -181,11 +183,22 @@ Public Class ClassFilehandle ''' Dateiname ohne Pfadangabe ''' Ersatzzeichen für alle unzulässigen Zeichen ''' im Dateinamen - Public Shared Function CleanFilename(ByVal sFilename As String, _ + Public Shared Function CleanFilename(ByVal sFilename As String, Optional ByVal REPLACEChar As String = "") As String - + If LogErrorsOnly = False Then ClassLogger.Add(" >> Filename before CleanFilename: '" & sFilename & "'", False) + If sFilename.Contains(".\") Then + sFilename = sFilename.Replace(".\", "\") + End If + 'If sFilename.Contains("'") Then + ' sFilename = sFilename.Replace("'", "") + 'End If + 'If sFilename.Contains("..") Then + ' sFilename = sFilename.Replace("..", ".") + 'End If ' alle nicht zulässigen Zeichen ersetzen - Return System.Text.RegularExpressions.Regex.Replace( _ - sFilename, "[?*^""<>|]", REPLACEChar) + sFilename = System.Text.RegularExpressions.Regex.Replace( + sFilename, REGEX_CLEAN_FILENAME, REPLACEChar) + If LogErrorsOnly = False Then ClassLogger.Add(" >> Filename after CleanFilename: '" & sFilename & "'", False) + Return sFilename End Function End Class diff --git a/Global_Indexer/ClassHelper.vb b/Global_Indexer/ClassHelper.vb index 3cc410a..675ab3e 100644 --- a/Global_Indexer/ClassHelper.vb +++ b/Global_Indexer/ClassHelper.vb @@ -41,5 +41,8 @@ Public Class ClassHelper Return 0 End Try End Function + Public Shared Sub Refresh_RegexTable() + CURRENT_DT_REGEX = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_FUNCTION_REGEX") + End Sub End Class diff --git a/Global_Indexer/ClassIndexFunctions.vb b/Global_Indexer/ClassIndexFunctions.vb index e66727b..8fe3f4a 100644 --- a/Global_Indexer/ClassIndexFunctions.vb +++ b/Global_Indexer/ClassIndexFunctions.vb @@ -4,6 +4,9 @@ Public Class ClassIndexFunctions Public Shared Function FileExistsinDropTable(Filename As String) Dim check As String Try + If Filename.Contains("'") Then + Filename = Filename.Replace("'", "''") + End If check = "SELECT COUNT(*) FROM TBGI_FILES_USER WHERE UPPER(FILENAME2WORK) = UPPER('" & Filename & "') AND WORKED = 0" Dim result = ClassDatabase.Execute_Scalar(check, MyConnectionString, True) Return result diff --git a/Global_Indexer/ClassLogger.vb b/Global_Indexer/ClassLogger.vb index 33aef2f..e62aa8e 100644 --- a/Global_Indexer/ClassLogger.vb +++ b/Global_Indexer/ClassLogger.vb @@ -76,9 +76,9 @@ Public Class ClassLogger If ClassLogger.OpenFile Then Try If ACHTUNG Then - ClassLogger.StreamWriter.WriteLine("#ACHTUNG# (" & System.DateTime.Now & "): " & information) + ClassLogger.StreamWriter.WriteLine(Now.ToString & "# ATTENTION #: " & information) Else - ClassLogger.StreamWriter.WriteLine(information) + ClassLogger.StreamWriter.WriteLine(Now.ToString & information) End If ClassLogger.CloseFile() Catch e As Exception @@ -91,8 +91,8 @@ Public Class ClassLogger Public Shared Sub Add(ByVal ex As Exception) If ClassLogger.OpenFile Then Try - ClassLogger.StreamWriter.WriteLine("##### Exception (" & System.DateTime.Now & ")") - ClassLogger.StreamWriter.WriteLine("##### Fehler: " & ex.Message & " Source [" & ex.Source & "]") + ClassLogger.StreamWriter.WriteLine(Now.ToString & "##### Exception ####") + ClassLogger.StreamWriter.WriteLine(Now.ToString & "##### Fehler: " & ex.Message & " Source [" & ex.Source & "]") ClassLogger.CloseFile() Catch e As Exception ClassLogger.ShowErrorMessage() diff --git a/Global_Indexer/Global_Indexer.vbproj b/Global_Indexer/Global_Indexer.vbproj index 605e499..b1c5245 100644 --- a/Global_Indexer/Global_Indexer.vbproj +++ b/Global_Indexer/Global_Indexer.vbproj @@ -157,7 +157,7 @@ False P:\Visual Studio Projekte\Bibliotheken\DLLLicenseManager.dll - + False P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.dll diff --git a/Global_Indexer/ModuleCURRENT.vb b/Global_Indexer/ModuleCURRENT.vb index 12dafd8..b0164a9 100644 --- a/Global_Indexer/ModuleCURRENT.vb +++ b/Global_Indexer/ModuleCURRENT.vb @@ -64,5 +64,8 @@ Public CURR_MISSING_SEARCH_STRING As String Public CURR_MISSING_MANUAL_VALUE As String Public CURR_DELETE_ORIGIN As Boolean = False + Public CURRENT_DT_REGEX As DataTable + Public REGEX_CLEAN_FILENAME As String = "[?*^""<>|]" End Module + diff --git a/Global_Indexer/My Project/Settings.Designer.vb b/Global_Indexer/My Project/Settings.Designer.vb index 16d651e..e9595cc 100644 --- a/Global_Indexer/My Project/Settings.Designer.vb +++ b/Global_Indexer/My Project/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.34209 +' Laufzeitversion:4.0.30319.42000 ' ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn ' der Code erneut generiert wird. @@ -15,21 +15,21 @@ Option Explicit On Namespace My _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) -#Region "Funktion zum automatischen Speichern von My.Settings" +#Region "Automatische My.Settings-Speicherfunktion" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If @@ -150,6 +150,18 @@ Namespace My Me("DA_Vorauswahlaktiv") = value End Set End Property + + _ + Public Property REGEX_Replace() As String + Get + Return CType(Me("REGEX_Replace"),String) + End Get + Set + Me("REGEX_Replace") = value + End Set + End Property End Class End Namespace diff --git a/Global_Indexer/MyDataset.Designer.vb b/Global_Indexer/MyDataset.Designer.vb index 24a78c5..e6d30b9 100644 --- a/Global_Indexer/MyDataset.Designer.vb +++ b/Global_Indexer/MyDataset.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.36366 +' Laufzeitversion:4.0.30319.42000 ' ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn ' der Code erneut generiert wird. diff --git a/Global_Indexer/MyDataset.xss b/Global_Indexer/MyDataset.xss index f21dce6..0241f13 100644 --- a/Global_Indexer/MyDataset.xss +++ b/Global_Indexer/MyDataset.xss @@ -4,16 +4,16 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + @@ -23,18 +23,18 @@ - + - - - + + + - + @@ -253,7 +253,7 @@ - + 38 diff --git a/Global_Indexer/frmConfig_Basic.designer.vb b/Global_Indexer/frmConfig_Basic.designer.vb index b4dcb8a..26e8bf5 100644 --- a/Global_Indexer/frmConfig_Basic.designer.vb +++ b/Global_Indexer/frmConfig_Basic.designer.vb @@ -22,8 +22,8 @@ Partial Class frmConfig_Basic 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() 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() Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabPage1 = New System.Windows.Forms.TabPage() Me.chkbxUserAut = New System.Windows.Forms.CheckBox() @@ -39,6 +39,7 @@ Partial Class frmConfig_Basic Me.txtPasswort = New System.Windows.Forms.TextBox() Me.BtnConnect = New System.Windows.Forms.Button() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() Me.Button3 = New System.Windows.Forms.Button() Me.cmbLanguage = New System.Windows.Forms.ComboBox() Me.Label9 = New System.Windows.Forms.Label() @@ -66,7 +67,6 @@ Partial Class frmConfig_Basic Me.btnstartstop2 = New System.Windows.Forms.Button() Me.btnstartstop1 = New System.Windows.Forms.Button() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() - Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.TabPage2.SuspendLayout() @@ -190,6 +190,12 @@ Partial Class frmConfig_Basic Me.TabPage2.Name = "TabPage2" Me.TabPage2.UseVisualStyleBackColor = True ' + 'LinkLabel1 + ' + resources.ApplyResources(Me.LinkLabel1, "LinkLabel1") + Me.LinkLabel1.Name = "LinkLabel1" + Me.LinkLabel1.TabStop = True + ' 'Button3 ' resources.ApplyResources(Me.Button3, "Button3") @@ -294,8 +300,8 @@ Partial Class frmConfig_Basic ' 'DataGridView1 ' - DataGridViewCellStyle2.BackColor = System.Drawing.Color.Aqua - Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.Aqua + Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 resources.ApplyResources(Me.DataGridView1, "DataGridView1") Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.DataGridView1.Name = "DataGridView1" @@ -371,12 +377,6 @@ Partial Class frmConfig_Basic ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" ' - 'LinkLabel1 - ' - resources.ApplyResources(Me.LinkLabel1, "LinkLabel1") - Me.LinkLabel1.Name = "LinkLabel1" - Me.LinkLabel1.TabStop = True - ' 'frmConfig_Basic ' resources.ApplyResources(Me, "$this") diff --git a/Global_Indexer/frmConfig_Basic.resx b/Global_Indexer/frmConfig_Basic.resx index b891bb9..bad0dfb 100644 --- a/Global_Indexer/frmConfig_Basic.resx +++ b/Global_Indexer/frmConfig_Basic.resx @@ -117,6 +117,23 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + + 255, 58 + + + 170, 17 + + + 47 + + + Windows-Authentifizierung + chkbxUserAut @@ -129,6 +146,21 @@ 0 + + True + + + 5, 115 + + + 150, 13 + + + 46 + + + Aktueller ConnectionString: + Label5 @@ -141,6 +173,15 @@ 1 + + 8, 78 + + + 244, 21 + + + 39 + cmbDatenbank @@ -153,6 +194,21 @@ 2 + + True + + + 5, 62 + + + 67, 13 + + + 44 + + + Datenbank: + Label4 @@ -165,6 +221,21 @@ 3 + + True + + + 5, 14 + + + 74, 13 + + + 41 + + + Server-Name: + Label1 @@ -177,6 +248,21 @@ 4 + + True + + + 255, 14 + + + 84, 13 + + + 42 + + + Benutzername: + Label2 @@ -189,6 +275,21 @@ 5 + + True + + + 379, 14 + + + 56, 13 + + + 43 + + + Passwort: + Label3 @@ -201,6 +302,19 @@ 6 + + + Top, Left, Right + + + 8, 131 + + + 370, 22 + + + 45 + txtActualConnection @@ -213,6 +327,15 @@ 7 + + 6, 30 + + + 246, 22 + + + 36 + txtServer @@ -225,6 +348,15 @@ 8 + + 255, 30 + + + 118, 22 + + + 37 + txtUser @@ -237,6 +369,15 @@ 9 + + 382, 30 + + + 64, 22 + + + 38 + txtPasswort @@ -249,6 +390,24 @@ 10 + + MiddleLeft + + + 255, 75 + + + 253, 25 + + + 40 + + + Verbindung zur Datenbank herstellen + + + MiddleRight + BtnConnect @@ -261,18 +420,15 @@ 11 - 4, 22 - 3, 3, 3, 3 582, 280 - 0 @@ -291,9 +447,6 @@ 0 - - Bottom, Right - True @@ -616,6 +769,9 @@ MiddleLeft + + NoControl + 197, 185 @@ -670,6 +826,22 @@ 1 + + True + + + 8, 197 + + + 453, 26 + + + 13 + + + Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung +ausgenommen werden sollen: + Label8 @@ -682,6 +854,18 @@ 0 + + Top, Bottom, Left + + + 11, 226 + + + 192, 100 + + + 11 + DataGridView1 @@ -694,6 +878,18 @@ 1 + + 495, 140 + + + 49, 22 + + + 10 + + + ... + Button2 @@ -706,6 +902,15 @@ 2 + + 11, 142 + + + 478, 22 + + + 8 + txtScanFolderWatch @@ -718,6 +923,21 @@ 3 + + True + + + 8, 126 + + + 392, 13 + + + 7 + + + Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll: + Label7 @@ -730,6 +950,18 @@ 4 + + 495, 30 + + + 49, 22 + + + 6 + + + ... + btnsetFW_Folder @@ -742,6 +974,18 @@ 5 + + 11, 87 + + + 298, 23 + + + 3 + + + Ordner 'SimpleIndexer' in Eigenen Dateien erzeugen + btnFW_OwnFiles @@ -754,603 +998,8 @@ 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 - - - 84, 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 - - - 8, 197 - - - 453, 26 - - - 13 - - - Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung -ausgenommen werden sollen: - - - Label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 0 - - - Top, Bottom, Left - - - 11, 226 - - - 192, 100 - - - 11 - - - DataGridView1 - - - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 1 - - - 495, 140 - - - 49, 22 - - - 10 - - - ... - - - Button2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 2 - - - 11, 142 - - - 478, 22 - - - 8 - - - txtScanFolderWatch - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 3 - - - True - - - 8, 126 - - - 392, 13 - - - 7 - - - Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll: - - - Label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 4 - - - 495, 30 - - - 49, 22 - - - 6 - - - ... - - - btnsetFW_Folder - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 5 - - - 11, 87 - - - 298, 23 - - - 3 - - - Ordner 'SimpleIndexer' in Eigenen Dateien erzeugen - - - btnFW_OwnFiles - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 6 - - - 11, 58 + + 11, 58 298, 23 @@ -1517,6 +1166,57 @@ 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/frmIndex.vb b/Global_Indexer/frmIndex.vb index e3c7221..51914fa 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -968,7 +968,7 @@ Public Class frmIndex NewFileString = DATEINAME sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString AnzahlIndexe += 1 - sql_history_Index_Values = sql_history_Index_Values & ", '" & value & "'" + sql_history_Index_Values = sql_history_Index_Values & ", '" & value.Replace("'", "''") & "'" Else If optional_index = True Then @@ -979,13 +979,13 @@ Public Class frmIndex NewFileString = DATEINAME sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString AnzahlIndexe += 1 - sql_history_Index_Values = sql_history_Index_Values & ", '" & System.IO.Path.GetFileNameWithoutExtension(CURRENT_WORKFILE) & "'" + sql_history_Index_Values = sql_history_Index_Values & ", '" & System.IO.Path.GetFileNameWithoutExtension(CURRENT_WORKFILE).Replace("'", "''") & "'" Else DATEINAME = DATEINAME.Replace(element.Value, value) NewFileString = DATEINAME sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString AnzahlIndexe += 1 - sql_history_Index_Values = sql_history_Index_Values & ", '" & value & "'" + sql_history_Index_Values = sql_history_Index_Values & ", '" & value.Replace("'", "''") & "'" End If Else @@ -1005,7 +1005,7 @@ Public Class frmIndex NewFileString = DATEINAME sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString AnzahlIndexe += 1 - sql_history_Index_Values = sql_history_Index_Values & ", '" & value & "'" + sql_history_Index_Values = sql_history_Index_Values & ", '" & value.Replace("'", "''") & "'" End If Else err = True @@ -1274,11 +1274,11 @@ Public Class frmIndex Dim toPattern As String = "" Dim messageIDPattern As String = "" Dim finalize_pattern As String = "" - Dim DT_REGEX As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_FUNCTION_REGEX") + ' Email Header auslesen Dim headers As String = ClassEmailHeaderExtractor.getMessageHeaders(msg) - For Each rowregex As DataRow In DT_REGEX.Rows + For Each rowregex As DataRow In CURRENT_DT_REGEX.Rows If rowregex.Item("FUNCTION_NAME") = "FROM_EMAIL_HEADER" Then fromPattern = rowregex.Item("REGEX") ElseIf rowregex.Item("FUNCTION_NAME") = "TO_EMAIL_HEADER" Then @@ -1650,7 +1650,9 @@ Public Class frmIndex Dim Insert_String As String Try - Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & CURRENT_WORKFILE & "','" & CURRENT_NEWFILENAME & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')" + Dim tempCur_WF = CURRENT_WORKFILE.Replace("'", "''") + Dim tempCur_New_FN = CURRENT_NEWFILENAME.Replace("'", "''") + Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')" If ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString) = True Then If CURRENT_MESSAGEID <> "" Then Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY" @@ -2359,6 +2361,12 @@ Public Class frmIndex lblhinweis.Visible = False lblerror.Visible = False Me.Cursor = Cursors.WaitCursor + ClassHelper.Refresh_RegexTable() + For Each rowregex As DataRow In CURRENT_DT_REGEX.Rows + If rowregex.Item("FUNCTION_NAME") = "CLEAN_FILENAME" Then + REGEX_CLEAN_FILENAME = rowregex.Item("REGEX") + End If + Next If chkMultiIndexer.Visible = True And chkMultiIndexer.Checked = True Then 'Die erste Datei indexieren If WORK_FILE() = True Then @@ -2446,7 +2454,9 @@ Public Class frmIndex 'Kein Fehler in Setzen der windream-Indizes Dim Insert_String As String Try - Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & CURRENT_WORKFILE & "','" & CURRENT_NEWFILENAME & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')" + Dim tempCur_WF = CURRENT_WORKFILE.Replace("'", "''") + Dim tempCur_New_FN = CURRENT_NEWFILENAME.Replace("'", "''") + Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')" ClassDatabase.Execute_Scalar(Insert_String, MyConnectionString, True) If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then If CURRENT_MESSAGEID <> "" Then diff --git a/Global_Indexer/frmStart.vb b/Global_Indexer/frmStart.vb index 29f7bd3..ca049f3 100644 --- a/Global_Indexer/frmStart.vb +++ b/Global_Indexer/frmStart.vb @@ -686,7 +686,7 @@ Public Class frmStart loaded = True Opacity = 0.65 - 'Sprache anpassen + ClassHelper.Refresh_RegexTable() Start_Folderwatch() ClassWindowLocation.LoadFormLocationSize(Me)