BIG CLEANUP
This commit is contained in:
@@ -92,11 +92,12 @@ Public Class frmConfig_Basic
|
||||
Exit Sub
|
||||
End If
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.DataSource = Me.txtServer.Text
|
||||
csb.IntegratedSecurity = False
|
||||
csb.UserID = Me.txtUser.Text
|
||||
csb.Password = Me.txtPasswort.Text
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder With {
|
||||
.DataSource = Me.txtServer.Text,
|
||||
.IntegratedSecurity = False,
|
||||
.UserID = Me.txtUser.Text,
|
||||
.Password = Me.txtPasswort.Text
|
||||
}
|
||||
|
||||
Dim con As String
|
||||
If chkbxUserAut.Checked Then
|
||||
@@ -106,8 +107,9 @@ Public Class frmConfig_Basic
|
||||
End If
|
||||
Dim connection As New SqlClient.SqlConnection(con) 'csb.ConnectionString)
|
||||
connection.Open()
|
||||
Dim cmd As New SqlClient.SqlCommand("sp_databases", connection)
|
||||
cmd.CommandType = CommandType.StoredProcedure
|
||||
Dim cmd As New SqlClient.SqlCommand("sp_databases", connection) With {
|
||||
.CommandType = CommandType.StoredProcedure
|
||||
}
|
||||
' Ausführen und Ergebnis in einer ListBox anzeigen
|
||||
Dim dr As SqlClient.SqlDataReader = cmd.ExecuteReader
|
||||
If dr.HasRows Then
|
||||
@@ -151,19 +153,19 @@ Public Class frmConfig_Basic
|
||||
End If
|
||||
reload = True
|
||||
Dim folderwatch = DATABASE_ECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & USER_ID)
|
||||
If Not folderwatch Is Nothing Then
|
||||
If folderwatch IsNot Nothing Then
|
||||
CURRENT_FOLDERWATCH = folderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH
|
||||
Dim SCAN_folderwatch = DATABASE_ECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & USER_ID)
|
||||
If Not SCAN_folderwatch Is Nothing Then
|
||||
If SCAN_folderwatch IsNot Nothing Then
|
||||
CURRENT_SCAN_FOLDERWATCH = SCAN_folderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = CURRENT_FOLDERWATCH
|
||||
Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH
|
||||
|
||||
If Not ClassFolderWatcher.FolderWatcher Is Nothing Then
|
||||
If ClassFolderWatcher.FolderWatcher.EnableRaisingEvents = True Then
|
||||
If FOLDER_WATCHER.FolderWatcher IsNot Nothing Then
|
||||
If FOLDER_WATCHER.FolderWatcher.EnableRaisingEvents = True Then
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop1.Text = "Überwachung stoppen"
|
||||
Else
|
||||
@@ -191,8 +193,8 @@ Public Class frmConfig_Basic
|
||||
btnstartstop1.Image = My.Resources.bell_go
|
||||
End If
|
||||
|
||||
If Not ClassFolderWatcher.FolderWatcher_SCAN Is Nothing Then
|
||||
If ClassFolderWatcher.FolderWatcher_SCAN.EnableRaisingEvents = True Then
|
||||
If FOLDER_WATCHER.FolderWatcher_SCAN IsNot Nothing Then
|
||||
If FOLDER_WATCHER.FolderWatcher_SCAN.EnableRaisingEvents = True Then
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
Else
|
||||
@@ -281,10 +283,10 @@ Public Class frmConfig_Basic
|
||||
End If
|
||||
End If
|
||||
If FW_started = True And FOLDER_TYPE = "DEFAULT" Then
|
||||
ClassFolderWatcher.Restart_FolderWatch()
|
||||
FOLDER_WATCHER.Restart_FolderWatch()
|
||||
End If
|
||||
If CONFIG.Config.FolderWatchScanStarted = True And FOLDER_TYPE = "SCAN" Then
|
||||
ClassFolderWatcher.Restart_FolderWatchSCAN()
|
||||
FOLDER_WATCHER.Restart_FolderWatchSCAN()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:")
|
||||
@@ -304,7 +306,7 @@ Public Class frmConfig_Basic
|
||||
|
||||
End Sub
|
||||
Sub CheckFW_State()
|
||||
Select Case ClassFolderWatcher.StartStop_FolderWatch()
|
||||
Select Case FOLDER_WATCHER.StartStop_FolderWatch()
|
||||
Case 1
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop1.Text = "Überwachung stoppen"
|
||||
@@ -324,7 +326,7 @@ Public Class frmConfig_Basic
|
||||
End Select
|
||||
End Sub
|
||||
Sub CheckFWSCAN_State()
|
||||
Select Case ClassFolderWatcher.StartStop_FolderWatchSCAN()
|
||||
Select Case FOLDER_WATCHER.StartStop_FolderWatchSCAN()
|
||||
Case 1
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
@@ -373,8 +375,9 @@ Public Class frmConfig_Basic
|
||||
chkLogErrorsOnly.Checked = CONFIG.Config.LogErrorsOnly
|
||||
|
||||
If Not MyConnectionString = String.Empty Then
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder With {
|
||||
.ConnectionString = MyConnectionString
|
||||
}
|
||||
Dim constr = MyConnectionString
|
||||
Try
|
||||
If Not constr.Contains("Trusted_Connection") Then
|
||||
@@ -452,15 +455,6 @@ Public Class frmConfig_Basic
|
||||
MsgBox("Changes saved.", MsgBoxStyle.Information)
|
||||
End Sub
|
||||
|
||||
Private Sub btnLogMail_Click(sender As Object, e As EventArgs) Handles btnLogMail.Click
|
||||
ClassEmail.Send_Log_Mail("<b> Log-/SupportMail von DD GLOBIX.</b> <p>",
|
||||
"Support-Mail GLOBIX", "support@didalog.de", "mail.triplew.de", "support@didalog.de", "ddemail40", "support@didalog.de", False, True)
|
||||
End Sub
|
||||
|
||||
Private Sub cmbLanguage_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbLanguage.SelectedIndexChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
Dim result As MsgBoxResult
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
@@ -514,6 +508,6 @@ Public Class frmConfig_Basic
|
||||
' Specify that the link was visited.
|
||||
Me.LinkLabel1.LinkVisited = True
|
||||
' Navigate to a URL.
|
||||
System.Diagnostics.Process.Start("http://www.didalog.de/Support")
|
||||
Process.Start("https://digitaldata.works/support")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user