MS Service ZuGferd und Begin GUI
This commit is contained in:
parent
142d9e316c
commit
71fdc188c2
@ -53,6 +53,10 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZUGFeRDTest", "ZUGFeRDTest\
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DD_CommunicationService", "DD_CommunicationService\DD_CommunicationService.vbproj", "{1FB2854F-C050-427D-9FAC-1D8F232E8025}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GUI_EDMI", "GUI_EDMI\GUI_EDMI.vbproj", "{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -123,6 +127,14 @@ Global
|
||||
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1FB2854F-C050-427D-9FAC-1D8F232E8025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1FB2854F-C050-427D-9FAC-1D8F232E8025}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1FB2854F-C050-427D-9FAC-1D8F232E8025}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1FB2854F-C050-427D-9FAC-1D8F232E8025}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -144,6 +156,8 @@ Global
|
||||
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC}
|
||||
{16156434-E471-43F1-8030-76A0DA17CD5A} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB}
|
||||
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC}
|
||||
{1FB2854F-C050-427D-9FAC-1D8F232E8025} = {7AF3F9C2-C939-4A08-95C1-0453207E298A}
|
||||
{88EDAD5B-1B98-43E4-B068-1251E7AF01A0} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286}
|
||||
|
||||
27
DD_CommunicationService/App.config
Normal file
27
DD_CommunicationService/App.config
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="DD_CommunicationService.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
<applicationSettings>
|
||||
<DD_CommunicationService.My.MySettings>
|
||||
<setting name="FB_ConnString" serializeAs="String">
|
||||
<value>172.24.12.41:E:\DB\Firebird\Databases\EDMI_TEMPLATE\EDMI_MASTER.FDB</value>
|
||||
</setting>
|
||||
<setting name="FB_DATABASE" serializeAs="String">
|
||||
<value>172.24.12.41</value>
|
||||
</setting>
|
||||
<setting name="FB_USER" serializeAs="String">
|
||||
<value>sysdba</value>
|
||||
</setting>
|
||||
<setting name="FB_PW" serializeAs="String">
|
||||
<value>dd</value>
|
||||
</setting>
|
||||
</DD_CommunicationService.My.MySettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
141
DD_CommunicationService/DD_CommunicationService.vbproj
Normal file
141
DD_CommunicationService/DD_CommunicationService.vbproj
Normal file
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1FB2854F-C050-427D-9FAC-1D8F232E8025}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DD_CommunicationService.MyComService</StartupObject>
|
||||
<RootNamespace>DD_CommunicationService</RootNamespace>
|
||||
<AssemblyName>DD_CommunicationService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>DD_CommunicationService.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>DD_CommunicationService.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Database">
|
||||
<HintPath>..\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Messaging">
|
||||
<HintPath>..\Message\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="clsEncryption.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MyComService.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MyComService.Designer.vb">
|
||||
<DependentUpon>MyComService.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.Designer.vb">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MyComService.resx">
|
||||
<DependentUpon>MyComService.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
13
DD_CommunicationService/My Project/Application.Designer.vb
generated
Normal file
13
DD_CommunicationService/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
DD_CommunicationService/My Project/Application.myapp
Normal file
10
DD_CommunicationService/My Project/Application.myapp
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>3</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
DD_CommunicationService/My Project/AssemblyInfo.vb
Normal file
35
DD_CommunicationService/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die einer Assembly zugeordnet sind.
|
||||
|
||||
' Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("DD_CommunicationService")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("DD_CommunicationService")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
<Assembly: Guid("6171730f-4eeb-4240-93c2-ea4a605c9c66")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
DD_CommunicationService/My Project/Resources.Designer.vb
generated
Normal file
62
DD_CommunicationService/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DD_CommunicationService.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
DD_CommunicationService/My Project/Resources.resx
Normal file
117
DD_CommunicationService/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
109
DD_CommunicationService/My Project/Settings.Designer.vb
generated
Normal file
109
DD_CommunicationService/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,109 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("172.24.12.41:E:\DB\Firebird\Databases\EDMI_TEMPLATE\EDMI_MASTER.FDB")> _
|
||||
Public ReadOnly Property FB_ConnString() As String
|
||||
Get
|
||||
Return CType(Me("FB_ConnString"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("172.24.12.41")> _
|
||||
Public ReadOnly Property FB_DATABASE() As String
|
||||
Get
|
||||
Return CType(Me("FB_DATABASE"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("sysdba")> _
|
||||
Public ReadOnly Property FB_USER() As String
|
||||
Get
|
||||
Return CType(Me("FB_USER"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("dd")> _
|
||||
Public ReadOnly Property FB_PW() As String
|
||||
Get
|
||||
Return CType(Me("FB_PW"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DD_CommunicationService.My.MySettings
|
||||
Get
|
||||
Return Global.DD_CommunicationService.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
18
DD_CommunicationService/My Project/Settings.settings
Normal file
18
DD_CommunicationService/My Project/Settings.settings
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="FB_ConnString" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">172.24.12.41:E:\DB\Firebird\Databases\EDMI_TEMPLATE\EDMI_MASTER.FDB</Value>
|
||||
</Setting>
|
||||
<Setting Name="FB_DATABASE" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">172.24.12.41</Value>
|
||||
</Setting>
|
||||
<Setting Name="FB_USER" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">sysdba</Value>
|
||||
</Setting>
|
||||
<Setting Name="FB_PW" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dd</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
52
DD_CommunicationService/MyComService.Designer.vb
generated
Normal file
52
DD_CommunicationService/MyComService.Designer.vb
generated
Normal file
@ -0,0 +1,52 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class MyComService
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
'UserService überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' Der Haupteinstiegspunkt für den Prozess
|
||||
<MTAThread()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Shared Sub Main()
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' Innerhalb eines Prozesses können mehrere NT-Dienste ausgeführt werden. Um einen
|
||||
' weiteren Dienst zu diesem Prozess hinzuzufügen, ändern Sie die folgende Zeile,
|
||||
' um ein zweites Dienstobjekt zu erstellen. Zum Beispiel
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
|
||||
'
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New MyComService}
|
||||
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
' Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
'
|
||||
'MyComService
|
||||
'
|
||||
Me.CanShutdown = True
|
||||
Me.ServiceName = "DDEDMI_ComService"
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
123
DD_CommunicationService/MyComService.resx
Normal file
123
DD_CommunicationService/MyComService.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
156
DD_CommunicationService/MyComService.vb
Normal file
156
DD_CommunicationService/MyComService.vb
Normal file
@ -0,0 +1,156 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports System.IO
|
||||
Public Class MyComService
|
||||
Private _Logger As Logger
|
||||
Private _MyLogger As LogConfig
|
||||
Private _firebird As Firebird
|
||||
Private _Email As Email
|
||||
Public Shared threadEmailQueue As BackgroundWorker
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
' Code zum Starten des Dienstes hier einfügen. Diese Methode sollte Vorgänge
|
||||
' ausführen, damit der Dienst gestartet werden kann.
|
||||
Try
|
||||
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"))
|
||||
_Logger = _MyLogger.GetLogger()
|
||||
_firebird = New Firebird(_MyLogger, My.Settings.FB_ConnString, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
|
||||
_Email = New Email(_MyLogger)
|
||||
If _firebird._DBInitialized = True Then
|
||||
MyComService.threadEmailQueue = New BackgroundWorker()
|
||||
MyComService.threadEmailQueue.WorkerReportsProgress = True
|
||||
MyComService.threadEmailQueue.WorkerSupportsCancellation = True
|
||||
AddHandler threadEmailQueue.DoWork, AddressOf RunThread_EmailQueue
|
||||
AddHandler threadEmailQueue.RunWorkerCompleted, AddressOf ThreadEMailQueue_Completed
|
||||
' Und den Durchlauf das erste Mal starten
|
||||
threadEmailQueue.RunWorkerAsync()
|
||||
|
||||
'### Den Timer generieren
|
||||
Dim Timer1_OneMinute As New System.Timers.Timer()
|
||||
'Das Event hinterlegen welches bei "Tick" ausgelöst wird
|
||||
AddHandler Timer1_OneMinute.Elapsed, AddressOf Timer1_Tick
|
||||
' Set the Interval
|
||||
Timer1_OneMinute.Interval = 60000
|
||||
'ClassLogger.Add("Timer - Intervall: " & clsSQLITE.konf_intervall & " Minuten", False)
|
||||
Timer1_OneMinute.Enabled = True
|
||||
|
||||
_Logger.Debug("Timer1_OneMinute started...")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If Not IsNothing(_MyLogger.LogFile) And File.Exists(_MyLogger.LogFile) Then
|
||||
_Logger.Error(ex)
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub Timer1_Tick()
|
||||
If Not threadEmailQueue.IsBusy Then
|
||||
threadEmailQueue.RunWorkerAsync()
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnStop()
|
||||
Try
|
||||
' Hier Code zum Ausführen erforderlicher Löschvorgänge zum Beenden des Dienstes einfügen.
|
||||
_Logger.Warn("Service has been stopped!")
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Sub RunThread_EmailQueue(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
|
||||
Try
|
||||
_firebird = New Firebird(_MyLogger, My.Settings.FB_ConnString, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
|
||||
If _firebird._DBInitialized = False Then
|
||||
_Logger.Warn("Firebird-DB could not be intitialized!")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim oSQL = "SELECT * FROM TBEDM_EMAIL_ACCOUNT WHERE GUID IN (SELECT DISTINCT EMAIL_ACCOUNT_ID FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO is not null)"
|
||||
Dim oDT_EMAIL_ACCOUNT As DataTable = _firebird.GetDatatable(oSQL)
|
||||
If IsNothing(oDT_EMAIL_ACCOUNT) Then
|
||||
_Logger.Warn("DT_EMAIL_ACCOUNT is nothing!")
|
||||
Exit Sub
|
||||
End If
|
||||
oSQL = "SELECT * FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO is not null"
|
||||
Dim oDT_EMAIL_QUEUE As DataTable = _firebird.GetDatatable(oSQL)
|
||||
If Not IsNothing(oDT_EMAIL_QUEUE) And oDT_EMAIL_ACCOUNT.Rows.Count >= 1 Then
|
||||
Dim oEmailTo, oSubject, oBody As String
|
||||
Dim oEMAILACCOUNT_ID, oGUID, oJOB_ID As Integer
|
||||
For Each oEmail_Row As DataRow In oDT_EMAIL_QUEUE.Rows
|
||||
oEMAILACCOUNT_ID = oEmail_Row.Item("GUID")
|
||||
Dim oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType As String
|
||||
|
||||
For Each oAccountRow As DataRow In oDT_EMAIL_ACCOUNT.Rows
|
||||
If oAccountRow.Item("GUID") = oEMAILACCOUNT_ID Then
|
||||
oMailFrom = oAccountRow.Item("EMAIL_FROM")
|
||||
oMailSMTP = oAccountRow.Item("SERVER_OUT")
|
||||
oMailport = oAccountRow.Item("PORT")
|
||||
oMailUser = oAccountRow.Item("EMAIL_USER")
|
||||
oAuthType = oAccountRow.Item("AUTH_TYPE")
|
||||
oMailPW = oAccountRow.Item("EMAIL_PW")
|
||||
|
||||
Dim owrapper As New clsEncryption("!35452didalog=")
|
||||
|
||||
Dim oPWPlain = owrapper.DecryptData(oMailPW)
|
||||
If Not IsNothing(oPWPlain) Then
|
||||
oMailPW = oPWPlain
|
||||
Else
|
||||
_Logger.Warn("PWPlain is Nothing - Could not decrypt password..")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If IsNothing(oMailFrom) Or IsNothing(oMailPW) Then
|
||||
_Logger.Warn("ACCOUNT-Infos are nothing!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
oGUID = oEmail_Row.Item("GUID")
|
||||
oEmailTo = oEmail_Row.Item("EMAIL_TO")
|
||||
oSubject = oEmail_Row.Item("EMAIL_SUBJ")
|
||||
oBody = oEmail_Row.Item("EMAIL_BODY")
|
||||
oJOB_ID = oEmail_Row.Item("JOB_ID")
|
||||
Dim link As String = "pmo://" & oJOB_ID & "-" & oEmail_Row.Item("REFERENCE1")
|
||||
If oBody.Contains("[%PMOLINK_GER]") Then
|
||||
oBody = oBody.Replace("[%PMOLINK_GER]", "<a href=""" & link & """>hier</a>")
|
||||
End If
|
||||
If oBody.Contains("[%PMOLINK_EN]") Or oBody.Contains("[%PMOLINK_US]") Then
|
||||
oBody = oBody.Replace("[%PMOLINK_EN]", "<a href=""" & link & """>here</a>")
|
||||
oBody = oBody.Replace("[%PMOLINK_US]", "<a href=""" & link & """>here</a>")
|
||||
End If
|
||||
|
||||
If _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType) = True Then
|
||||
Dim upd = "UPDATE TBPMO_WORKFLOW_REMINDER SET EMAIL_SENT = CURRENT_TIMESTAMP WHERE GUID = " & oGUID
|
||||
_firebird.ExecuteNonQuery(upd)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
_Logger.Warn("Check the Email_Config Tables in EDM_MASTER. At least on table returns nothing or is empty.")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
#Region "*** BackgroundWorker Stop/Completed ***"
|
||||
Private Sub ThreadEMailQueue_Completed(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) 'Handles threadDateiimport.RunWorkerCompleted
|
||||
' This event fires when the DoWork event completes
|
||||
Try
|
||||
Dim result As String = ""
|
||||
If e.Cancelled Then
|
||||
_Logger.Warn("ThreadEMailQueue has been cancelled manually...")
|
||||
|
||||
ElseIf e.Error IsNot Nothing Then
|
||||
_Logger.Warn("Unexpected error in running thread: " & e.Error.Message)
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
48
DD_CommunicationService/ProjectInstaller.Designer.vb
generated
Normal file
48
DD_CommunicationService/ProjectInstaller.Designer.vb
generated
Normal file
@ -0,0 +1,48 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
'Installer überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller()
|
||||
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller()
|
||||
'
|
||||
'ServiceProcessInstaller1
|
||||
'
|
||||
Me.ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||
Me.ServiceProcessInstaller1.Password = Nothing
|
||||
Me.ServiceProcessInstaller1.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.Description = "Communication Service for sending and receiving notifications and messages"
|
||||
Me.ServiceInstaller1.DisplayName = "DDEDMI_ComService"
|
||||
Me.ServiceInstaller1.ServiceName = "DDEDMI_ComService"
|
||||
Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ServiceProcessInstaller1 As ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller1 As ServiceProcess.ServiceInstaller
|
||||
End Class
|
||||
129
DD_CommunicationService/ProjectInstaller.resx
Normal file
129
DD_CommunicationService/ProjectInstaller.resx
Normal file
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ServiceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
16
DD_CommunicationService/ProjectInstaller.vb
Normal file
16
DD_CommunicationService/ProjectInstaller.vb
Normal file
@ -0,0 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
Public Class ProjectInstaller
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
'Initialisierungscode nach dem Aufruf von InitializeComponent hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
72
DD_CommunicationService/clsEncryption.vb
Normal file
72
DD_CommunicationService/clsEncryption.vb
Normal file
@ -0,0 +1,72 @@
|
||||
Imports System.Security.Cryptography
|
||||
Public Class clsEncryption
|
||||
Private TripleDes As New TripleDESCryptoServiceProvider
|
||||
Sub New(ByVal key As String)
|
||||
' Initialize the crypto provider.
|
||||
TripleDes.Key = TruncateHash(key, TripleDes.KeySize \ 8)
|
||||
TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8)
|
||||
End Sub
|
||||
|
||||
Private Function TruncateHash(
|
||||
ByVal key As String,
|
||||
ByVal length As Integer) As Byte()
|
||||
|
||||
Dim sha1 As New SHA1CryptoServiceProvider
|
||||
|
||||
' Hash the key.
|
||||
Dim keyBytes() As Byte =
|
||||
System.Text.Encoding.Unicode.GetBytes(key)
|
||||
Dim hash() As Byte = sha1.ComputeHash(keyBytes)
|
||||
|
||||
' Truncate or pad the hash.
|
||||
ReDim Preserve hash(length - 1)
|
||||
Return hash
|
||||
End Function
|
||||
Public Function EncryptData(
|
||||
ByVal plaintext As String) As String
|
||||
|
||||
' Convert the plaintext string to a byte array.
|
||||
Dim plaintextBytes() As Byte =
|
||||
System.Text.Encoding.Unicode.GetBytes("!Didalog35452Heuchelheim=" & plaintext)
|
||||
|
||||
' Create the stream.
|
||||
Dim ms As New System.IO.MemoryStream
|
||||
' Create the encoder to write to the stream.
|
||||
Dim encStream As New CryptoStream(ms,
|
||||
TripleDes.CreateEncryptor(),
|
||||
System.Security.Cryptography.CryptoStreamMode.Write)
|
||||
|
||||
' Use the crypto stream to write the byte array to the stream.
|
||||
encStream.Write(plaintextBytes, 0, plaintextBytes.Length)
|
||||
encStream.FlushFinalBlock()
|
||||
|
||||
' Convert the encrypted stream to a printable string.
|
||||
Return Convert.ToBase64String(ms.ToArray)
|
||||
End Function
|
||||
'Entschlüsselt die Zeichenfolge
|
||||
Public Function DecryptData(
|
||||
ByVal encryptedtext As String) As String
|
||||
Try
|
||||
' Convert the encrypted text string to a byte array.
|
||||
Dim encryptedBytes() As Byte = Convert.FromBase64String(encryptedtext)
|
||||
|
||||
' Create the stream.
|
||||
Dim ms As New System.IO.MemoryStream
|
||||
' Create the decoder to write to the stream.
|
||||
Dim decStream As New CryptoStream(ms,
|
||||
TripleDes.CreateDecryptor(),
|
||||
System.Security.Cryptography.CryptoStreamMode.Write)
|
||||
|
||||
' Use the crypto stream to write the byte array to the stream.
|
||||
decStream.Write(encryptedBytes, 0, encryptedBytes.Length)
|
||||
decStream.FlushFinalBlock()
|
||||
Dim result = System.Text.Encoding.Unicode.GetString(ms.ToArray)
|
||||
result = result.Replace("!Didalog35452Heuchelheim=", "")
|
||||
' Convert the plaintext stream to a string.
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
End Class
|
||||
6
GUI_EDMI/App.config
Normal file
6
GUI_EDMI/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
109
GUI_EDMI/Form1.Designer.vb
generated
Normal file
109
GUI_EDMI/Form1.Designer.vb
generated
Normal file
@ -0,0 +1,109 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class Form1
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroupAdministration = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 428)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(800, 22)
|
||||
Me.StatusStrip1.TabIndex = 0
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 1
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2})
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(800, 141)
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupAdministration})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "Main"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
'RibbonPageGroupAdministration
|
||||
'
|
||||
Me.RibbonPageGroupAdministration.Name = "RibbonPageGroupAdministration"
|
||||
Me.RibbonPageGroupAdministration.Text = "Adminsitration"
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2, Me.RibbonPageGroup3})
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "Administration"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
|
||||
'
|
||||
'RibbonPageGroup3
|
||||
'
|
||||
Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
|
||||
Me.RibbonPageGroup3.Text = "Messaging"
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.RibbonControl1)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "Form1"
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonPageGroupAdministration As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
End Class
|
||||
123
GUI_EDMI/Form1.resx
Normal file
123
GUI_EDMI/Form1.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
3
GUI_EDMI/Form1.vb
Normal file
3
GUI_EDMI/Form1.vb
Normal file
@ -0,0 +1,3 @@
|
||||
Public Class Form1
|
||||
|
||||
End Class
|
||||
127
GUI_EDMI/GUI_EDMI.vbproj
Normal file
127
GUI_EDMI/GUI_EDMI.vbproj
Normal file
@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>GUI_EDMI.My.MyApplication</StartupObject>
|
||||
<RootNamespace>GUI_EDMI</RootNamespace>
|
||||
<AssemblyName>GUI_EDMI</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>GUI_EDMI.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>GUI_EDMI.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Utils.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.vb">
|
||||
<DependentUpon>Form1.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
38
GUI_EDMI/My Project/Application.Designer.vb
generated
Normal file
38
GUI_EDMI/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.GUI_EDMI.Form1
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
11
GUI_EDMI/My Project/Application.myapp
Normal file
11
GUI_EDMI/My Project/Application.myapp
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>Form1</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>0</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
GUI_EDMI/My Project/AssemblyInfo.vb
Normal file
35
GUI_EDMI/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die einer Assembly zugeordnet sind.
|
||||
|
||||
' Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("GUI_EDMI")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("GUI_EDMI")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
<Assembly: Guid("3f1792bb-0ef0-4265-8f4d-6b79cf88cdb3")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
GUI_EDMI/My Project/Resources.Designer.vb
generated
Normal file
62
GUI_EDMI/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("GUI_EDMI.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
GUI_EDMI/My Project/Resources.resx
Normal file
117
GUI_EDMI/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
GUI_EDMI/My Project/Settings.Designer.vb
generated
Normal file
73
GUI_EDMI/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.GUI_EDMI.My.MySettings
|
||||
Get
|
||||
Return Global.GUI_EDMI.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
GUI_EDMI/My Project/Settings.settings
Normal file
7
GUI_EDMI/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
1
GUI_EDMI/My Project/licenses.licx
Normal file
1
GUI_EDMI/My Project/licenses.licx
Normal file
@ -0,0 +1 @@
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
219
Message/Email.vb
219
Message/Email.vb
@ -2,104 +2,147 @@
|
||||
Imports Independentsoft.Email
|
||||
Imports Independentsoft.Email.Smtp
|
||||
Imports Independentsoft.Email.Mime
|
||||
|
||||
Imports DigitalData.Modules.Logging
|
||||
Public Class Email
|
||||
Private Shared Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger
|
||||
Public Function NewSendMail(ByVal mailSubject As String, ByVal mailBody As String, mailto As String,
|
||||
mailfrom As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String,
|
||||
AUTH_TYPE As String, Optional attment As String = "")
|
||||
Dim empfaenger As String()
|
||||
If mailto.Contains(";") Then
|
||||
empfaenger = mailto.Split(";")
|
||||
Else
|
||||
ReDim Preserve empfaenger(0)
|
||||
empfaenger(0) = mailto
|
||||
End If
|
||||
Dim _error As Boolean = False
|
||||
'Für jeden Empfänger eine Neue Mail erzeugen
|
||||
For Each _mailempfaenger As String In empfaenger
|
||||
Try
|
||||
Dim message As New Message()
|
||||
message.From = New Mailbox(mailfrom, mailfrom)
|
||||
message.[To].Add(New Mailbox(_mailempfaenger))
|
||||
message.Subject = mailSubject
|
||||
Dim textBodyPart As New BodyPart()
|
||||
textBodyPart.ContentType = New ContentType("text", "html", "utf-8")
|
||||
textBodyPart.ContentTransferEncoding = ContentTransferEncoding.QuotedPrintable
|
||||
textBodyPart.Body = mailBody
|
||||
message.BodyParts.Add(textBodyPart)
|
||||
If attment <> String.Empty Then
|
||||
If System.IO.File.Exists(attment) Then
|
||||
Dim attachment1 As New Attachment(attment)
|
||||
If attment.ToLower.EndsWith("pdf") Then
|
||||
attachment1.ContentType = New ContentType("application", "pdf")
|
||||
ElseIf attment.ToLower.EndsWith("jpg") Then
|
||||
attachment1.ContentType = New ContentType("application", "jpg")
|
||||
ElseIf attment.ToLower.EndsWith("docx") Then
|
||||
attachment1.ContentType = New ContentType("application", "MS-word")
|
||||
Private _logger As DigitalData.Modules.Logging.Logger
|
||||
Private _logConfig As LogConfig
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_logger = LogConfig.GetLogger()
|
||||
_logConfig = LogConfig
|
||||
End Sub
|
||||
Public Function NewEmail(mailto As String, mailSubject As String, mailBody As String,
|
||||
mailfrom As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String,
|
||||
AUTH_TYPE As String, Optional attment As String = "")
|
||||
Try
|
||||
_logger.Debug($"in NewEmail..")
|
||||
Dim oEmpfaenger As String()
|
||||
If mailto.Contains(";") Then
|
||||
oEmpfaenger = mailto.Split(";")
|
||||
Else
|
||||
ReDim Preserve oEmpfaenger(0)
|
||||
oEmpfaenger(0) = mailto
|
||||
End If
|
||||
Dim oError As Boolean = False
|
||||
'Für jeden Empfänger eine Neue Mail erzeugen
|
||||
For Each oMailempfaenger As String In oEmpfaenger
|
||||
_logger.Debug($"Working on email for {oMailempfaenger}..")
|
||||
Try
|
||||
Dim oMessage As New Message()
|
||||
oMessage.From = New Mailbox(mailfrom, mailfrom)
|
||||
oMessage.[To].Add(New Mailbox(oMailempfaenger))
|
||||
oMessage.Subject = mailSubject
|
||||
_logger.Debug($"Message created..")
|
||||
Dim oTextBodyPart As New BodyPart()
|
||||
oTextBodyPart.ContentType = New ContentType("text", "html", "utf-8")
|
||||
oTextBodyPart.ContentTransferEncoding = ContentTransferEncoding.QuotedPrintable
|
||||
oTextBodyPart.Body = mailBody
|
||||
oMessage.BodyParts.Add(oTextBodyPart)
|
||||
If attment <> String.Empty Then
|
||||
If System.IO.File.Exists(attment) Then
|
||||
Dim attachment1 As New Attachment(attment)
|
||||
If attment.ToLower.EndsWith("pdf") Then
|
||||
attachment1.ContentType = New ContentType("application", "pdf")
|
||||
ElseIf attment.ToLower.EndsWith("jpg") Then
|
||||
attachment1.ContentType = New ContentType("application", "jpg")
|
||||
ElseIf attment.ToLower.EndsWith("docx") Then
|
||||
attachment1.ContentType = New ContentType("application", "MS-word")
|
||||
End If
|
||||
oMessage.BodyParts.Add(attachment1)
|
||||
Else
|
||||
_logger.Warn($"Attachment {attment.ToString} is not existing!")
|
||||
End If
|
||||
message.BodyParts.Add(attachment1)
|
||||
End If
|
||||
End If
|
||||
Dim client As SmtpClient
|
||||
Try
|
||||
client = New SmtpClient(mailsmtp, mailport)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsEmail.SendMail(Create Client): " & ex.Message)
|
||||
_error = True
|
||||
Continue For
|
||||
End Try
|
||||
Try
|
||||
client.Connect()
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsEmail.SendMail(Client.Connect): " & ex.Message)
|
||||
_error = True
|
||||
Continue For
|
||||
End Try
|
||||
Logger.Info("Connected to Client!")
|
||||
If AUTH_TYPE = "SSL" Then
|
||||
client.EnableSsl = True
|
||||
client.ValidateRemoteCertificate = True
|
||||
Logger.Info("Authentification via SSL.")
|
||||
ElseIf AUTH_TYPE = "TLS" Then
|
||||
Dim oEmailCient As SmtpClient
|
||||
Try
|
||||
client.EnableSsl = False
|
||||
Logger.Info("Authentification via TLS. SSL enabled")
|
||||
'client.StartTls()
|
||||
oEmailCient = New SmtpClient(mailsmtp, mailport)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsEmail.SendMail(Client.StartTls): " & ex.Message)
|
||||
_error = True
|
||||
_logger.Warn("clsEmail.Create Client: " & ex.Message)
|
||||
oError = True
|
||||
Continue For
|
||||
End Try
|
||||
Try
|
||||
oEmailCient.Connect()
|
||||
Catch ex As Exception
|
||||
_logger.Warn("clsEmail.Client.Connect: " & ex.Message)
|
||||
oError = True
|
||||
' Continue For
|
||||
End Try
|
||||
_logger.Info("Connected to Client!")
|
||||
If AUTH_TYPE = "SSL" Then
|
||||
oEmailCient.EnableSsl = True
|
||||
'client.ValidateRemoteCertificate = True
|
||||
_logger.Info("Authentification via SSL.")
|
||||
ElseIf AUTH_TYPE = "TLS" Then
|
||||
' client.ValidateRemoteCertificate = False
|
||||
oEmailCient.StartTls()
|
||||
oEmailCient.EnableSsl = False
|
||||
_logger.Info("Authentification via TLS. SSL disabled")
|
||||
Else
|
||||
oEmailCient.EnableSsl = False
|
||||
_logger.Info("Authentification NONE. SSL disabled")
|
||||
End If
|
||||
Try
|
||||
|
||||
oEmailCient.Connect()
|
||||
Catch ex As Exception
|
||||
_logger.Warn("clsEmail.Client.Connect: " & ex.Message)
|
||||
oError = True
|
||||
' Continue For
|
||||
End Try
|
||||
Try
|
||||
If mailsmtp.Contains("office365.com") Then
|
||||
oEmailCient.Login(mailUser, mailPW, AuthenticationType.None)
|
||||
Else
|
||||
oEmailCient.Login(mailUser, mailPW)
|
||||
End If
|
||||
|
||||
_logger.Info("Logged in!")
|
||||
Catch ex As Exception
|
||||
Try
|
||||
If mailsmtp.Contains("office365.com") Then
|
||||
oEmailCient.Login(mailUser, mailPW, AuthenticationType.Login)
|
||||
Else
|
||||
oEmailCient.Login(mailUser, mailPW, AuthenticationType.Anonymous)
|
||||
End If
|
||||
|
||||
Catch ex1 As Exception
|
||||
Try
|
||||
oEmailCient.Login(mailUser, mailPW, AuthenticationType.Login)
|
||||
Catch ex2 As Exception
|
||||
_logger.Warn("clsEmail.Client.Login: " & ex.Message)
|
||||
oError = True
|
||||
oEmailCient.Disconnect()
|
||||
Continue For
|
||||
End Try
|
||||
End Try
|
||||
End Try
|
||||
Try
|
||||
oEmailCient.Send(oMessage)
|
||||
_logger.Info("Message to " & oMailempfaenger & " has been send.")
|
||||
oError = False
|
||||
Catch ex As Exception
|
||||
_logger.Warn("clsEmail.Client.Send: " & ex.Message)
|
||||
oError = True
|
||||
oEmailCient.Disconnect()
|
||||
Continue For
|
||||
End Try
|
||||
oEmailCient.Disconnect()
|
||||
|
||||
End If
|
||||
Try
|
||||
client.Login(mailUser, mailPW)
|
||||
Logger.Info("Logged in!")
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsEmail.SendMail(Client.Login): " & ex.Message)
|
||||
_error = True
|
||||
client.Disconnect()
|
||||
Continue For
|
||||
_logger.Error(ex)
|
||||
oError = True
|
||||
End Try
|
||||
Try
|
||||
client.Send(message)
|
||||
Logger.Info("Message to " & _mailempfaenger & " has been send.")
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsEmail.SendMail(Client.Send): " & ex.Message)
|
||||
_error = True
|
||||
client.Disconnect()
|
||||
Continue For
|
||||
End Try
|
||||
client.Disconnect()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_error = True
|
||||
End Try
|
||||
Next
|
||||
If _error = True Then
|
||||
Next
|
||||
|
||||
If oError = True Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@ -43,12 +43,15 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Email">
|
||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Email .NET\Bin\Independentsoft.Email.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.5.10\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
|
||||
@ -59,7 +59,8 @@
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.5.10\lib\net45\NLog.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
|
||||
@ -53,6 +53,7 @@ Public Class Firebird
|
||||
Private _connectionUsername As String
|
||||
Private _connectionPassword As String
|
||||
Private _connectionString As String
|
||||
Public _DBInitialized As Boolean = False
|
||||
|
||||
Public Enum TransactionMode
|
||||
NoTransaction
|
||||
@ -104,6 +105,8 @@ Public Class Firebird
|
||||
|
||||
If oConnection Is Nothing Then
|
||||
Throw New Exceptions.DatabaseException()
|
||||
Else
|
||||
_DBInitialized = True
|
||||
End If
|
||||
|
||||
_logger.Debug("Connection sucessfully established!")
|
||||
|
||||
@ -972,7 +972,120 @@ Public Class Windream2
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function Export_WMFile(WMPath As String, Exportpath As String)
|
||||
Try
|
||||
If Not Exportpath.EndsWith("\") Then
|
||||
Exportpath &= "\"
|
||||
End If
|
||||
|
||||
Dim oWMObject As WMObject = GetFileByPath(WMPath)
|
||||
|
||||
_logger.Debug("Working on file: " & oWMObject.aName)
|
||||
|
||||
|
||||
Dim ExportFileIO = New WMOTOOLLib.WMFileIO ' CreateObject("WMOTOOLLib.WMFileIO") ' New WMOTOOLLib.WMFileIO
|
||||
_logger.Debug("ExportFileIO created...")
|
||||
' Stream Interface bereitstellen
|
||||
oWMObject.LockFor(WMObjectEditModeFileSystem)
|
||||
Try
|
||||
If Not oWMObject.aLocked Then
|
||||
oWMObject.lock()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Dim oWMStream = oWMObject.OpenStream("BinaryObject", WMObjectEditModeTypedData)
|
||||
'### VERSIONIERUNG ###
|
||||
Dim version As Integer = 2
|
||||
'Dim Stammname As String = System.IO.Path.GetFileNameWithoutExtension(Quelle)
|
||||
Dim Filename = oWMObject.aName.Substring(0, oWMObject.aName.LastIndexOf("."))
|
||||
Dim Extension = oWMObject.aName.Substring(oWMObject.aName.LastIndexOf("."))
|
||||
Dim tempFilename As String = Exportpath & Filename & Extension
|
||||
'Überprüfen ob File existiert
|
||||
Do While IO.File.Exists(tempFilename) = True
|
||||
tempFilename = Exportpath & Filename & "_" & version & Extension
|
||||
version = version + 1
|
||||
Loop
|
||||
_logger.Debug("Exportfilename is: " & tempFilename)
|
||||
' den Dateiinhalt der neuen Datei zuweisen
|
||||
ExportFileIO.aWMStream = oWMStream
|
||||
ExportFileIO.bstrOriginalFileName = tempFilename
|
||||
'Das eigentliche kopieren
|
||||
ExportFileIO.ExportOriginal(True)
|
||||
' close the windream file stream
|
||||
oWMStream.Close()
|
||||
oWMObject.Save()
|
||||
oWMObject.unlock()
|
||||
_logger.Info($"WMFile has been exported to {tempFilename} ")
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function Export_WMFile_DocID(WMPath As String, Exportpath As String, DocId As Integer)
|
||||
Try
|
||||
If Not Exportpath.EndsWith("\") Then
|
||||
Exportpath &= "\"
|
||||
End If
|
||||
|
||||
Dim oWMObject As WMObject = GetFileByPath(WMPath)
|
||||
Try
|
||||
_logger.Info("Working on file: " & oWMObject.aName)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
_logger.Warn("No object created: " & WMPath)
|
||||
Return False
|
||||
End Try
|
||||
Dim ExportFileIO = New WMOTOOLLib.WMFileIO ' CreateObject("WMOTOOLLib.WMFileIO") ' New WMOTOOLLib.WMFileIO
|
||||
_logger.Debug("ExportFileIO created...")
|
||||
' Stream Interface bereitstellen
|
||||
'Try
|
||||
' oWMObject.LockFor(WMObjectEditModeMoveReadOnly) 'WMObjectEditModeFileSystem)
|
||||
'Catch ex As Exception
|
||||
' If Not oWMObject.aLocked Then
|
||||
' Try
|
||||
' oWMObject.lock()
|
||||
' Catch ex1 As Exception
|
||||
' _logger.Warn($"{ex1.Message} Could not lock document - DocID: {DocId}")
|
||||
' Return False
|
||||
' End Try
|
||||
|
||||
' End If
|
||||
' '_logger.(ex)
|
||||
|
||||
'End Try
|
||||
|
||||
Dim oWMStream = oWMObject.OpenStream("BinaryObject", 1)
|
||||
'### VERSIONIERUNG ###
|
||||
Dim version As Integer = 2
|
||||
Dim Extension = oWMObject.aName.Substring(oWMObject.aName.LastIndexOf("."))
|
||||
Dim tempFilename As String = Exportpath & DocId & Extension
|
||||
'Überprüfen ob File existiert
|
||||
Do While IO.File.Exists(tempFilename) = True
|
||||
tempFilename = Exportpath & DocId & "_" & version & Extension
|
||||
version = version + 1
|
||||
Loop
|
||||
_logger.Debug("Exportfilename is: " & tempFilename)
|
||||
' den Dateiinhalt der neuen Datei zuweisen
|
||||
ExportFileIO.aWMStream = oWMStream
|
||||
ExportFileIO.bstrOriginalFileName = tempFilename
|
||||
'Das eigentliche kopieren
|
||||
ExportFileIO.ExportOriginal(True)
|
||||
' close the windream file stream
|
||||
oWMStream.Close()
|
||||
_logger.Info($"WMFile DocID {DocId} has been exported to {tempFilename} ")
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
_logger.Info("Unexpected error in Export_WMFile: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function TestFolderExists(Path As String) As Boolean
|
||||
Return TestObjectExists(GetNormalizedPath(Path), WMEntityFolder)
|
||||
End Function
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
Namespace My
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
|
||||
Namespace My
|
||||
' Für MyApplication sind folgende Ereignisse verfügbar:
|
||||
' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
|
||||
' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
|
||||
@ -6,5 +9,8 @@
|
||||
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
|
||||
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
|
||||
Partial Friend Class MyApplication
|
||||
Private Sub MyApplication_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user