MS
This commit is contained in:
@@ -39,6 +39,7 @@ Public Class ClassWindream
|
||||
#Region "+++++ Variablen +++++"
|
||||
Public Shared oConnect ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public Shared oSession 'As WINDREAMLib.WMSession ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public _inited
|
||||
Public Shared oBrowser As New WMOBRWSLib.ServerBrowser
|
||||
Public Shared oDokumentTypen As WINDREAMLib.WMObjects
|
||||
Private Shared oController As New WMOSearchController
|
||||
@@ -207,7 +208,7 @@ Public Class ClassWindream
|
||||
End Try
|
||||
|
||||
' wenn windream nicht angemeldet ist
|
||||
If Not IsLoggedIn() Then
|
||||
If IsLoggedIn() = False Then
|
||||
|
||||
' Art der Anmeldung an windream festlegen
|
||||
' 0x0L (also 0) = Standard windream Benutzer
|
||||
@@ -735,7 +736,10 @@ Public Class ClassWindream
|
||||
endgültigerDateiname = "\" & endgültigerDateiname
|
||||
End If
|
||||
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
|
||||
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
|
||||
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
|
||||
|
||||
|
||||
aktWMObject = WMObject
|
||||
Return True
|
||||
Else
|
||||
@@ -756,10 +760,8 @@ Public Class ClassWindream
|
||||
End If
|
||||
ClassLogger.Add(">> ATTENTION in Stream File - FileLength = 0, File " & CURRENT_FILEIN_WD & " will be imported")
|
||||
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
|
||||
'###
|
||||
If CURRENT_FILEIN_WD.Contains("\\") Then
|
||||
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
|
||||
End If
|
||||
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
|
||||
|
||||
'###
|
||||
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
|
||||
aktWMObject = WMObject
|
||||
@@ -786,6 +788,43 @@ Public Class ClassWindream
|
||||
|
||||
|
||||
End Function
|
||||
Public Shared Function Delete_WDFile(ByVal WD_File As String)
|
||||
Try
|
||||
WD_File = WD_File.Substring(2)
|
||||
Dim WMObject As WINDREAMLib.WMObject '= CreateObject("WINDREAMLib.WMObject") 'New WINDREAMLib.WMObject
|
||||
Try
|
||||
WMObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, WD_File) 'WINDREAMLib.WMEntity.WMEntityDocument
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Could not create WMObject for file '" & WD_File & "' - so it is not existing", False)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Deleting started - Object created", False)
|
||||
WMObject.Delete()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Delete_WDFile: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Unexpected Error in Delete_WDFile: " & ex.Message, False)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function WDFile_exists(ByVal WD_File As String)
|
||||
Try
|
||||
If Not WD_File.StartsWith("\") Then
|
||||
WD_File = WD_File.Substring(2)
|
||||
End If
|
||||
Dim WMObject As WINDREAMLib.WMObject '= CreateObject("WINDREAMLib.WMObject") 'New WINDREAMLib.WMObject
|
||||
WMObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, WD_File) 'WINDREAMLib.WMEntity.WMEntityDocument
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> WDFile_exists - Could create an object", False)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> WDFile_exists- Could not create object for file '" & WD_File & "'", False)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Übergibt einer in windream gespeicherten Datei Indexwerte
|
||||
''' </summary>
|
||||
@@ -823,9 +862,18 @@ Public Class ClassWindream
|
||||
|
||||
' wenn der Datei noch kein Dokumenttyp zugewiesen wurde
|
||||
If WMObject.aObjectType.aName = "Standard" Then
|
||||
Try
|
||||
' ihr den entsprechenden Dokumenttyp zuweisen
|
||||
WMObject.aObjectType = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityObjectType, _WDObjekttyp)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error Setting the objecttype' " & _WDObjekttyp & "'!")
|
||||
ClassLogger.Add("Error-Description: " & ex.Message)
|
||||
WMObject.Save()
|
||||
WMObject.unlock()
|
||||
' Me.TreeNodeInfos.Add(temp)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
' ihr den entsprechenden Dokumenttyp zuweisen
|
||||
WMObject.aObjectType = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityObjectType, _WDObjekttyp)
|
||||
' WMObject.aObjectType = Me.selectedProfile.Dokumenttyp
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Objecttype '" & _WDObjekttyp & "' was set!", False)
|
||||
End If
|
||||
@@ -881,11 +929,6 @@ Public Class ClassWindream
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> value for indexing: " & _Value, False)
|
||||
End If
|
||||
|
||||
'indexe &= indexname & " = " & werte & vbNewLine
|
||||
'Der Indexierungsvorgang
|
||||
' Dim indexErgebnis As ArrayList = Indexiere(filenameZiel, _Indexname, werte)
|
||||
'Me.singleInfoNode.Insert(0, Me.singleInfoNode(1))
|
||||
'Me.singleInfoNode.Insert(0, Me.singleInfoNode(0))
|
||||
Dim arrIndex() As String = Nothing
|
||||
Dim arrValue() As String = Nothing
|
||||
ReDim Preserve arrIndex(0)
|
||||
@@ -1061,6 +1104,10 @@ Public Class ClassWindream
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> type of windreamIndex 4099 Vektor Kommazahl", False)
|
||||
'Vektor Kommazahl
|
||||
vektor = True
|
||||
Case 4100
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> type of windreamIndex 4100 Vektor Boolean", False)
|
||||
'Vektor Kommazahl
|
||||
vektor = True
|
||||
Case 4101
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> type of windreamIndex 4101 Vektor Date", False)
|
||||
'Vektor Kommazahl
|
||||
@@ -1385,6 +1432,9 @@ Public Class ClassWindream
|
||||
Str = Str.ToString.Replace(" ", "")
|
||||
'Umwandeln in Double
|
||||
Return CDbl(Str.Replace(".", ","))
|
||||
Case 4100
|
||||
'Umwandeln in Boolean
|
||||
Return CBool(value)
|
||||
Case 4101
|
||||
'Umwandeln in Date
|
||||
Return CDate(value)
|
||||
|
||||
Reference in New Issue
Block a user