diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..548a973 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\ToolCollection.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..379c9c6 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/ToolCollection/ClassNIProfile.vb b/ToolCollection/ClassNIProfile.vb index d063ff5..9a44735 100644 --- a/ToolCollection/ClassNIProfile.vb +++ b/ToolCollection/ClassNIProfile.vb @@ -37,96 +37,104 @@ End Try End Function Public Shared Sub LoadFromXmlFile() - Dim i As Integer = 0 - Dim xml As Xml.XmlDocument + Try + Dim i As Integer = 0 + Dim xml As Xml.XmlDocument - ClassNIProfile._profiles = Nothing + ClassNIProfile._profiles = Nothing - If xmlConfigFile Is Nothing Then Exit Sub + If xmlConfigFile Is Nothing Then Exit Sub - If Not xmlConfigFile = "" Then - xml = New Xml.XmlDocument() - xml.Load(xmlConfigFile) - 'MsgBox(xmlConfigFile) - ' Anzahl der Profilelemente in der XML-Datei zählen - Dim anzProfile = xml.SelectNodes("Settings/Profile/Profil").Count + If Not xmlConfigFile = "" Then + If System.IO.File.Exists(xmlConfigFile) Then + xml = New Xml.XmlDocument() + xml.Load(xmlConfigFile) + 'MsgBox(xmlConfigFile) + ' Anzahl der Profilelemente in der XML-Datei zählen + Dim anzProfile = xml.SelectNodes("Settings/Profile/Profil").Count - ' wenn mindestens ein Profilelement eingetragen ist - If anzProfile > 0 Then + ' wenn mindestens ein Profilelement eingetragen ist + If anzProfile > 0 Then - ' alle Profile laden - Dim xmlNodes As Xml.XmlNodeList = xml.SelectNodes("Settings/Profile/Profil") + ' alle Profile laden + Dim xmlNodes As Xml.XmlNodeList = xml.SelectNodes("Settings/Profile/Profil") - ' alle Profile der XML-Datei durchlaufen - For Each xmlProfil As Xml.XmlNode In xmlNodes + ' alle Profile der XML-Datei durchlaufen + For Each xmlProfil As Xml.XmlNode In xmlNodes - ' prüfen ob ein Profilname angegeben wurde - If xmlProfil.Attributes("profilname") IsNot Nothing And xmlProfil.Attributes("dokumenttyp") IsNot Nothing And _ - xmlProfil.Attributes("windreamsuche") IsNot Nothing And xmlProfil.Attributes("dbArt") IsNot Nothing And _ - xmlProfil.Attributes("dataSource") IsNot Nothing Then + ' prüfen ob ein Profilname angegeben wurde + If xmlProfil.Attributes("profilname") IsNot Nothing And xmlProfil.Attributes("dokumenttyp") IsNot Nothing And + xmlProfil.Attributes("windreamsuche") IsNot Nothing And xmlProfil.Attributes("dbArt") IsNot Nothing And + xmlProfil.Attributes("dataSource") IsNot Nothing Then - ' ein Element an Items anhängen - ReDim Preserve ClassNIProfile._profiles(i) + ' ein Element an Items anhängen + ReDim Preserve ClassNIProfile._profiles(i) - ClassNIProfile._profiles(i) = New ClassNIProfil() + ClassNIProfile._profiles(i) = New ClassNIProfil() - Dim initialCatalog As String = Nothing - Dim userId As String = Nothing - Dim password As String = Nothing + Dim initialCatalog As String = Nothing + Dim userId As String = Nothing + Dim password As String = Nothing - If xmlProfil.Attributes("userId") IsNot Nothing Then - userId = xmlProfil.Attributes("userId").Value - End If + If xmlProfil.Attributes("userId") IsNot Nothing Then + userId = xmlProfil.Attributes("userId").Value + End If - If xmlProfil.Attributes("password") IsNot Nothing Then - password = xmlProfil.Attributes("password").Value - End If + If xmlProfil.Attributes("password") IsNot Nothing Then + password = xmlProfil.Attributes("password").Value + End If - If xmlProfil.Attributes("initialCatalog") IsNot Nothing Then - initialCatalog = xmlProfil.Attributes("initialCatalog").Value - End If + If xmlProfil.Attributes("initialCatalog") IsNot Nothing Then + initialCatalog = xmlProfil.Attributes("initialCatalog").Value + End If - ' das Profilobjekt erstellen - 'profilname, dokumenttyp_string , windreamSuche, _ - 'NI_Art , xmlEnd , xmlfolder , - 'delete , dbArt , dataSource , userId , _ - 'password , initialCatalog , SQLAnweisung , windreamIndex , checkIndexSQL , indexValidation , _ - 'finalerIndex , aktiv , mrDAIndex , mrKDIndex - ClassNIProfile._profiles(i) = New ClassNIProfil(xmlProfil.Attributes("profilname").Value, xmlProfil.Attributes("dokumenttyp").Value, xmlProfil.Attributes("windreamsuche").Value, _ - xmlProfil.Attributes("ni_art").Value, xmlProfil.Attributes("xml_end").Value, xmlProfil.Attributes("folder").Value, _ - xmlProfil.Attributes("delete").Value, xmlProfil.Attributes("dbArt").Value, xmlProfil.Attributes("dataSource").Value, _ - userId, _ - password, _ - initialCatalog, _ - xmlProfil.Attributes("sqlanweisung").Value, _ - xmlProfil.Attributes("windreamIndex").Value, _ - xmlProfil.Attributes("checkIndexSQL").Value, _ - xmlProfil.Attributes("indexValidation").Value, _ - xmlProfil.Attributes("indexFehler").Value, _ - xmlProfil.Attributes("finalerIndex").Value, _ - xmlProfil.Attributes("aktiv").Value, _ - xmlProfil.Attributes("mr_DAIndex").Value, _ - xmlProfil.Attributes("mr_KDIndex").Value, _ - xmlProfil.Attributes("move2Folder").Value, _ - xmlProfil.Attributes("intervall").Value, _ - xmlProfil.Attributes("lastrun").Value, _ - xmlProfil.Attributes("NB_AD").Value, _ - xmlProfil.Attributes("getordneridx").Value, _ - xmlProfil.Attributes("ordnerType").Value, _ - xmlProfil.Attributes("ordnerType_eb").Value, _ - xmlProfil.Attributes("crfolderindex").Value, _ - xmlProfil.Attributes("crfolder_folder").Value, _ - xmlProfil.Attributes("crfolder_move").Value) - ' Zähler für Profile erhöhen - i += 1 + ' das Profilobjekt erstellen + 'profilname, dokumenttyp_string , windreamSuche, _ + 'NI_Art , xmlEnd , xmlfolder , + 'delete , dbArt , dataSource , userId , _ + 'password , initialCatalog , SQLAnweisung , windreamIndex , checkIndexSQL , indexValidation , _ + 'finalerIndex , aktiv , mrDAIndex , mrKDIndex + ClassNIProfile._profiles(i) = New ClassNIProfil(xmlProfil.Attributes("profilname").Value, xmlProfil.Attributes("dokumenttyp").Value, xmlProfil.Attributes("windreamsuche").Value, + xmlProfil.Attributes("ni_art").Value, xmlProfil.Attributes("xml_end").Value, xmlProfil.Attributes("folder").Value, + xmlProfil.Attributes("delete").Value, xmlProfil.Attributes("dbArt").Value, xmlProfil.Attributes("dataSource").Value, + userId, + password, + initialCatalog, + xmlProfil.Attributes("sqlanweisung").Value, + xmlProfil.Attributes("windreamIndex").Value, + xmlProfil.Attributes("checkIndexSQL").Value, + xmlProfil.Attributes("indexValidation").Value, + xmlProfil.Attributes("indexFehler").Value, + xmlProfil.Attributes("finalerIndex").Value, + xmlProfil.Attributes("aktiv").Value, + xmlProfil.Attributes("mr_DAIndex").Value, + xmlProfil.Attributes("mr_KDIndex").Value, + xmlProfil.Attributes("move2Folder").Value, + xmlProfil.Attributes("intervall").Value, + xmlProfil.Attributes("lastrun").Value, + xmlProfil.Attributes("NB_AD").Value, + xmlProfil.Attributes("getordneridx").Value, + xmlProfil.Attributes("ordnerType").Value, + xmlProfil.Attributes("ordnerType_eb").Value, + xmlProfil.Attributes("crfolderindex").Value, + xmlProfil.Attributes("crfolder_folder").Value, + xmlProfil.Attributes("crfolder_move").Value) + ' Zähler für Profile erhöhen + i += 1 + End If + + Next End If + End If - Next End If - End If + Catch ex As Exception + + End Try + End Sub ' erstellt ein neues Profil diff --git a/ToolCollection/frmNIHauptseite.vb b/ToolCollection/frmNIHauptseite.vb index e97b41f..c17c706 100644 --- a/ToolCollection/frmNIHauptseite.vb +++ b/ToolCollection/frmNIHauptseite.vb @@ -1529,6 +1529,7 @@ Public Class frmNIHauptseite Private Function Volltext_indexer(_dokument As WMObject, fulltext As String) Try ' MsgBox(fulltext) + Dim namedoc = _dokument.aName fulltext = fulltext.Replace(vbCrLf, "") Dim ign_whitespace As Boolean = False Dim IndexArray As String() @@ -1685,7 +1686,7 @@ Public Class frmNIHauptseite 'Erfolgreich = Me._windreamNI.RunIndexing_Vektor(_dokument, IndexArray, ErgebnisArray) Else - Logger("## Fehler in Volltext_indexer-Run Indexing Vektor - Erfolgreich = False", False, True) + Logger("## Fehler in Volltext_indexer- Erfolgreich = False", False, True) End If Next