Imports System.Xml Imports System.IO Imports System.Reflection Public Class Parameters Dim sconnectionstring As String Property connectionstring() As String Get Return sconnectionstring End Get Set(ByVal value As String) sconnectionstring = value End Set End Property Dim sconnectionstring_Journale As String Property connectionstring_Journale() As String Get Return sconnectionstring_Journale End Get Set(ByVal value As String) sconnectionstring_Journale = value End Set End Property Dim sworkdir As String Property WorkDir() As String Get Return sworkdir End Get Set(ByVal value As String) sworkdir = value End Set End Property Dim bDebugmode As Boolean Property DebugMode() As Boolean Get Return bDebugmode End Get Set(ByVal value As Boolean) bDebugmode = value End Set End Property Dim sOKMeldungBetreff As String Property OKMeldungBetreff() As String Get Return sOKMeldungBetreff End Get Set(ByVal value As String) sOKMeldungBetreff = value End Set End Property Dim sOKMeldung As String Property OKMeldung() As String Get Return sOKMeldung End Get Set(ByVal value As String) sOKMeldung = value End Set End Property Dim sNOKMeldungBetreff As String Property NOKMeldungBetreff() As String Get Return sNOKMeldungBetreff End Get Set(ByVal value As String) sNOKMeldungBetreff = value End Set End Property Dim sNOKMeldung As String Property NOKMeldung() As String Get Return sNOKMeldung End Get Set(ByVal value As String) sNOKMeldung = value End Set End Property Dim iInterval As Integer Property TimerInterval() As Integer Get Return iInterval End Get Set(ByVal value As Integer) iInterval = value End Set End Property Dim iMaNrFehlerMeldung As Integer Property MaNrFehlermeldung() As Integer Get Return iMaNrFehlerMeldung End Get Set(ByVal value As Integer) iMaNrFehlerMeldung = value End Set End Property Dim sFehlermeldungBetreff As String Property FehlermeldungBetreff() As String Get Return sFehlermeldungBetreff End Get Set(ByVal value As String) sFehlermeldungBetreff = value End Set End Property Dim sFehlerMeldungMeldung As String Property FehlerMeldungMeldung() As String Get Return sFehlerMeldungMeldung End Get Set(ByVal value As String) sFehlerMeldungMeldung = value End Set End Property Dim bCheckOffice2010_Vorlage As Boolean Property CheckOffice2010_Vorlage() As Boolean Get Return bCheckOffice2010_Vorlage End Get Set(ByVal value As Boolean) bCheckOffice2010_Vorlage = value End Set End Property Dim xmldoc As New XmlDocument Public Sub New() xmldoc.Load(Me.ApplicationPath + "Parameters.xml") Me.connectionstring = xmldoc.SelectSingleNode("/Configuration/SQLConnectionString").InnerText Me.connectionstring_Journale = xmldoc.SelectSingleNode("/Configuration/SQLConnectionStringJournale").InnerText Me.WorkDir = xmldoc.SelectSingleNode("/Configuration/WorkDir").InnerText Me.DebugMode = UCase(xmldoc.SelectSingleNode("/Configuration/DebugMode").InnerText) = "TRUE" Me.OKMeldungBetreff = xmldoc.SelectSingleNode("/Configuration/OKMeldungBetreff").InnerText Me.OKMeldung = xmldoc.SelectSingleNode("/Configuration/OKMeldung").InnerText Me.NOKMeldungBetreff = xmldoc.SelectSingleNode("/Configuration/NOKMeldungBetreff").InnerText Me.NOKMeldung = xmldoc.SelectSingleNode("/Configuration/NOKMeldung").InnerText Me.TimerInterval = xmldoc.SelectSingleNode("/Configuration/TimerInterval").InnerText Me.MaNrFehlermeldung = xmldoc.SelectSingleNode("/Configuration/MaNrFehlerMeldung").InnerText Me.FehlermeldungBetreff = xmldoc.SelectSingleNode("/Configuration/FehlerMeldungBetreff").InnerText Me.FehlerMeldungMeldung = xmldoc.SelectSingleNode("/Configuration/FehlerMeldungMeldung").InnerText Me.MaNrFehlermeldung = xmldoc.SelectSingleNode("/Configuration/MaNrFehlerMeldung").InnerText Me.CheckOffice2010_Vorlage = UCase(xmldoc.SelectSingleNode("/Configuration/CheckOffice2010_Vorlage").InnerText) = "TRUE" Globals.conn.sConnectionString = Me.connectionstring Globals.connJournale.sConnectionString = Me.connectionstring_Journale Globals.PrintLog("EDKB12 gestartet", EventLogEntryType.Information) Globals.PrintLog("Connectionstring EDOKA:" & Me.connectionstring, EventLogEntryType.Information) Globals.PrintLog("Connectionstring Journale:" & Me.connectionstring_Journale, EventLogEntryType.Information) Globals.PrintLog("WorkDir:" & Me.WorkDir, EventLogEntryType.Information) Globals.PrintLog("DebugMode:" & Me.DebugMode, EventLogEntryType.Information) Globals.PrintLog("TimerInterval:" & Me.TimerInterval, EventLogEntryType.Information) Globals.PrintLog("Ma-Nr Fehlermeldung:" & Me.MaNrFehlermeldung, EventLogEntryType.Information) End Sub Public Function ApplicationPath() As String Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\" End Function End Class