Revert "commit"
This commit is contained in:
6
WoelflEmail/App.config
Normal file
6
WoelflEmail/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.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
185
WoelflEmail/Mail.vb
Normal file
185
WoelflEmail/Mail.vb
Normal file
@@ -0,0 +1,185 @@
|
||||
Imports System.Net.Mail
|
||||
Imports System.IO
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Module Mail
|
||||
Dim sPath As String = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
Dim last_sent As String = sPath & "\last_sent.txt" '" & Now.ToString("ddMMyyyyHHmmss") & ".csv"
|
||||
|
||||
Sub Main()
|
||||
If Not IO.File.Exists(last_sent) Then
|
||||
IO.File.Create(last_sent)
|
||||
End If
|
||||
|
||||
System.Console.WriteLine("Starte Wölfl-Mail...")
|
||||
If SendEmail() Then
|
||||
Try
|
||||
Dim outFile As IO.StreamWriter = Nothing
|
||||
outFile = My.Computer.FileSystem.OpenTextFileWriter(last_sent, False)
|
||||
outFile.Write(Now.AddDays(-1).ToShortDateString)
|
||||
outFile.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Function getDateFromFile() As String
|
||||
Try
|
||||
Dim instr = New StreamReader(last_sent)
|
||||
Dim d As Date = CDate(instr.ReadLine).AddDays(1)
|
||||
instr.Close()
|
||||
Return d
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function SendEmail() As Boolean
|
||||
Dim Msg As New MailMessage
|
||||
Dim myCredentials As New System.Net.NetworkCredential
|
||||
myCredentials.UserName = "al@verag.ag"
|
||||
myCredentials.Password = "Luxandreas#2"
|
||||
Msg.IsBodyHtml = False
|
||||
Dim mySmtpsvr As New SmtpClient()
|
||||
mySmtpsvr.Host = "smtp.1und1.de" 'bei web.de
|
||||
mySmtpsvr.Port = 587 '25
|
||||
mySmtpsvr.UseDefaultCredentials = False
|
||||
mySmtpsvr.Credentials = myCredentials
|
||||
System.Console.WriteLine("E-Mail Daten initialisiert...")
|
||||
Try
|
||||
Dim datum As String = Now.AddDays(-1).ToShortDateString
|
||||
Dim von = getDateFromFile()
|
||||
If von = "" Then von = datum
|
||||
Dim bis = datum
|
||||
System.Console.WriteLine("Erstelle CSV...")
|
||||
Dim csv As String = genCSV(von, bis)
|
||||
System.Console.WriteLine("CSV erstellt...")
|
||||
If csv <> "" And Not csv.StartsWith("ERROR: ") Then
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
Msg.From = New MailAddress("al@verag.ag")
|
||||
Msg.To.Add("al@verag.ag")
|
||||
Msg.Subject = "VERAG: Gutschriften/Rechnungen " & von & "-" & bis
|
||||
Msg.Body = "Sehr geehrte Damen und Herren," & vbNewLine & vbNewLine & "anbei erhalten Sie die Gutschriften/Rechnungen im Zeitraum: " & von & "-" & bis & ". " & vbNewLine & vbNewLine & "Mit frendlichen Grüßen " & vbNewLine & "Ihr VERAG MDM-TEAM" & vbNewLine & vbNewLine & vbNewLine & "Automatisch generiertes E-Mail."
|
||||
|
||||
Dim attachment As Attachment = New Attachment(File.OpenRead(csv), "WOELFL_" & von & "-" & bis & ".csv")
|
||||
Msg.Attachments.Add(attachment)
|
||||
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
' MsgBox("E-Mail gesendet.", MsgBoxStyle.Information, Title:="Information")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Return True
|
||||
Else
|
||||
System.Console.WriteLine(csv)
|
||||
Threading.Thread.Sleep(1000)
|
||||
' System.Console.WriteLine("Programm beendet in 5")
|
||||
' Threading.Thread.Sleep(1000)
|
||||
' System.Console.WriteLine("Programm beendet in 4")
|
||||
' Threading.Thread.Sleep(1000)
|
||||
System.Console.WriteLine("Programm beendet in 3")
|
||||
Threading.Thread.Sleep(1000)
|
||||
System.Console.WriteLine("Programm beendet in 2")
|
||||
Threading.Thread.Sleep(1000)
|
||||
System.Console.WriteLine("Programm beendet in 1")
|
||||
Threading.Thread.Sleep(1000)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(Err.Number & ex.Message & ex.StackTrace.ToString) 'Falls ein Fehler auftritt wird eine MsgBox angezeigt
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function genCSV(von, bis) As String
|
||||
Try
|
||||
|
||||
|
||||
Dim sqlstr = " SELECT CASE [BelegartenNr] WHEN 71 THEN 'GS' " &
|
||||
" WHEN 70 THEN 'RG' " &
|
||||
" END AS [BelegArt] " &
|
||||
" ,[RechnungsNr] " &
|
||||
" ,CONVERT(VARCHAR(10), [RechnungsDatum], 104) as [RechnungsDatum] " &
|
||||
" ,[FilialenNr],[AbfertigungsNr],[UnterNr] " &
|
||||
" ,CONVERT(VARCHAR(10), [Abfertigungsdatum], 104) as [Abfertigungsdatum] " &
|
||||
" ,isnull(Adressen.WölflKundenNr,'') as WölflKundenNr " &
|
||||
" ,CASE WHEN [EmpfängerStraße] IS NULL THEN [EmpfängerName 1] " &
|
||||
" ELSE [EmpfängerName 1] + ' ' +[EmpfängerName 2] " &
|
||||
" END AS [Empfänger] " &
|
||||
" ,CASE WHEN [EmpfängerStraße] IS NULL THEN [EmpfängerName 2] " &
|
||||
" ELSE [EmpfängerStraße] " &
|
||||
" END AS [EmpfängerAdresse 1] " &
|
||||
" ,[EmpfängerOrt] as [EmpfängerAdresse 2] " &
|
||||
" ,[Packstücke und Warenbezeichnung] as Beschreibung,[LeistungsNr],[LeistungsBez],[Steuersatz %] ,[SteuerpflichtigerGesamtbetrag] as [SteuerpflichtigerGesamtbetrag Netto] " &
|
||||
" ,[SteuerfreierGesamtbetrag],[SteuerpflichtigerBetrag] as [SteuerpflichtigerBetrag Netto] ,[SteuerfreierBetrag] " &
|
||||
" FROM [VERAG].[dbo].[Rechnungsausgang] inner join [VERAG].[dbo].[RechnungsausgangPositionen] on Rechnungsausgang.[RK_ID]=RechnungsausgangPositionen.[RK_ID] " &
|
||||
" inner join [VERAG].[dbo].Adressen on Rechnungsausgang.EmpfängerKundenNr=Adressen.AdressenNr " &
|
||||
" WHERE RechnungsKundenNr = 150000 " &
|
||||
" and RechnungsDatum between '" & von & "' and '" & bis & "'"
|
||||
' MsgBox(sqlstr)
|
||||
' Dim SQL As New System.Data.Sql
|
||||
Dim dt As DataTable = loadDgvBySql(sqlstr)
|
||||
|
||||
|
||||
Dim fn As String = sPath & "WOELFL.csv" '" & Now.ToString("ddMMyyyyHHmmss") & ".csv"
|
||||
Dim outFile As IO.StreamWriter = Nothing
|
||||
Try
|
||||
outFile = My.Computer.FileSystem.OpenTextFileWriter(fn, False)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Return "ERROR: Schreibfehler"
|
||||
End Try
|
||||
|
||||
System.Console.WriteLine("Vorhandene Datensätze: " & dt.Rows.Count)
|
||||
|
||||
If dt.Rows.Count = 0 Then
|
||||
Return "ERROR: KEINE DATEN"
|
||||
End If
|
||||
|
||||
Dim clmns As String = ""
|
||||
For i = 0 To dt.Columns.Count - 1
|
||||
clmns &= dt.Columns(i).ColumnName.ToString().Replace(";", ",") & ";"
|
||||
Next
|
||||
|
||||
outFile.WriteLine(clmns)
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
clmns = ""
|
||||
For j = 0 To dt.Columns.Count - 1
|
||||
Dim o As Object = dt.Rows(i).Item(j).ToString
|
||||
clmns &= dt.Rows(i).Item(j).ToString() & ";"
|
||||
Next
|
||||
outFile.WriteLine(clmns)
|
||||
Next
|
||||
outFile.Close()
|
||||
Return fn
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message)
|
||||
Return "ERROR: " & ex.Message
|
||||
End Try
|
||||
End Function
|
||||
Public Function loadDgvBySql(ByVal sql As String) As DataTable
|
||||
Try
|
||||
Dim myTable = New DataTable()
|
||||
Dim conn As New SqlConnection
|
||||
conn.ConnectionString = "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
|
||||
conn.Open()
|
||||
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
Dim dr As SqlDataReader = cmd.ExecuteReader()
|
||||
myTable.Load(dr)
|
||||
dr.Close()
|
||||
End Using
|
||||
conn.Close()
|
||||
|
||||
Return myTable
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Module
|
||||
13
WoelflEmail/My Project/Application.Designer.vb
generated
Normal file
13
WoelflEmail/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.34209
|
||||
'
|
||||
' 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
WoelflEmail/My Project/Application.myapp
Normal file
10
WoelflEmail/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>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
WoelflEmail/My Project/AssemblyInfo.vb
Normal file
35
WoelflEmail/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 mit einer Assembly verknüpft sind.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("WoelflEmail")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("WoelflEmail")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016")>
|
||||
<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("e42a804d-7fd4-4606-88a6-04d4ad5ab213")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
WoelflEmail/My Project/Resources.Designer.vb
generated
Normal file
62
WoelflEmail/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.34209
|
||||
'
|
||||
' 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("WoelflEmail.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
WoelflEmail/My Project/Resources.resx
Normal file
117
WoelflEmail/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
WoelflEmail/My Project/Settings.Designer.vb
generated
Normal file
73
WoelflEmail/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.34209
|
||||
'
|
||||
' 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.WoelflEmail.My.MySettings
|
||||
Get
|
||||
Return Global.WoelflEmail.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
WoelflEmail/My Project/Settings.settings
Normal file
7
WoelflEmail/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>
|
||||
114
WoelflEmail/WoelflEmail.vbproj
Normal file
114
WoelflEmail/WoelflEmail.vbproj
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{9AED0618-EF52-42D0-B148-AEC7AE4B5052}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>WoelflEmail.Mail</StartupObject>
|
||||
<RootNamespace>WoelflEmail</RootNamespace>
|
||||
<AssemblyName>WoelflEmail</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</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>WoelflEmail.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>WoelflEmail.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="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</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="Mail.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>
|
||||
</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="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Reference in New Issue
Block a user