This commit is contained in:
Digital Data - Marlon Schreiber 2017-07-27 12:37:57 +02:00
parent 688f53a74a
commit e54d8ce325
5 changed files with 90 additions and 71 deletions

3
.vs/ProjectSettings.json Normal file
View File

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}

View File

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\ToolCollection.sln",
"PreviewInSolutionExplorer": false
}

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

View File

@ -37,96 +37,104 @@
End Try End Try
End Function End Function
Public Shared Sub LoadFromXmlFile() Public Shared Sub LoadFromXmlFile()
Dim i As Integer = 0 Try
Dim xml As Xml.XmlDocument 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 If Not xmlConfigFile = "" Then
xml = New Xml.XmlDocument() If System.IO.File.Exists(xmlConfigFile) Then
xml.Load(xmlConfigFile) xml = New Xml.XmlDocument()
'MsgBox(xmlConfigFile) xml.Load(xmlConfigFile)
' Anzahl der Profilelemente in der XML-Datei zählen 'MsgBox(xmlConfigFile)
Dim anzProfile = xml.SelectNodes("Settings/Profile/Profil").Count ' Anzahl der Profilelemente in der XML-Datei zählen
Dim anzProfile = xml.SelectNodes("Settings/Profile/Profil").Count
' wenn mindestens ein Profilelement eingetragen ist ' wenn mindestens ein Profilelement eingetragen ist
If anzProfile > 0 Then If anzProfile > 0 Then
' alle Profile laden ' alle Profile laden
Dim xmlNodes As Xml.XmlNodeList = xml.SelectNodes("Settings/Profile/Profil") Dim xmlNodes As Xml.XmlNodeList = xml.SelectNodes("Settings/Profile/Profil")
' alle Profile der XML-Datei durchlaufen ' alle Profile der XML-Datei durchlaufen
For Each xmlProfil As Xml.XmlNode In xmlNodes For Each xmlProfil As Xml.XmlNode In xmlNodes
' prüfen ob ein Profilname angegeben wurde ' prüfen ob ein Profilname angegeben wurde
If xmlProfil.Attributes("profilname") IsNot Nothing And xmlProfil.Attributes("dokumenttyp") IsNot Nothing And _ 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("windreamsuche") IsNot Nothing And xmlProfil.Attributes("dbArt") IsNot Nothing And
xmlProfil.Attributes("dataSource") IsNot Nothing Then xmlProfil.Attributes("dataSource") IsNot Nothing Then
' ein Element an Items anhängen ' ein Element an Items anhängen
ReDim Preserve ClassNIProfile._profiles(i) ReDim Preserve ClassNIProfile._profiles(i)
ClassNIProfile._profiles(i) = New ClassNIProfil() ClassNIProfile._profiles(i) = New ClassNIProfil()
Dim initialCatalog As String = Nothing Dim initialCatalog As String = Nothing
Dim userId As String = Nothing Dim userId As String = Nothing
Dim password As String = Nothing Dim password As String = Nothing
If xmlProfil.Attributes("userId") IsNot Nothing Then If xmlProfil.Attributes("userId") IsNot Nothing Then
userId = xmlProfil.Attributes("userId").Value userId = xmlProfil.Attributes("userId").Value
End If End If
If xmlProfil.Attributes("password") IsNot Nothing Then If xmlProfil.Attributes("password") IsNot Nothing Then
password = xmlProfil.Attributes("password").Value password = xmlProfil.Attributes("password").Value
End If End If
If xmlProfil.Attributes("initialCatalog") IsNot Nothing Then If xmlProfil.Attributes("initialCatalog") IsNot Nothing Then
initialCatalog = xmlProfil.Attributes("initialCatalog").Value initialCatalog = xmlProfil.Attributes("initialCatalog").Value
End If End If
' das Profilobjekt erstellen ' das Profilobjekt erstellen
'profilname, dokumenttyp_string , windreamSuche, _ 'profilname, dokumenttyp_string , windreamSuche, _
'NI_Art , xmlEnd , xmlfolder , 'NI_Art , xmlEnd , xmlfolder ,
'delete , dbArt , dataSource , userId , _ 'delete , dbArt , dataSource , userId , _
'password , initialCatalog , SQLAnweisung , windreamIndex , checkIndexSQL , indexValidation , _ 'password , initialCatalog , SQLAnweisung , windreamIndex , checkIndexSQL , indexValidation , _
'finalerIndex , aktiv , mrDAIndex , mrKDIndex 'finalerIndex , aktiv , mrDAIndex , mrKDIndex
ClassNIProfile._profiles(i) = New ClassNIProfil(xmlProfil.Attributes("profilname").Value, xmlProfil.Attributes("dokumenttyp").Value, xmlProfil.Attributes("windreamsuche").Value, _ 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("ni_art").Value, xmlProfil.Attributes("xml_end").Value, xmlProfil.Attributes("folder").Value,
xmlProfil.Attributes("delete").Value, xmlProfil.Attributes("dbArt").Value, xmlProfil.Attributes("dataSource").Value, _ xmlProfil.Attributes("delete").Value, xmlProfil.Attributes("dbArt").Value, xmlProfil.Attributes("dataSource").Value,
userId, _ userId,
password, _ password,
initialCatalog, _ initialCatalog,
xmlProfil.Attributes("sqlanweisung").Value, _ xmlProfil.Attributes("sqlanweisung").Value,
xmlProfil.Attributes("windreamIndex").Value, _ xmlProfil.Attributes("windreamIndex").Value,
xmlProfil.Attributes("checkIndexSQL").Value, _ xmlProfil.Attributes("checkIndexSQL").Value,
xmlProfil.Attributes("indexValidation").Value, _ xmlProfil.Attributes("indexValidation").Value,
xmlProfil.Attributes("indexFehler").Value, _ xmlProfil.Attributes("indexFehler").Value,
xmlProfil.Attributes("finalerIndex").Value, _ xmlProfil.Attributes("finalerIndex").Value,
xmlProfil.Attributes("aktiv").Value, _ xmlProfil.Attributes("aktiv").Value,
xmlProfil.Attributes("mr_DAIndex").Value, _ xmlProfil.Attributes("mr_DAIndex").Value,
xmlProfil.Attributes("mr_KDIndex").Value, _ xmlProfil.Attributes("mr_KDIndex").Value,
xmlProfil.Attributes("move2Folder").Value, _ xmlProfil.Attributes("move2Folder").Value,
xmlProfil.Attributes("intervall").Value, _ xmlProfil.Attributes("intervall").Value,
xmlProfil.Attributes("lastrun").Value, _ xmlProfil.Attributes("lastrun").Value,
xmlProfil.Attributes("NB_AD").Value, _ xmlProfil.Attributes("NB_AD").Value,
xmlProfil.Attributes("getordneridx").Value, _ xmlProfil.Attributes("getordneridx").Value,
xmlProfil.Attributes("ordnerType").Value, _ xmlProfil.Attributes("ordnerType").Value,
xmlProfil.Attributes("ordnerType_eb").Value, _ xmlProfil.Attributes("ordnerType_eb").Value,
xmlProfil.Attributes("crfolderindex").Value, _ xmlProfil.Attributes("crfolderindex").Value,
xmlProfil.Attributes("crfolder_folder").Value, _ xmlProfil.Attributes("crfolder_folder").Value,
xmlProfil.Attributes("crfolder_move").Value) xmlProfil.Attributes("crfolder_move").Value)
' Zähler für Profile erhöhen ' Zähler für Profile erhöhen
i += 1 i += 1
End If
Next
End If End If
End If
Next
End If End If
End If Catch ex As Exception
End Try
End Sub End Sub
' erstellt ein neues Profil ' erstellt ein neues Profil

View File

@ -1529,6 +1529,7 @@ Public Class frmNIHauptseite
Private Function Volltext_indexer(_dokument As WMObject, fulltext As String) Private Function Volltext_indexer(_dokument As WMObject, fulltext As String)
Try Try
' MsgBox(fulltext) ' MsgBox(fulltext)
Dim namedoc = _dokument.aName
fulltext = fulltext.Replace(vbCrLf, "") fulltext = fulltext.Replace(vbCrLf, "")
Dim ign_whitespace As Boolean = False Dim ign_whitespace As Boolean = False
Dim IndexArray As String() Dim IndexArray As String()
@ -1685,7 +1686,7 @@ Public Class frmNIHauptseite
'Erfolgreich = Me._windreamNI.RunIndexing_Vektor(_dokument, IndexArray, ErgebnisArray) 'Erfolgreich = Me._windreamNI.RunIndexing_Vektor(_dokument, IndexArray, ErgebnisArray)
Else Else
Logger("## Fehler in Volltext_indexer-Run Indexing Vektor - Erfolgreich = False", False, True) Logger("## Fehler in Volltext_indexer- Erfolgreich = False", False, True)
End If End If
Next Next