MS18042016
This commit is contained in:
@@ -44,7 +44,7 @@ Public Class frmConfig_Basic
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
result = MessageBox.Show("Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
Else
|
||||
result = MessageBox.Show("Connection was created successfull!" & vbNewLine & "Do You wnat to save this connection now in the application?", "Success:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
result = MessageBox.Show("Connection was created successfully!" & vbNewLine & "Do You want to save this connection now in the application?", "Success:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
End If
|
||||
|
||||
If result = MsgBoxResult.Yes Then
|
||||
@@ -155,12 +155,22 @@ Public Class frmConfig_Basic
|
||||
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged
|
||||
Select Case TabControl1.SelectedIndex
|
||||
Case 1
|
||||
If ERROR_STATE = "NO DB-CONNECTION" Then
|
||||
MsgBox("Configurations only editable after Application started completely!", MsgBoxStyle.Exclamation)
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Exit Sub
|
||||
End If
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
cmbLanguage.SelectedIndex = 0
|
||||
Else
|
||||
cmbLanguage.SelectedIndex = 1
|
||||
End If
|
||||
Case 2
|
||||
If ERROR_STATE = "NO DB-CONNECTION" Then
|
||||
MsgBox("Configurations only editable after Application started completely!", MsgBoxStyle.Exclamation)
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Exit Sub
|
||||
End If
|
||||
reload = True
|
||||
Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & CURRENT_USERID, MyConnectionString)
|
||||
If Not folderwatch Is Nothing Then
|
||||
@@ -240,10 +250,10 @@ Public Class frmConfig_Basic
|
||||
System.IO.Directory.CreateDirectory(mypath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" >> Fehler beim Erstellen des Folderwatchordners: " & mypath, False)
|
||||
ClassLogger.Add(" >> Unexpected error inm Erstellen des Folderwatchordners: " & mypath, False)
|
||||
ClassLogger.Add(" >> " & ex.Message, False)
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
MsgBox("Fehler beim Erstellen des Folderwatchordners: " & mypath & vbNewLine & "Bitte überprüfen Sie die Rechte!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
MsgBox("Unexpected error inm Erstellen des Folderwatchordners: " & mypath & vbNewLine & "Bitte überprüfen Sie die Rechte!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Else
|
||||
MsgBox("Error in creating Hotfolder: " & mypath & vbNewLine & "Please check the rights!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
@@ -352,33 +362,45 @@ Public Class frmConfig_Basic
|
||||
|
||||
End Sub
|
||||
Sub Load_Basics()
|
||||
If Not MyConnectionString = String.Empty Then
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
Try
|
||||
If Not MyConnectionString = String.Empty Then
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
Dim constr = MyConnectionString
|
||||
Try
|
||||
If Not constr.Contains("Trusted_Connection") Then
|
||||
Try
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
Catch ex As Exception
|
||||
chkbxUserAut.Checked = False
|
||||
End Try
|
||||
Else
|
||||
chkbxUserAut.Checked = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
|
||||
Dim constr = MyConnectionString
|
||||
If Not constr.Contains("Trusted_Connection") Then
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
Else
|
||||
chkbxUserAut.Checked = True
|
||||
Me.txtActualConnection.Text = constr
|
||||
End If
|
||||
Me.txtuniversalViewer.Text = UniversalViewer_Path
|
||||
chkLogErrorsOnly.Checked = LogErrorsOnly
|
||||
txtuniversalViewer.Enabled = True
|
||||
btnaddUniversalViewer.Enabled = True
|
||||
|
||||
Me.txtActualConnection.Text = constr
|
||||
End If
|
||||
Me.txtuniversalViewer.Text = UniversalViewer_Path
|
||||
chkLogErrorsOnly.Checked = LogErrorsOnly
|
||||
txtuniversalViewer.Enabled = True
|
||||
btnaddUniversalViewer.Enabled = True
|
||||
|
||||
If ERROR_STATE = "FAILED DBCONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
ElseIf ERROR_STATE = "NO DB-CONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
txtuniversalViewer.Enabled = False
|
||||
btnaddUniversalViewer.Enabled = False
|
||||
ElseIf ERROR_STATE = "NO UV" Then
|
||||
Me.TabControl1.SelectedIndex = 1
|
||||
End If
|
||||
If ERROR_STATE = "FAILED DBCONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
ElseIf ERROR_STATE = "NO DB-CONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
txtuniversalViewer.Enabled = False
|
||||
btnaddUniversalViewer.Enabled = False
|
||||
ElseIf ERROR_STATE = "NO UV" Then
|
||||
Me.TabControl1.SelectedIndex = 1
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Load_Basics:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub btnopenlog_Click(sender As Object, e As EventArgs) Handles btnopenlog.Click
|
||||
Process.Start(ClassLogger.DateiSpeicherort)
|
||||
@@ -456,7 +478,6 @@ Public Class frmConfig_Basic
|
||||
USER_LANGUAGE = lang
|
||||
|
||||
If ClassDatabase.Execute_non_Query(update, True) = True Then
|
||||
SetLanguage()
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
MsgBox("Die Sprache wurde erfolgreich geändert!", MsgBoxStyle.Information)
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user