jj: PDF Exchange Viewer Pfad ändern -> fenster nicht anklickbar
This commit is contained in:
parent
bca59c1be0
commit
3f0835a775
@ -182,26 +182,18 @@ Public Class frmValidator
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Function process_User_exists(processname As String, Status As String)
|
Private Function process_User_exists(processname As String, Status As String)
|
||||||
|
Dim fi = New FileInfo(processname)
|
||||||
|
Dim filename As String = fi.Name.Replace(fi.Extension, "")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim selectQuery As SelectQuery = New SelectQuery("Win32_Process")
|
If Process.GetProcessesByName(filename).Length > 0 Then
|
||||||
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher(selectQuery)
|
|
||||||
For Each proc As ManagementObject In searcher.Get
|
|
||||||
If proc("Name").ToString.ToLower = processname.ToLower Then
|
|
||||||
Dim s(1) As String
|
|
||||||
proc.InvokeMethod("GetOwner", CType(s, Object()))
|
|
||||||
If CStr(s(0)).ToLower.Contains(Environment.UserName.ToLower) Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Return False
|
|
||||||
Catch ex As Exception
|
|
||||||
If Status = "CLOSE" Then
|
|
||||||
Return False
|
|
||||||
Else
|
|
||||||
'ClassLogger.Add(">> Fehler in process_User_exists " & Status & ": " & ex.Message, True)
|
|
||||||
Return True
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add(">> Fehler in process_User_exists: " & ex.Message, True)
|
||||||
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
Private Function process_terminate(processname As String)
|
Private Function process_terminate(processname As String)
|
||||||
@ -1340,7 +1332,7 @@ Public Class frmValidator
|
|||||||
End Function
|
End Function
|
||||||
Sub Open_PDFXCHANGE(AktuelleIndexfile As String)
|
Sub Open_PDFXCHANGE(AktuelleIndexfile As String)
|
||||||
Try
|
Try
|
||||||
Dim Proc As New System.Diagnostics.Process
|
Dim Proc As New Process
|
||||||
Dim psi As New ProcessStartInfo(PDFXChangeViewer, """" & AktuelleIndexfile & """")
|
Dim psi As New ProcessStartInfo(PDFXChangeViewer, """" & AktuelleIndexfile & """")
|
||||||
psi.WindowStyle = ProcessWindowStyle.Minimized
|
psi.WindowStyle = ProcessWindowStyle.Minimized
|
||||||
Proc.EnableRaisingEvents = True
|
Proc.EnableRaisingEvents = True
|
||||||
@ -1348,9 +1340,9 @@ Public Class frmValidator
|
|||||||
Proc.StartInfo = psi
|
Proc.StartInfo = psi
|
||||||
|
|
||||||
Proc.Start()
|
Proc.Start()
|
||||||
Do While process_User_exists("PDFXCview.exe", "START") = False
|
Do While process_User_exists(PDFXChangeViewer, "START") = False
|
||||||
'Warten bis PDF geladen ist
|
'Warten bis PDF geladen ist
|
||||||
System.Threading.Thread.Sleep(500)
|
Thread.Sleep(500)
|
||||||
Loop
|
Loop
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in Open_PDFXCHANGE:")
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in Open_PDFXCHANGE:")
|
||||||
@ -2758,6 +2750,13 @@ Public Class frmValidator
|
|||||||
Case "System.Windows.Forms.CheckBox"
|
Case "System.Windows.Forms.CheckBox"
|
||||||
Dim chk As CheckBox = inctrl
|
Dim chk As CheckBox = inctrl
|
||||||
input = chk.Checked.ToString
|
input = chk.Checked.ToString
|
||||||
|
|
||||||
|
If chk.Checked = False And _MUSSEINGABE = True Then
|
||||||
|
missing = True
|
||||||
|
errmessage = "Option '" & chk.Name & "' is required."
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
'den aktuellen Wert in windream auslesen
|
'den aktuellen Wert in windream auslesen
|
||||||
Dim WertWD As String
|
Dim WertWD As String
|
||||||
Dim Bool_WD As Boolean
|
Dim Bool_WD As Boolean
|
||||||
@ -2789,6 +2788,8 @@ Public Class frmValidator
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Dim Bool_WD = CBool(aktivesDokument.GetVariableValue(_IDXName))
|
' Dim Bool_WD = CBool(aktivesDokument.GetVariableValue(_IDXName))
|
||||||
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
'wenn Wert in Windream <> der Eingabe darf indexiert werden
|
||||||
If Bool_WD <> chk.Checked Then
|
If Bool_WD <> chk.Checked Then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user