WIP: cleanup, work on doc result form

This commit is contained in:
Jonathan Jenne
2019-10-08 16:05:03 +02:00
parent 9a1b716e92
commit 7ddf409933
237 changed files with 857 additions and 547 deletions

409
Modules.Messaging/Email.vb Normal file
View File

@@ -0,0 +1,409 @@
Imports Independentsoft.Email
Imports Independentsoft.Email.Pop3
Imports Independentsoft.Email.Mime
Imports Independentsoft.Email.Imap
Imports System.Net.Mail
Imports System.Net
Imports System.Reflection
Imports System.IO
Public Class Email
Private ReadOnly _logger As Logging.Logger
Private ReadOnly _logConfig As Logging.LogConfig
Public Sub New(LogConfig As Logging.LogConfig)
_logger = LogConfig.GetLogger()
_logConfig = LogConfig
End Sub
''' <summary>
''' Tests connection to a given IMAP Server by connecting and doing a simple message query.
''' </summary>
''' <param name="Server">IP-Address or Domainname of Server</param>
''' <param name="Port">IMAP-Port</param>
''' <param name="Username">IMAP-Username</param>
''' <param name="Password">IMAP-Password</param>
''' <param name="Folder">The folder to fetch messages from. Defaults to `Inbox`</param>
''' <returns>True if connection and query were successful. False otherwise.</returns>
Public Function TestIMAPLogin(Server As String, Port As Integer, Username As String, Password As String, Optional Folder As String = "Inbox") As Boolean
_logger.Debug("Testing Login to Server {0}:{1} with user {2}", Server, Port, Username)
Try
_logger.Debug("Connecting...")
Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True)
If Not oClient.Authed Then
_logger.Warn("Connected to server but authentication failed.")
Return False
End If
_logger.Debug("Connection successful")
_logger.Debug("Fetching MessageIds..")
Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder)
_logger.Debug("Found {0} messages", oMessageIds.Count)
_logger.Debug("Fetching messages...")
Dim oMessages As IEnumerable(Of MailMessage) = oClient.GetMessages(oMessageIds, False, Folder)
_logger.Debug("Messages fetched")
oClient.Dispose()
Return True
End Using
Catch ex As Exception
_logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Connects to an IMAP Server with the given credentials and
''' fetches emails from the given folder.
''' Results can be filtered with `SearchCondition`
''' </summary>
''' <param name="Server">IP-Address or Domainname of Server</param>
''' <param name="Port">IMAP-Port</param>
''' <param name="Username">IMAP-Username</param>
''' <param name="Password">IMAP-Password</param>
''' <param name="Folder">The folder to fetch messages from</param>
''' <param name="SearchCondition">Filter the search command. Defaults to `All`</param>
''' <returns>A list of Independentsoft.Email.Mime.Message objects</returns>
Public Function FetchIMAPMessages(Server As String, Port As Integer, Username As String, Password As String, Folder As String) As List(Of Message) ', Optional SearchCondition As S22.Imap.SearchCondition = S22.Imap.SearchCondition.All
Dim oMessages As New List(Of Message)
_logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username)
Try
_logger.Debug("Connecting...")
Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True)
If Not oClient.Authed Then
_logger.Warn("Connected to server but authentication failed.")
Return Nothing
End If
_logger.Debug("Connection successful")
_logger.Debug("Fetching MessageIds..")
Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder)
_logger.Debug("Found {0} messages", oMessageIds.Count)
_logger.Debug("Fetching messages...")
' Since this needs to return a list of IndependentSoft Message objects,
' we 'convert' the .NET MailMessage objects that are fetched from the server
' by writing them temporarily to disk as an eml file and then reading them back into a Message object.
' This approach uses an unintended use of internal .NET APIs and may break in the future.
For Each oMessageId As UInteger In oMessageIds
Dim oMessage = oClient.GetMessage(oMessageId, False, Folder)
Dim oTempPath = Path.GetTempFileName()
Dim oResult = WriteMessageToFile(oMessage, oTempPath)
Dim oMsg As New Message(oTempPath)
oMessages.Add(oMsg)
Try
File.Delete(oTempPath)
Catch ex As Exception
_logger.Error(ex)
_logger.Warn("Temp file could not be deleted")
End Try
Next
_logger.Debug("{0} Messages fetched", oMessages.Count)
End Using
Return oMessages
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
''' <summary>
''' Uses a private API from MailWriter to write a MailMessage to disk.
''' May break in future versions of .NET
''' </summary>
Public Function WriteMessageToFile(Message As MailMessage, Filename As String) As Boolean
Dim oAssembly As Assembly = GetType(Mail.SmtpClient).Assembly
Dim oMailWriterType As Type = oAssembly.[GetType]("System.Net.Mail.MailWriter")
Try
Using oStream As New FileStream(Filename, FileMode.Create)
Dim oMailWriterConstructor As ConstructorInfo = oMailWriterType.GetConstructor(
BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, New Type() {GetType(Stream)}, Nothing
)
Dim oMailWriter As Object = oMailWriterConstructor.Invoke(New Object() {oStream})
Dim sendMethod As MethodInfo = GetType(MailMessage).GetMethod("Send", BindingFlags.Instance Or BindingFlags.NonPublic)
sendMethod.Invoke(Message, BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, {oMailWriter, True, True}, Nothing)
End Using
Return True
Catch ex As Exception
Return Nothing
End Try
End Function
Public Function IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String)
Try
Dim oMAIL_LIST As New ArrayList()
_logger.Info(String.Format("Working on IMAP_COLLECT..."))
Dim oClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT)
oClient.Connect()
oClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
oClient.SelectFolder("Inbox")
Dim oEnvelopes As Envelope() = oClient.ListMessages()
For i As Integer = 0 To oEnvelopes.Length - 1
If Not IsNothing(oEnvelopes(i).Subject) Then
'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then
_logger.Info($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}")
Dim message As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID)
If Not IsNothing(message) Then
oMAIL_LIST.Add(message)
End If
'End If
End If
Next
oClient.Disconnect()
_logger.Debug("IMAP_COLLECT finished!")
Return oMAIL_LIST
Catch ex As Exception
_logger.Error(ex, "Unexpected Error in IMAP COLLECT:")
Return Nothing
End Try
End Function
Public Function TEST_IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String)
Try
_logger.Info(String.Format("Working on TEST_IMAP_COLLECT....."))
Dim oClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT)
oClient.Connect()
oClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
oClient.SelectFolder(INBOXNAME)
Dim oEnvelopes As Envelope() = oClient.ListMessages()
For i As Integer = 0 To oEnvelopes.Length - 1
If Not IsNothing(oEnvelopes(i).Subject) Then
'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then
MsgBox($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}")
Dim message As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID)
End If
Next
oClient.Disconnect()
_logger.Info("TEST_IMAP_COLLECT finished!")
Return True
Catch ex As Exception
_logger.Error(ex, "Unexpected Error in TEST_IMAP_COLLECT:")
Return False
End Try
End Function
Public Function POP3_COLLECT(MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String)
Try
Dim oMAIL_LIST As New ArrayList()
_logger.Debug(String.Format("Working on POP3_COLLECT....."))
Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT)
oClient.ValidateRemoteCertificate = False
oClient.Connect()
_logger.Debug(String.Format("..connected!"))
oClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
Dim oMessageInfo As MessageInfo() = oClient.List()
For i As Integer = 0 To oMessageInfo.Length - 1
Dim message As Message = oClient.GetMessage(oMessageInfo(i).Index)
oMAIL_LIST.Add(message)
Try
_logger.Debug(String.Format("Message [{0}] added", message.Subject))
Catch ex As Exception
End Try
Next
oClient.Disconnect()
_logger.Debug(String.Format(" POP3_COLLECT finished!"))
Return oMAIL_LIST
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
Public Function TEST_POP3_COLLECT(MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) As Boolean
Try
_logger.Debug(String.Format("Working on TEST_POP3_COLLECT..."))
Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT)
oClient.ValidateRemoteCertificate = False
oClient.Connect()
_logger.Debug(String.Format("..connected!"))
oClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
Dim messageInfo As MessageInfo() = oClient.List()
For i As Integer = 0 To messageInfo.Length - 1
Dim message As Message = oClient.GetMessage(messageInfo(i).Index)
MsgBox(String.Format("Message [{0}] added", message.Subject))
Next
oClient.Disconnect()
MsgBox(String.Format("TEST_POP3_COLLECT finished!"))
Return True
Catch ex As Exception
_logger.Error(ex)
Return False
End Try
End Function
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, SENDER_INSTANCE As String, Optional attachmentString As String = "", Optional Test As Boolean = False)
Dim myClient As Net.Mail.SmtpClient
Dim myMesssage As New MailMessage
Try
Dim oError As Boolean = False
Dim oReceipiants As String()
If mailto.Contains(";") Then
oReceipiants = mailto.Split(";")
Else
ReDim Preserve oReceipiants(0)
oReceipiants(0) = mailto
End If
For Each oMailReceipiant As String In oReceipiants
_logger.Debug($"oMailReceipiant [{oMailReceipiant}]")
_logger.Debug($"mailsmtp [{mailsmtp}]")
Try
myClient = New Net.Mail.SmtpClient(mailsmtp, mailport)
Catch ex As Exception
_logger.Warn($"Could not create SMTP-Client: [{ex.Message}]")
Return False
End Try
myClient.DeliveryMethod = SmtpDeliveryMethod.Network
myClient.Port = mailport
_logger.Debug($"mailport [{mailport}]")
If AUTH_TYPE = "SSL" Then
_logger.Debug("SSL = true")
myClient.EnableSsl = True
Else
_logger.Debug("SSL = false")
myClient.EnableSsl = False
End If
_logger.Debug($"mailUser [{mailUser}]")
myClient.Credentials = New NetworkCredential(mailUser, mailPW)
myClient.UseDefaultCredentials = False
If Test = True Then
myMesssage.Body = $"This is the body (text will be replaced within profile)! <br> mailsmtp: {mailsmtp} <br> mailport: {mailport} <br> mailUser: {mailUser} <br> mailPW: XXXX <br> AUTH_TYPE: {AUTH_TYPE}"
Else
myMesssage.Body = mailBody
End If
_logger.Debug($"mailBody [{mailBody}]")
'mymesssage.IsBodyHtml = True
Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(myMesssage.Body)
htmlView.ContentType = New System.Net.Mime.ContentType("text/html")
myMesssage.AlternateViews.Add(htmlView)
_logger.Debug($"attachmentString [{attachmentString}]")
If attachmentString <> "" Then
_logger.Info($"Attachment Path is: {attachmentString}")
Dim oAttachment As New System.Net.Mail.Attachment(attachmentString)
'If attment.ToLower.EndsWith("pdf") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "pdf")
'ElseIf attment.ToLower.EndsWith("jpg") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "jpg")
'ElseIf attment.ToLower.EndsWith("docx") Then
' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "MS-word")
'End If
myMesssage.Attachments.Add(oAttachment)
Else
_logger.Debug("No Attachment.")
End If
_logger.Debug($"mailfrom [{mailfrom}]")
myMesssage.From = New MailAddress(mailfrom)
_logger.Debug($"mailSubject [{mailSubject}]")
myMesssage.Subject = mailSubject
myMesssage.To.Add(New MailAddress(oMailReceipiant))
_logger.Debug($"Now Sending mail...")
myClient.Send(myMesssage)
_logger.Debug($"Mail has been sent!")
_logger.Info("Message to " & oMailReceipiant & " has been send.")
Next
If oError = False Then
Return True
Else
Return False
End If
Catch ex As Exception
_logger.Error(ex)
Try
_logger.Info("Unexpected error in Sending smtp-Mail: ")
If Not IsNothing(myClient) Then
_logger.Info($"myClient.Host: {myClient.Host.ToString}")
_logger.Info($"myClient.Port: {myClient.Port.ToString}")
_logger.Info($"myClient.EnableSsl: {myClient.EnableSsl.ToString}")
End If
If Not IsNothing(myMesssage) Then
_logger.Info($"myMesssage.Subject: {myMesssage.Subject.ToString}")
_logger.Info($"myMesssage.Body: {myMesssage.Body.ToString}")
_logger.Info($"myMesssage.From: {myMesssage.From.ToString}")
End If
Catch e1x As Exception
End Try
Return False
End Try
End Function
Public Function DELETE_EMAIL(POLLTYPE As String, msgid As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String)
Try
If POLLTYPE = "POP" Then
Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT)
oClient.ValidateRemoteCertificate = False
oClient.Connect()
oClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
Dim oMessageInfo As MessageInfo() = oClient.List()
For i As Integer = 0 To oMessageInfo.Length - 1
Dim message As Message = oClient.GetMessage(oMessageInfo(i).Index)
If message.MessageID = msgid Then
oClient.Delete(oMessageInfo(i).Index)
_logger.Info(String.Format("Message [{0}] was deleted!", message.Subject))
Exit For
End If
Next
oClient.Disconnect()
Return True
ElseIf POLLTYPE = "IMAP" Then
Dim oIMAPClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT)
oIMAPClient.ValidateRemoteCertificate = False
oIMAPClient.Connect()
oIMAPClient.Login(MYMAIL_USER, MYMAIL_USER_PW)
oIMAPClient.SelectFolder("Inbox")
Dim envelopes As Envelope() = oIMAPClient.ListMessages()
For i As Integer = 0 To envelopes.Length - 1
If envelopes(i).MessageID = msgid Then
oIMAPClient.Delete(envelopes(i).UniqueID) 'mark as deleted
End If
Next
oIMAPClient.Expunge() 'delete messages marked as deleted
oIMAPClient.Disconnect()
Return True
End If
Catch ex As Exception
_logger.Error(ex)
'clsLogger.Add("Unexpected Error in DELETE_EMAIL: " & ex.Message)
Return False
End Try
End Function
End Class

View File

@@ -0,0 +1,65 @@
Imports System.Reflection
''' <summary>
''' A Simple EventBus for .NET
''' https://stackoverflow.com/questions/368265/a-simple-event-bus-for-net
''' </summary>
Public Class EventBus
Private Shared _Instance As EventBus
Private _Listeners As List(Of EventListenerWrapper) = New List(Of EventListenerWrapper)()
Public Shared ReadOnly Property Instance As EventBus
Get
If IsNothing(_Instance) Then
_Instance = New EventBus()
End If
Return _Instance
End Get
End Property
''' <summary>
''' Register a form as an event listener.
''' </summary>
''' <param name="listener">The event listener, usually `Me`</param>
Public Sub Register(ByVal listener As Object)
If Not _Listeners.Any(Function(l) l.Listener.Equals(listener)) Then
_Listeners.Add(New EventListenerWrapper(listener))
End If
End Sub
Public Sub Unregister(ByVal listener As Object)
_Listeners.RemoveAll(Function(l) l.Listener = listener)
End Sub
Public Sub PostEvent(ByVal e As Object)
_Listeners.
Where(Function(l) l.EventType = e.[GetType]()).
ToList().
ForEach(Sub(l) l.PostEvent(e))
End Sub
Private Class EventListenerWrapper
Public Property Listener As Object
Public Property EventType As Type
Private _method As MethodBase
Public Sub New(ByVal listener As Object)
Me.Listener = listener
Dim oType As Type = listener.[GetType]()
_method = oType.GetMethod("OnEvent")
If _method Is Nothing Then
Throw New ArgumentException("Class " & oType.Name & " does not containt method OnEvent")
End If
Dim oParameters As ParameterInfo() = _method.GetParameters()
If oParameters.Length <> 1 Then
Throw New ArgumentException("Method OnEvent of class " & oType.Name & " have invalid number of parameters (should be one)")
End If
EventType = oParameters(0).ParameterType
End Sub
Public Sub PostEvent(ByVal e As Object)
_method.Invoke(Listener, {e})
End Sub
End Class
End Class

View File

@@ -0,0 +1,124 @@
<?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>{AF664D85-0A4B-4BAB-A2F8-83110C06553A}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Messaging</RootNamespace>
<AssemblyName>DigitalData.Modules.Messaging</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Messaging.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Messaging.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.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.6.7\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<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="Email.vb" />
<Compile Include="EventBus.vb" />
<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>
<Compile Include="SMS.vb" />
</ItemGroup>
<ItemGroup>
<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="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <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

View 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>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View 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("Messaging")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Messaging")>
<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("60d22737-01f3-4ea2-b6f6-ad312dc07c53")>
' 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")>

View File

@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <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
Imports System
Namespace My.Resources
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</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("DigitalData.Modules.Messaging.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View 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>

View File

@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <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
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.DigitalData.Modules.Messaging.My.MySettings
Get
Return Global.DigitalData.Modules.Messaging.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View 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>

3
Modules.Messaging/SMS.vb Normal file
View File

@@ -0,0 +1,3 @@
Public Class SMS
End Class

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.6.7" targetFramework="net461" />
<package id="S22.Imap" version="3.6.0.0" targetFramework="net461" />
</packages>