Fix DocumentPath
This commit is contained in:
parent
ae380b983e
commit
d83b8cb3f3
@ -226,14 +226,24 @@ Public Class ClassWindream_allgemein
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function CheckFileExists(Path As String)
|
|
||||||
Dim oNormalizedPath = Path
|
Public Function NormalizePath(Path As String)
|
||||||
If Not Path.StartsWith("\") Then
|
Dim oNormalizedPath As String
|
||||||
oNormalizedPath = Path.Substring(2)
|
|
||||||
End If
|
If Path.StartsWith("\") Then
|
||||||
If Path.StartsWith("\\windream") Then
|
oNormalizedPath = Path.Substring(1)
|
||||||
|
ElseIf Path.StartsWith("\\windream") Then
|
||||||
oNormalizedPath = Path.Replace("\\windream\objects\", "")
|
oNormalizedPath = Path.Replace("\\windream\objects\", "")
|
||||||
|
Else
|
||||||
|
Return Path
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Return oNormalizedPath
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function CheckFileExists(Path As String)
|
||||||
|
Dim oNormalizedPath = NormalizePath(Path)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oObjectId = 0
|
Dim oObjectId = 0
|
||||||
Dim oObjectDbId = 0
|
Dim oObjectDbId = 0
|
||||||
|
|||||||
@ -155,9 +155,6 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> MainForm initialized!", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> MainForm initialized!", False)
|
||||||
|
|
||||||
MsgBox(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData))
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@ -586,7 +586,7 @@ Public Class frmMassValidator
|
|||||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2))
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message)
|
ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message)
|
||||||
Exit For
|
Exit For
|
||||||
@ -922,7 +922,7 @@ Public Class frmMassValidator
|
|||||||
CURRENT_DOC_GUID = docrow.Item("DOC_GUID")
|
CURRENT_DOC_GUID = docrow.Item("DOC_GUID")
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2))
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||||
Exit For
|
Exit For
|
||||||
@ -1385,7 +1385,7 @@ Public Class frmMassValidator
|
|||||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2))
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
||||||
_allfine = False
|
_allfine = False
|
||||||
@ -1437,7 +1437,7 @@ Public Class frmMassValidator
|
|||||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||||
Dim WMDOC As WMObject
|
Dim WMDOC As WMObject
|
||||||
Try
|
Try
|
||||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2))
|
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||||
_allfine = False
|
_allfine = False
|
||||||
|
|||||||
@ -32,7 +32,10 @@ Public Class frmValidator
|
|||||||
Dim aktivesDokument As WMObject
|
Dim aktivesDokument As WMObject
|
||||||
'speichert die DocumentDaten
|
'speichert die DocumentDaten
|
||||||
Private navStep As String = Nothing
|
Private navStep As String = Nothing
|
||||||
Public Shared Document_Path As String
|
|
||||||
|
Public Shared Windream_Document_Path As String
|
||||||
|
Public Shared Filesystem_Document_Path As String
|
||||||
|
|
||||||
Dim OLD_Document_Path As String = ""
|
Dim OLD_Document_Path As String = ""
|
||||||
Dim ValueDTP As Date
|
Dim ValueDTP As Date
|
||||||
Dim AnzDoks As Integer
|
Dim AnzDoks As Integer
|
||||||
@ -94,7 +97,7 @@ Public Class frmValidator
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Error in Load FormLayout: " & ex.Message)
|
ClassLogger.Add("Error in Load FormLayout: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
Select Case Path.GetExtension(Document_Path).ToLower
|
Select Case Path.GetExtension(Windream_Document_Path).ToLower
|
||||||
Case ".pdf"
|
Case ".pdf"
|
||||||
Select Case vpdfviewer
|
Select Case vpdfviewer
|
||||||
Case "internal"
|
Case "internal"
|
||||||
@ -137,7 +140,7 @@ Public Class frmValidator
|
|||||||
Kill_PDFAcrobat()
|
Kill_PDFAcrobat()
|
||||||
Else
|
Else
|
||||||
If pdfxchange = True Or sumatra = True Then
|
If pdfxchange = True Or sumatra = True Then
|
||||||
Close_PDF_Viewer(Document_Path)
|
Close_PDF_Viewer(Windream_Document_Path)
|
||||||
End If
|
End If
|
||||||
KillU_Viewer()
|
KillU_Viewer()
|
||||||
End If
|
End If
|
||||||
@ -1212,9 +1215,9 @@ Public Class frmValidator
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Sub Open_PDF_withStandard()
|
Sub Open_PDF_withStandard()
|
||||||
If Document_Path.ToLower.EndsWith(".pdf") = True Then
|
If Windream_Document_Path.ToLower.EndsWith(".pdf") = True Then
|
||||||
Dim Proc As New System.Diagnostics.Process
|
Dim Proc As New System.Diagnostics.Process
|
||||||
Dim psi As New ProcessStartInfo(Document_Path)
|
Dim psi As New ProcessStartInfo(Filesystem_Document_Path)
|
||||||
psi.WindowStyle = ProcessWindowStyle.Minimized
|
psi.WindowStyle = ProcessWindowStyle.Minimized
|
||||||
Proc.EnableRaisingEvents = True
|
Proc.EnableRaisingEvents = True
|
||||||
Proc.StartInfo = psi
|
Proc.StartInfo = psi
|
||||||
@ -1258,19 +1261,22 @@ Public Class frmValidator
|
|||||||
|
|
||||||
newGUID = Next_GUID(OLD_Document_Path, CURRENT_ProfilGUID, PROFIL_sortbynewest)
|
newGUID = Next_GUID(OLD_Document_Path, CURRENT_ProfilGUID, PROFIL_sortbynewest)
|
||||||
|
|
||||||
Document_Path = ""
|
Windream_Document_Path = ""
|
||||||
CURRENT_DOC_PATH = ""
|
CURRENT_DOC_PATH = ""
|
||||||
If newGUID > 0 Then
|
If newGUID > 0 Then
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> newGUID: " & newGUID.ToString, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> newGUID: " & newGUID.ToString, False)
|
||||||
Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
Windream_Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
||||||
Document_Path = Document_Path.Replace("W:", "\\windream\objects")
|
Windream_Document_Path = Windream_Document_Path.Replace("W:", "\\windream\objects")
|
||||||
Document_Path = Document_Path.Replace("K:", "\\windream\objects")
|
Windream_Document_Path = Windream_Document_Path.Replace("K:", "\\windream\objects")
|
||||||
CURRENT_DOC_PATH = Document_Path
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Document_Path: " & Document_Path, False)
|
Filesystem_Document_Path = GetFilesystemDocumentPath(Windream_Document_Path)
|
||||||
|
|
||||||
|
CURRENT_DOC_PATH = Windream_Document_Path
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Document_Path: " & Windream_Document_Path, False)
|
||||||
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Überprüfen ob File existiert?", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Überprüfen ob File existiert?", False)
|
||||||
Dim i As Integer = 0
|
Dim i As Integer = 0
|
||||||
Do While allgFunk.file_exists(Document_Path, _windream) = False And newGUID <> 0
|
Do While allgFunk.file_exists(Windream_Document_Path, _windream) = False And newGUID <> 0
|
||||||
i = i + 1
|
i = i + 1
|
||||||
If i > 800 Then
|
If i > 800 Then
|
||||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Get_Next_GUID - Datei nicht vorhanden!", Environment.UserName)
|
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Get_Next_GUID - Datei nicht vorhanden!", Environment.UserName)
|
||||||
@ -1278,12 +1284,12 @@ Public Class frmValidator
|
|||||||
Dim Del = "DELETE FROM TBPM_PROFILE_FILES where GUID = " & newGUID
|
Dim Del = "DELETE FROM TBPM_PROFILE_FILES where GUID = " & newGUID
|
||||||
ClassDatabase.Execute_non_Query(Del, True)
|
ClassDatabase.Execute_non_Query(Del, True)
|
||||||
errmessage = "Die windream-Datei existiert nicht!"
|
errmessage = "Die windream-Datei existiert nicht!"
|
||||||
Document_Path = ""
|
Windream_Document_Path = ""
|
||||||
CURRENT_DOC_PATH = ""
|
CURRENT_DOC_PATH = ""
|
||||||
Return 0
|
Return 0
|
||||||
End If
|
End If
|
||||||
Loop
|
Loop
|
||||||
OLD_Document_Path = Document_Path
|
OLD_Document_Path = Windream_Document_Path
|
||||||
'If PROFIL_sortbynewest Then
|
'If PROFIL_sortbynewest Then
|
||||||
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdgetNextFile_GUID_Newest(PROFIL_ID, Document_Path, Environment.UserName)
|
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdgetNextFile_GUID_Newest(PROFIL_ID, Document_Path, Environment.UserName)
|
||||||
' Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
' Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
||||||
@ -1320,7 +1326,7 @@ Public Class frmValidator
|
|||||||
AnzDoks = DT.Rows.Count
|
AnzDoks = DT.Rows.Count
|
||||||
Else
|
Else
|
||||||
AnzDoks = 1
|
AnzDoks = 1
|
||||||
Document_Path = CURRENT_DOC_PATH
|
Windream_Document_Path = CURRENT_DOC_PATH
|
||||||
End If
|
End If
|
||||||
|
|
||||||
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - GUID: " & CURRENT_DOC_GUID
|
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - GUID: " & CURRENT_DOC_GUID
|
||||||
@ -1336,7 +1342,7 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If pdfxchange = True Or sumatra = True Or vpdfviewer = "system" Then
|
If pdfxchange = True Or sumatra = True Or vpdfviewer = "system" Then
|
||||||
Close_PDF_Viewer(Document_Path)
|
Close_PDF_Viewer(Windream_Document_Path)
|
||||||
End If
|
End If
|
||||||
If aktivesDokument Is Nothing = False Then
|
If aktivesDokument Is Nothing = False Then
|
||||||
If aktivesDokument.aLocked Then
|
If aktivesDokument.aLocked Then
|
||||||
@ -1356,13 +1362,20 @@ Public Class frmValidator
|
|||||||
pnlpdf.Visible = visible
|
pnlpdf.Visible = visible
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Function GetFilesystemDocumentPath(WindreamPath As String)
|
||||||
|
Return Path.Combine(CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH"), Windream_Document_Path)
|
||||||
|
End Function
|
||||||
|
|
||||||
Sub Load_Next_Document(first As Boolean)
|
Sub Load_Next_Document(first As Boolean)
|
||||||
|
|
||||||
aktivesDokument = Nothing
|
aktivesDokument = Nothing
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> aktivesDokument nothing gesetzt", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> aktivesDokument nothing gesetzt", False)
|
||||||
activate_controls(False)
|
activate_controls(False)
|
||||||
errmessage = ""
|
errmessage = ""
|
||||||
Document_Path = ""
|
Windream_Document_Path = ""
|
||||||
|
Filesystem_Document_Path = ""
|
||||||
|
|
||||||
CURRENT_HTML_DOC = ""
|
CURRENT_HTML_DOC = ""
|
||||||
|
|
||||||
'Me.lblerror.Visible = False
|
'Me.lblerror.Visible = False
|
||||||
@ -1391,25 +1404,25 @@ Public Class frmValidator
|
|||||||
If CURRENT_JUMP_DOC_GUID = 0 Then
|
If CURRENT_JUMP_DOC_GUID = 0 Then
|
||||||
CURRENT_DOC_GUID = Get_Next_GUID()
|
CURRENT_DOC_GUID = Get_Next_GUID()
|
||||||
Else
|
Else
|
||||||
Document_Path = CURRENT_DOC_PATH
|
Windream_Document_Path = CURRENT_DOC_PATH
|
||||||
|
Filesystem_Document_Path = GetFilesystemDocumentPath(Windream_Document_Path)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'", False)
|
||||||
If CURRENT_DOC_GUID > 0 Then
|
If CURRENT_DOC_GUID > 0 Then
|
||||||
'Beschriftung des Navigators
|
'Beschriftung des Navigators
|
||||||
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
||||||
If Document_Path <> String.Empty Then
|
If Windream_Document_Path <> String.Empty Then
|
||||||
' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ###########################
|
' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ###########################
|
||||||
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(True, Environment.UserName, CURRENT_DOC_GUID)
|
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(True, Environment.UserName, CURRENT_DOC_GUID)
|
||||||
' ############ Infos eintragen #################
|
' ############ Infos eintragen #################
|
||||||
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - DocGUID: " & CURRENT_DOC_GUID
|
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - DocGUID: " & CURRENT_DOC_GUID
|
||||||
' txtDateipfad.Text = Document_Path
|
' txtDateipfad.Text = Document_Path
|
||||||
tstrlbl_Info.Text = "Datei " & docCounter.ToString & " von " & Anzahl_ValDoks.ToString
|
tstrlbl_Info.Text = "Datei " & docCounter.ToString & " von " & Anzahl_ValDoks.ToString
|
||||||
ClassLogger.Add(">> Validierung für Dokument '" & Document_Path & "' gestartet", False)
|
ClassLogger.Add(">> Validierung für Dokument '" & Windream_Document_Path & "' gestartet", False)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
'aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2))
|
aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(Windream_Document_Path))
|
||||||
aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Replace("\\windream\objects", ""))
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
||||||
ClassLogger.Add("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message)
|
ClassLogger.Add("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message)
|
||||||
@ -1418,8 +1431,7 @@ Public Class frmValidator
|
|||||||
'Nochmaliger Versuch windream zu initialiseren
|
'Nochmaliger Versuch windream zu initialiseren
|
||||||
If Init_windream() = True Then
|
If Init_windream() = True Then
|
||||||
Try
|
Try
|
||||||
'aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2))
|
aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Windream_Document_Path)
|
||||||
aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2))
|
|
||||||
Catch ex1 As Exception
|
Catch ex1 As Exception
|
||||||
ClassLogger.Add("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message)
|
ClassLogger.Add("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message)
|
||||||
errmessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!"
|
errmessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!"
|
||||||
@ -1447,7 +1459,7 @@ Public Class frmValidator
|
|||||||
|
|
||||||
load_viewer()
|
load_viewer()
|
||||||
|
|
||||||
If Document_Path.ToLower.EndsWith(".pdf") Then
|
If Windream_Document_Path.ToLower.EndsWith(".pdf") Then
|
||||||
ToolStripButtonAnnotation.Visible = True
|
ToolStripButtonAnnotation.Visible = True
|
||||||
Else
|
Else
|
||||||
ToolStripButtonAnnotation.Visible = False
|
ToolStripButtonAnnotation.Visible = False
|
||||||
@ -1519,19 +1531,19 @@ Public Class frmValidator
|
|||||||
If Viewer = "uviewer" Then
|
If Viewer = "uviewer" Then
|
||||||
pdfxchange = False
|
pdfxchange = False
|
||||||
sumatra = False
|
sumatra = False
|
||||||
If Document_Path.ToLower.EndsWith(".msg") Then
|
If Filesystem_Document_Path.ToLower.EndsWith(".msg") Then
|
||||||
Show_Email()
|
Show_Email()
|
||||||
Else
|
Else
|
||||||
ShowFile_UniversalViewer(Document_Path)
|
ShowFile_UniversalViewer(Filesystem_Document_Path)
|
||||||
End If
|
End If
|
||||||
ElseIf Viewer = "docview" Then
|
ElseIf Viewer = "docview" Then
|
||||||
PdfControls_visible(False)
|
PdfControls_visible(False)
|
||||||
If Document_Path.ToLower.EndsWith(".pdf") And vpdfviewer <> "none" Then
|
If Filesystem_Document_Path.ToLower.EndsWith(".pdf") And vpdfviewer <> "none" Then
|
||||||
Select Case vpdfviewer
|
Select Case vpdfviewer
|
||||||
Case "internal"
|
Case "internal"
|
||||||
SplitContainer1.Panel2Collapsed = False
|
SplitContainer1.Panel2Collapsed = False
|
||||||
PdfViewer1.LoadDocument(Document_Path)
|
PdfViewer1.LoadDocument(Filesystem_Document_Path)
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Internal Viewer Path: " & Document_Path, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Internal Viewer Path: " & Filesystem_Document_Path, False)
|
||||||
PdfControls_visible(True)
|
PdfControls_visible(True)
|
||||||
Me.Size = My.Settings.frmValidation_Size_PDFViewer
|
Me.Size = My.Settings.frmValidation_Size_PDFViewer
|
||||||
'PdfViewer1.ZoomFactor = PDFViewer_ZoomMode
|
'PdfViewer1.ZoomFactor = PDFViewer_ZoomMode
|
||||||
@ -1540,14 +1552,14 @@ Public Class frmValidator
|
|||||||
sumatra = False
|
sumatra = False
|
||||||
Case "pdfxchange"
|
Case "pdfxchange"
|
||||||
SplitContainer1.Panel2Collapsed = True
|
SplitContainer1.Panel2Collapsed = True
|
||||||
Open_PDFXCHANGE(Document_Path)
|
Open_PDFXCHANGE(Filesystem_Document_Path)
|
||||||
pdfxchange = True
|
pdfxchange = True
|
||||||
sumatra = False
|
sumatra = False
|
||||||
System.Threading.Thread.Sleep(1000)
|
System.Threading.Thread.Sleep(1000)
|
||||||
Me.Size = My.Settings.frmValidatorSize
|
Me.Size = My.Settings.frmValidatorSize
|
||||||
Case "sumatra"
|
Case "sumatra"
|
||||||
SplitContainer1.Panel2Collapsed = True
|
SplitContainer1.Panel2Collapsed = True
|
||||||
Open_Sumatra(Document_Path)
|
Open_Sumatra(Filesystem_Document_Path)
|
||||||
sumatra = True
|
sumatra = True
|
||||||
pdfxchange = False
|
pdfxchange = False
|
||||||
System.Threading.Thread.Sleep(1000)
|
System.Threading.Thread.Sleep(1000)
|
||||||
@ -1560,7 +1572,7 @@ Public Class frmValidator
|
|||||||
System.Threading.Thread.Sleep(1000)
|
System.Threading.Thread.Sleep(1000)
|
||||||
Me.Size = My.Settings.frmValidatorSize
|
Me.Size = My.Settings.frmValidatorSize
|
||||||
End Select
|
End Select
|
||||||
ElseIf Document_Path.ToLower.EndsWith(".msg") Then
|
ElseIf Filesystem_Document_Path.ToLower.EndsWith(".msg") Then
|
||||||
Show_Email()
|
Show_Email()
|
||||||
Else
|
Else
|
||||||
SplitContainer1.Panel2Collapsed = True
|
SplitContainer1.Panel2Collapsed = True
|
||||||
@ -1590,7 +1602,7 @@ Public Class frmValidator
|
|||||||
Try
|
Try
|
||||||
Me.grpBetreff.Dock = DockStyle.Top
|
Me.grpBetreff.Dock = DockStyle.Top
|
||||||
Me.grpbxMailBody.Dock = DockStyle.Fill
|
Me.grpbxMailBody.Dock = DockStyle.Fill
|
||||||
Dim msg_email As New Msg.Message(Document_Path)
|
Dim msg_email As New Msg.Message(Windream_Document_Path)
|
||||||
'Eine tempfile generieren
|
'Eine tempfile generieren
|
||||||
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
|
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
|
||||||
Dim name = Path.GetFileNameWithoutExtension(tempFilename)
|
Dim name = Path.GetFileNameWithoutExtension(tempFilename)
|
||||||
@ -2521,7 +2533,7 @@ Public Class frmValidator
|
|||||||
ClassDatabase.Execute_non_Query(ins)
|
ClassDatabase.Execute_non_Query(ins)
|
||||||
|
|
||||||
Close_document_viewer()
|
Close_document_viewer()
|
||||||
If Document_Path.ToLower.EndsWith(".pdf") Then
|
If Windream_Document_Path.ToLower.EndsWith(".pdf") Then
|
||||||
If Not IsNothing(WORK_HISTORY_ENTRY) Then
|
If Not IsNothing(WORK_HISTORY_ENTRY) Then
|
||||||
If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
|
If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
|
||||||
sql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID)
|
sql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID)
|
||||||
@ -2552,7 +2564,7 @@ Public Class frmValidator
|
|||||||
|
|
||||||
'wenn Move2Folder aktiviert wurde
|
'wenn Move2Folder aktiviert wurde
|
||||||
If Move2Folder <> "" Then
|
If Move2Folder <> "" Then
|
||||||
idxerr_message = allgFunk.Move2Folder(Document_Path, Move2Folder, CURRENT_ProfilGUID, _windream)
|
idxerr_message = allgFunk.Move2Folder(Windream_Document_Path, Move2Folder, CURRENT_ProfilGUID, _windream)
|
||||||
If idxerr_message <> "" Then
|
If idxerr_message <> "" Then
|
||||||
errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message
|
errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
@ -2561,7 +2573,7 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'Validierungsfile löschen wenn vorhanden
|
'Validierungsfile löschen wenn vorhanden
|
||||||
allgFunk.Delete_xffres(Document_Path, _windream)
|
allgFunk.Delete_xffres(Windream_Document_Path, _windream)
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Delete_xffres ausgeführt", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Delete_xffres ausgeführt", False)
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> All Input clear", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> All Input clear", False)
|
||||||
Anzahl_validierte_Dok += 1
|
Anzahl_validierte_Dok += 1
|
||||||
@ -3243,7 +3255,7 @@ Public Class frmValidator
|
|||||||
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
|
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
|
||||||
Try
|
Try
|
||||||
Dim Proc As New System.Diagnostics.Process
|
Dim Proc As New System.Diagnostics.Process
|
||||||
Dim psi As New ProcessStartInfo(Document_Path)
|
Dim psi As New ProcessStartInfo(Filesystem_Document_Path)
|
||||||
Proc.EnableRaisingEvents = True
|
Proc.EnableRaisingEvents = True
|
||||||
Proc.StartInfo = psi
|
Proc.StartInfo = psi
|
||||||
Proc.Start()
|
Proc.Start()
|
||||||
@ -3263,8 +3275,8 @@ Public Class frmValidator
|
|||||||
'Das Dokument freigeben
|
'Das Dokument freigeben
|
||||||
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", CURRENT_DOC_GUID)
|
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", CURRENT_DOC_GUID)
|
||||||
|
|
||||||
If TBPM_FILES_USER_NOT_INDEXEDTableAdapter.FileExists(Environment.UserName, CURRENT_ProfilGUID, Document_Path) = 0 Then
|
If TBPM_FILES_USER_NOT_INDEXEDTableAdapter.FileExists(Environment.UserName, CURRENT_ProfilGUID, Windream_Document_Path) = 0 Then
|
||||||
TBPM_FILES_USER_NOT_INDEXEDTableAdapter.cmdInsert(Environment.UserName, CURRENT_ProfilGUID, Document_Path)
|
TBPM_FILES_USER_NOT_INDEXEDTableAdapter.cmdInsert(Environment.UserName, CURRENT_ProfilGUID, Windream_Document_Path)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Dokument freigegeben", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Dokument freigegeben", False)
|
||||||
@ -3283,7 +3295,7 @@ Public Class frmValidator
|
|||||||
Close_document_viewer()
|
Close_document_viewer()
|
||||||
'Aus der Tabelle löschen
|
'Aus der Tabelle löschen
|
||||||
TBPM_PROFILE_FILESTableAdapter.CmdDelete(CURRENT_DOC_GUID)
|
TBPM_PROFILE_FILESTableAdapter.CmdDelete(CURRENT_DOC_GUID)
|
||||||
Dim resul = allgFunk.Delete_xffres(Document_Path, _windream)
|
Dim resul = allgFunk.Delete_xffres(Filesystem_Document_Path, _windream)
|
||||||
If resul = Nothing Or resul = True Then
|
If resul = Nothing Or resul = True Then
|
||||||
If Delete_File() = True Then
|
If Delete_File() = True Then
|
||||||
'MsgBox("Die Datei wurde erfolgreich aus windream gelöscht!" & vbNewLine & "Es wird nun die nächste Datei angezeigt!", MsgBoxStyle.Information, "Erfolgsmeldung:")
|
'MsgBox("Die Datei wurde erfolgreich aus windream gelöscht!" & vbNewLine & "Es wird nun die nächste Datei angezeigt!", MsgBoxStyle.Information, "Erfolgsmeldung:")
|
||||||
@ -3347,12 +3359,12 @@ Public Class frmValidator
|
|||||||
End Structure
|
End Structure
|
||||||
|
|
||||||
Private Sub DateieigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateieigenschaftenToolStripMenuItem.Click
|
Private Sub DateieigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateieigenschaftenToolStripMenuItem.Click
|
||||||
If Document_Path <> "" Then
|
If Windream_Document_Path <> "" Then
|
||||||
Cursor = Cursors.WaitCursor
|
Cursor = Cursors.WaitCursor
|
||||||
Dim sei As New SHELLEXECUTEINFO
|
Dim sei As New SHELLEXECUTEINFO
|
||||||
sei.cbSize = Marshal.SizeOf(sei)
|
sei.cbSize = Marshal.SizeOf(sei)
|
||||||
sei.lpVerb = "properties"
|
sei.lpVerb = "properties"
|
||||||
sei.lpFile = Document_Path
|
sei.lpFile = Filesystem_Document_Path
|
||||||
sei.nShow = SW_SHOW
|
sei.nShow = SW_SHOW
|
||||||
sei.fMask = SEE_MASK_INVOKEIDLIST
|
sei.fMask = SEE_MASK_INVOKEIDLIST
|
||||||
If Not ShellExecuteEx(sei) Then
|
If Not ShellExecuteEx(sei) Then
|
||||||
@ -3364,8 +3376,8 @@ Public Class frmValidator
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub frmValidation_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
Private Sub frmValidation_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
||||||
If Document_Path Is Nothing = False Then
|
If Windream_Document_Path Is Nothing = False Then
|
||||||
Select Case Path.GetExtension(Document_Path).ToLower
|
Select Case Path.GetExtension(Windream_Document_Path).ToLower
|
||||||
Case ".pdf"
|
Case ".pdf"
|
||||||
Select Case vpdfviewer
|
Select Case vpdfviewer
|
||||||
Case "internal"
|
Case "internal"
|
||||||
@ -3440,7 +3452,7 @@ Public Class frmValidator
|
|||||||
|
|
||||||
Private Sub ToolStripButtonAnnotation_Click(sender As Object, e As EventArgs) Handles ToolStripButtonAnnotation.Click
|
Private Sub ToolStripButtonAnnotation_Click(sender As Object, e As EventArgs) Handles ToolStripButtonAnnotation.Click
|
||||||
PdfViewer1.CloseDocument()
|
PdfViewer1.CloseDocument()
|
||||||
Close_PDF_Viewer(Document_Path)
|
Close_PDF_Viewer(Windream_Document_Path)
|
||||||
Application.DoEvents()
|
Application.DoEvents()
|
||||||
|
|
||||||
frmAnnotations.ShowDialog()
|
frmAnnotations.ShowDialog()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user