Änderung

- Komplett überarbeitet
This commit is contained in:
Hoeglinger Eugen 2022-04-28 16:54:42 +02:00
parent 7861b7861e
commit 240a90c863
62 changed files with 742 additions and 1489 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,11 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31613.86
# Visual Studio Version 17
VisualStudioVersion = 17.1.32421.90
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogWriter", "LogWriter\LogWriter.csproj", "{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogWriter", "LogWriter\LogWriter.csproj", "{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_LogWriter", "Test_LogWriter\Test_LogWriter.csproj", "{052D2936-B3E0-4348-991E-00FEC44CA3F1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_LogWriter", "Test_LogWriter\Test_LogWriter.csproj", "{9414648E-B3A3-4279-B2E1-F54E35326E93}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -13,19 +13,19 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}.Release|Any CPU.Build.0 = Release|Any CPU
{052D2936-B3E0-4348-991E-00FEC44CA3F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{052D2936-B3E0-4348-991E-00FEC44CA3F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{052D2936-B3E0-4348-991E-00FEC44CA3F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{052D2936-B3E0-4348-991E-00FEC44CA3F1}.Release|Any CPU.Build.0 = Release|Any CPU
{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}.Release|Any CPU.Build.0 = Release|Any CPU
{9414648E-B3A3-4279-B2E1-F54E35326E93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9414648E-B3A3-4279-B2E1-F54E35326E93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9414648E-B3A3-4279-B2E1-F54E35326E93}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9414648E-B3A3-4279-B2E1-F54E35326E93}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9030B3E2-EE94-4D2F-8FB1-2A39DF357BBA}
SolutionGuid = {8884E98F-BF3E-4D03-B17D-433AEE46045E}
EndGlobalSection
EndGlobal

View File

@ -1,117 +0,0 @@
//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------
namespace Eugen.ESystem.IO {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// 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.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class AppResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppResources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LogWriter.AppResources", typeof(AppResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <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)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The directory specifyed in Path was not found. ähnelt.
/// </summary>
internal static string msg001 {
get {
return ResourceManager.GetString("msg001", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Schwerer Fehler ähnelt.
/// </summary>
internal static string msg001cap {
get {
return ResourceManager.GetString("msg001cap", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die FileFormat has the wrong format. ähnelt.
/// </summary>
internal static string msg002 {
get {
return ResourceManager.GetString("msg002", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Fehler ähnelt.
/// </summary>
internal static string msg002cap {
get {
return ResourceManager.GetString("msg002cap", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Der für die Anzeige notwendige Editor konnte nicht gefunden werden. ähnelt.
/// </summary>
internal static string msg003 {
get {
return ResourceManager.GetString("msg003", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Die Log-Datei wurde nicht gefunden. ähnelt.
/// </summary>
internal static string msg004 {
get {
return ResourceManager.GetString("msg004", resourceCulture);
}
}
}
}

View File

@ -1,138 +0,0 @@
<?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>
<data name="msg001" xml:space="preserve">
<value>Das in Pfad angegebene Verzeichnis wurde nicht gefunden.</value>
</data>
<data name="msg001cap" xml:space="preserve">
<value>Schwerer Fehler</value>
</data>
<data name="msg002" xml:space="preserve">
<value>FileFormat hat das falsche Format.</value>
</data>
<data name="msg002cap" xml:space="preserve">
<value>Fehler</value>
</data>
<data name="msg003" xml:space="preserve">
<value>Der für die Anzeige notwendige Editor konnte nicht gefunden werden.</value>
</data>
<data name="msg004" xml:space="preserve">
<value>Die Log-Datei wurde nicht gefunden.</value>
</data>
</root>

View File

@ -1,138 +0,0 @@
<?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>
<data name="msg001" xml:space="preserve">
<value>The directory specifyed in Path was not found.</value>
</data>
<data name="msg001cap" xml:space="preserve">
<value>Fatal Error</value>
</data>
<data name="msg002" xml:space="preserve">
<value>FileFormat has the wrong format.</value>
</data>
<data name="msg002cap" xml:space="preserve">
<value>Error</value>
</data>
<data name="msg003" xml:space="preserve">
<value>The editor required for the display could not be found.</value>
</data>
<data name="msg004" xml:space="preserve">
<value>The log file was not found.</value>
</data>
</root>

View File

@ -1,138 +0,0 @@
<?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>
<data name="msg001" xml:space="preserve">
<value>The directory specifyed in Path was not found.</value>
</data>
<data name="msg001cap" xml:space="preserve">
<value>Schwerer Fehler</value>
</data>
<data name="msg002" xml:space="preserve">
<value>FileFormat has the wrong format.</value>
</data>
<data name="msg002cap" xml:space="preserve">
<value>Fehler</value>
</data>
<data name="msg003" xml:space="preserve">
<value>Der für die Anzeige notwendige Editor konnte nicht gefunden werden.</value>
</data>
<data name="msg004" xml:space="preserve">
<value>Die Log-Datei wurde nicht gefunden.</value>
</data>
</root>

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
@ -11,11 +9,7 @@ using System.Windows.Forms;
namespace Eugen.ESystem.IO
{
/// <summary>
/// Handles a log file
/// </summary>
[Description("Handles a log file")]
public class LogWriter : Component
public class LogWriter
{
#region Version und Copyright
// Version und Copyright
@ -131,105 +125,44 @@ namespace Eugen.ESystem.IO
protected string ProgramCopyright { private set; get; }
#endregion
#region enum
public enum Time
{
Write,
NoWrite
}
#endregion
#region delegates
/// <summary>
/// Provides a method, wich handles events from written messages
/// </summary>
/// <param name="sender">Sender object</param>
/// <param name="e">Event arguments</param>
[Description("Provides a method, wich handles events from written messages")]
public delegate void LogWriterEventHandler(object sender, LogWriterEventArgs e);
#endregion
#region fields
/// <summary>
/// Stores the log save path
/// </summary>
private string path = String.Empty;
/// <summary>
/// Stores the logfile name
/// </summary>
private string filename = String.Empty;
/// <summary>
/// Stores the log header
/// </summary>
private string logheader = String.Empty;
/// <summary>
/// Stores the file name format
/// </summary>
private string fileFormat = "log_{0:d}.log";
/// <summary>
/// Stores the message format
/// </summary>
private string messageFormat = "{0:T}.{1} - {2}";
#endregion
#region events
/// <summary>
/// Fired, when a message was written
/// </summary>
[Description("Fired, when a message was written")]
public event LogWriterEventHandler MessageWritten;
/// <summary>
/// Fired, when a new log file was created. Fired, when a message was written
/// </summary>
[Description("Fired, when a new log file was created. Fired, when a message was written")]
public event EventHandler FileCreated;
#endregion
#region properties
/// <summary>
/// Specifyes the log save path
/// </summary>
[Description("Specifyes the log save path")]
public string Path
static LogWriter()
{
get
SetDllInfo();
}
public LogWriter(string path)
{
SetDllInfo();
SetDate();
this.Path = path;
this.FileName = String.Concat("log_", this.CurrentDate, ".log");
}
public LogWriter(string path, string fileName)
{
SetDllInfo();
SetDate();
this.Path = path;
if (fileName.EndsWith(".log"))
{
return this.path;
this.FileName = fileName;
}
set
else
{
this.path = value;
this.FileName = String.Concat(fileName, ".log");
}
}
/// <summary>
/// Specifyes the file name format
/// </summary>
[Description("Specifyes the file name format")]
[DefaultValue("log_{0:d}.log")]
public string FileFormat
{
get
{
return this.fileFormat;
}
set
{
this.fileFormat = value;
}
}
/// <summary>
/// Specifyes the message format
/// </summary>
[Description("Specifyes the message format")]
[DefaultValue("{0:t}: {1}")]
public string MessageFormat
private string Path { get; set; }
private string FileName { get; set; }
private string CurrentDate { get; set; }
private string MessageFormat
{
get
{
@ -240,337 +173,243 @@ namespace Eugen.ESystem.IO
this.messageFormat = value;
}
}
#endregion
#region constructor
/// <summary>
/// Constructor (for DLL-Information)
/// </summary>
static LogWriter()
private void SetDate()
{
SetDllInfo();
DateTime dateTime = DateTime.Now;
this.CurrentDate = dateTime.ToString().Remove(dateTime.ToString().IndexOf(" "));
}
/// <summary>
/// Constructor
/// </summary>
public LogWriter()
{
}
private string messageFormat = "{0:T}.{1} - {2}"; // Definiert das Mitteilungsformat
/// <summary>
/// Constructor (Filename = 'log_dd.mm.yyyy.log)
/// </summary>
/// <param name="path">Specifyes the log save path</param>
public LogWriter(string path)
{
this.path = path;
}
/// <summary>
/// Constructor (Filename = self defined)
/// </summary>
/// <param name="path">Specifyes the log save path</param>
/// <param name="filename">Specifyes the log file name</param>
public LogWriter(string path, string filename)
{
this.path = path;
this.filename = filename;
if (this.filename.EndsWith(".log"))
{
this.filename.Replace(".log", "");
}
}
#endregion
#region public members
/// <summary>
/// Writes a message
/// </summary>
/// <param name="message">Specifyes the message to be written</param>
/// <returns>Wheather the writing progress was successful</returns>
public bool WriteMessage(string message)
{
return WriteMessage(message, Time.Write);
}
/// <summary>
/// Writes a message
/// </summary>
/// <param name="message">Specifyes the message to be written</param>
/// <param name="writeTime">Indicates whether the time is written or not</param>
/// <returns>Wheather the writing progress was successful</returns>
public bool WriteMessage(string message, Time writeTime)
{
// if directory not exists, cancel
if (!Directory.Exists(this.path))
throw new DirectoryNotFoundException(AppResources.msg001);
// holds the actual date and time
DateTime time = DateTime.Now;
int ms = time.Millisecond;
string fmt = "000";
string ms3 = ms.ToString(fmt);
// creates the file name
string fileName;
if (String.IsNullOrEmpty(this.filename))
if (writeTime == Time.Write)
{
if (String.IsNullOrEmpty(this.path))
{
fileName = System.IO.Path.DirectorySeparatorChar.ToString();
}
else
{
fileName = this.path;
if (fileName[fileName.Length - 1] != System.IO.Path.DirectorySeparatorChar)
{
fileName += System.IO.Path.DirectorySeparatorChar;
}
}
try
{
fileName += String.Format(this.fileFormat, time);
}
catch (FormatException)
{
throw new FormatException(AppResources.msg002);
}
catch
{
return false;
}
return WriteLine(time, ms, String.Format(this.messageFormat, new object[] { time, ms.ToString("000"), message }));
}
else
{
if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar)
{
if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
{
fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log");
}
else
{
fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename);
}
}
else
{
if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
{
fileName = String.Concat(this.path, this.filename, ".log");
}
else
{
fileName = String.Concat(this.path, this.filename);
}
}
}
// build message line
string line;
try
{
// creates the line
if (writeTime == Time.Write)
{
line = String.Format(this.messageFormat, new object[] { time, ms3, message });
}
else
{
line = String.Empty;
line = message;
}
}
catch (FormatException)
{
throw new FormatException(AppResources.msg002);
}
catch
{
return false;
return WriteLine(time, ms, message);
}
}
private bool WriteLine(DateTime time, int ms, string message)
{
try
{
StreamWriter writer;
// open file
if (!File.Exists(fileName))
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
{
writer = new StreamWriter(fileName);
// Wenn Logdatei noch nicht existiert, dann anlegen
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName));
OnFileCreated(EventArgs.Empty);
}
else
{
writer = new StreamWriter(fileName, true);
// Wenn Logdatei schon nicht existiert, dann zum Schreiben öffnen
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName), true);
}
// write message line
writer.WriteLine(line);
// Zeile schreiben
writer.WriteLine(message);
// close file
// Logdatei schließen
writer.Close();
OnMessageWritten(new LogWriterEventArgs(time, ms, message));
return true;
}
catch
catch (Exception)
{
return false;
}
}
/// <summary>
/// Deletes the defined log file.
/// Displays the current logfile
/// </summary>
/// <returns>Returns 'true' if the log file does not exist or could be deleted, otherwise 'false'.</returns>
public bool DeleteLogFile()
/// <returns>Wheather the displaying progress was successful</returns>
public bool ShowLogFile()
{
return ShowLogFile(this.Path, this.FileName);
}
/// <summary>
/// Displays a logfile
/// </summary>
/// <param name="path">A valid path</param>
/// <param name="fileName">A valid filename</param>
/// <returns>Wheather the displaying progress was successful</returns>
public bool ShowLogFile(string path, string fileName)
{
if (String.IsNullOrEmpty(path) || String.IsNullOrEmpty(fileName))
{
return false; // Pfad oder Name wurde nicht gefunden
}
else
{
if (!fileName.EndsWith(".log"))
{
fileName = String.Concat(fileName, ".log");
}
if (File.Exists(String.Concat(path, "\\", fileName)))
{
if (!ShowTextFile.Show(String.Concat(path, "\\", fileName)))
{
return false; // Editor nicht gefunden
}
}
else
{
return false; //Datei nicht gefunden
}
}
return true;
}
/// <summary>
/// Deletes the current Logfile
/// </summary>
/// <returns>Wheather the deleting progress was successful</returns>
public bool Delete()
{
try
{
if (String.IsNullOrEmpty(path))
if (String.IsNullOrEmpty(Path) || String.IsNullOrEmpty(FileName))
{
return false;
}
if (String.IsNullOrEmpty(filename))
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
{
DateTime time = DateTime.Now;
filename = String.Concat("log_", time.ToString().Remove(time.ToString().IndexOf(" ")), ".log");
if (!File.Exists(String.Concat(Path, "\\", filename)))
return true; // Existiert nicht mehr
}
else
{
// Muss noch gelöscht werden
File.Delete(String.Concat(this.Path, "\\", this.FileName));
if (File.Exists(String.Concat(this.Path, "\\", this.FileName)))
{
return false;
return false; // Konnte nicht gelöscht werden
}
else
{
return true; // Wurde erfolgreich gelöscht
}
}
if (!filename.EndsWith(".log"))
{
filename = String.Concat(filename, ".log");
}
if (!File.Exists(path + "\\" + filename))
{
return true;
}
else
{
File.Delete(path + "\\" + filename);
//return true;
}
if (File.Exists(path + "\\" + filename))
{
return false;
}
else
{
return true;
}
}
catch
catch (Exception)
{
return false;
}
}
private bool IsFileEmpty(string filename)
{
if (File.Exists(filename))
{
System.IO.StreamReader file = new System.IO.StreamReader(filename);
if (String.IsNullOrEmpty(file.ReadLine()))
public bool Delete(string path, string fileName)
{
if (!fileName.EndsWith(".log"))
{
fileName = String.Concat(fileName, ".log");
}
try
{
if (File.Exists(String.Concat(path, "\\", fileName)))
{
file.Close();
return true; // file is empty
File.Delete(String.Concat(path, "\\", fileName));
if (File.Exists(String.Concat(path, "\\", fileName)))
{
return false; // Konnte nicht gelöscht werden
}
else
{
return true; // Wurde erfolgreich gelöscht
}
}
else
{
file.Close();
return false; // file is not empty
return true; // Existiert nicht mehr
}
}
else
catch (Exception)
{
return true; // file doesn't exist - is empty
return false;
}
}
/// <summary>
/// Shows the Logfile.
/// Provides a method, wich handles events from written messages
/// </summary>
public void ShowLogFile()
{
//string messageText = "";
//string messageHeadline = "";
//string file = String.Concat(tempDir, "\\CleanUp.log");
if (File.Exists(String.Concat(path, "\\", filename)))
{
// Log-Datei anzeigen
try
{
Process P = new Process();
P.StartInfo.FileName = "Notepad.exe";
// hier kann z.B. eine Textdatei mit übergeben werden
P.StartInfo.Arguments = String.Concat(path, "\\", filename);
P.Start();
}
catch
{
// Editor nicht gefunden
MessageBox.Show(AppResources.msg003,
AppResources.msg001cap,
MessageBoxButtons.OK,
MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1);
}
}
else
{
// Log-Datei nicht gefunden
MessageBox.Show(AppResources.msg004,
AppResources.msg002cap,
MessageBoxButtons.OK,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button1);
}
}
#endregion
#region protected members
/// <summary>
/// Fires the MessageWritten event
/// </summary>
/// <param name="e"></param>
protected void OnMessageWritten(LogWriterEventArgs e)
{
if (MessageWritten != null)
MessageWritten(this, e);
}
/// <param name="sender">Sender object</param>
/// <param name="e">Event arguments</param>
public delegate void LogWriterEventHandler(object sender, LogWriterEventArgs e);
/// <summary>
/// Fires the FileCreated event
/// </summary>
/// <param name="e"></param>
/// <param name="e">Event arguments</param>
protected void OnFileCreated(EventArgs e)
{
if (FileCreated != null)
{
FileCreated(this, e);
}
}
#endregion
/// <summary>
/// Fires the MessageWritten event
/// </summary>
/// <param name="e">Event arguments</param>
protected void OnMessageWritten(LogWriterEventArgs e)
{
if (MessageWritten != null)
{
MessageWritten(this, e);
}
}
/// <summary>
/// Fired, when a new log file was created. Fired, when a message was written
/// </summary>
public event EventHandler FileCreated;
/// <summary>
/// Fired, when a message was written
/// </summary>
public event LogWriterEventHandler MessageWritten;
}
#region LogWriterEventArgs class
/// <summary>
/// LogWriterEventArgs stores information about the sent log message
/// </summary>
public class LogWriterEventArgs : EventArgs
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="time">Specifyes the message post time</param>
/// <param name="millisecond">Specifyes the message post milliseconds</param>
/// <param name="message">Specifyes the message</param>
public LogWriterEventArgs(DateTime time, int millisecond, string message) : base()
{
this.time = time;
this.millisecond = millisecond;
this.message = message;
}
#region fields
/// <summary>
/// Stores the message post time
@ -592,7 +431,6 @@ namespace Eugen.ESystem.IO
/// <summary>
/// Specifyes the message post time
/// </summary>
[Description("Specifyes the message post time")]
public DateTime Time
{
get
@ -604,7 +442,6 @@ namespace Eugen.ESystem.IO
/// <summary>
/// Specifyes the message
/// </summary>
[Description("Specifyes the message")]
public string Message
{
get
@ -613,22 +450,5 @@ namespace Eugen.ESystem.IO
}
}
#endregion
#region constructor
/// <summary>
/// Constructor
/// </summary>
/// <param name="time">Specifyes the message post time</param>
/// <param name="millisecond">Specifyes the message post milliseconds</param>
/// <param name="message">Specifyes the message</param>
public LogWriterEventArgs(DateTime time, int millisecond, string message)
: base()
{
this.time = time;
this.millisecond = millisecond;
this.message = message;
}
#endregion
}
#endregion
}

View File

@ -4,12 +4,12 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}</ProjectGuid>
<ProjectGuid>{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LogWriter</RootNamespace>
<AssemblyName>helogwri</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>false</Deterministic>
<TargetFrameworkProfile />
@ -32,6 +32,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="heshowtf">
<HintPath>..\..\ShowTextFile.git\ShowTextFile\bin\Debug\heshowtf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
@ -43,28 +46,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>AppResources.resx</DependentUpon>
</Compile>
<Compile Include="LogWriter.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LogWriter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AppResources.de.resx">
<CustomToolNamespace>Eugen.ESystem.IO</CustomToolNamespace>
</EmbeddedResource>
<EmbeddedResource Include="AppResources.en.resx">
<CustomToolNamespace>Eugen.ESystem.IO</CustomToolNamespace>
</EmbeddedResource>
<EmbeddedResource Include="AppResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
<CustomToolNamespace>Eugen.ESystem.IO</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("LogWriter")]
[assembly: AssemblyDescription("Schreibt eine Logdatei")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LogWriter")]
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("9ab1c683-4535-4f92-a3d1-4af8bc1c8b9e")]
[assembly: Guid("e95b9315-e0b9-4db0-ba06-caea7269e922")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]

View File

@ -1 +1 @@
ea63bd59f5cf4e43a4d116f52f8a38689920a819
2c170a6de4ecef6e0914644ba93f8bbf52dc503d

View File

@ -1,14 +1,9 @@
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.AssemblyReference.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CoreCompileInputs.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\de\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\en\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.AssemblyReference.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.resources
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.de.resources
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.en.resources
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.GenerateResource.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CoreCompileInputs.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\de\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\en\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\heshowtf.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\heshowtf.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CopyComplete

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

View File

@ -1,5 +1,4 @@

namespace Test_LogWriter
namespace Test_LogWriter
{
partial class Form1
{
@ -34,10 +33,10 @@ namespace Test_LogWriter
this.labelProgramInfo = new System.Windows.Forms.Label();
this.groupBoxDLLInfo = new System.Windows.Forms.GroupBox();
this.labelDLLInfo = new System.Windows.Forms.Label();
this.labelResult = new System.Windows.Forms.Label();
this.buttonShowLog1 = new System.Windows.Forms.Button();
this.buttonShowLog2 = new System.Windows.Forms.Button();
this.buttonShowLog3 = new System.Windows.Forms.Button();
this.buttonShowLog2 = new System.Windows.Forms.Button();
this.buttonShowLog1 = new System.Windows.Forms.Button();
this.labelResult = new System.Windows.Forms.Label();
this.groupBoxProgramInfo.SuspendLayout();
this.groupBoxDLLInfo.SuspendLayout();
this.SuspendLayout();
@ -92,44 +91,44 @@ namespace Test_LogWriter
this.labelDLLInfo.TabIndex = 0;
this.labelDLLInfo.Text = "...";
//
// labelResult
// buttonShowLog3
//
this.labelResult.AutoSize = true;
this.labelResult.Location = new System.Drawing.Point(13, 13);
this.labelResult.Name = "labelResult";
this.labelResult.Size = new System.Drawing.Size(16, 13);
this.labelResult.TabIndex = 13;
this.labelResult.Text = "...";
//
// buttonShowLog1
//
this.buttonShowLog1.Location = new System.Drawing.Point(12, 258);
this.buttonShowLog1.Name = "buttonShowLog1";
this.buttonShowLog1.Size = new System.Drawing.Size(160, 23);
this.buttonShowLog1.TabIndex = 14;
this.buttonShowLog1.Text = "Log-Datei 1 anzeigen";
this.buttonShowLog1.UseVisualStyleBackColor = true;
this.buttonShowLog1.Click += new System.EventHandler(this.buttonShowLog1_Click);
this.buttonShowLog3.Location = new System.Drawing.Point(627, 254);
this.buttonShowLog3.Name = "buttonShowLog3";
this.buttonShowLog3.Size = new System.Drawing.Size(160, 23);
this.buttonShowLog3.TabIndex = 20;
this.buttonShowLog3.Text = "Log-Datei 3 anzeigen";
this.buttonShowLog3.UseVisualStyleBackColor = true;
this.buttonShowLog3.Click += new System.EventHandler(this.buttonShowLog3_Click);
//
// buttonShowLog2
//
this.buttonShowLog2.Location = new System.Drawing.Point(320, 258);
this.buttonShowLog2.Location = new System.Drawing.Point(319, 254);
this.buttonShowLog2.Name = "buttonShowLog2";
this.buttonShowLog2.Size = new System.Drawing.Size(160, 23);
this.buttonShowLog2.TabIndex = 15;
this.buttonShowLog2.TabIndex = 19;
this.buttonShowLog2.Text = "Log-Datei 2 anzeigen";
this.buttonShowLog2.UseVisualStyleBackColor = true;
this.buttonShowLog2.Click += new System.EventHandler(this.buttonShowLog2_Click);
//
// buttonShowLog3
// buttonShowLog1
//
this.buttonShowLog3.Location = new System.Drawing.Point(628, 258);
this.buttonShowLog3.Name = "buttonShowLog3";
this.buttonShowLog3.Size = new System.Drawing.Size(160, 23);
this.buttonShowLog3.TabIndex = 16;
this.buttonShowLog3.Text = "Log-Datei 3 anzeigen";
this.buttonShowLog3.UseVisualStyleBackColor = true;
this.buttonShowLog3.Click += new System.EventHandler(this.buttonShowLog3_Click);
this.buttonShowLog1.Location = new System.Drawing.Point(11, 254);
this.buttonShowLog1.Name = "buttonShowLog1";
this.buttonShowLog1.Size = new System.Drawing.Size(160, 23);
this.buttonShowLog1.TabIndex = 18;
this.buttonShowLog1.Text = "Log-Datei 1 anzeigen";
this.buttonShowLog1.UseVisualStyleBackColor = true;
this.buttonShowLog1.Click += new System.EventHandler(this.buttonShowLog1_Click_1);
//
// labelResult
//
this.labelResult.AutoSize = true;
this.labelResult.Location = new System.Drawing.Point(12, 9);
this.labelResult.Name = "labelResult";
this.labelResult.Size = new System.Drawing.Size(16, 13);
this.labelResult.TabIndex = 17;
this.labelResult.Text = "...";
//
// Form1
//
@ -162,10 +161,10 @@ namespace Test_LogWriter
private System.Windows.Forms.Label labelProgramInfo;
private System.Windows.Forms.GroupBox groupBoxDLLInfo;
private System.Windows.Forms.Label labelDLLInfo;
private System.Windows.Forms.Label labelResult;
private System.Windows.Forms.Button buttonShowLog1;
private System.Windows.Forms.Button buttonShowLog2;
private System.Windows.Forms.Button buttonShowLog3;
private System.Windows.Forms.Button buttonShowLog2;
private System.Windows.Forms.Button buttonShowLog1;
private System.Windows.Forms.Label labelResult;
}
}

View File

@ -132,26 +132,26 @@ namespace Test_LogWriter
{
//Variante 1 - Logdateiname ist automatisch 'log_dd-mm-yy.log'
var logWriter1 = new LogWriter(@"C:\TMP\");
logWriter1.DeleteLogFile();
logWriter1.Delete();
logWriter1.WriteMessage("Das ist Test 1");
labelResult.Text = String.Concat("Die Log-Datei C:\\TMP\\log_", DateTime.Now.Date.ToString().Remove(10), ".log wurde geschrieben.");
//Variante 2 - Logdateiname wird angegeben, z.B. 'my_logfile2.log'
var logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2.log");
logWriter2.DeleteLogFile();
logWriter2.Delete();
logWriter2.WriteMessage("Das ist Test 2");
labelResult.Text = String.Concat(labelResult.Text, "\nDie Log-Datei C:\\TMP\\my_logfile2.log wurde geschrieben");
//Variante 3 - Logdateiname wird angegeben und Header wird geschrieben
string header = "--------------------\n Das ist der Header\n--------------------";
var logWriter3 = new LogWriter(@"C:\TMP\", "my_logfile3");
logWriter3.DeleteLogFile();
logWriter3.Delete();
logWriter3.WriteMessage(header, LogWriter.Time.NoWrite);
logWriter3.WriteMessage("Das ist Test 3");
labelResult.Text = String.Concat(labelResult.Text, "\nDie Log-Datei C:\\TMP\\my_logfile3.log wurde geschrieben");
}
private void buttonShowLog1_Click(object sender, EventArgs e)
private void buttonShowLog1_Click_1(object sender, EventArgs e)
{
string textFileName = String.Concat("C:\\TMP\\log_", DateTime.Now.Date.ToString().Remove(10), ".log");

View File

@ -6,7 +6,7 @@ using System.Windows.Forms;
namespace Test_LogWriter
{
static class Program
internal static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Test_LogWriter")]
[assembly: AssemblyCopyright("Copyright © 2021 by Eugen Höglinger")]
[assembly: AssemblyCopyright("Copyright © 2022 by Eugen Höglinger")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("052d2936-b3e0-4348-991e-00fec44ca3f1")]
[assembly: Guid("9414648e-b3a3-4279-b2e1-f54e35326e93")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//

View File

@ -4,11 +4,11 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{052D2936-B3E0-4348-991E-00FEC44CA3F1}</ProjectGuid>
<ProjectGuid>{9414648E-B3A3-4279-B2E1-F54E35326E93}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Test_LogWriter</RootNamespace>
<AssemblyName>Test_LogWriter</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
@ -38,7 +38,7 @@
<HintPath>..\LogWriter\bin\Debug\helogwri.dll</HintPath>
</Reference>
<Reference Include="heshowtf">
<HintPath>..\..\ShowTextFile.git\ShowTextFile\bin\Debug\heshowtf.dll</HintPath>
<HintPath>..\LogWriter\bin\Debug\heshowtf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -66,6 +66,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

View File

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]

View File

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

View File

@ -1 +1 @@
d3959b100c00336106276e6bc8f285afd0c6d70f
0b37f65528887a8f138f27074e88fb5740eb62c1

View File

@ -1,18 +1,16 @@
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe.config
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\de\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\en\helogwri.resources.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.AssemblyReference.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.SuggestedBindingRedirects.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Form1.resources
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Properties.Resources.resources
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.GenerateResource.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CoreCompileInputs.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe.config
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.dll
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CopyComplete
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.exe
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.pdb
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.SuggestedBindingRedirects.cache
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll