This commit is contained in:
2021-09-07 16:35:17 +02:00
parent d5aeb55704
commit 1f392ca41b
51 changed files with 6881 additions and 1404 deletions

View File

@@ -1,4 +1,5 @@
Imports System.Globalization
Imports DigitalData.Modules.Database
Public Class frmKonfig
Private email As New ClassEmail
@@ -12,16 +13,16 @@ Public Class frmKonfig
gvLogs.Columns.First().Caption = "Log Nachricht"
If CONNECTION_STRING = String.Empty Then
If CONNECTION_STRING_ECM = String.Empty Then
Me.TabControl1.SelectedIndex = 1
Load_ConString("")
Else
Load_ConString(CONNECTION_STRING)
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING
Load_ConString(CONNECTION_STRING_ECM)
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING_ECM
Me.TBPM_KONFIGURATIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_KONFIGURATION)
End If
chkLogErrorsOnly.Checked = CBool(LOG_ERRORS_ONLY)
chkLogErrorsOnly.Checked = CBool(DEBUG)
txtIntervall.Text = CONFIG.Config.ReminderTimer
Catch ex As Exception
@@ -86,8 +87,9 @@ Public Class frmKonfig
result = MessageBox.Show("Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
'ConnectionString in Anwendung speichern
CONNECTION_STRING = oPlainConnectionString
CONNECTION_STRING_ECM = oPlainConnectionString
ClassDatabase.Init()
Database_ECM = New MSSQLServer(LOGCONFIG, CONNECTION_STRING_ECM)
'Das Passwort verschlüsseln
If chkbxUserAut.Checked = False Then
Dim wrapper As New ClassEncryption("!35452didalog=")
@@ -100,18 +102,18 @@ Public Class frmKonfig
If RadioDefaultConnection.Checked Then
LOGGER.Debug("ConnectionString saved")
CONNECTION_STRING = oPlainConnectionString
CONNECTION_STRING_ECM = oPlainConnectionString
CONFIG.Config.ConnectionString = oEncryptedConnectionString
CONFIG.Save(ForceAll:=True)
Else
LOGGER.Debug("ConnectionStringTest saved")
CONNECTION_STRING = oPlainConnectionString
CONNECTION_STRING_ECM = oPlainConnectionString
CONFIG.Config.ConnectionStringTest = oEncryptedConnectionString
CONFIG.Save(ForceAll:=True)
End If
Load_ConString(CONNECTION_STRING)
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING
Load_ConString(CONNECTION_STRING_ECM)
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING_ECM
Me.TBPM_KONFIGURATIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_KONFIGURATION)
End If
Catch ex As Exception
@@ -195,9 +197,9 @@ Public Class frmKonfig
End Sub
Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged
LOG_ERRORS_ONLY = chkLogErrorsOnly.Checked
LOGCONFIG.Debug = Not LOG_ERRORS_ONLY
CONFIG.Config.LogErrorsOnly = LOG_ERRORS_ONLY
DEBUG = chkLogErrorsOnly.Checked
LOGCONFIG.Debug = DEBUG
CONFIG.Config.DEBUG = DEBUG
CONFIG.Save()
'SaveMySettingsValue("LogErrorsOnly", chkLogErrorsOnly.Checked)
End Sub