Beendigung des AddIns bei fehlerhafter Verbindung
This commit is contained in:
@@ -5,6 +5,7 @@ Imports System.Reflection
|
|||||||
Imports System.Windows.Forms
|
Imports System.Windows.Forms
|
||||||
Imports Microsoft.Office.Core
|
Imports Microsoft.Office.Core
|
||||||
Imports System.Dynamic
|
Imports System.Dynamic
|
||||||
|
Imports SDL
|
||||||
|
|
||||||
'Option Private Module
|
'Option Private Module
|
||||||
'Imports Microsoft.Office.Core
|
'Imports Microsoft.Office.Core
|
||||||
@@ -27,6 +28,7 @@ Public Class ThisAddIn
|
|||||||
inspectors = Me.Application.Inspectors
|
inspectors = Me.Application.Inspectors
|
||||||
currentExplorer = Me.Application.ActiveExplorer
|
currentExplorer = Me.Application.ActiveExplorer
|
||||||
SharedExplorer = currentExplorer
|
SharedExplorer = currentExplorer
|
||||||
|
checkConnection()
|
||||||
|
|
||||||
AddHandler VERAGRibbon.bla, Sub()
|
AddHandler VERAGRibbon.bla, Sub()
|
||||||
' MsgBox("JOAS")
|
' MsgBox("JOAS")
|
||||||
@@ -173,6 +175,23 @@ Public Class ThisAddIn
|
|||||||
' wdDoc.Close(False)
|
' wdDoc.Close(False)
|
||||||
' wdApp.Quit()
|
' wdApp.Quit()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub checkConnection()
|
||||||
|
|
||||||
|
|
||||||
|
Dim con = New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
|
If con.getValueTxtBySql("SELECT 1", "FMZOLL") <> 1 Then
|
||||||
|
MsgBox("ACHTUNG: Server nicht erreichbar!" & vbCrLf & "VERAG ADD In wird beendet")
|
||||||
|
Application.Quit()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,7 @@ Public Class VERAGRibbon
|
|||||||
'VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
'VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
|
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
|
||||||
LOGIN_OK = AVISO_Mail_Functions.initFirmaUser()
|
LOGIN_OK = AVISO_Mail_Functions.initFirmaUser()
|
||||||
If testConnection() = False Then
|
|
||||||
Windows.Forms.Application.Exit()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user