Initial commit
This commit is contained in:
32
EDKB10/BMS/Common/AssemblyInfo.vb
Normal file
32
EDKB10/BMS/Common/AssemblyInfo.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("A015538C-4631-4461-B711-4B2A3F76985B")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
|
||||
<Assembly: AssemblyVersion("2.0.*")>
|
||||
305
EDKB10/BMS/Common/Common.vb
Normal file
305
EDKB10/BMS/Common/Common.vb
Normal file
@@ -0,0 +1,305 @@
|
||||
#Region "Includes"
|
||||
|
||||
Imports System.Xml
|
||||
Imports System.Data.SqlClient
|
||||
Imports Common.Settings
|
||||
|
||||
#End Region
|
||||
|
||||
Public Class Common
|
||||
Public Const SERVICE_DISPLAY_NAME As String = "EDKB10"
|
||||
Public Const DLL_DISPLAY_NAME As String = "EDKB10 Library"
|
||||
Private Const DSN_DECRYPT_PASSWORD As String = "HutterundMueller"
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private m_DSN As String
|
||||
Private m_StartJobInterval As Integer
|
||||
Private m_WatchJobInterval As Integer
|
||||
Private m_MaximalStartDuration As Integer
|
||||
Private m_EventLogName As String
|
||||
Private m_LogTarget As LogTarget
|
||||
Private m_MailServer As String
|
||||
Private m_MailFrom As String
|
||||
Private m_MailServerAuthMethod As MailServerAuthMethod
|
||||
Private m_MailServerAuthUser As String
|
||||
Private m_MailServerAuthPassword As String
|
||||
Private m_MaxStarterNotifications As Integer
|
||||
Private m_MaxWatcherNotifications As Integer
|
||||
|
||||
Private m_EventLog As EventLog
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'Creates a new instance of this object
|
||||
Public Sub New()
|
||||
Try
|
||||
Dim reader As System.IO.StreamReader
|
||||
Dim s As String
|
||||
|
||||
reader = System.IO.File.OpenText(AppDomain.CurrentDomain.BaseDirectory & "bms_conn.cfg")
|
||||
s = reader.ReadLine
|
||||
|
||||
m_DSN = ZpCryptography.DsnCrypto.Decrypt(s, DSN_DECRYPT_PASSWORD)
|
||||
|
||||
LoadSettings()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
|
||||
'Loads all settings from xml configuration file
|
||||
Private Sub LoadSettings()
|
||||
Try
|
||||
Dim xmlDoc As New XmlDocument
|
||||
|
||||
xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory & "bms_settings.xml")
|
||||
|
||||
m_MaximalStartDuration = CInt(xmlDoc.SelectSingleNode("/root/config/MaximumStartDuration").InnerText)
|
||||
m_StartJobInterval = CDbl(xmlDoc.SelectSingleNode("/root/config/StartJobInterval").InnerText) * 1000 * 60
|
||||
m_WatchJobInterval = CDbl(xmlDoc.SelectSingleNode("/root/config/WatchJobInterval").InnerText) * 1000 * 60
|
||||
|
||||
m_EventLogName = xmlDoc.SelectSingleNode("/root/config/EventLogName").InnerText
|
||||
m_LogTarget = CType(CInt(xmlDoc.SelectSingleNode("/root/config/LogTarget").InnerText), LogTarget)
|
||||
|
||||
m_MailServer = xmlDoc.SelectSingleNode("/root/config/MailServer").InnerText
|
||||
m_MailFrom = xmlDoc.SelectSingleNode("/root/config/MailFrom").InnerText
|
||||
|
||||
m_MailServerAuthMethod = CType(xmlDoc.SelectSingleNode("/root/config/MailServerAuth/Method").InnerText, MailServerAuthMethod)
|
||||
m_MailServerAuthUser = xmlDoc.SelectSingleNode("/root/config/MailServerAuth/UserName").InnerText
|
||||
m_MailServerAuthPassword = xmlDoc.SelectSingleNode("/root/config/MailServerAuth/Password").InnerText
|
||||
|
||||
m_MaxStarterNotifications = CInt(xmlDoc.SelectSingleNode("/root/config/MaxStarterNotifications").InnerText)
|
||||
m_MaxWatcherNotifications = CInt(xmlDoc.SelectSingleNode("/root/config/MaxWatcherNotifications").InnerText)
|
||||
|
||||
m_EventLog = New EventLog(m_EventLogName)
|
||||
m_EventLog.Source = "Service"
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Public Methods"
|
||||
|
||||
'Logs an exception
|
||||
Public Sub Log(ByVal source As String, ByVal message As String)
|
||||
Try
|
||||
Log(source, message, EventLogEntryType.Information)
|
||||
Catch ex As Exception
|
||||
Log(SERVICE_DISPLAY_NAME, "Catastrophical error while writing to EventLog " + m_LogTarget.ToString() + Environment.NewLine + ex.Message + Environment.NewLine + ex.StackTrace, EventLogEntryType.Error, LogTarget.SystemEventLog)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Logs an exception
|
||||
Public Sub Log(ByVal ex As Exception)
|
||||
Try
|
||||
Log(ex.Source, ex.Message, EventLogEntryType.Error)
|
||||
Catch exNew As Exception
|
||||
Log(SERVICE_DISPLAY_NAME, "Catastrophical error while writing to EventLog " + m_LogTarget.ToString() + Environment.NewLine + exNew.Message + Environment.NewLine + exNew.StackTrace, EventLogEntryType.Error, LogTarget.SystemEventLog)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Logs an message to the system eventlog or database event log
|
||||
Public Sub Log(ByVal source As String, ByVal message As String, ByVal eventLogType As EventLogEntryType)
|
||||
Try
|
||||
Log(source, message, eventLogType, m_LogTarget)
|
||||
'MsgBox(CInt("23s45")) force crash 4 debug
|
||||
Catch ex As Exception
|
||||
Log(SERVICE_DISPLAY_NAME, "Catastrophical error while writing to EventLog " + m_LogTarget.ToString() + Environment.NewLine + ex.Message + Environment.NewLine + ex.StackTrace, EventLogEntryType.Error, LogTarget.SystemEventLog)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Logs an event
|
||||
Public Sub Log(ByVal source As String, ByVal message As String, ByVal eventLogType As EventLogEntryType, ByVal logTarget As LogTarget)
|
||||
Try
|
||||
Select Case logTarget
|
||||
Case logTarget.SystemEventLog
|
||||
If Not System.Diagnostics.EventLog.SourceExists(m_EventLogName) Then
|
||||
System.Diagnostics.EventLog.CreateEventSource(m_EventLogName, m_EventLogName)
|
||||
End If
|
||||
|
||||
'System.Diagnostics.EventLog.WriteEntry(m_EventLogName, message, eventLogType)
|
||||
EventLog.WriteEntry(m_EventLogName, message, eventLogType)
|
||||
Case logTarget.Database
|
||||
Dim sqlCon As New SqlConnection(m_DSN)
|
||||
Dim sqlCom As New SqlCommand
|
||||
|
||||
sqlCon.Open()
|
||||
|
||||
sqlCom.CommandType = CommandType.StoredProcedure
|
||||
sqlCom.Connection = sqlCon
|
||||
sqlCom.CommandText = "CreateEventLogEntry"
|
||||
|
||||
sqlCom.Parameters.Add(New SqlParameter("@TypeId", CInt(eventLogType)))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Source", source))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Computer", Environment.MachineName))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@EventDesc", message))
|
||||
sqlCom.ExecuteNonQuery()
|
||||
|
||||
sqlCon.Close()
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
m_EventLog.WriteEntry("EXCEPTION ON Common.Log: " + ex.Message, EventLogEntryType.Error)
|
||||
'Log(source, "EXCEPTION ON Common.Log: " + ex.Message + Environment.NewLine + Environment.NewLine + message, eventLogType, logTarget.SystemEventLog)
|
||||
'Log(SERVICE_DISPLAY_NAME, "EXCEPTION ON Common.Log: " + ex.Message + Environment.NewLine + ex.StackTrace, EventLogEntryType.Error, logTarget.SystemEventLog)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Sends a mail using sql server and cdo object
|
||||
Public Sub SendMail(ByVal receiver As String, ByVal subject As String, ByVal message As String)
|
||||
Dim sqlConn As New SqlConnection(m_DSN)
|
||||
Try
|
||||
Dim sqlCom As New SqlCommand
|
||||
Dim da As New SqlDataAdapter
|
||||
Dim ds As New DataSet
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCom.CommandType = CommandType.StoredProcedure
|
||||
sqlCom.Connection = sqlConn
|
||||
sqlCom.CommandText = "SendMailMessage"
|
||||
|
||||
sqlCom.Parameters.Add(New SqlParameter("@MailServer", m_MailServer))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@From", m_MailFrom))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@AuthMethod", m_MailServerAuthMethod.ToString()))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Username", m_MailServerAuthUser))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Password", m_MailServerAuthPassword))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@To", receiver))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Subject", subject))
|
||||
sqlCom.Parameters.Add(New SqlParameter("@Body", message))
|
||||
|
||||
da.SelectCommand = sqlCom
|
||||
da.Fill(ds)
|
||||
|
||||
sqlConn.Close()
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
Throw New Exception("Mail konnte nicht versendet werden. " + ds.Tables(0).Rows(0)(0).ToString() + " " + ds.Tables(0).Rows(0)(1).ToString() + " " + ds.Tables(0).Rows(0)(2).ToString())
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If sqlConn.State = ConnectionState.Open Then
|
||||
sqlConn.Close()
|
||||
End If
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property StartJobInterval() As Integer
|
||||
Get
|
||||
Return m_StartJobInterval
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WatchJobInterval() As Integer
|
||||
Get
|
||||
Return m_WatchJobInterval
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MaximalStartDuration() As Integer
|
||||
Get
|
||||
Return m_MaximalStartDuration
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DSN() As String
|
||||
Get
|
||||
Return m_DSN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EventLogName() As String
|
||||
Get
|
||||
Return m_EventLogName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MailServer() As String
|
||||
Get
|
||||
Return m_EventLogName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MailFrom() As String
|
||||
Get
|
||||
Return m_EventLogName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MaxStarterNotifications() As String
|
||||
Get
|
||||
Return m_MaxStarterNotifications
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MaxWatcherNotifications() As String
|
||||
Get
|
||||
Return m_MaxWatcherNotifications
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Enums"
|
||||
|
||||
Enum JournalEntryType
|
||||
Information = 1
|
||||
Warning = 2
|
||||
[Error] = 3
|
||||
End Enum
|
||||
|
||||
Enum JobType
|
||||
WatchJob = 1
|
||||
StartJob = 2
|
||||
End Enum
|
||||
|
||||
Enum JobStartType
|
||||
Executable = 1
|
||||
WindowsService = 2
|
||||
SqlQuery = 3
|
||||
End Enum
|
||||
|
||||
Enum StartParameterType
|
||||
Username = 1
|
||||
Password = 2
|
||||
ServerName = 3
|
||||
FilePath = 4
|
||||
ServiceName = 5
|
||||
ConnectionString = 6
|
||||
SQLQuery = 7
|
||||
End Enum
|
||||
|
||||
Enum LastRun
|
||||
Start = 1
|
||||
[End] = 2
|
||||
End Enum
|
||||
|
||||
Enum NotificationType
|
||||
Mail = 1
|
||||
File = 2
|
||||
End Enum
|
||||
|
||||
Enum LogTarget
|
||||
SystemEventLog = 1
|
||||
Database = 2
|
||||
End Enum
|
||||
|
||||
Enum MailServerAuthMethod
|
||||
cdoAnonymous = 0
|
||||
cdoBasic = 1
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
128
EDKB10/BMS/Common/Common.vbproj
Normal file
128
EDKB10/BMS/Common/Common.vbproj
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}</ProjectGuid>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>Common</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>Common</RootNamespace>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Windows</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>Common.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>Common.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Common.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Settings.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ZpCryptography\ZpCryptography.vbproj">
|
||||
<Project>{290C31E0-49C7-4E85-A39F-CA496BE678B6}</Project>
|
||||
<Name>ZpCryptography</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
58
EDKB10/BMS/Common/Common.vbproj.user
Normal file
58
EDKB10/BMS/Common/Common.vbproj.user
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>C:\Documents and Settings\rsteimen\My Documents\Visual Studio Projects\BMS\;C:\D\EDOKA\</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
10
EDKB10/BMS/Common/Common.vbproj.vspscc
Normal file
10
EDKB10/BMS/Common/Common.vbproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
81
EDKB10/BMS/Common/Settings.vb
Normal file
81
EDKB10/BMS/Common/Settings.vb
Normal file
@@ -0,0 +1,81 @@
|
||||
Imports System
|
||||
Imports System.Xml
|
||||
Imports System.Data
|
||||
|
||||
Public Class Settings
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Dim _settings As XmlDocument
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Consts"
|
||||
|
||||
Private Const DSN_DECRYPT_PASSWORD As String = "HutterundMueller"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
Try
|
||||
_settings = New XmlDocument
|
||||
_settings.Load(AppDomain.CurrentDomain.BaseDirectory + "settings.xml")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gets the first matching value of a property</summary>
|
||||
'''<param name="propertyName"></param>
|
||||
'''<returns></returns>
|
||||
Public Function GetSettingValue(ByVal propertyName As String) As String
|
||||
Try
|
||||
Dim nodes As XmlNodeList = _settings.GetElementsByTagName(propertyName)
|
||||
If (nodes.Count > 0) Then
|
||||
Return nodes(0).InnerText
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Sets the first matching value of a property</summary>
|
||||
'''<param name="xpath"></param>
|
||||
'''<param name="value"></param>
|
||||
Public Sub SetSettingsValue(ByVal xpath As String, ByVal value As String)
|
||||
Try
|
||||
_settings.SelectSingleNode(xpath).InnerText = value
|
||||
_settings.Save(AppDomain.CurrentDomain.BaseDirectory + "settings.xml")
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Return the descripted dsn string</summary>
|
||||
'''<returns></returns>
|
||||
Public Function GetDecryptedDSN() As String
|
||||
Try
|
||||
Dim reader As System.IO.StreamReader
|
||||
Dim s As String
|
||||
|
||||
reader = System.IO.File.OpenText(AppDomain.CurrentDomain.BaseDirectory & "bms_conn.cfg")
|
||||
s = reader.ReadLine
|
||||
|
||||
Return ZpCryptography.DsnCrypto.Decrypt(s, DSN_DECRYPT_PASSWORD)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
BIN
EDKB10/BMS/Common/bin/Common.dll
Normal file
BIN
EDKB10/BMS/Common/bin/Common.dll
Normal file
Binary file not shown.
BIN
EDKB10/BMS/Common/bin/Common.pdb
Normal file
BIN
EDKB10/BMS/Common/bin/Common.pdb
Normal file
Binary file not shown.
22
EDKB10/BMS/Common/bin/Common.xml
Normal file
22
EDKB10/BMS/Common/bin/Common.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
Common
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Common.Settings.GetSettingValue(System.String)">
|
||||
<summary>Gets the first matching value of a property</summary>
|
||||
<param name="propertyName"></param>
|
||||
<returns></returns>
|
||||
</member><member name="M:Common.Settings.SetSettingsValue(System.String,System.String)">
|
||||
<summary>Sets the first matching value of a property</summary>
|
||||
<param name="xpath"></param>
|
||||
<param name="value"></param>
|
||||
</member><member name="M:Common.Settings.GetDecryptedDSN">
|
||||
<summary>Return the descripted dsn string</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
BIN
EDKB10/BMS/Common/bin/ZpCryptography.dll
Normal file
BIN
EDKB10/BMS/Common/bin/ZpCryptography.dll
Normal file
Binary file not shown.
BIN
EDKB10/BMS/Common/bin/ZpCryptography.pdb
Normal file
BIN
EDKB10/BMS/Common/bin/ZpCryptography.pdb
Normal file
Binary file not shown.
11
EDKB10/BMS/Common/bin/ZpCryptography.xml
Normal file
11
EDKB10/BMS/Common/bin/ZpCryptography.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
ZpCryptography
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
|
||||
</members>
|
||||
</doc>
|
||||
5
EDKB10/BMS/Common/mssccprj.scc
Normal file
5
EDKB10/BMS/Common/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a Source Code Control file
|
||||
|
||||
[Common.vbproj]
|
||||
SCC_Aux_Path = "\\SERVER01\DATEN\SourceSave\EDOKA4.0"
|
||||
SCC_Project_Name = "$/BMS/Common", LTCAAAAA
|
||||
7
EDKB10/BMS/Common/obj/Common.vbproj.FileList.txt
Normal file
7
EDKB10/BMS/Common/obj/Common.vbproj.FileList.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
bin\Common.dll
|
||||
bin\Common.xml
|
||||
bin\ZpCryptography.dll
|
||||
bin\ZpCryptography.xml
|
||||
obj\Release\ResolveAssemblyReference.cache
|
||||
obj\Release\Common.dll
|
||||
obj\Release\Common.xml
|
||||
18
EDKB10/BMS/Common/obj/Common.vbproj.FileListAbsolute.txt
Normal file
18
EDKB10/BMS/Common/obj/Common.vbproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\Common.dll
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\Common.pdb
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\Common.xml
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\ZpCryptography.dll
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\ZpCryptography.pdb
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\bin\ZpCryptography.xml
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\obj\Debug\ResolveAssemblyReference.cache
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\obj\Debug\Common.dll
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\obj\Debug\Common.xml
|
||||
C:\Program Files\EDOKA\EDOKA_Entwicklung\Batches\EDKB10\BMS\Common\obj\Debug\Common.pdb
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\bin\Common.dll
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\bin\Common.xml
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\bin\ZpCryptography.dll
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\bin\ZpCryptography.pdb
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\bin\ZpCryptography.xml
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\obj\Release\ResolveAssemblyReference.cache
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\obj\Release\Common.dll
|
||||
E:\Software-Projekte\EDOKA\Batches\EDKB10\BMS\Common\obj\Release\Common.xml
|
||||
BIN
EDKB10/BMS/Common/obj/Debug/Common.dll
Normal file
BIN
EDKB10/BMS/Common/obj/Debug/Common.dll
Normal file
Binary file not shown.
BIN
EDKB10/BMS/Common/obj/Debug/Common.pdb
Normal file
BIN
EDKB10/BMS/Common/obj/Debug/Common.pdb
Normal file
Binary file not shown.
Binary file not shown.
22
EDKB10/BMS/Common/obj/Debug/Common.xml
Normal file
22
EDKB10/BMS/Common/obj/Debug/Common.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
Common
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Common.Settings.GetSettingValue(System.String)">
|
||||
<summary>Gets the first matching value of a property</summary>
|
||||
<param name="propertyName"></param>
|
||||
<returns></returns>
|
||||
</member><member name="M:Common.Settings.SetSettingsValue(System.String,System.String)">
|
||||
<summary>Sets the first matching value of a property</summary>
|
||||
<param name="xpath"></param>
|
||||
<param name="value"></param>
|
||||
</member><member name="M:Common.Settings.GetDecryptedDSN">
|
||||
<summary>Return the descripted dsn string</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
BIN
EDKB10/BMS/Common/obj/Debug/ResolveAssemblyReference.cache
Normal file
BIN
EDKB10/BMS/Common/obj/Debug/ResolveAssemblyReference.cache
Normal file
Binary file not shown.
BIN
EDKB10/BMS/Common/obj/Release/Common.dll
Normal file
BIN
EDKB10/BMS/Common/obj/Release/Common.dll
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\bin\Common.dll
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\bin\Common.xml
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\bin\ZpCryptography.dll
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\bin\ZpCryptography.pdb
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\bin\ZpCryptography.xml
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\obj\Release\Common.vbprojResolveAssemblyReference.cache
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\obj\Release\Common.dll
|
||||
E:\Software-Projekte\EDOKA\batch\EDKB10\BMS\Common\obj\Release\Common.xml
|
||||
Binary file not shown.
22
EDKB10/BMS/Common/obj/Release/Common.xml
Normal file
22
EDKB10/BMS/Common/obj/Release/Common.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
Common
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Common.Settings.GetSettingValue(System.String)">
|
||||
<summary>Gets the first matching value of a property</summary>
|
||||
<param name="propertyName"></param>
|
||||
<returns></returns>
|
||||
</member><member name="M:Common.Settings.SetSettingsValue(System.String,System.String)">
|
||||
<summary>Sets the first matching value of a property</summary>
|
||||
<param name="xpath"></param>
|
||||
<param name="value"></param>
|
||||
</member><member name="M:Common.Settings.GetDecryptedDSN">
|
||||
<summary>Return the descripted dsn string</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
BIN
EDKB10/BMS/Common/obj/Release/ResolveAssemblyReference.cache
Normal file
BIN
EDKB10/BMS/Common/obj/Release/ResolveAssemblyReference.cache
Normal file
Binary file not shown.
BIN
EDKB10/BMS/Common/vssver.scc
Normal file
BIN
EDKB10/BMS/Common/vssver.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user