diff --git a/.vs/LogWriter.git/v17/.suo b/.vs/LogWriter.git/v17/.suo
new file mode 100644
index 0000000..fab5830
Binary files /dev/null and b/.vs/LogWriter.git/v17/.suo differ
diff --git a/LogWriter/AppResources.Designer.cs b/LogWriter/AppResources.Designer.cs
index a118a77..7671094 100644
--- a/LogWriter/AppResources.Designer.cs
+++ b/LogWriter/AppResources.Designer.cs
@@ -1,81 +1,81 @@
-//------------------------------------------------------------------------------
-//
-// 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.
-//
-//------------------------------------------------------------------------------
-
-namespace Eugen.ESystem.IO {
- using System;
-
-
- ///
- /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
- ///
- // 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() {
- }
-
- ///
- /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
- ///
- [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;
- }
- }
-
- ///
- /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
- /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die The directory specifyed in Path was not found. ähnelt.
- ///
- internal static string msg001 {
- get {
- return ResourceManager.GetString("msg001", resourceCulture);
- }
- }
-
- ///
- /// Sucht eine lokalisierte Zeichenfolge, die FileFormat has the wrong format. ähnelt.
- ///
- internal static string msg002 {
- get {
- return ResourceManager.GetString("msg002", resourceCulture);
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace Eugen.ESystem.IO {
+ using System;
+
+
+ ///
+ /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ ///
+ // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class AppResources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal AppResources() {
+ }
+
+ ///
+ /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die The directory specifyed in Path was not found. ähnelt.
+ ///
+ internal static string msg001 {
+ get {
+ return ResourceManager.GetString("msg001", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die FileFormat has the wrong format. ähnelt.
+ ///
+ internal static string msg002 {
+ get {
+ return ResourceManager.GetString("msg002", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/LogWriter/LogWriter.cs b/LogWriter/LogWriter.cs
index b80faac..404d5db 100644
--- a/LogWriter/LogWriter.cs
+++ b/LogWriter/LogWriter.cs
@@ -1,539 +1,576 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Eugen.ESystem.IO
-{
- ///
- /// Handles a log file
- ///
- [Description("Handles a log file")]
- public class LogWriter : Component
- {
- #region Version und Copyright
- // Version und Copyright
- static string dllName = System.IO.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
- ///
- /// Contains the name of the dll file.
- ///
- public static string DllName { private set; get; }
-
- ///
- /// Contains the version of the dll file.
- ///
- public static string DllVersion { private set; get; }
-
- ///
- /// Contains the copyright notice.
- ///
- public static string Copyright { private set; get; }
-
- ///
- /// Contains the name-, version- and copyright-information of the dll file.
- ///
- 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
-
- #region enum
- public enum Time
- {
- Write,
- NoWrite
- }
- #endregion
-
- #region delegates
- ///
- /// Provides a method, wich handles events from written messages
- ///
- /// Sender object
- /// Event arguments
- [Description("Provides a method, wich handles events from written messages")]
- public delegate void LogWriterEventHandler(object sender, LogWriterEventArgs e);
- #endregion
-
- #region fields
- ///
- /// Stores the log save path
- ///
- private string path = String.Empty;
-
- ///
- /// Stores the logfile name
- ///
- private string filename = String.Empty;
-
- ///
- /// Stores the log header
- ///
- private string logheader = String.Empty;
-
- ///
- /// Stores the file name format
- ///
- private string fileFormat = "log_{0:d}.log";
-
- ///
- /// Stores the message format
- ///
- private string messageFormat = "{0:T}.{1} - {2}";
- #endregion
-
- #region events
- ///
- /// Fired, when a message was written
- ///
- [Description("Fired, when a message was written")]
- public event LogWriterEventHandler MessageWritten;
-
- ///
- /// Fired, when a new log file was created. Fired, when a message was written
- ///
- [Description("Fired, when a new log file was created. Fired, when a message was written")]
- public event EventHandler FileCreated;
- #endregion
-
- #region properties
- ///
- /// Specifyes the log save path
- ///
- [Description("Specifyes the log save path")]
- public string Path
- {
- get
- {
- return this.path;
- }
- set
- {
- this.path = value;
- }
- }
-
- ///
- /// Specifyes the file name format
- ///
- [Description("Specifyes the file name format")]
- [DefaultValue("log_{0:d}.log")]
- public string FileFormat
- {
- get
- {
- return this.fileFormat;
- }
- set
- {
- this.fileFormat = value;
- }
- }
-
- ///
- /// Specifyes the message format
- ///
- [Description("Specifyes the message format")]
- [DefaultValue("{0:t}: {1}")]
- public string MessageFormat
- {
- get
- {
- return this.messageFormat;
- }
- set
- {
- this.messageFormat = value;
- }
- }
- #endregion
-
- #region constructor
- ///
- /// Constructor (for DLL-Information)
- ///
- static LogWriter()
- {
- SetDllInfo();
- }
-
- ///
- /// Constructor
- ///
- public LogWriter()
- {
- }
-
- ///
- /// Constructor (Filename = 'log_dd.mm.yyyy.log)
- ///
- /// Specifyes the log save path
- public LogWriter(string path)
- {
- this.path = path;
- }
-
- ///
- /// Constructor (Filename = self defined)
- ///
- /// Specifyes the log save path
- /// Specifyes the log file name
- public LogWriter(string path, string filename)
- {
- this.path = path;
- this.filename = filename;
- if (this.filename.EndsWith(".log"))
- {
- this.filename.Replace(".log", "");
- }
- }
- #endregion
-
- #region public members
- ///
- /// Writes a message
- ///
- /// Specifyes the message to be written
- /// Wheather the writing progress was successful
- public bool WriteMessage(string message)
- {
- return WriteMessage(message, Time.Write);
- }
-
- ///
- /// Writes a message
- ///
- /// Specifyes the message to be written
- /// Indicates whether the time is written or not
- /// Wheather the writing progress was successful
- public bool WriteMessage(string message, Time writeTime)
- {
- // if directory not exists, cancel
- if (!Directory.Exists(this.path))
- throw new DirectoryNotFoundException(AppResources.msg001);
-
- // holds the actual date and time
- DateTime time = DateTime.Now;
- int ms = time.Millisecond;
- string fmt = "000";
- string ms3 = ms.ToString(fmt);
-
- // creates the file name
- string fileName;
-
- if (String.IsNullOrEmpty(this.filename))
- {
- if (String.IsNullOrEmpty(this.path))
- {
- fileName = System.IO.Path.DirectorySeparatorChar.ToString();
- }
- else
- {
- fileName = this.path;
-
- if (fileName[fileName.Length - 1] != System.IO.Path.DirectorySeparatorChar)
- {
- fileName += System.IO.Path.DirectorySeparatorChar;
- }
- }
-
- try
- {
- fileName += String.Format(this.fileFormat, time);
- }
- catch (FormatException)
- {
- throw new FormatException(AppResources.msg002);
- }
- catch
- {
- return false;
- }
- }
- else
- {
- if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar)
- {
- if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
- {
- fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log");
- }
- else
- {
- fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename);
- }
- }
- else
- {
- if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
- {
- fileName = String.Concat(this.path, this.filename, ".log");
- }
- else
- {
- fileName = String.Concat(this.path, this.filename);
- }
- }
- }
-
- // build message line
- string line;
- try
- {
- // creates the line
- if (writeTime == Time.Write)
- {
- line = String.Format(this.messageFormat, new object[] { time, ms3, message });
- }
- else
- {
- line = String.Empty;
- line = message;
- }
- }
- catch (FormatException)
- {
- throw new FormatException(AppResources.msg002);
- }
- catch
- {
- return false;
- }
-
- try
- {
- StreamWriter writer;
-
- // open file
- if (!File.Exists(fileName))
- {
- writer = new StreamWriter(fileName);
- OnFileCreated(EventArgs.Empty);
- }
- else
- {
- writer = new StreamWriter(fileName, true);
- }
-
- // write message line
- writer.WriteLine(line);
-
- // close file
- writer.Close();
-
- OnMessageWritten(new LogWriterEventArgs(time, ms, message));
-
- return true;
- }
- catch
- {
- return false;
- }
- }
-
- private bool IsFileEmpty(string filename)
- {
- if (File.Exists(filename))
- {
- System.IO.StreamReader file = new System.IO.StreamReader(filename);
-
- if (String.IsNullOrEmpty(file.ReadLine()))
- {
- file.Close();
- return true; // file is empty
- }
- else
- {
- file.Close();
- return false; // file is not empty
- }
- }
- else
- {
- return true; // file doesn't exist - is empty
- }
- }
- #endregion
-
- #region protected members
- ///
- /// Fires the MessageWritten event
- ///
- ///
- protected void OnMessageWritten(LogWriterEventArgs e)
- {
- if (MessageWritten != null)
- MessageWritten(this, e);
- }
-
- ///
- /// Fires the FileCreated event
- ///
- ///
- protected void OnFileCreated(EventArgs e)
- {
- if (FileCreated != null)
- FileCreated(this, e);
- }
- #endregion
- }
-
- #region LogWriterEventArgs class
- ///
- /// LogWriterEventArgs stores information about the sent log message
- ///
- public class LogWriterEventArgs : EventArgs
- {
- #region fields
- ///
- /// Stores the message post time
- ///
- private DateTime time;
-
- ///
- /// Stores the milliseconds of the post time of the message
- ///
- private int millisecond;
-
- ///
- /// Stores the message
- ///
- private string message;
- #endregion
-
- #region properties
- ///
- /// Specifyes the message post time
- ///
- [Description("Specifyes the message post time")]
- public DateTime Time
- {
- get
- {
- return this.time;
- }
- }
-
- ///
- /// Specifyes the message
- ///
- [Description("Specifyes the message")]
- public string Message
- {
- get
- {
- return this.message;
- }
- }
- #endregion
-
- #region constructor
- ///
- /// Constructor
- ///
- /// Specifyes the message post time
- /// Specifyes the message post milliseconds
- /// Specifyes the message
- public LogWriterEventArgs(DateTime time, int millisecond, string message)
- : base()
- {
- this.time = time;
- this.millisecond = millisecond;
- this.message = message;
- }
- #endregion
- }
- #endregion
-}
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Eugen.ESystem.IO
+{
+ ///
+ /// Handles a log file
+ ///
+ [Description("Handles a log file")]
+ public class LogWriter : Component
+ {
+ #region Version und Copyright
+ // Version und Copyright
+ static string dllName = System.IO.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
+ ///
+ /// Contains the name of the dll file.
+ ///
+ public static string DllName { private set; get; }
+
+ ///
+ /// Contains the version of the dll file.
+ ///
+ public static string DllVersion { private set; get; }
+
+ ///
+ /// Contains the copyright notice.
+ ///
+ public static string Copyright { private set; get; }
+
+ ///
+ /// Contains the name-, version- and copyright-information of the dll file.
+ ///
+ 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
+
+ #region enum
+ public enum Time
+ {
+ Write,
+ NoWrite
+ }
+ #endregion
+
+ #region delegates
+ ///
+ /// Provides a method, wich handles events from written messages
+ ///
+ /// Sender object
+ /// Event arguments
+ [Description("Provides a method, wich handles events from written messages")]
+ public delegate void LogWriterEventHandler(object sender, LogWriterEventArgs e);
+ #endregion
+
+ #region fields
+ ///
+ /// Stores the log save path
+ ///
+ private string path = String.Empty;
+
+ ///
+ /// Stores the logfile name
+ ///
+ private string filename = String.Empty;
+
+ ///
+ /// Stores the log header
+ ///
+ private string logheader = String.Empty;
+
+ ///
+ /// Stores the file name format
+ ///
+ private string fileFormat = "log_{0:d}.log";
+
+ ///
+ /// Stores the message format
+ ///
+ private string messageFormat = "{0:T}.{1} - {2}";
+ #endregion
+
+ #region events
+ ///
+ /// Fired, when a message was written
+ ///
+ [Description("Fired, when a message was written")]
+ public event LogWriterEventHandler MessageWritten;
+
+ ///
+ /// Fired, when a new log file was created. Fired, when a message was written
+ ///
+ [Description("Fired, when a new log file was created. Fired, when a message was written")]
+ public event EventHandler FileCreated;
+ #endregion
+
+ #region properties
+ ///
+ /// Specifyes the log save path
+ ///
+ [Description("Specifyes the log save path")]
+ public string Path
+ {
+ get
+ {
+ return this.path;
+ }
+ set
+ {
+ this.path = value;
+ }
+ }
+
+ ///
+ /// Specifyes the file name format
+ ///
+ [Description("Specifyes the file name format")]
+ [DefaultValue("log_{0:d}.log")]
+ public string FileFormat
+ {
+ get
+ {
+ return this.fileFormat;
+ }
+ set
+ {
+ this.fileFormat = value;
+ }
+ }
+
+ ///
+ /// Specifyes the message format
+ ///
+ [Description("Specifyes the message format")]
+ [DefaultValue("{0:t}: {1}")]
+ public string MessageFormat
+ {
+ get
+ {
+ return this.messageFormat;
+ }
+ set
+ {
+ this.messageFormat = value;
+ }
+ }
+ #endregion
+
+ #region constructor
+ ///
+ /// Constructor (for DLL-Information)
+ ///
+ static LogWriter()
+ {
+ SetDllInfo();
+ }
+
+ ///
+ /// Constructor
+ ///
+ public LogWriter()
+ {
+ }
+
+ ///
+ /// Constructor (Filename = 'log_dd.mm.yyyy.log)
+ ///
+ /// Specifyes the log save path
+ public LogWriter(string path)
+ {
+ this.path = path;
+ }
+
+ ///
+ /// Constructor (Filename = self defined)
+ ///
+ /// Specifyes the log save path
+ /// Specifyes the log file name
+ public LogWriter(string path, string filename)
+ {
+ this.path = path;
+ this.filename = filename;
+ if (this.filename.EndsWith(".log"))
+ {
+ this.filename.Replace(".log", "");
+ }
+ }
+ #endregion
+
+ #region public members
+ ///
+ /// Writes a message
+ ///
+ /// Specifyes the message to be written
+ /// Wheather the writing progress was successful
+ public bool WriteMessage(string message)
+ {
+ return WriteMessage(message, Time.Write);
+ }
+
+ ///
+ /// Writes a message
+ ///
+ /// Specifyes the message to be written
+ /// Indicates whether the time is written or not
+ /// Wheather the writing progress was successful
+ public bool WriteMessage(string message, Time writeTime)
+ {
+ // if directory not exists, cancel
+ if (!Directory.Exists(this.path))
+ throw new DirectoryNotFoundException(AppResources.msg001);
+
+ // holds the actual date and time
+ DateTime time = DateTime.Now;
+ int ms = time.Millisecond;
+ string fmt = "000";
+ string ms3 = ms.ToString(fmt);
+
+ // creates the file name
+ string fileName;
+
+ if (String.IsNullOrEmpty(this.filename))
+ {
+ if (String.IsNullOrEmpty(this.path))
+ {
+ fileName = System.IO.Path.DirectorySeparatorChar.ToString();
+ }
+ else
+ {
+ fileName = this.path;
+
+ if (fileName[fileName.Length - 1] != System.IO.Path.DirectorySeparatorChar)
+ {
+ fileName += System.IO.Path.DirectorySeparatorChar;
+ }
+ }
+
+ try
+ {
+ fileName += String.Format(this.fileFormat, time);
+ }
+ catch (FormatException)
+ {
+ throw new FormatException(AppResources.msg002);
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar)
+ {
+ if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
+ {
+ fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log");
+ }
+ else
+ {
+ fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename);
+ }
+ }
+ else
+ {
+ if (String.IsNullOrEmpty(System.IO.Path.GetExtension(this.filename)))
+ {
+ fileName = String.Concat(this.path, this.filename, ".log");
+ }
+ else
+ {
+ fileName = String.Concat(this.path, this.filename);
+ }
+ }
+ }
+
+ // build message line
+ string line;
+ try
+ {
+ // creates the line
+ if (writeTime == Time.Write)
+ {
+ line = String.Format(this.messageFormat, new object[] { time, ms3, message });
+ }
+ else
+ {
+ line = String.Empty;
+ line = message;
+ }
+ }
+ catch (FormatException)
+ {
+ throw new FormatException(AppResources.msg002);
+ }
+ catch
+ {
+ return false;
+ }
+
+ try
+ {
+ StreamWriter writer;
+
+ // open file
+ if (!File.Exists(fileName))
+ {
+ writer = new StreamWriter(fileName);
+ OnFileCreated(EventArgs.Empty);
+ }
+ else
+ {
+ writer = new StreamWriter(fileName, true);
+ }
+
+ // write message line
+ writer.WriteLine(line);
+
+ // close file
+ writer.Close();
+
+ OnMessageWritten(new LogWriterEventArgs(time, ms, message));
+
+ return true;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ ///
+ /// Deletes the defined log file.
+ ///
+ /// Returns 'true' if the log file does not exist or could be deleted, otherwise 'false'.
+ public bool DeleteLogFile()
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(path) || String.IsNullOrEmpty(filename))
+ {
+ return false;
+ }
+
+ if (!File.Exists(path + "\\" + filename))
+ {
+ return true;
+ }
+ else
+ {
+ File.Delete(path + "\\" + filename);
+ return true;
+ }
+
+ if (File.Exists(path + "\\" + filename))
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ private bool IsFileEmpty(string filename)
+ {
+ if (File.Exists(filename))
+ {
+ System.IO.StreamReader file = new System.IO.StreamReader(filename);
+
+ if (String.IsNullOrEmpty(file.ReadLine()))
+ {
+ file.Close();
+ return true; // file is empty
+ }
+ else
+ {
+ file.Close();
+ return false; // file is not empty
+ }
+ }
+ else
+ {
+ return true; // file doesn't exist - is empty
+ }
+ }
+ #endregion
+
+ #region protected members
+ ///
+ /// Fires the MessageWritten event
+ ///
+ ///
+ protected void OnMessageWritten(LogWriterEventArgs e)
+ {
+ if (MessageWritten != null)
+ MessageWritten(this, e);
+ }
+
+ ///
+ /// Fires the FileCreated event
+ ///
+ ///
+ protected void OnFileCreated(EventArgs e)
+ {
+ if (FileCreated != null)
+ FileCreated(this, e);
+ }
+ #endregion
+ }
+
+ #region LogWriterEventArgs class
+ ///
+ /// LogWriterEventArgs stores information about the sent log message
+ ///
+ public class LogWriterEventArgs : EventArgs
+ {
+ #region fields
+ ///
+ /// Stores the message post time
+ ///
+ private DateTime time;
+
+ ///
+ /// Stores the milliseconds of the post time of the message
+ ///
+ private int millisecond;
+
+ ///
+ /// Stores the message
+ ///
+ private string message;
+ #endregion
+
+ #region properties
+ ///
+ /// Specifyes the message post time
+ ///
+ [Description("Specifyes the message post time")]
+ public DateTime Time
+ {
+ get
+ {
+ return this.time;
+ }
+ }
+
+ ///
+ /// Specifyes the message
+ ///
+ [Description("Specifyes the message")]
+ public string Message
+ {
+ get
+ {
+ return this.message;
+ }
+ }
+ #endregion
+
+ #region constructor
+ ///
+ /// Constructor
+ ///
+ /// Specifyes the message post time
+ /// Specifyes the message post milliseconds
+ /// Specifyes the message
+ public LogWriterEventArgs(DateTime time, int millisecond, string message)
+ : base()
+ {
+ this.time = time;
+ this.millisecond = millisecond;
+ this.message = message;
+ }
+ #endregion
+ }
+ #endregion
+}
diff --git a/LogWriter/LogWriter.csproj b/LogWriter/LogWriter.csproj
index c41bcd1..e9f7e24 100644
--- a/LogWriter/LogWriter.csproj
+++ b/LogWriter/LogWriter.csproj
@@ -1,69 +1,69 @@
-
-
-
-
- Debug
- AnyCPU
- {9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}
- Library
- Properties
- LogWriter
- helogwri
- v4.6.1
- 512
- false
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- AppResources.resx
-
-
- Component
-
-
-
-
-
- Eugen.ESystem.IO
-
-
- Eugen.ESystem.IO
-
-
- ResXFileCodeGenerator
- AppResources.Designer.cs
- Eugen.ESystem.IO
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}
+ Library
+ Properties
+ LogWriter
+ helogwri
+ v4.7.2
+ 512
+ false
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ AppResources.resx
+
+
+ Component
+
+
+
+
+
+ Eugen.ESystem.IO
+
+
+ Eugen.ESystem.IO
+
+
+ ResXFileCodeGenerator
+ AppResources.Designer.cs
+ Eugen.ESystem.IO
+
+
+
\ No newline at end of file
diff --git a/LogWriter/bin/Debug/de/helogwri.resources.dll b/LogWriter/bin/Debug/de/helogwri.resources.dll
index e11c3bc..4afc52c 100644
Binary files a/LogWriter/bin/Debug/de/helogwri.resources.dll and b/LogWriter/bin/Debug/de/helogwri.resources.dll differ
diff --git a/LogWriter/bin/Debug/en/helogwri.resources.dll b/LogWriter/bin/Debug/en/helogwri.resources.dll
index b280c61..f2b2542 100644
Binary files a/LogWriter/bin/Debug/en/helogwri.resources.dll and b/LogWriter/bin/Debug/en/helogwri.resources.dll differ
diff --git a/LogWriter/bin/Debug/helogwri.dll b/LogWriter/bin/Debug/helogwri.dll
index 3fc13a0..9c149f8 100644
Binary files a/LogWriter/bin/Debug/helogwri.dll and b/LogWriter/bin/Debug/helogwri.dll differ
diff --git a/LogWriter/bin/Debug/helogwri.pdb b/LogWriter/bin/Debug/helogwri.pdb
index 7a0b880..a7fbfc7 100644
Binary files a/LogWriter/bin/Debug/helogwri.pdb and b/LogWriter/bin/Debug/helogwri.pdb differ
diff --git a/LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
index 3871b18..057ed7f 100644
--- a/LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
+++ b/LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
@@ -1,4 +1,4 @@
-//
-using System;
-using System.Reflection;
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
diff --git a/LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
new file mode 100644
index 0000000..3cf0af3
--- /dev/null
+++ b/LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
diff --git a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index e7183b8..cdfaa77 100644
Binary files a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index aa799e8..b726438 100644
Binary files a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache b/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache
index 3a8bb1e..ce6c4ca 100644
Binary files a/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache and b/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache differ
diff --git a/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache b/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache
index 50d8fe7..c20eb4c 100644
--- a/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache
+++ b/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-a9e9b7e70c786bcdc5613b5c4ffe419197602a83
+0c0190d04d7df5cf01e539cc5977a2261a4f5476
diff --git a/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt b/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt
index a652a10..011e75b 100644
--- a/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt
+++ b/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt
@@ -1,14 +1,14 @@
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.pdb
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\de\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\en\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.AssemblyReference.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.resources
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.de.resources
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.en.resources
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.GenerateResource.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CoreCompileInputs.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\de\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\en\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\helogwri.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\de\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\en\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.AssemblyReference.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.resources
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.de.resources
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.AppResources.en.resources
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.GenerateResource.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\LogWriter.csproj.CoreCompileInputs.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\de\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\en\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.pdb
diff --git a/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache b/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache
index 0fcc4c5..a75eb92 100644
Binary files a/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache and b/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache differ
diff --git a/LogWriter/obj/Debug/TempPE/AppResources.Designer.cs.dll b/LogWriter/obj/Debug/TempPE/AppResources.Designer.cs.dll
index 677248e..1b969f2 100644
Binary files a/LogWriter/obj/Debug/TempPE/AppResources.Designer.cs.dll and b/LogWriter/obj/Debug/TempPE/AppResources.Designer.cs.dll differ
diff --git a/LogWriter/obj/Debug/de/helogwri.resources.dll b/LogWriter/obj/Debug/de/helogwri.resources.dll
index e11c3bc..4afc52c 100644
Binary files a/LogWriter/obj/Debug/de/helogwri.resources.dll and b/LogWriter/obj/Debug/de/helogwri.resources.dll differ
diff --git a/LogWriter/obj/Debug/en/helogwri.resources.dll b/LogWriter/obj/Debug/en/helogwri.resources.dll
index b280c61..f2b2542 100644
Binary files a/LogWriter/obj/Debug/en/helogwri.resources.dll and b/LogWriter/obj/Debug/en/helogwri.resources.dll differ
diff --git a/LogWriter/obj/Debug/helogwri.dll b/LogWriter/obj/Debug/helogwri.dll
index 3fc13a0..9c149f8 100644
Binary files a/LogWriter/obj/Debug/helogwri.dll and b/LogWriter/obj/Debug/helogwri.dll differ
diff --git a/LogWriter/obj/Debug/helogwri.pdb b/LogWriter/obj/Debug/helogwri.pdb
index 7a0b880..a7fbfc7 100644
Binary files a/LogWriter/obj/Debug/helogwri.pdb and b/LogWriter/obj/Debug/helogwri.pdb differ
diff --git a/Test_LogWriter/App.config b/Test_LogWriter/App.config
index 731f6de..de27714 100644
--- a/Test_LogWriter/App.config
+++ b/Test_LogWriter/App.config
@@ -1,6 +1,6 @@
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/Test_LogWriter/Properties/Resources.Designer.cs b/Test_LogWriter/Properties/Resources.Designer.cs
index fd47b5e..bdffebd 100644
--- a/Test_LogWriter/Properties/Resources.Designer.cs
+++ b/Test_LogWriter/Properties/Resources.Designer.cs
@@ -1,70 +1,63 @@
-//------------------------------------------------------------------------------
-//
-// Dieser Code wurde von einem Tool generiert.
-// Laufzeitversion: 4.0.30319.42000
-//
-// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
-// der Code neu generiert wird.
-//
-//------------------------------------------------------------------------------
-
-
-namespace Test_LogWriter.Properties
-{
- ///
- /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
- ///
- // Diese Klasse wurde von der StronglyTypedResourceBuilder-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")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- 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()
- {
- }
-
- ///
- /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_LogWriter.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
- /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace Test_LogWriter.Properties {
+ using System;
+
+
+ ///
+ /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ ///
+ // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class 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() {
+ }
+
+ ///
+ /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ ///
+ [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("Test_LogWriter.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Test_LogWriter/Properties/Settings.Designer.cs b/Test_LogWriter/Properties/Settings.Designer.cs
index 18b4b00..92c8cfb 100644
--- a/Test_LogWriter/Properties/Settings.Designer.cs
+++ b/Test_LogWriter/Properties/Settings.Designer.cs
@@ -1,29 +1,26 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-
-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
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace Test_LogWriter.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [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 {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Test_LogWriter/Test_LogWriter.csproj b/Test_LogWriter/Test_LogWriter.csproj
index ee85bfc..0ee39f9 100644
--- a/Test_LogWriter/Test_LogWriter.csproj
+++ b/Test_LogWriter/Test_LogWriter.csproj
@@ -1,89 +1,90 @@
-
-
-
-
- Debug
- AnyCPU
- {052D2936-B3E0-4348-991E-00FEC44CA3F1}
- WinExe
- Test_LogWriter
- Test_LogWriter
- v4.6.1
- 512
- true
- false
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- ..\LogWriter\bin\Debug\helogwri.dll
-
-
- ..\..\ShowTextFile.git\ShowTextFile\bin\Debug\heshowtf.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Form
-
-
- Form1.cs
-
-
-
-
- Form1.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
- True
-
-
-
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {052D2936-B3E0-4348-991E-00FEC44CA3F1}
+ WinExe
+ Test_LogWriter
+ Test_LogWriter
+ v4.7.2
+ 512
+ true
+ false
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\LogWriter\bin\Debug\helogwri.dll
+
+
+ ..\..\ShowTextFile.git\ShowTextFile\bin\Debug\heshowtf.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.exe b/Test_LogWriter/bin/Debug/Test_LogWriter.exe
index 7a3bfec..5c9202b 100644
Binary files a/Test_LogWriter/bin/Debug/Test_LogWriter.exe and b/Test_LogWriter/bin/Debug/Test_LogWriter.exe differ
diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.exe.config b/Test_LogWriter/bin/Debug/Test_LogWriter.exe.config
index 731f6de..de27714 100644
--- a/Test_LogWriter/bin/Debug/Test_LogWriter.exe.config
+++ b/Test_LogWriter/bin/Debug/Test_LogWriter.exe.config
@@ -1,6 +1,6 @@
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.pdb b/Test_LogWriter/bin/Debug/Test_LogWriter.pdb
index 51285f9..50e3f30 100644
Binary files a/Test_LogWriter/bin/Debug/Test_LogWriter.pdb and b/Test_LogWriter/bin/Debug/Test_LogWriter.pdb differ
diff --git a/Test_LogWriter/bin/Debug/de/helogwri.resources.dll b/Test_LogWriter/bin/Debug/de/helogwri.resources.dll
index e11c3bc..4afc52c 100644
Binary files a/Test_LogWriter/bin/Debug/de/helogwri.resources.dll and b/Test_LogWriter/bin/Debug/de/helogwri.resources.dll differ
diff --git a/Test_LogWriter/bin/Debug/en/helogwri.resources.dll b/Test_LogWriter/bin/Debug/en/helogwri.resources.dll
index b280c61..f2b2542 100644
Binary files a/Test_LogWriter/bin/Debug/en/helogwri.resources.dll and b/Test_LogWriter/bin/Debug/en/helogwri.resources.dll differ
diff --git a/Test_LogWriter/bin/Debug/helogwri.dll b/Test_LogWriter/bin/Debug/helogwri.dll
index 3fc13a0..9c149f8 100644
Binary files a/Test_LogWriter/bin/Debug/helogwri.dll and b/Test_LogWriter/bin/Debug/helogwri.dll differ
diff --git a/Test_LogWriter/bin/Debug/helogwri.pdb b/Test_LogWriter/bin/Debug/helogwri.pdb
index 7a0b880..a7fbfc7 100644
Binary files a/Test_LogWriter/bin/Debug/helogwri.pdb and b/Test_LogWriter/bin/Debug/helogwri.pdb differ
diff --git a/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
new file mode 100644
index 0000000..057ed7f
--- /dev/null
+++ b/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
diff --git a/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
new file mode 100644
index 0000000..3cf0af3
--- /dev/null
+++ b/Test_LogWriter/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
diff --git a/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 9c5a92c..2d8a026 100644
Binary files a/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 980e48a..b5a92df 100644
Binary files a/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/Test_LogWriter/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/Test_LogWriter/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
new file mode 100644
index 0000000..28a2581
Binary files /dev/null and b/Test_LogWriter/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache
index 1f4cde4..1b81db9 100644
Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache and b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache differ
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.CoreCompileInputs.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.CoreCompileInputs.cache
index 43582d8..e1bd82d 100644
--- a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.CoreCompileInputs.cache
+++ b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-b69314ac7e0577ff976a8ba62b6b4dc25ca31ef0
+d3959b100c00336106276e6bc8f285afd0c6d70f
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt
index 13f7524..531d571 100644
--- a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt
+++ b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt
@@ -1,17 +1,18 @@
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe.config
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.pdb
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.pdb
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.pdb
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\de\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\en\helogwri.resources.dll
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.AssemblyReference.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Form1.resources
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Properties.Resources.resources
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.GenerateResource.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CoreCompileInputs.cache
-H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\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\Test_LogWriter.exe.config
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.exe
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\Test_LogWriter.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\heshowtf.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\de\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\en\helogwri.resources.dll
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.AssemblyReference.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Form1.resources
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.Properties.Resources.resources
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.GenerateResource.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CoreCompileInputs.cache
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.CopyComplete
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.exe
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.pdb
+H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.csproj.SuggestedBindingRedirects.cache
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache
index fee9892..12d54d4 100644
Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache and b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache differ
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.SuggestedBindingRedirects.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.SuggestedBindingRedirects.cache
new file mode 100644
index 0000000..e69de29
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.exe b/Test_LogWriter/obj/Debug/Test_LogWriter.exe
index 7a3bfec..5c9202b 100644
Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.exe and b/Test_LogWriter/obj/Debug/Test_LogWriter.exe differ
diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.pdb b/Test_LogWriter/obj/Debug/Test_LogWriter.pdb
index 51285f9..50e3f30 100644
Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.pdb and b/Test_LogWriter/obj/Debug/Test_LogWriter.pdb differ