Initialize
- Dll zum Erzeugen einer Logdatei - 3 Arten können erzeugt werden: - Automatischer Dateiname: 'log_dd.mm.yyyy.log' - Manueller Dateiname - Manueller Dateiname und frei definerbarer Dateiheader
This commit is contained in:
commit
866676ef53
BIN
.vs/LogWriter.git/v16/.suo
Normal file
BIN
.vs/LogWriter.git/v16/.suo
Normal file
Binary file not shown.
31
LogWriter.git.sln
Normal file
31
LogWriter.git.sln
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.31613.86
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogWriter", "LogWriter\LogWriter.csproj", "{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_LogWriter", "Test_LogWriter\Test_LogWriter.csproj", "{052D2936-B3E0-4348-991E-00FEC44CA3F1}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
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
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {9030B3E2-EE94-4D2F-8FB1-2A39DF357BBA}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
524
LogWriter/LogWriter.cs
Normal file
524
LogWriter/LogWriter.cs
Normal file
@ -0,0 +1,524 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Handles a log file
|
||||||
|
/// </summary>
|
||||||
|
[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
|
||||||
|
/// <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
|
||||||
|
|
||||||
|
#region delegates
|
||||||
|
/// <summary>
|
||||||
|
/// Provides a method, wich handles events from written messages
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">Sender object</param>
|
||||||
|
/// <param name="e">Event arguments</param>
|
||||||
|
[Description("Provides a method, wich handles events from written messages")]
|
||||||
|
public delegate void LogWriterEventHandler(object sender, LogWriterEventArgs e);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region fields
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the log save path
|
||||||
|
/// </summary>
|
||||||
|
private string path = String.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the logfile name
|
||||||
|
/// </summary>
|
||||||
|
private string filename = String.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the log header
|
||||||
|
/// </summary>
|
||||||
|
private string logheader = String.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the file name format
|
||||||
|
/// </summary>
|
||||||
|
private string fileFormat = "log_{0:d}.log";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the message format
|
||||||
|
/// </summary>
|
||||||
|
private string messageFormat = "{0:T}: {1}";
|
||||||
|
#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 createdFired, when a message was written
|
||||||
|
/// </summary>
|
||||||
|
[Description("Fired, when a new log file was createdFired, 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
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.path;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.path = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifyes the file name format
|
||||||
|
/// </summary>
|
||||||
|
[Description("Specifyes the file name format")]
|
||||||
|
[DefaultValue("log_{0:d}.log")]
|
||||||
|
public string FileFormat
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.fileFormat;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.fileFormat = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifyes the message format
|
||||||
|
/// </summary>
|
||||||
|
[Description("Specifyes the message format")]
|
||||||
|
[DefaultValue("{0:t}: {1}")]
|
||||||
|
public string MessageFormat
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.messageFormat;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.messageFormat = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region constructor
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor (for DLL-Information)
|
||||||
|
/// </summary>
|
||||||
|
static LogWriter()
|
||||||
|
{
|
||||||
|
SetDllInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
public LogWriter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor (Filename = 'log_dd.mm.yyyy.log)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Specifyes the log save path</param>
|
||||||
|
public LogWriter(string path)
|
||||||
|
{
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor (Filename = self defined)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Specifyes the log save path</param>
|
||||||
|
/// <param name="filename">Specifyes the log file name</param>
|
||||||
|
public LogWriter(string path, string filename)
|
||||||
|
{
|
||||||
|
this.path = path;
|
||||||
|
this.filename = filename;
|
||||||
|
if (this.filename.EndsWith(".log"))
|
||||||
|
{
|
||||||
|
this.filename.Replace(".log", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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)
|
||||||
|
{
|
||||||
|
this.path = path;
|
||||||
|
this.filename = filename;
|
||||||
|
if (this.filename.EndsWith(".log"))
|
||||||
|
{
|
||||||
|
this.filename.Replace(".log", "");
|
||||||
|
}
|
||||||
|
this.logheader = logheader;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public members
|
||||||
|
/// <summary>
|
||||||
|
/// Writes a message
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message">Specifyes the message to be written</param>
|
||||||
|
/// <returns>Wheather the writing progress was successful</returns>
|
||||||
|
public bool WriteMessage(string message)
|
||||||
|
{
|
||||||
|
// if directory not exists, cancel
|
||||||
|
if (!Directory.Exists(this.path))
|
||||||
|
throw new DirectoryNotFoundException("The directory specifyed in Path was not found");
|
||||||
|
|
||||||
|
// holds the actual date and time
|
||||||
|
DateTime time = DateTime.Now;
|
||||||
|
|
||||||
|
// 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("FileFormat has the wrong format.");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (this.path[this.path.Length - 1] != System.IO.Path.DirectorySeparatorChar)
|
||||||
|
{
|
||||||
|
fileName = String.Concat(path, System.IO.Path.DirectorySeparatorChar, this.filename, ".log");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fileName = String.Concat(this.path, this.filename, ".log");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// build message line
|
||||||
|
string line;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// creates the line
|
||||||
|
line = String.Format(this.messageFormat, new object[] { time, message });
|
||||||
|
}
|
||||||
|
catch (FormatException)
|
||||||
|
{
|
||||||
|
throw new FormatException("MessageFormat has the wrong format.");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StreamWriter writer;
|
||||||
|
|
||||||
|
// if a log header is to be written
|
||||||
|
if (!String.IsNullOrEmpty(logheader) && IsFileEmpty(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);
|
||||||
|
OnFileCreated(EventArgs.Empty);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
writer = new StreamWriter(fileName, true);
|
||||||
|
|
||||||
|
// write message line
|
||||||
|
writer.WriteLine(line);
|
||||||
|
|
||||||
|
// close file
|
||||||
|
writer.Close();
|
||||||
|
|
||||||
|
OnMessageWritten(new LogWriterEventArgs(time, 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
|
||||||
|
/// <summary>
|
||||||
|
/// Fires the MessageWritten event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void OnMessageWritten(LogWriterEventArgs e)
|
||||||
|
{
|
||||||
|
if (MessageWritten != null)
|
||||||
|
MessageWritten(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fires the FileCreated event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void OnFileCreated(EventArgs e)
|
||||||
|
{
|
||||||
|
if (FileCreated != null)
|
||||||
|
FileCreated(this, e);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
#region LogWriterEventArgs class
|
||||||
|
/// <summary>
|
||||||
|
/// LogWriterEventArgs stores information about the sent log message
|
||||||
|
/// </summary>
|
||||||
|
public class LogWriterEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
#region fields
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the message post time
|
||||||
|
/// </summary>
|
||||||
|
private DateTime time;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores the message
|
||||||
|
/// </summary>
|
||||||
|
private string message;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region properties
|
||||||
|
/// <summary>
|
||||||
|
/// Specifyes the message post time
|
||||||
|
/// </summary>
|
||||||
|
[Description("Specifyes the message post time")]
|
||||||
|
public DateTime Time
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifyes the message
|
||||||
|
/// </summary>
|
||||||
|
[Description("Specifyes the message")]
|
||||||
|
public string Message
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#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, string message)
|
||||||
|
: base()
|
||||||
|
{
|
||||||
|
this.time = time;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
51
LogWriter/LogWriter.csproj
Normal file
51
LogWriter/LogWriter.csproj
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9AB1C683-4535-4F92-A3D1-4AF8BC1C8B9E}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>LogWriter</RootNamespace>
|
||||||
|
<AssemblyName>helogwri</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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="LogWriter.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
36
LogWriter/Properties/AssemblyInfo.cs
Normal file
36
LogWriter/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("LogWriter")]
|
||||||
|
[assembly: AssemblyDescription("Schreibt eine Logdatei")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("LogWriter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2021 by Eugen Höglinger")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[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")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
//[assembly: AssemblyFileVersion("1.0.0.0")] //Wenn auskommentiert, dann gleich wie AssemblyVersion!
|
||||||
BIN
LogWriter/bin/Debug/helogwri.dll
Normal file
BIN
LogWriter/bin/Debug/helogwri.dll
Normal file
Binary file not shown.
BIN
LogWriter/bin/Debug/helogwri.pdb
Normal file
BIN
LogWriter/bin/Debug/helogwri.pdb
Normal file
Binary file not shown.
@ -0,0 +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")]
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||||
BIN
LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
BIN
LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
f0b374017f4794fe143ae8bbf7e29de886fecf22
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
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\obj\Debug\helogwri.dll
|
||||||
|
H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\helogwri.pdb
|
||||||
BIN
LogWriter/obj/Debug/helogwri.dll
Normal file
BIN
LogWriter/obj/Debug/helogwri.dll
Normal file
Binary file not shown.
BIN
LogWriter/obj/Debug/helogwri.pdb
Normal file
BIN
LogWriter/obj/Debug/helogwri.pdb
Normal file
Binary file not shown.
6
Test_LogWriter/App.config
Normal file
6
Test_LogWriter/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
119
Test_LogWriter/Form1.Designer.cs
generated
Normal file
119
Test_LogWriter/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
|
||||||
|
namespace Test_LogWriter
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Windows Form-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.buttonRunProgram = new System.Windows.Forms.Button();
|
||||||
|
this.groupBoxProgramInfo = new System.Windows.Forms.GroupBox();
|
||||||
|
this.labelProgramInfo = new System.Windows.Forms.Label();
|
||||||
|
this.groupBoxDLLInfo = new System.Windows.Forms.GroupBox();
|
||||||
|
this.labelDLLInfo = new System.Windows.Forms.Label();
|
||||||
|
this.groupBoxProgramInfo.SuspendLayout();
|
||||||
|
this.groupBoxDLLInfo.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonRunProgram
|
||||||
|
//
|
||||||
|
this.buttonRunProgram.Location = new System.Drawing.Point(12, 287);
|
||||||
|
this.buttonRunProgram.Name = "buttonRunProgram";
|
||||||
|
this.buttonRunProgram.Size = new System.Drawing.Size(776, 23);
|
||||||
|
this.buttonRunProgram.TabIndex = 0;
|
||||||
|
this.buttonRunProgram.Text = "Programm ausführen";
|
||||||
|
this.buttonRunProgram.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonRunProgram.Click += new System.EventHandler(this.buttonRunProgram_Click);
|
||||||
|
//
|
||||||
|
// groupBoxProgramInfo
|
||||||
|
//
|
||||||
|
this.groupBoxProgramInfo.Controls.Add(this.labelProgramInfo);
|
||||||
|
this.groupBoxProgramInfo.Location = new System.Drawing.Point(12, 372);
|
||||||
|
this.groupBoxProgramInfo.Name = "groupBoxProgramInfo";
|
||||||
|
this.groupBoxProgramInfo.Size = new System.Drawing.Size(385, 66);
|
||||||
|
this.groupBoxProgramInfo.TabIndex = 11;
|
||||||
|
this.groupBoxProgramInfo.TabStop = false;
|
||||||
|
this.groupBoxProgramInfo.Text = "Programm Information";
|
||||||
|
//
|
||||||
|
// labelProgramInfo
|
||||||
|
//
|
||||||
|
this.labelProgramInfo.AutoSize = true;
|
||||||
|
this.labelProgramInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.labelProgramInfo.Location = new System.Drawing.Point(7, 20);
|
||||||
|
this.labelProgramInfo.Name = "labelProgramInfo";
|
||||||
|
this.labelProgramInfo.Size = new System.Drawing.Size(16, 13);
|
||||||
|
this.labelProgramInfo.TabIndex = 0;
|
||||||
|
this.labelProgramInfo.Text = "...";
|
||||||
|
//
|
||||||
|
// groupBoxDLLInfo
|
||||||
|
//
|
||||||
|
this.groupBoxDLLInfo.Controls.Add(this.labelDLLInfo);
|
||||||
|
this.groupBoxDLLInfo.Location = new System.Drawing.Point(403, 372);
|
||||||
|
this.groupBoxDLLInfo.Name = "groupBoxDLLInfo";
|
||||||
|
this.groupBoxDLLInfo.Size = new System.Drawing.Size(385, 66);
|
||||||
|
this.groupBoxDLLInfo.TabIndex = 12;
|
||||||
|
this.groupBoxDLLInfo.TabStop = false;
|
||||||
|
this.groupBoxDLLInfo.Text = "DLL Information";
|
||||||
|
//
|
||||||
|
// labelDLLInfo
|
||||||
|
//
|
||||||
|
this.labelDLLInfo.AutoSize = true;
|
||||||
|
this.labelDLLInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.labelDLLInfo.Location = new System.Drawing.Point(7, 20);
|
||||||
|
this.labelDLLInfo.Name = "labelDLLInfo";
|
||||||
|
this.labelDLLInfo.Size = new System.Drawing.Size(16, 13);
|
||||||
|
this.labelDLLInfo.TabIndex = 0;
|
||||||
|
this.labelDLLInfo.Text = "...";
|
||||||
|
//
|
||||||
|
// 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.groupBoxProgramInfo);
|
||||||
|
this.Controls.Add(this.groupBoxDLLInfo);
|
||||||
|
this.Controls.Add(this.buttonRunProgram);
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "Test_LogWriter";
|
||||||
|
this.Load += new System.EventHandler(this.Form1_Load);
|
||||||
|
this.groupBoxProgramInfo.ResumeLayout(false);
|
||||||
|
this.groupBoxProgramInfo.PerformLayout();
|
||||||
|
this.groupBoxDLLInfo.ResumeLayout(false);
|
||||||
|
this.groupBoxDLLInfo.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button buttonRunProgram;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxProgramInfo;
|
||||||
|
private System.Windows.Forms.Label labelProgramInfo;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxDLLInfo;
|
||||||
|
private System.Windows.Forms.Label labelDLLInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
147
Test_LogWriter/Form1.cs
Normal file
147
Test_LogWriter/Form1.cs
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace Test_LogWriter
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
#region Version und Copyright
|
||||||
|
// Version und Copyright
|
||||||
|
string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||||
|
string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||||
|
string copyright = GenerateCopyright();
|
||||||
|
string icon = Application.StartupPath + "\\Info.bmp";
|
||||||
|
|
||||||
|
//Assembly Datum und Zeit
|
||||||
|
static DateTime value = AssemblyDateTime();
|
||||||
|
string date = value.ToShortDateString();
|
||||||
|
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 Programm-Info
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the name of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the version of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the copyright notice
|
||||||
|
/// </summary>
|
||||||
|
public static string Copyright { set; get; }
|
||||||
|
|
||||||
|
private void SetProgramInfo()
|
||||||
|
{
|
||||||
|
//Name, Version und Copyright setzen
|
||||||
|
ProgramName = programName;
|
||||||
|
ProgramVersion = programVersion;
|
||||||
|
Copyright = copyright;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
SetProgramInfo();
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelProgramInfo.Text = String.Concat(ProgramName, "\r\n", ProgramVersion, "\r\n", Copyright); // Zeigt die Programm-Information an
|
||||||
|
|
||||||
|
labelDLLInfo.Text = String.Concat(LogWriter.DllName, "\r\n", LogWriter.DllVersion, "\r\n", LogWriter.Copyright); // Zeigt die DLL-Information an
|
||||||
|
}
|
||||||
|
|
||||||
|
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.WriteMessage("Das ist ein Test");
|
||||||
|
|
||||||
|
//Variante 2 - Logdateiname wird angegeben, z.B. 'my_logfile.log'
|
||||||
|
var logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2");
|
||||||
|
logWriter2.WriteMessage("Das ist Test 2");
|
||||||
|
|
||||||
|
//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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Test_LogWriter/Form1.resx
Normal file
120
Test_LogWriter/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?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>
|
||||||
|
</root>
|
||||||
22
Test_LogWriter/Program.cs
Normal file
22
Test_LogWriter/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Test_LogWriter
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
Test_LogWriter/Properties/AssemblyInfo.cs
Normal file
36
Test_LogWriter/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("Test_LogWriter")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Test_LogWriter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2021 by Eugen Höglinger")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[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")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
//[assembly: AssemblyFileVersion("1.0.0.0")] //Wenn auskommentiert, dann gleich wie AssemblyVersion!
|
||||||
70
Test_LogWriter/Properties/Resources.Designer.cs
generated
Normal file
70
Test_LogWriter/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 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.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
// 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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_LogWriter.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Test_LogWriter/Properties/Resources.resx
Normal file
117
Test_LogWriter/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
29
Test_LogWriter/Properties/Settings.Designer.cs
generated
Normal file
29
Test_LogWriter/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 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.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Test_LogWriter/Properties/Settings.settings
Normal file
7
Test_LogWriter/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
86
Test_LogWriter/Test_LogWriter.csproj
Normal file
86
Test_LogWriter/Test_LogWriter.csproj
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{052D2936-B3E0-4348-991E-00FEC44CA3F1}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>Test_LogWriter</RootNamespace>
|
||||||
|
<AssemblyName>Test_LogWriter</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="helogwri">
|
||||||
|
<HintPath>..\LogWriter\bin\Debug\helogwri.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.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
BIN
Test_LogWriter/bin/Debug/Test_LogWriter.exe
Normal file
BIN
Test_LogWriter/bin/Debug/Test_LogWriter.exe
Normal file
Binary file not shown.
6
Test_LogWriter/bin/Debug/Test_LogWriter.exe.config
Normal file
6
Test_LogWriter/bin/Debug/Test_LogWriter.exe.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
BIN
Test_LogWriter/bin/Debug/Test_LogWriter.pdb
Normal file
BIN
Test_LogWriter/bin/Debug/Test_LogWriter.pdb
Normal file
Binary file not shown.
BIN
Test_LogWriter/bin/Debug/helogwri.dll
Normal file
BIN
Test_LogWriter/bin/Debug/helogwri.dll
Normal file
Binary file not shown.
BIN
Test_LogWriter/bin/Debug/helogwri.pdb
Normal file
BIN
Test_LogWriter/bin/Debug/helogwri.pdb
Normal file
Binary file not shown.
@ -0,0 +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")]
|
||||||
Binary file not shown.
Binary file not shown.
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.Form1.resources
Normal file
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.Form1.resources
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
c22a14cd5e15cda5a8e1291702aaf3f81bc0cc03
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
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\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
|
||||||
Binary file not shown.
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.exe
Normal file
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.exe
Normal file
Binary file not shown.
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.pdb
Normal file
BIN
Test_LogWriter/obj/Debug/Test_LogWriter.pdb
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user