Compare commits
10 Commits
adbb61a3fd
...
d8059750ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8059750ca | ||
|
|
0149b71907 | ||
|
|
1ff67e8926 | ||
|
|
06d626e50e | ||
|
|
692cef160e | ||
|
|
240a90c863 | ||
|
|
7861b7861e | ||
|
|
8971cdd73c | ||
|
|
b7b1d9ee44 | ||
| c6da990e8b |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.vs/LogWriter.git/v17/.suo
Normal file
BIN
.vs/LogWriter.git/v17/.suo
Normal file
Binary file not shown.
86
.vs/LogWriter.git/v17/DocumentLayout.json
Normal file
86
.vs/LogWriter.git/v17/DocumentLayout.json
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{9414648E-B3A3-4279-B2E1-F54E35326E93}|Test_LogWriter\\Test_LogWriter.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\test_logwriter\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{9414648E-B3A3-4279-B2E1-F54E35326E93}|Test_LogWriter\\Test_LogWriter.csproj|solutionrelative:test_logwriter\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}|LogWriter\\LogWriter.csproj|c:\\cad\\git-workrepository\\visualstudio\\_dll\\logwriter.git\\logwriter\\logwriter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E95B9315-E0B9-4DB0-BA06-CAEA7269E922}|LogWriter\\LogWriter.csproj|solutionrelative:logwriter\\logwriter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{9414648E-B3A3-4279-B2E1-F54E35326E93}|Test_LogWriter\\Test_LogWriter.csproj|C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\test_logwriter\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{9414648E-B3A3-4279-B2E1-F54E35326E93}|Test_LogWriter\\Test_LogWriter.csproj|solutionrelative:test_logwriter\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 4,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Form1.cs",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\Test_LogWriter\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "Test_LogWriter\\Form1.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\Test_LogWriter\\Form1.cs",
|
||||
"RelativeToolTip": "Test_LogWriter\\Form1.cs",
|
||||
"ViewState": "AQIAAHgAAAAAAAAAAAAowJwAAABkAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-06-11T12:34:35.414Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [Entwurf]",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\Test_LogWriter\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "Test_LogWriter\\Form1.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\Test_LogWriter\\Form1.cs [Entwurf]",
|
||||
"RelativeToolTip": "Test_LogWriter\\Form1.cs [Entwurf]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-06-11T12:34:35.436Z",
|
||||
"EditorCaption": " [Entwurf]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "LogWriter.cs",
|
||||
"DocumentMoniker": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\LogWriter\\LogWriter.cs",
|
||||
"RelativeDocumentMoniker": "LogWriter\\LogWriter.cs",
|
||||
"ToolTip": "C:\\CAD\\Git-WorkRepository\\VisualStudio\\_DLL\\LogWriter.git\\LogWriter\\LogWriter.cs",
|
||||
"RelativeToolTip": "LogWriter\\LogWriter.cs",
|
||||
"ViewState": "AQIAANICAAAAAAAAAAAAACADAAAIAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-06-11T12:34:36.369Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -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
|
||||
|
||||
81
LogWriter/AppResources.Designer.cs
generated
81
LogWriter/AppResources.Designer.cs
generated
@ -1,81 +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", "16.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 FileFormat has the wrong format. ähnelt.
|
||||
/// </summary>
|
||||
internal static string msg002 {
|
||||
get {
|
||||
return ResourceManager.GetString("msg002", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,126 +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="msg002" xml:space="preserve">
|
||||
<value>FileFormat hat das falsche Format.</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,126 +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="msg002" xml:space="preserve">
|
||||
<value>FileFormat has the wrong format.</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,126 +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="msg002" xml:space="preserve">
|
||||
<value>FileFormat has the wrong format.</value>
|
||||
</data>
|
||||
</root>
|
||||
270
LogWriter/FormattingLongStrings.cs
Normal file
270
LogWriter/FormattingLongStrings.cs
Normal file
@ -0,0 +1,270 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Eugen.ESystem.Text
|
||||
{
|
||||
public class FormattingLongStrings
|
||||
{
|
||||
#region Version und Copyright
|
||||
// Version und Copyright
|
||||
static string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||
static string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
static string copyright = GenerateCopyright();
|
||||
|
||||
//Assembly Datum und Zeit
|
||||
static DateTime value = AssemblyDateTime();
|
||||
static string date = value.ToShortDateString();
|
||||
static string time = value.ToLongTimeString();
|
||||
|
||||
private static DateTime AssemblyDateTime()
|
||||
{
|
||||
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
|
||||
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
|
||||
return buildDateTime;
|
||||
}
|
||||
|
||||
private static string CurrentYear()
|
||||
{
|
||||
DateTime dtn = DateTime.Now;
|
||||
return dtn.Year.ToString();
|
||||
}
|
||||
|
||||
private static string StartYear()
|
||||
{
|
||||
string startYear = "";
|
||||
if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © "))
|
||||
{
|
||||
startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", "");
|
||||
while (startYear.StartsWith(" "))
|
||||
{
|
||||
startYear = startYear.Remove(0, 1);
|
||||
}
|
||||
|
||||
if (startYear.Contains("-"))
|
||||
{
|
||||
startYear = startYear.Remove(startYear.IndexOf("-"));
|
||||
}
|
||||
else
|
||||
{
|
||||
startYear = startYear.Remove(startYear.IndexOf(" "));
|
||||
}
|
||||
return startYear;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime dtn = DateTime.Now;
|
||||
return dtn.Year.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private static string GenerateCopyright()
|
||||
{
|
||||
string startYear = StartYear();
|
||||
string currentYear = CurrentYear();
|
||||
|
||||
if (startYear == currentYear)
|
||||
{
|
||||
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
}
|
||||
else
|
||||
{
|
||||
string temp = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
string start = temp.Remove(temp.IndexOf(startYear) - 1);
|
||||
string end = (temp.Remove(0, temp.IndexOf(" by")));
|
||||
|
||||
return String.Concat(start, " ", startYear, "-", currentYear, end);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DLL-Info
|
||||
/// <summary>
|
||||
/// Contains the name of the dll file.
|
||||
/// </summary>
|
||||
public static string DllName { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the version of the dll file.
|
||||
/// </summary>
|
||||
public static string DllVersion { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the copyright notice.
|
||||
/// </summary>
|
||||
public static string Copyright { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the name-, version- and copyright-information of the dll file.
|
||||
/// </summary>
|
||||
public static string[] DllInfo { private set; get; }
|
||||
|
||||
private static void SetDllInfo()
|
||||
{
|
||||
//Name, Version und Copyright setzen
|
||||
DllName = dllName;
|
||||
DllVersion = dllVersion;
|
||||
Copyright = copyright;
|
||||
|
||||
string[] dllInfo = new string[3];
|
||||
dllInfo[0] = dllName;
|
||||
dllInfo[1] = dllVersion;
|
||||
dllInfo[2] = copyright;
|
||||
DllInfo = dllInfo;
|
||||
}
|
||||
|
||||
protected string ProgramName { private set; get; }
|
||||
protected string ProgramVersion { private set; get; }
|
||||
protected string ProgramCopyright { private set; get; }
|
||||
#endregion
|
||||
|
||||
static FormattingLongStrings()
|
||||
{
|
||||
SetDllInfo();
|
||||
}
|
||||
|
||||
//public FormattingLongStrings()
|
||||
//{
|
||||
// SetDllInfo();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the length type
|
||||
/// </summary>
|
||||
public enum LengthType
|
||||
{
|
||||
LineLength,
|
||||
IndentLength
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Splits a longer text into sections with a defined maximum length for each section
|
||||
/// </summary>
|
||||
/// <param name="text">Text to be edited</param>
|
||||
/// <param name="lengthFirstLine">Length of the first line in characters</param>
|
||||
/// <param name="lengthSubsequentLines">Length of the following line or the indentation in characters</param>
|
||||
/// <param name="lengthType">Defines whether the line length or the indentation is measured</param>
|
||||
/// <returns>Returns a string array with individual lines</returns>
|
||||
public static string[] FormattingString(string text, int lengthFirstLine, int lengthSubsequentLines, LengthType lengthType)
|
||||
{
|
||||
// If the text line is longer than the desired first line length, then split it, otherwise it is already ok
|
||||
if (text.Length > lengthFirstLine)
|
||||
{
|
||||
lengthSubsequentLines = LengthSubsequentLines(lengthFirstLine, lengthSubsequentLines, lengthType); // The text length of the other lines is calculated
|
||||
int indentLength = lengthFirstLine - lengthSubsequentLines; ;
|
||||
|
||||
List<string> lines = new List<string>();
|
||||
|
||||
lines.Add(CreateLine(text, lengthFirstLine)); // Create the first line in the length of the first line
|
||||
|
||||
text = ShortenStringByAlreadyUsed(text, lines[0]); // The text already used is removed from the text
|
||||
|
||||
text = RemoveLeadingSpaces(text); // If the text line begins with a space, remove it
|
||||
|
||||
string tempText = "";
|
||||
|
||||
// If the text line is longer than the desired line length, then split it
|
||||
while (text.Length > lengthSubsequentLines)
|
||||
{
|
||||
tempText = CreateLine(text, lengthSubsequentLines);
|
||||
|
||||
// Generate the other lines with the corresponding length
|
||||
if (lengthType == LengthType.LineLength)
|
||||
{
|
||||
lines.Add(tempText); // If the line length of the additional lines
|
||||
}
|
||||
else
|
||||
{
|
||||
// Line length is the length of the first line minus the length of the indentation
|
||||
// Spaces in the number of indents are placed in front of the text
|
||||
lines.Add(tempText.PadLeft(indentLength + tempText.Length, ' '));
|
||||
}
|
||||
|
||||
text = ShortenStringByAlreadyUsed(text, tempText); // The text already used is removed from the text
|
||||
|
||||
text = RemoveLeadingSpaces(text); // If the text line begins with a space, remove it
|
||||
}
|
||||
|
||||
// If the text still contains characters, then edit
|
||||
if (text.Length > 0)
|
||||
{
|
||||
if (lengthType == LengthType.LineLength)
|
||||
{
|
||||
lines.Add(text); // If the line type is 'Line length' then add
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.Add(text.PadLeft(indentLength + text.Length, ' ')); // Otherwise, precede with a space and then add
|
||||
}
|
||||
}
|
||||
|
||||
return lines.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] value = {text}; // If the text is shorter than the line length, then use it
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
private static int LengthSubsequentLines(int lengthFirstLine, int lengthSubsequentLines, LengthType lengthType)
|
||||
{
|
||||
// Returns the length of the subsequent lines, depending on the line type
|
||||
if (lengthType == LengthType.LineLength)
|
||||
{
|
||||
return lengthSubsequentLines; // Line length
|
||||
}
|
||||
else
|
||||
{
|
||||
return lengthFirstLine - lengthSubsequentLines; // Line length with indentation
|
||||
}
|
||||
}
|
||||
|
||||
private static string CreateLine(string text, int lineLength)
|
||||
{
|
||||
// Returns a text section of the specified length
|
||||
string tempLine = text.Remove(lineLength);
|
||||
string tempRemainingLine = text.Remove(0, lineLength);
|
||||
|
||||
// If the next part begins with a space, the line ends with a whole word
|
||||
if (tempRemainingLine.StartsWith(" "))
|
||||
{
|
||||
return tempLine; // Then use the line as it is
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tempLine.Contains(" "))
|
||||
{
|
||||
return tempLine.Remove(tempLine.LastIndexOf(" ")); // Otherwise shorten the line up to the last space
|
||||
}
|
||||
else
|
||||
{
|
||||
return tempLine; // Then use the line as it is
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static string ShortenStringByAlreadyUsed(string text, string usedCharacters)
|
||||
{
|
||||
// Remove the piece of text used from the entire text
|
||||
return text.Replace(usedCharacters, "");
|
||||
}
|
||||
|
||||
private static string RemoveLeadingSpaces(string text)
|
||||
{
|
||||
// If the text line begins with a space, remove the space
|
||||
while (text.StartsWith(" "))
|
||||
{
|
||||
text = text.Remove(0, 1);
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,19 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Eugen.ESystem.Text;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Eugen.ESystem.IO.LogWriter;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
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
|
||||
@ -129,97 +124,70 @@ namespace Eugen.ESystem.IO
|
||||
protected string ProgramCopyright { private set; get; }
|
||||
#endregion
|
||||
|
||||
#region delegates
|
||||
/// <summary>
|
||||
/// Provides a method, wich handles events from written messages
|
||||
/// Defines whether and what type of header should/should not be generated
|
||||
/// </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
|
||||
public enum Header
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.path;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.path = value;
|
||||
}
|
||||
None,
|
||||
Default,
|
||||
Userdefined
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifyes the file name format
|
||||
/// Defines whether the current time should be written or not
|
||||
/// </summary>
|
||||
[Description("Specifyes the file name format")]
|
||||
[DefaultValue("log_{0:d}.log")]
|
||||
public string FileFormat
|
||||
public enum Time
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fileFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.fileFormat = value;
|
||||
}
|
||||
Write,
|
||||
NoWrite
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifyes the message format
|
||||
/// Defines whether a logging level should be specified or not
|
||||
/// </summary>
|
||||
[Description("Specifyes the message format")]
|
||||
[DefaultValue("{0:t}: {1}")]
|
||||
public string MessageFormat
|
||||
public enum LogLevel
|
||||
{
|
||||
Debugging,
|
||||
Information,
|
||||
Warning,
|
||||
Error,
|
||||
Fatal,
|
||||
NoLevel
|
||||
}
|
||||
|
||||
static LogWriter()
|
||||
{
|
||||
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"))
|
||||
{
|
||||
this.FileName = fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.FileName = String.Concat(fileName, ".log");
|
||||
}
|
||||
}
|
||||
|
||||
private string Path { get; set; }
|
||||
private string FileName { get; set; }
|
||||
private string CurrentDate { get; set; }
|
||||
private string MessageFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -230,259 +198,590 @@ namespace Eugen.ESystem.IO
|
||||
this.messageFormat = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region constructor
|
||||
/// <summary>
|
||||
/// Constructor (for DLL-Information)
|
||||
/// </summary>
|
||||
static LogWriter()
|
||||
private int lineLength = 80;
|
||||
private int indentLengthWithoutLogLevel = 15;
|
||||
private int indentLengthWithLogLevel = 23;
|
||||
|
||||
private void SetDate()
|
||||
{
|
||||
SetDllInfo();
|
||||
DateTime dateTime = DateTime.Now;
|
||||
this.CurrentDate = dateTime.ToString().Remove(dateTime.ToString().IndexOf(" "));
|
||||
}
|
||||
|
||||
private string messageFormat = "{0}{1:T}.{2} - {3}"; // Defines the message format
|
||||
|
||||
/// <summary>
|
||||
/// Name of the program to be logged
|
||||
/// </summary>
|
||||
public string NameOfProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Version number of the program to be logged
|
||||
/// </summary>
|
||||
public string VersionNumberOfProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Copyright of the program to be logged
|
||||
/// </summary>
|
||||
public string CopyrightOfProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Content of a self-defined header as a string
|
||||
/// </summary>
|
||||
public string UserDefinedHeaderAsString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Content of a self-defined header as a string array
|
||||
/// </summary>
|
||||
public string[] UserDefinedHeaderAsArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Writes a separation line to a log file
|
||||
/// </summary>
|
||||
/// <returns>On success true is returned, on the other hand false</returns>
|
||||
public bool WriteSeparationLine()
|
||||
{
|
||||
string message = String.Empty;
|
||||
return WriteMessage(message.PadRight(80, '-'), LogLevel.NoLevel, Time.NoWrite);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// Writes a header to a log file
|
||||
/// </summary>
|
||||
public LogWriter()
|
||||
/// <param name="header"></param>
|
||||
/// <returns>On success true is returned, on the other hand false</returns>
|
||||
public bool WriteHeader(Header header)
|
||||
{
|
||||
}
|
||||
|
||||
/// <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"))
|
||||
switch (header)
|
||||
{
|
||||
this.filename.Replace(".log", "");
|
||||
case Header.Default:
|
||||
return WriteDefaultHeader();
|
||||
case Header.Userdefined:
|
||||
if (!String.IsNullOrEmpty(UserDefinedHeaderAsString))
|
||||
{
|
||||
return WriteUserDefinedHeader(DefineUserDefinedHeader());
|
||||
}
|
||||
else if (UserDefinedHeaderAsArray != null)
|
||||
{
|
||||
return WriteUserDefinedHeader(UserDefinedHeaderAsArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
case Header.None:
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor (Filename = self defined, with fileheader)
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="fileheader"></param>
|
||||
public LogWriter(string path, string filename, string logheader)
|
||||
private bool WriteDefaultHeader()
|
||||
{
|
||||
this.path = path;
|
||||
this.filename = filename;
|
||||
if (this.filename.EndsWith(".log"))
|
||||
string message = String.Empty;
|
||||
string line = message.PadRight(80, '-');
|
||||
|
||||
try
|
||||
{
|
||||
this.filename.Replace(".log", "");
|
||||
}
|
||||
this.logheader = logheader;
|
||||
}
|
||||
#endregion
|
||||
StreamWriter writer;
|
||||
|
||||
#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)
|
||||
{
|
||||
// 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;
|
||||
|
||||
// creates the file name
|
||||
string fileName;
|
||||
|
||||
if (String.IsNullOrEmpty(this.filename))
|
||||
{
|
||||
if (String.IsNullOrEmpty(this.path))
|
||||
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
|
||||
{
|
||||
fileName = System.IO.Path.DirectorySeparatorChar.ToString();
|
||||
// If log file does not exist yet, create one
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName));
|
||||
OnFileCreated(EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName = this.path;
|
||||
|
||||
if (fileName[fileName.Length - 1] != System.IO.Path.DirectorySeparatorChar)
|
||||
{
|
||||
fileName += System.IO.Path.DirectorySeparatorChar;
|
||||
}
|
||||
// If log file already exists, then open to write
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName), true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
fileName += String.Format(this.fileFormat, time);
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new FormatException(AppResources.msg002);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Write line
|
||||
writer.WriteLine(line);
|
||||
writer.WriteLine(DefaultHeaderLine1());
|
||||
writer.WriteLine(DefaultHeaderLine2());
|
||||
writer.WriteLine(DefaultHeaderLine3());
|
||||
writer.WriteLine(CurrentDayDateTime());
|
||||
writer.WriteLine(line);
|
||||
|
||||
// Close log file
|
||||
writer.Close();
|
||||
|
||||
OnMessageWritten(new LogWriterEventArgs(LogLevel.NoLevel.ToString(), DateTime.Now, 0, "SUCCESS"));
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private string DefaultHeaderLine1()
|
||||
{
|
||||
if (String.IsNullOrEmpty(NameOfProgram))
|
||||
{
|
||||
return "Program Name:";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar)
|
||||
return String.Concat("Program Name: ", NameOfProgram);
|
||||
}
|
||||
}
|
||||
|
||||
private string DefaultHeaderLine2()
|
||||
{
|
||||
if (String.IsNullOrEmpty(VersionNumberOfProgram))
|
||||
{
|
||||
return "Program Version: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
return String.Concat("Program Version: ", VersionNumberOfProgram);
|
||||
}
|
||||
}
|
||||
|
||||
private string DefaultHeaderLine3()
|
||||
{
|
||||
if (String.IsNullOrEmpty(CopyrightOfProgram))
|
||||
{
|
||||
return "Copyright: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(CopyrightOfProgram.StartsWith("Copyright"))
|
||||
{
|
||||
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);
|
||||
}
|
||||
return String.Concat("Copyright: ", CopyrightOfProgram.Remove(0, CopyrightOfProgram.IndexOf(" ") + 1));
|
||||
}
|
||||
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);
|
||||
}
|
||||
return String.Concat("Copyright: ", CopyrightOfProgram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string[] DefineUserDefinedHeader()
|
||||
{
|
||||
if (!String.IsNullOrEmpty(UserDefinedHeaderAsString))
|
||||
{
|
||||
string[] stringSeparators = new string[] { "\n\r", "\r\n", "\n", "\r" };
|
||||
string[] lines = UserDefinedHeaderAsString.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
return lines;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] lines = {" "};
|
||||
return lines;
|
||||
}
|
||||
}
|
||||
|
||||
private bool WriteUserDefinedHeader(string[] lines)
|
||||
{
|
||||
string message = String.Empty;
|
||||
string line = message.PadRight(80, '-');
|
||||
|
||||
// build message line
|
||||
string line;
|
||||
try
|
||||
{
|
||||
// creates the line
|
||||
line = String.Format(this.messageFormat, new object[] { time, ms, message });
|
||||
StreamWriter writer;
|
||||
|
||||
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
|
||||
{
|
||||
// If log file does not exist yet, create one
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName));
|
||||
OnFileCreated(EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If log file already exists, open it for writing
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName), true);
|
||||
}
|
||||
|
||||
// Write lines
|
||||
writer.WriteLine(line);
|
||||
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
writer.WriteLine(lines[i]);
|
||||
}
|
||||
|
||||
writer.WriteLine(line);
|
||||
|
||||
// Close log file
|
||||
writer.Close();
|
||||
|
||||
OnMessageWritten(new LogWriterEventArgs(LogLevel.NoLevel.ToString(), DateTime.Now, 0, "SUCCESS"));
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new FormatException(AppResources.msg002);
|
||||
}
|
||||
catch
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the current day, date and time to a logfile
|
||||
/// </summary>
|
||||
/// <returns>On success true is returned, on the other hand false</returns>
|
||||
public bool WriteDayDateTime()
|
||||
{
|
||||
try
|
||||
{
|
||||
StreamWriter writer;
|
||||
|
||||
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
|
||||
{
|
||||
// If log file does not exist yet, create one
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName));
|
||||
OnFileCreated(EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If log file already exists, open it for writing
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName), true);
|
||||
}
|
||||
|
||||
// Write lines
|
||||
writer.WriteLine(CurrentDayDateTime());
|
||||
|
||||
// Close log file
|
||||
writer.Close();
|
||||
|
||||
OnMessageWritten(new LogWriterEventArgs(LogLevel.NoLevel.ToString(), DateTime.Now, 0, "SUCCESS"));
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private string CurrentDayDateTime()
|
||||
{
|
||||
DateTime time = DateTime.Now;
|
||||
int ms = time.Millisecond;
|
||||
|
||||
return String.Concat("Date: ", time.DayOfWeek.ToString(), ", ", time, ".", ms.ToString("000"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to a log file
|
||||
/// </summary>
|
||||
/// <param name="message">The message to write</param>
|
||||
/// <returns>On success true is returned, on the other hand false</returns>
|
||||
public bool WriteMessage(string message)
|
||||
{
|
||||
return WriteMessage(message, LogLevel.NoLevel, Time.Write);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to a log file
|
||||
/// </summary>
|
||||
/// <param name="message">The message to write</param>
|
||||
/// <param name="writeLogLevel">Writes the log level in front of the line</param>
|
||||
/// <param name="writeTime">Writes the log time</param>
|
||||
/// <returns>On success true is returned, on the other hand false</returns>
|
||||
public bool WriteMessage(string message, LogLevel writeLogLevel, Time writeTime)
|
||||
{
|
||||
string logLevel = "";
|
||||
|
||||
switch (writeLogLevel)
|
||||
{
|
||||
case LogLevel.Debugging:
|
||||
logLevel = "DEBUG - ";
|
||||
break;
|
||||
case LogLevel.Information:
|
||||
logLevel = "INFO - ";
|
||||
break;
|
||||
case LogLevel.Warning:
|
||||
logLevel = "WARN - ";
|
||||
break;
|
||||
case LogLevel.Error:
|
||||
logLevel = "ERROR - ";
|
||||
break;
|
||||
case LogLevel.Fatal:
|
||||
logLevel = "FATAL - ";
|
||||
break;
|
||||
case LogLevel.NoLevel:
|
||||
logLevel = "";
|
||||
break;
|
||||
default:
|
||||
logLevel = "";
|
||||
break;
|
||||
}
|
||||
|
||||
DateTime time = DateTime.Now;
|
||||
int ms = time.Millisecond;
|
||||
|
||||
if (writeTime == Time.Write)
|
||||
{
|
||||
return WriteLine(logLevel, time, ms, String.Format(this.messageFormat, new object[] { logLevel, time, ms.ToString("000"), message }));
|
||||
}
|
||||
else
|
||||
{
|
||||
return WriteLine(logLevel, time, ms, message);
|
||||
}
|
||||
}
|
||||
|
||||
private bool WriteLine(string logLevel, DateTime time, int ms, string message)
|
||||
{
|
||||
int indentLength = 0;
|
||||
|
||||
if (logLevel == "")
|
||||
{
|
||||
indentLength = indentLengthWithoutLogLevel;
|
||||
}
|
||||
else
|
||||
{
|
||||
indentLength = indentLengthWithLogLevel;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
StreamWriter writer;
|
||||
|
||||
// if a log header is to be written
|
||||
if (!String.IsNullOrEmpty(logheader) && IsFileEmpty(fileName))
|
||||
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
|
||||
{
|
||||
// write log header
|
||||
// open file
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
writer = new StreamWriter(fileName);
|
||||
OnFileCreated(EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
writer = new StreamWriter(fileName);
|
||||
|
||||
// write message line
|
||||
writer.WriteLine(this.logheader);
|
||||
|
||||
// close file
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
// open file
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
writer = new StreamWriter(fileName);
|
||||
// If the log file does not yet exist, create it
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName));
|
||||
OnFileCreated(EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
writer = new StreamWriter(fileName, true);
|
||||
{
|
||||
// If log file already exists, open it for writing
|
||||
writer = new StreamWriter(String.Concat(this.Path, "\\", this.FileName), true);
|
||||
}
|
||||
|
||||
// write message line
|
||||
writer.WriteLine(line);
|
||||
// Write line
|
||||
if (message.Length > lineLength)
|
||||
{
|
||||
foreach (string line in FormattingLongStrings.FormattingString(message, lineLength, indentLength, FormattingLongStrings.LengthType.IndentLength))
|
||||
{
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLine(message);
|
||||
}
|
||||
|
||||
// close file
|
||||
// Close log file
|
||||
writer.Close();
|
||||
|
||||
OnMessageWritten(new LogWriterEventArgs(time, ms, message));
|
||||
OnMessageWritten(new LogWriterEventArgs(logLevel, time, ms, message));
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsFileEmpty(string filename)
|
||||
/// <summary>
|
||||
/// Displays the current logfile
|
||||
/// </summary>
|
||||
/// <returns>Wheather the displaying progress was successful</returns>
|
||||
public bool ShowLogFile()
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
System.IO.StreamReader file = new System.IO.StreamReader(filename);
|
||||
return ShowLogFile(this.Path, this.FileName);
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(file.ReadLine()))
|
||||
{
|
||||
file.Close();
|
||||
return true; // file is empty
|
||||
}
|
||||
else
|
||||
{
|
||||
file.Close();
|
||||
return false; // file is not empty
|
||||
}
|
||||
/// <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; // Path or name not found
|
||||
}
|
||||
else
|
||||
{
|
||||
return true; // file doesn't exist - is empty
|
||||
if (File.Exists(String.Concat(path, "\\", fileName)))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Call with the standard program
|
||||
var process = new Process();
|
||||
process.StartInfo = new ProcessStartInfo()
|
||||
{
|
||||
UseShellExecute = true,
|
||||
FileName = String.Concat(path, "\\", fileName)
|
||||
};
|
||||
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
const string program = "Notepad.exe"; // Call with Notepad
|
||||
|
||||
ProcessStartInfo start = new ProcessStartInfo(program, String.Concat(path, "\\", fileName));
|
||||
Process.Start(start);
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region protected members
|
||||
/// <summary>
|
||||
/// Fires the MessageWritten event
|
||||
/// Deletes the current Logfile
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected void OnMessageWritten(LogWriterEventArgs e)
|
||||
/// <returns>Wheather the deleting progress was successful</returns>
|
||||
public bool Delete()
|
||||
{
|
||||
if (MessageWritten != null)
|
||||
MessageWritten(this, e);
|
||||
try
|
||||
{
|
||||
if (String.IsNullOrEmpty(Path) || String.IsNullOrEmpty(FileName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!File.Exists(String.Concat(this.Path, "\\", this.FileName)))
|
||||
{
|
||||
return true; // No longer exists
|
||||
}
|
||||
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; // Could not be deleted
|
||||
}
|
||||
else
|
||||
{
|
||||
return true; // Successfully deleted
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
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.Delete(String.Concat(path, "\\", fileName));
|
||||
|
||||
if (File.Exists(String.Concat(path, "\\", fileName)))
|
||||
{
|
||||
return false; // Could not be deleted
|
||||
}
|
||||
else
|
||||
{
|
||||
return true; // Successfully deleted
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true; // No longer exists
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a method, wich handles events from written messages
|
||||
/// </summary>
|
||||
/// <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(string logLevel, DateTime time, int millisecond, string message) : base()
|
||||
{
|
||||
this.logLevel = logLevel;
|
||||
this.time = time;
|
||||
this.millisecond = millisecond;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
#region fields
|
||||
/// <summary>
|
||||
/// Stores the logging level
|
||||
/// </summary>
|
||||
private string logLevel;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the message post time
|
||||
/// </summary>
|
||||
@ -503,7 +802,6 @@ namespace Eugen.ESystem.IO
|
||||
/// <summary>
|
||||
/// Specifyes the message post time
|
||||
/// </summary>
|
||||
[Description("Specifyes the message post time")]
|
||||
public DateTime Time
|
||||
{
|
||||
get
|
||||
@ -515,7 +813,6 @@ namespace Eugen.ESystem.IO
|
||||
/// <summary>
|
||||
/// Specifyes the message
|
||||
/// </summary>
|
||||
[Description("Specifyes the message")]
|
||||
public string Message
|
||||
{
|
||||
get
|
||||
@ -524,21 +821,5 @@ namespace Eugen.ESystem.IO
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region constructor
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="time">Specifyes the message post time</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
|
||||
}
|
||||
|
||||
@ -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.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>false</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
@ -32,38 +32,17 @@
|
||||
<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.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<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="FormattingLongStrings.cs" />
|
||||
<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>
|
||||
@ -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("Writes a log file")]
|
||||
[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:
|
||||
//
|
||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
// indem Sie "*" wie unten gezeigt eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
//[assembly: AssemblyFileVersion("1.0.0.0")] //Wenn auskommentiert, dann gleich wie AssemblyVersion!
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
LogWriter/bin/Debug/heshowtf.dll
Normal file
BIN
LogWriter/bin/Debug/heshowtf.dll
Normal file
Binary file not shown.
BIN
LogWriter/bin/Debug/heshowtf.pdb
Normal file
BIN
LogWriter/bin/Debug/heshowtf.pdb
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
LogWriter/obj/Debug/LogWriter.csproj.CopyComplete
Normal file
0
LogWriter/obj/Debug/LogWriter.csproj.CopyComplete
Normal file
@ -1 +1 @@
|
||||
a9e9b7e70c786bcdc5613b5c4ffe419197602a83
|
||||
4c670e3294eecc743f9ea4d797951847f22f5cb8e82909513a5e79cc343002b8
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
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\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.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\obj\Debug\LogWriter.csproj.CopyComplete
|
||||
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\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\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\de\helogwri.resources.dll
|
||||
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\en\helogwri.resources.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\heshowtf.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\heshowtf.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.AssemblyReference.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CoreCompileInputs.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.Up2Date
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.pdb
|
||||
|
||||
Binary file not shown.
0
LogWriter/obj/Debug/LogWriter.csproj.Up2Date
Normal file
0
LogWriter/obj/Debug/LogWriter.csproj.Up2Date
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
87
Netz/CreateExeWithEmbededDlls.bat
Normal file
87
Netz/CreateExeWithEmbededDlls.bat
Normal file
@ -0,0 +1,87 @@
|
||||
@echo off
|
||||
|
||||
:SELECTIONMENU
|
||||
cls
|
||||
echo.
|
||||
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
|
||||
echo º º
|
||||
echo º Programmkomprimierung in eine einzelene EXE mit .NETZ º
|
||||
echo º º
|
||||
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
|
||||
echo º Version 1.0 º
|
||||
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
|
||||
echo º Dieses Script erzeugt aus der Programm '.exe' und allen da- º
|
||||
echo º zugehoerenden '.dll's, eine gemeinsame, komprimierte Pro- º
|
||||
echo º gramm '.exe' mit eingebetteten '.dll's in einem Unterver- º
|
||||
echo º zeichnis im Verzeichnis der Programm .exe. Die dazugehoer- º
|
||||
echo º igen Hilfe-Dateien werden ebenfals in dieses Unterverzeich- º
|
||||
echo º nis kopiert. Das Unterverzeichnis kann dann unmittelbar an º
|
||||
echo º seinen Bestimmungsort kopiert werden und ist dadurch an º
|
||||
echo º diesem Ort sofort einsetzbar und funktionsfaehig. º
|
||||
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
|
||||
echo º º
|
||||
echo º [S] Prozess starten º
|
||||
echo º [C] Script abbrechen º
|
||||
echo º º
|
||||
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
|
||||
echo.
|
||||
|
||||
set asw=0
|
||||
set /p asw=">>> Bitte eine Auswahl treffen: "
|
||||
|
||||
if %asw%==s goto START
|
||||
if %asw%==S goto START
|
||||
if %asw%==c goto CANCEL
|
||||
if %asw%==C goto CANCEL
|
||||
goto SELECTIONMENU
|
||||
|
||||
:START
|
||||
echo.
|
||||
echo.
|
||||
echo --- Starte den Koprimierungsprozess
|
||||
echo.
|
||||
echo.
|
||||
|
||||
rem --- Argumente --- Anfang ---
|
||||
rem --- Die Argumente mit den entsprechenden Werten belegen ---
|
||||
rem --- NETZ ... Der Programmname und der kompletter Pfad der netz.exe
|
||||
rem --- FOLDER ... Der Pfad zur Programm .exe
|
||||
rem --- NAME ... Ist gleich dem Programnamen ohne '.exe'
|
||||
rem --- EXE ... Der Programmname und der komplette Pfad der '.exe' die komprimiert werden soll
|
||||
rem --- DLL ... Die durch Leerzeichen getrennt Liste der im Programm verwendeten '.dll'
|
||||
rem --- HELP ... Die durch Leerzeichen getrennt Liste der verwendeten Hilfedateien. Gibt es keine Hilfe-Dateien, dann bleibt der Platz nach dem 'Ist Gleich'-Zeichen leer
|
||||
|
||||
set NETZ=H:\Programmieren\Netz\netz.exe
|
||||
|
||||
set FOLDER=H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug
|
||||
set NAME=LogWriter
|
||||
|
||||
set EXE=%FOLDER%\Test_LogWriter.exe
|
||||
rem set DLL=%FOLDER%\myDLL1.dll %FOLDER%\MyDLL2.dll
|
||||
rem set HELP=%FOLDER%\Hilfe.chm %FOLDER%\Help.chm
|
||||
rem --- Argumente --- Ende ---
|
||||
|
||||
rem --- Prozess ausfuehren ---
|
||||
%NETZ% -s -z %EXE% %DLL%
|
||||
|
||||
rem --- Hilfe-Dateien kopieren ---
|
||||
if not defined HELP goto NEXT
|
||||
set DESTINATION=%FOLDER%\%NAME%.exe.netz
|
||||
for %%A in (%HELP%) do xcopy %%A %DESTINATION% /D /Y
|
||||
|
||||
:NEXT
|
||||
echo.
|
||||
echo.
|
||||
echo --- Der Komprimierungsprozess wurde ausgefuehrt.
|
||||
echo.
|
||||
goto END
|
||||
|
||||
:CANCEL
|
||||
echo.
|
||||
echo.
|
||||
echo Das Script wird auf Ihren Wunsch hin abgebrochen!
|
||||
echo.
|
||||
goto END
|
||||
|
||||
:END
|
||||
pause
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
82
Test_LogWriter/Form1.Designer.cs
generated
82
Test_LogWriter/Form1.Designer.cs
generated
@ -1,5 +1,4 @@
|
||||
|
||||
namespace Test_LogWriter
|
||||
namespace Test_LogWriter
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
@ -34,10 +33,11 @@ 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.buttonShowLog4 = new System.Windows.Forms.Button();
|
||||
this.groupBoxProgramInfo.SuspendLayout();
|
||||
this.groupBoxDLLInfo.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -92,50 +92,61 @@ 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(421, 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(216, 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(12, 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 = "...";
|
||||
//
|
||||
// buttonShowLog4
|
||||
//
|
||||
this.buttonShowLog4.Location = new System.Drawing.Point(626, 254);
|
||||
this.buttonShowLog4.Name = "buttonShowLog4";
|
||||
this.buttonShowLog4.Size = new System.Drawing.Size(160, 23);
|
||||
this.buttonShowLog4.TabIndex = 21;
|
||||
this.buttonShowLog4.Text = "Log-Datei 4 anzeigen";
|
||||
this.buttonShowLog4.UseVisualStyleBackColor = true;
|
||||
this.buttonShowLog4.Click += new System.EventHandler(this.buttonShowLog4_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.buttonShowLog4);
|
||||
this.Controls.Add(this.buttonShowLog3);
|
||||
this.Controls.Add(this.buttonShowLog2);
|
||||
this.Controls.Add(this.buttonShowLog1);
|
||||
@ -162,10 +173,11 @@ 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;
|
||||
private System.Windows.Forms.Button buttonShowLog4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Eugen.ESystem.IO;
|
||||
using Eugen.ESystem.Text;
|
||||
|
||||
namespace Test_LogWriter
|
||||
{
|
||||
@ -128,31 +122,52 @@ namespace Test_LogWriter
|
||||
labelDLLInfo.Text = String.Concat(LogWriter.DllName, "\r\n", LogWriter.DllVersion, "\r\n", LogWriter.Copyright); // Zeigt die DLL-Information an
|
||||
}
|
||||
|
||||
LogWriter logWriter1 = new LogWriter(@"C:\TMP\");
|
||||
LogWriter logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2.log"); // Die Extension .log kann, muss aber nicht angegeben werden
|
||||
LogWriter logWriter3 = new LogWriter(@"C:\TMP\", "my_logfile3");
|
||||
LogWriter logWriter4 = new LogWriter(@"C:\TMP\", "my_logfile4");
|
||||
|
||||
private void buttonRunProgram_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Variante 1 - Logdateiname ist automatisch 'log_dd-mm-yy.log'
|
||||
var logWriter1 = new LogWriter(@"C:\TMP\");
|
||||
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.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 = "--------------------\nDas ist der Header\n--------------------";
|
||||
var logWriter3 = new LogWriter(@"C:\TMP\", "my_logfile3", header);
|
||||
logWriter3.WriteMessage("Das ist Test 3");
|
||||
//Variante 3 - Logdateiname wird angegeben und Standard Header wird geschrieben
|
||||
logWriter3.NameOfProgram = ProgramName;
|
||||
logWriter3.VersionNumberOfProgram = ProgramVersion;
|
||||
logWriter3.CopyrightOfProgram = Copyright;
|
||||
|
||||
logWriter3.Delete();
|
||||
logWriter3.WriteHeader(LogWriter.Header.Default);
|
||||
logWriter3.WriteMessage("Das ist Test 3. Dabei handelt es sich um eine sehr lange Log-Message. Die ist höchstwahrscheinlich länger als die 80 Zeichen die in eine Zeile geschrieben werden. Darum soll sie auch umgebrochen werden.");
|
||||
labelResult.Text = String.Concat(labelResult.Text, "\nDie Log-Datei C:\\TMP\\my_logfile3.log wurde geschrieben");
|
||||
|
||||
//Variante 4 - Logdateiname wird angegeben und ein Anwender definierter Header wird geschrieben
|
||||
logWriter4.UserDefinedHeaderAsString = "--------------------\n\r Das ist der Anwender definierte Header\n\r--------------------";
|
||||
|
||||
logWriter4.Delete();
|
||||
logWriter4.WriteHeader(LogWriter.Header.Userdefined);
|
||||
logWriter4.WriteMessage("Das ist Test 4. Was passiert wenn lange kein Leerzeichen kommt? z.B.1234567890123456789012345678901234567890123456789012345678901234567890", LogWriter.LogLevel.Information, LogWriter.Time.Write);
|
||||
logWriter4.WriteMessage("Eine Zeile ohne Log Level", LogWriter.LogLevel.NoLevel, LogWriter.Time.Write);
|
||||
logWriter4.WriteMessage("Und noch eine Zeile mit Log Level", LogWriter.LogLevel.Warning, LogWriter.Time.Write);
|
||||
logWriter4.WriteSeparationLine();
|
||||
labelResult.Text = String.Concat(labelResult.Text, "\nDie Log-Datei C:\\TMP\\my_logfile4.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");
|
||||
//string textFileName = String.Concat("C:\\TMP\\log_", DateTime.Now.Date.ToString().Remove(10), ".log");
|
||||
|
||||
//Wenn die Datei nicht angezeigt werden kann, dann eine Fehlermeldung ausgeben
|
||||
if (!ShowTextFile.Show(textFileName))
|
||||
//if (!ShowTextFile.Show(textFileName))
|
||||
if (!logWriter1.ShowLogFile("C:\\TMP", String.Concat("log_", DateTime.Now.Date.ToString().Remove(10), ".log")))
|
||||
{
|
||||
MessageBox.Show("Entweder die Datei existiert nicht oder der Editor konnte nicht geöffnet werden!");
|
||||
}
|
||||
@ -160,10 +175,11 @@ namespace Test_LogWriter
|
||||
|
||||
private void buttonShowLog2_Click(object sender, EventArgs e)
|
||||
{
|
||||
string textFileName = "C:\\TMP\\my_logfile2.log";
|
||||
//string textFileName = "C:\\TMP\\my_logfile2.log";
|
||||
|
||||
//Wenn die Datei nicht angezeigt werden kann, dann eine Fehlermeldung ausgeben
|
||||
if (!ShowTextFile.Show(textFileName))
|
||||
//if (!ShowTextFile.Show(textFileName))
|
||||
if (!logWriter1.ShowLogFile("C:\\TMP", "my_logfile2.log"))
|
||||
{
|
||||
MessageBox.Show("Entweder die Datei existiert nicht oder der Editor konnte nicht geöffnet werden!");
|
||||
}
|
||||
@ -171,10 +187,19 @@ namespace Test_LogWriter
|
||||
|
||||
private void buttonShowLog3_Click(object sender, EventArgs e)
|
||||
{
|
||||
string textFileName = "C:\\TMP\\my_logfile3.log";
|
||||
//string textFileName = "C:\\TMP\\my_logfile3.log";
|
||||
|
||||
//Wenn die Datei nicht angezeigt werden kann, dann eine Fehlermeldung ausgeben
|
||||
if (!ShowTextFile.Show(textFileName))
|
||||
//if (!ShowTextFile.Show(textFileName))
|
||||
if (!logWriter1.ShowLogFile("C:\\TMP", "my_logfile3.log"))
|
||||
{
|
||||
MessageBox.Show("Entweder die Datei existiert nicht oder der Editor konnte nicht geöffnet werden!");
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonShowLog4_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!logWriter1.ShowLogFile("C:\\TMP", "my_logfile4.log"))
|
||||
{
|
||||
MessageBox.Show("Entweder die Datei existiert nicht oder der Editor konnte nicht geöffnet werden!");
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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:
|
||||
//
|
||||
|
||||
45
Test_LogWriter/Properties/Resources.Designer.cs
generated
45
Test_LogWriter/Properties/Resources.Designer.cs
generated
@ -1,48 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion: 4.0.30319.42000
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code neu generiert wird.
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Test_LogWriter.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
namespace Test_LogWriter.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// 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 Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
// 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 Resources
|
||||
{
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <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 ((resourceMan == null))
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_LogWriter.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
@ -52,17 +48,14 @@ namespace Test_LogWriter.Properties
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// 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
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
23
Test_LogWriter/Properties/Settings.Designer.cs
generated
23
Test_LogWriter/Properties/Settings.Designer.cs
generated
@ -1,27 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Test_LogWriter.Properties {
|
||||
|
||||
|
||||
namespace Test_LogWriter.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,14 +4,15 @@
|
||||
<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.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>false</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -36,9 +37,6 @@
|
||||
<Reference Include="helogwri">
|
||||
<HintPath>..\LogWriter\bin\Debug\helogwri.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="heshowtf">
|
||||
<HintPath>..\..\ShowTextFile.git\ShowTextFile\bin\Debug\heshowtf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@ -71,6 +69,7 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
Test_LogWriter/obj/Debug/Test_Log.B764C44C.Up2Date
Normal file
0
Test_LogWriter/obj/Debug/Test_Log.B764C44C.Up2Date
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
b69314ac7e0577ff976a8ba62b6b4dc25ca31ef0
|
||||
d2a509232f30804e06c635054be7c5f81c895b43e12ff8f66085ca477f29e392
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
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
|
||||
@ -6,12 +7,21 @@ H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWrit
|
||||
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\helogwri.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\bin\Debug\helogwri.dll
|
||||
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\bin\Debug\heshowtf.dll
|
||||
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.AssemblyReference.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Form1.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Properties.Resources.resources
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.GenerateResource.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CoreCompileInputs.cache
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.exe
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe.config
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.pdb
|
||||
C:\CAD\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_Log.B764C44C.Up2Date
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user