diff --git a/.vs/LogWriter.git/v16/.suo b/.vs/LogWriter.git/v16/.suo index e47aee0..3b3b8ec 100644 Binary files a/.vs/LogWriter.git/v16/.suo and b/.vs/LogWriter.git/v16/.suo differ diff --git a/LogWriter/AppResources.Designer.cs b/LogWriter/AppResources.Designer.cs new file mode 100644 index 0000000..0c426eb --- /dev/null +++ b/LogWriter/AppResources.Designer.cs @@ -0,0 +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); + } + } + } +} diff --git a/LogWriter/AppResources.de.resx b/LogWriter/AppResources.de.resx new file mode 100644 index 0000000..ce88b00 --- /dev/null +++ b/LogWriter/AppResources.de.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Das in Pfad angegebene Verzeichnis wurde nicht gefunden + + + FileFormat hat das falsche Format. + + \ No newline at end of file diff --git a/LogWriter/AppResources.en.resx b/LogWriter/AppResources.en.resx new file mode 100644 index 0000000..59c633f --- /dev/null +++ b/LogWriter/AppResources.en.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The directory specifyed in Path was not found. + + + FileFormat has the wrong format. + + \ No newline at end of file diff --git a/LogWriter/AppResources.resx b/LogWriter/AppResources.resx new file mode 100644 index 0000000..6a80247 --- /dev/null +++ b/LogWriter/AppResources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The directory specifyed in Path was not found + + + FileFormat has the wrong format. + + \ No newline at end of file diff --git a/LogWriter/LogWriter.cs b/LogWriter/LogWriter.cs index 403c2da..7a79df9 100644 --- a/LogWriter/LogWriter.cs +++ b/LogWriter/LogWriter.cs @@ -300,7 +300,7 @@ namespace Eugen.ESystem.IO { // if directory not exists, cancel if (!Directory.Exists(this.path)) - throw new DirectoryNotFoundException("The directory specifyed in Path was not found"); + throw new DirectoryNotFoundException(AppResources.msg001); // holds the actual date and time DateTime time = DateTime.Now; @@ -331,7 +331,7 @@ namespace Eugen.ESystem.IO } catch (FormatException) { - throw new FormatException("FileFormat has the wrong format."); + throw new FormatException(AppResources.msg002); } catch { @@ -373,7 +373,7 @@ namespace Eugen.ESystem.IO } catch (FormatException) { - throw new FormatException("MessageFormat has the wrong format."); + throw new FormatException(AppResources.msg002); } catch { diff --git a/LogWriter/LogWriter.csproj b/LogWriter/LogWriter.csproj index e441cc8..c41bcd1 100644 --- a/LogWriter/LogWriter.csproj +++ b/LogWriter/LogWriter.csproj @@ -42,10 +42,28 @@ + + 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 new file mode 100644 index 0000000..501e153 Binary files /dev/null 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 new file mode 100644 index 0000000..357408a Binary files /dev/null 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 58d7837..0da0a85 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 d0a546f..1e53ce6 100644 Binary files a/LogWriter/bin/Debug/helogwri.pdb and b/LogWriter/bin/Debug/helogwri.pdb differ diff --git a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache index e7183b8..7e61149 100644 Binary files a/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/LogWriter/obj/Debug/LogWriter.AppResources.de.resources b/LogWriter/obj/Debug/LogWriter.AppResources.de.resources new file mode 100644 index 0000000..fd5d9c1 Binary files /dev/null and b/LogWriter/obj/Debug/LogWriter.AppResources.de.resources differ diff --git a/LogWriter/obj/Debug/LogWriter.AppResources.en.resources b/LogWriter/obj/Debug/LogWriter.AppResources.en.resources new file mode 100644 index 0000000..4d90900 Binary files /dev/null and b/LogWriter/obj/Debug/LogWriter.AppResources.en.resources differ diff --git a/LogWriter/obj/Debug/LogWriter.AppResources.resources b/LogWriter/obj/Debug/LogWriter.AppResources.resources new file mode 100644 index 0000000..b529c89 Binary files /dev/null and b/LogWriter/obj/Debug/LogWriter.AppResources.resources differ diff --git a/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache b/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache deleted file mode 100644 index 3a8bb1e..0000000 Binary files a/LogWriter/obj/Debug/LogWriter.csproj.AssemblyReference.cache and /dev/null differ diff --git a/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache b/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache index 890b03e..50d8fe7 100644 --- a/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache +++ b/LogWriter/obj/Debug/LogWriter.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -f0b374017f4794fe143ae8bbf7e29de886fecf22 +a9e9b7e70c786bcdc5613b5c4ffe419197602a83 diff --git a/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt b/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt index bc3cfe7..0847dbc 100644 --- a/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt +++ b/LogWriter/obj/Debug/LogWriter.csproj.FileListAbsolute.txt @@ -3,4 +3,11 @@ H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bi 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 -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\bin\Debug\de\helogwri.resources.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\bin\Debug\en\helogwri.resources.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\de\helogwri.resources.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\LogWriter\obj\Debug\en\helogwri.resources.dll diff --git a/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache b/LogWriter/obj/Debug/LogWriter.csproj.GenerateResource.cache new file mode 100644 index 0000000..6953e19 Binary files /dev/null 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 new file mode 100644 index 0000000..1c00df1 Binary files /dev/null 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 new file mode 100644 index 0000000..501e153 Binary files /dev/null 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 new file mode 100644 index 0000000..357408a Binary files /dev/null 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 58d7837..0da0a85 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 d0a546f..1e53ce6 100644 Binary files a/LogWriter/obj/Debug/helogwri.pdb and b/LogWriter/obj/Debug/helogwri.pdb differ diff --git a/Test_LogWriter/Form1.Designer.cs b/Test_LogWriter/Form1.Designer.cs index 81e2939..6a44d94 100644 --- a/Test_LogWriter/Form1.Designer.cs +++ b/Test_LogWriter/Form1.Designer.cs @@ -34,6 +34,7 @@ namespace Test_LogWriter this.labelProgramInfo = new System.Windows.Forms.Label(); this.groupBoxDLLInfo = new System.Windows.Forms.GroupBox(); this.labelDLLInfo = new System.Windows.Forms.Label(); + this.labelResult = new System.Windows.Forms.Label(); this.groupBoxProgramInfo.SuspendLayout(); this.groupBoxDLLInfo.SuspendLayout(); this.SuspendLayout(); @@ -88,11 +89,21 @@ namespace Test_LogWriter this.labelDLLInfo.TabIndex = 0; this.labelDLLInfo.Text = "..."; // + // labelResult + // + this.labelResult.AutoSize = true; + this.labelResult.Location = new System.Drawing.Point(13, 13); + this.labelResult.Name = "labelResult"; + this.labelResult.Size = new System.Drawing.Size(16, 13); + this.labelResult.TabIndex = 13; + this.labelResult.Text = "..."; + // // 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.labelResult); this.Controls.Add(this.groupBoxProgramInfo); this.Controls.Add(this.groupBoxDLLInfo); this.Controls.Add(this.buttonRunProgram); @@ -104,6 +115,7 @@ namespace Test_LogWriter this.groupBoxDLLInfo.ResumeLayout(false); this.groupBoxDLLInfo.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -114,6 +126,7 @@ namespace Test_LogWriter private System.Windows.Forms.Label labelProgramInfo; private System.Windows.Forms.GroupBox groupBoxDLLInfo; private System.Windows.Forms.Label labelDLLInfo; + private System.Windows.Forms.Label labelResult; } } diff --git a/Test_LogWriter/Form1.cs b/Test_LogWriter/Form1.cs index 79ba5aa..d2ea1a6 100644 --- a/Test_LogWriter/Form1.cs +++ b/Test_LogWriter/Form1.cs @@ -133,7 +133,7 @@ namespace Test_LogWriter //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_logfile2.log' var logWriter2 = new LogWriter(@"C:\TMP\", "my_logfile2.log"); logWriter2.WriteMessage("Das ist Test 2"); diff --git a/Test_LogWriter/bin/Debug/Test_LogWriter.exe b/Test_LogWriter/bin/Debug/Test_LogWriter.exe index 9e60fc2..4e14c69 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.pdb b/Test_LogWriter/bin/Debug/Test_LogWriter.pdb index a3fcf1e..338284c 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 new file mode 100644 index 0000000..501e153 Binary files /dev/null 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 new file mode 100644 index 0000000..357408a Binary files /dev/null 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 58d7837..0da0a85 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 d0a546f..1e53ce6 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/DesignTimeResolveAssemblyReferences.cache b/Test_LogWriter/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 625ed8b..29485f7 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/Test_LogWriter.csproj.AssemblyReference.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.AssemblyReference.cache index 5f39418..3393a62 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.FileListAbsolute.txt b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt index 772fd94..a9cb946 100644 --- a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt +++ b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.FileListAbsolute.txt @@ -11,3 +11,5 @@ H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWrit H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.exe H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\obj\Debug\Test_LogWriter.pdb H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\helogwri.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\de\helogwri.resources.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\LogWriter.git\Test_LogWriter\bin\Debug\en\helogwri.resources.dll diff --git a/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache b/Test_LogWriter/obj/Debug/Test_LogWriter.csproj.GenerateResource.cache index cbd6f0c..70ab5ce 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.exe b/Test_LogWriter/obj/Debug/Test_LogWriter.exe index 9e60fc2..4e14c69 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 a3fcf1e..338284c 100644 Binary files a/Test_LogWriter/obj/Debug/Test_LogWriter.pdb and b/Test_LogWriter/obj/Debug/Test_LogWriter.pdb differ