From 7c9673d0441b3d980326923649285e16d8170e87 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Mon, 7 Jul 2025 09:45:27 +0200 Subject: [PATCH 01/38] resources.de --- .../LogExpert.Resources.csproj | 9 + .../Resources.de.Designer.cs | 343 ++++++++++++++++++ src/LogExpert.Resources/Resources.de.resx | 211 +++++++++++ 3 files changed, 563 insertions(+) create mode 100644 src/LogExpert.Resources/Resources.de.Designer.cs create mode 100644 src/LogExpert.Resources/Resources.de.resx diff --git a/src/LogExpert.Resources/LogExpert.Resources.csproj b/src/LogExpert.Resources/LogExpert.Resources.csproj index 553388a5..408d6b7d 100644 --- a/src/LogExpert.Resources/LogExpert.Resources.csproj +++ b/src/LogExpert.Resources/LogExpert.Resources.csproj @@ -23,6 +23,11 @@ + + Resources.de.resx + True + True + True True @@ -31,6 +36,10 @@ + + Resources.de.Designer.cs + PublicResXFileCodeGenerator + PublicResXFileCodeGenerator Resources.Designer.cs diff --git a/src/LogExpert.Resources/Resources.de.Designer.cs b/src/LogExpert.Resources/Resources.de.Designer.cs new file mode 100644 index 00000000..7bb1227c --- /dev/null +++ b/src/LogExpert.Resources/Resources.de.Designer.cs @@ -0,0 +1,343 @@ +//------------------------------------------------------------------------------ +// +// 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 LogExpert { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources___Copy { + + 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___Copy() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LogExpert.Resources - Copy", typeof(Resources___Copy).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Add { + get { + object obj = ResourceManager.GetObject("Add", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Arrow_menu_close { + get { + object obj = ResourceManager.GetObject("Arrow_menu_close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Arrow_menu_open { + get { + object obj = ResourceManager.GetObject("Arrow_menu_open", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ArrowDown { + get { + object obj = ResourceManager.GetObject("ArrowDown", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ArrowLeft { + get { + object obj = ResourceManager.GetObject("ArrowLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ArrowRight { + get { + object obj = ResourceManager.GetObject("ArrowRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ArrowUp { + get { + object obj = ResourceManager.GetObject("ArrowUp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bookmark_add { + get { + object obj = ResourceManager.GetObject("Bookmark_add", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bookmark_added { + get { + object obj = ResourceManager.GetObject("Bookmark_added", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap bookmark_bubbles { + get { + object obj = ResourceManager.GetObject("bookmark_bubbles", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bookmark_manager { + get { + object obj = ResourceManager.GetObject("Bookmark_manager", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bookmark_remove { + get { + object obj = ResourceManager.GetObject("Bookmark_remove", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Bookmarks { + get { + object obj = ResourceManager.GetObject("Bookmarks", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Check_circle { + get { + object obj = ResourceManager.GetObject("Check_circle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Close { + get { + object obj = ResourceManager.GetObject("Close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Deceased { + get { + object obj = ResourceManager.GetObject("Deceased", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Delete { + get { + object obj = ResourceManager.GetObject("Delete", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Exit { + get { + object obj = ResourceManager.GetObject("Exit", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Favorite { + get { + object obj = ResourceManager.GetObject("Favorite", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap File_open { + get { + object obj = ResourceManager.GetObject("File_open", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Filter { + get { + object obj = ResourceManager.GetObject("Filter", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Folder_open { + get { + object obj = ResourceManager.GetObject("Folder_open", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap LogLover { + get { + object obj = ResourceManager.GetObject("LogLover", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Pro_Filter { + get { + object obj = ResourceManager.GetObject("Pro_Filter", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Restart_alt { + get { + object obj = ResourceManager.GetObject("Restart_alt", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Search { + get { + object obj = ResourceManager.GetObject("Search", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Settings { + get { + object obj = ResourceManager.GetObject("Settings", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap Star { + get { + object obj = ResourceManager.GetObject("Star", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx new file mode 100644 index 00000000..e9b5affe --- /dev/null +++ b/src/LogExpert.Resources/Resources.de.resx @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + images\png\48\Add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Add + + + images\png\48\ArrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ArrowDown + + + images\png\48\ArrowLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\ArrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\ArrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Arrow_menu_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Arrow_menu_close + + + images\png\48\Arrow_menu_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Arrow_menu_open + + + images\png\48\Bookmarks.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Bookmark_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Bookmark_added.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\bookmark_bubbles.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Bookmark_manager.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Bookmark_remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Check_circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Deceased.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Exit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Favorite.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\File_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Filter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\gif\LogLover.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Logexpert Logo + + + images\bmp\Pro_Filter.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Restart_alt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + images\png\48\Settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Settings Logo + + + images\png\48\Star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file From 7b57073faff701127f6cf570ea851dbc3d698261 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Mon, 7 Jul 2025 11:08:32 +0200 Subject: [PATCH 02/38] resources to program.cs added --- src/LogExpert.Resources/Resources.Designer.cs | 135 ++++++++++++++++++ src/LogExpert.Resources/Resources.de.resx | 45 ++++++ src/LogExpert.Resources/Resources.resx | 48 +++++++ src/LogExpert/Program.cs | 121 ++++++++++------ 4 files changed, 305 insertions(+), 44 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index fbcf8bd2..dab71c7d 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -300,6 +300,123 @@ public static System.Drawing.Bitmap Pro_Filter { } } + /// + /// Looks up a localized string similar to Config file not found. + /// + public static string Program_Error_ConfigFileNotFound { + get { + return ResourceManager.GetString("Program_Error_ConfigFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}). + /// + public static string Program_Error_InsufficiantRights { + get { + return ResourceManager.GetString("Program_Error_InsufficiantRights", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IpcClientChannel error, giving up: {0}. + /// + public static string Program_Error_IPCChannel_ClientError { + get { + return ResourceManager.GetString("Program_Error_IPCChannel_ClientError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IpcClientChannel error: {0}. + /// + public static string Program_Error_IPCChannel_ClientError_Default { + get { + return ResourceManager.GetString("Program_Error_IPCChannel_ClientError_Default", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mutex error, giving up: {0}. + /// + public static string Program_Error_MutexError { + get { + return ResourceManager.GetString("Program_Error_MutexError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid payload command: null. + /// + public static string Program_Error_Payload_InvalidCommand { + get { + return ResourceManager.GetString("Program_Error_Payload_InvalidCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot open connection to first instance ({0}). + /// + public static string Program_Error_Pipe_CannotConnectToFirstInstance { + get { + return ResourceManager.GetString("Program_Error_Pipe_CannotConnectToFirstInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pipe server error: {0}. + /// + public static string Program_Error_Pipe_CommonError { + get { + return ResourceManager.GetString("Program_Error_Pipe_CommonError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Operation while connecting to the pipe server: {0}. + /// + public static string Program_Error_Pipe_InvalidOperationException { + get { + return ResourceManager.GetString("Program_Error_Pipe_InvalidOperationException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An I/O error occurred while connecting to the pipe server: {0}. + /// + public static string Program_Error_Pipe_IOException { + get { + return ResourceManager.GetString("Program_Error_Pipe_IOException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeout connecting to pipe server. + /// + public static string Program_Error_Pipe_TimeoutException { + get { + return ResourceManager.GetString("Program_Error_Pipe_TimeoutException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unauthorized access while connecting to the pipe server: {0}. + /// + public static string Program_Error_Pipe_UnauthorizedAccessException { + get { + return ResourceManager.GetString("Program_Error_Pipe_UnauthorizedAccessException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown IPC Message Type: {0}; with payload: {1}. + /// + public static string Program_Error_Pipe_UnkownIPCMessage { + get { + return ResourceManager.GetString("Program_Error_Pipe_UnkownIPCMessage", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -339,5 +456,23 @@ public static System.Drawing.Bitmap Star { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized string similar to LogExpert. + /// + public static string Title_LogExpert { + get { + return ResourceManager.GetString("Title_LogExpert", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LogExpert Error. + /// + public static string Title_LogExpert_Error { + get { + return ResourceManager.GetString("Title_LogExpert_Error", resourceCulture); + } + } } } diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index e9b5affe..ba120f6b 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -188,10 +188,19 @@ images\png\48\Folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + LogExpert + images\gif\LogLover.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Logexpert Logo + + Konfigurationsdatei konnte nicht gefunden werden + + + LogExpert besitzt nicht alle Systemrechte. Vielleicht wurde LogExpert aus einem Netzwerklaufwerk gestartet. Bitte LogExpert von einem lokalen Laufwerk starten!\n ({0}) + images\bmp\Pro_Filter.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -208,4 +217,40 @@ images\png\48\Star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + LogExpert Fehler + + + Beim versuch den Pipe-Server zu erreichen kam es zu einem Timeoutfehler + + + Beim Versuch den Pipe-Server zu erreich kam es zu einem I/O Fehler: {0} + + + Beim Versuch den Pipe-Server zu erreich kam es zu einem Zugriffsfehler: {0} + + + Pipeserver Fehler: {0} + + + Falsche Payload: null + + + Unbekannte IPC Nachricht Type: {0}; mit payload: {1} + + + Die Verbindung zur ersten Instanz kann nicht geöffnet werden: {0} + + + Problem beim Mutex, Program wird beendet: {0} + + + Fehler des IPC Client Channels, Program wird beendet: {0} + + + Fehler des IPC Client Channels: {0} + + + Eine invalide Operation wurde durchgeführt, während des Verbindungsversuches zum Pipeserver: {0} + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index e9b5affe..4177be33 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -188,10 +188,20 @@ images\png\48\Folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + LogExpert + LogExpert + images\gif\LogLover.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Logexpert Logo + + Config file not found + + + Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}) + images\bmp\Pro_Filter.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -208,4 +218,42 @@ images\png\48\Star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + LogExpert Error + LogExpert Error Title + + + Timeout connecting to pipe server + Timeout Exception thrown from the Named Pipe + + + An I/O error occurred while connecting to the pipe server: {0} + + + Unauthorized access while connecting to the pipe server: {0} + + + Pipe server error: {0} + + + Invalid payload command: null + + + Unknown IPC Message Type: {0}; with payload: {1} + + + Cannot open connection to first instance ({0}) + + + Mutex error, giving up: {0} + + + IpcClientChannel error, giving up: {0} + + + IpcClientChannel error: {0} + + + Invalid Operation while connecting to the pipe server: {0} + \ No newline at end of file diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 53d6678a..0d984b47 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -1,11 +1,19 @@ +using System.Diagnostics; +using System.Globalization; +using System.IO.Pipes; +using System.Reflection; +using System.Runtime.Versioning; +using System.Security; +using System.Security.Principal; +using System.Text; +using System.Windows.Forms; + using LogExpert.Classes; using LogExpert.Classes.CommandLine; using LogExpert.Config; using LogExpert.Core.Classes.IPC; using LogExpert.Core.Config; -using LogExpert.Core.Interface; using LogExpert.Dialogs; -using LogExpert.UI.Controls.LogWindow; using LogExpert.UI.Dialogs; using LogExpert.UI.Extensions.LogWindow; @@ -14,15 +22,6 @@ using NLog; -using System.Diagnostics; -using System.Globalization; -using System.IO.Pipes; -using System.Reflection; -using System.Security; -using System.Security.Principal; -using System.Text; -using System.Windows.Forms; - namespace LogExpert; internal static class Program @@ -41,7 +40,8 @@ internal static class Program /// The main entry point for the application. /// [STAThread] - private static void Main(string[] args) + [SupportedOSPlatform("windows")] + private static void Main (string[] args) { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.ThreadException += Application_ThreadException; @@ -69,11 +69,11 @@ private static void Main(string[] args) } else { - MessageBox.Show(@"Config file not found", @"LogExpert"); + _ = MessageBox.Show(Resources.Program_Error_ConfigFileNotFound, Resources.Title_LogExpert); } } - PluginRegistry.PluginRegistry.Instance.Create(ConfigManager.Instance.ConfigDir, ConfigManager.Instance.Settings.Preferences.PollingInterval); + _ = PluginRegistry.PluginRegistry.Instance.Create(ConfigManager.Instance.ConfigDir, ConfigManager.Instance.Settings.Preferences.PollingInterval); var pId = Process.GetCurrentProcess().SessionId; @@ -95,7 +95,7 @@ private static void Main(string[] args) LogExpertProxy proxy = new(logWin); LogExpertApplicationContext context = new(proxy, logWin); - Task.Run(() => RunServerLoopAsync(SendMessageToProxy, proxy, cts.Token)); + _ = Task.Run(() => RunServerLoopAsync(SendMessageToProxy, proxy, cts.Token)); Application.Run(context); } @@ -104,7 +104,7 @@ private static void Main(string[] args) var counter = 3; Exception errMsg = null; - Settings settings = ConfigManager.Instance.Settings; + var settings = ConfigManager.Instance.Settings; while (counter > 0) { try @@ -114,10 +114,13 @@ private static void Main(string[] args) SendCommandToServer(command); break; } - catch (Exception e) + catch (Exception ex) when (ex is ArgumentNullException + or ArgumentOutOfRangeException + or ArgumentException + or SecurityException) { - _logger.Warn(e, "IpcClientChannel error: "); - errMsg = e; + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_IPCChannel_ClientError_Default, ex)); + errMsg = ex; counter--; Thread.Sleep(500); } @@ -125,8 +128,8 @@ private static void Main(string[] args) if (counter == 0) { - _logger.Error(errMsg, "IpcClientChannel error, giving up: "); - MessageBox.Show($"Cannot open connection to first instance ({errMsg})", "LogExpert"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_IPCChannel_ClientError, errMsg)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.Title_LogExpert); } //TODO: Remove this from here? Why is it called from the Main project and not from the main window? @@ -144,21 +147,29 @@ private static void Main(string[] args) mutex.Close(); cts.Cancel(); } - catch (Exception ex) + catch (Exception ex) when (ex is UnauthorizedAccessException + or IOException + or DirectoryNotFoundException + or PathTooLongException + or WaitHandleCannotBeOpenedException + or InvalidOperationException + or SecurityException + or ArgumentNullException + or ArgumentException) { - _logger.Error(ex, "Mutex error, giving up: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_MutexError, ex)); cts.Cancel(); - MessageBox.Show($"Cannot open connection to first instance ({ex.Message})", "LogExpert"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.Title_LogExpert); } } catch (SecurityException se) { - MessageBox.Show("Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n(" + se.Message + ")", "LogExpert Error"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_InsufficiantRights, se.Message), Resources.Title_LogExpert_Error); cts.Cancel(); } } - private static string SerializeCommandIntoNonFormattedJSON(string[] fileNames, bool allowOnlyOneInstance) + private static string SerializeCommandIntoNonFormattedJSON (string[] fileNames, bool allowOnlyOneInstance) { var message = new IpcMessage() { @@ -172,7 +183,7 @@ private static string SerializeCommandIntoNonFormattedJSON(string[] fileNames, b // This loop tries to convert relative file names into absolute file names (assuming that platform file names are given). // It tolerates errors, to give file system plugins (e.g. sftp) a change later. // TODO: possibly should be moved to LocalFileSystem plugin - private static string[] GenerateAbsoluteFilePaths(string[] remainingArgs) + private static string[] GenerateAbsoluteFilePaths (string[] remainingArgs) { List argsList = []; @@ -183,7 +194,12 @@ private static string[] GenerateAbsoluteFilePaths(string[] remainingArgs) FileInfo info = new(fileArg); argsList.Add(info.Exists ? info.FullName : fileArg); } - catch (Exception) + catch (Exception ex) when (ex is ArgumentNullException + or SecurityException + or ArgumentException + or UnauthorizedAccessException + or PathTooLongException + or NotSupportedException) { argsList.Add(fileArg); } @@ -192,7 +208,7 @@ private static string[] GenerateAbsoluteFilePaths(string[] remainingArgs) return [.. argsList]; } - private static void SendMessageToProxy(IpcMessage message, LogExpertProxy proxy) + private static void SendMessageToProxy (IpcMessage message, LogExpertProxy proxy) { var payLoad = message.Payload.ToObject(); @@ -210,7 +226,7 @@ private static void SendMessageToProxy(IpcMessage message, LogExpertProxy proxy) proxy.NewWindowOrLockedWindow([.. payLoad.Files]); break; default: - _logger.Error($"Unknown IPC Message Type: {message.Type}; with payload: {payLoad}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_UnkownIPCMessage, message.Type, payLoad)); break; } } @@ -220,14 +236,14 @@ private static bool CheckPayload (LoadPayload payLoad) { if (payLoad == null) { - _logger.Error("Invalid payload command: null"); + _logger.Error(Resources.Program_Error_Payload_InvalidCommand); return false; } return true; } - private static void SendCommandToServer(string command) + private static void SendCommandToServer (string command) { using var client = new NamedPipeClientStream(".", PIPE_SERVER_NAME, PipeDirection.Out); @@ -237,17 +253,22 @@ private static void SendCommandToServer(string command) } catch (TimeoutException) { - _logger.Error("Timeout connecting to pipe server"); + _logger.Error(Resources.Program_Error_Pipe_TimeoutException); return; } catch (IOException ex) { - _logger.Warn(ex, "An I/O error occurred while connecting to the pipe server."); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_IOException, ex)); + return; + } + catch (InvalidOperationException ioe) + { + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_InvalidOperationException, ioe)); return; } catch (UnauthorizedAccessException ex) { - _logger.Warn(ex, "Unauthorized access while connecting to the pipe server."); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_UnauthorizedAccessException, ex)); return; } @@ -255,9 +276,10 @@ private static void SendCommandToServer(string command) writer.WriteLine(command); } - private static async Task RunServerLoopAsync(Action onCommand, LogExpertProxy proxy, CancellationToken cancellationToken) + [SupportedOSPlatform("windows")] + private static async Task RunServerLoopAsync (Action onCommand, LogExpertProxy proxy, CancellationToken cancellationToken) { - while (cancellationToken.IsCancellationRequested == false) + while (!cancellationToken.IsCancellationRequested) { using var server = new NamedPipeServerStream( PIPE_SERVER_NAME, @@ -268,9 +290,9 @@ private static async Task RunServerLoopAsync(Action try { - await server.WaitForConnectionAsync(cancellationToken); + await server.WaitForConnectionAsync(cancellationToken).ConfigureAwait(false); using var reader = new StreamReader(server, Encoding.UTF8); - var line = await reader.ReadLineAsync(cancellationToken); + var line = await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false); if (line != null) { @@ -282,15 +304,24 @@ private static async Task RunServerLoopAsync(Action { break; } - catch (Exception ex) + catch (Exception ex) when (ex is IOException + or ObjectDisposedException + or TimeoutException + or InvalidOperationException + or UnauthorizedAccessException + or SecurityException + or ArgumentNullException + or ArgumentOutOfRangeException + or ArgumentException) { - _logger.Warn(ex, "Pipe server error"); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CommonError, ex)); } } } [STAThread] - private static void ShowUnhandledException(object exceptionObject) + [SupportedOSPlatform("windows")] + private static void ShowUnhandledException (object exceptionObject) { var errorText = string.Empty; string stackTrace; @@ -319,7 +350,8 @@ private static void ShowUnhandledException(object exceptionObject) #region Events handler - private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + [SupportedOSPlatform("windows")] + private static void Application_ThreadException (object sender, ThreadExceptionEventArgs e) { _logger.Fatal(e); @@ -333,7 +365,8 @@ private static void Application_ThreadException(object sender, ThreadExceptionEv thread.Join(); } - private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + [SupportedOSPlatform("windows")] + private static void CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e) { _logger.Fatal(e); From 485c16605191eb28a722d8982ddce55459ef5f21 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Mon, 7 Jul 2025 12:13:23 +0200 Subject: [PATCH 03/38] highlight dialog and proxy --- src/LogExpert.Resources/Resources.Designer.cs | 254 +++++++++++++++--- src/LogExpert.Resources/Resources.de.resx | 86 +++++- src/LogExpert.Resources/Resources.resx | 86 +++++- .../Dialogs/LogTabWindow/HighlightDialog.cs | 88 +++--- .../Classes/LogExpertApplicationContext.cs | 11 +- src/LogExpert/Classes/LogExpertProxy.cs | 59 ++-- src/LogExpert/Config/ConfigManager.cs | 14 +- src/LogExpert/Program.cs | 29 +- 8 files changed, 477 insertions(+), 150 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index dab71c7d..ff6917f1 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -280,6 +280,186 @@ public static System.Drawing.Bitmap Folder_open { } } + /// + /// Looks up a localized string similar to Error during add of highlight entry: {0}. + /// + public static string HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry { + get { + return ResourceManager.GetString("HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error during save of save highlight entry: {0}. + /// + public static string HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry { + get { + return ResourceManager.GetString("HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while trying to access file: {0}, exception: {1}. + /// + public static string HighlightDialog_Logger_Error_FileAccessError { + get { + return ResourceManager.GetString("HighlightDialog_Logger_Error_FileAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regex value is null or whitespace. + /// + public static string HighlightDialog_RegexError { + get { + return ResourceManager.GetString("HighlightDialog_RegexError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Default]. + /// + public static string HighlightDialog_UI_DefaultGroupName { + get { + return ResourceManager.GetString("HighlightDialog_UI_DefaultGroupName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error during add of entry.\r\n{0}. + /// + public static string HighlightDialog_UI_ErrorDuringAddOfHighLightEntry { + get { + return ResourceManager.GetString("HighlightDialog_UI_ErrorDuringAddOfHighLightEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error during save of entry.\r\n{0}. + /// + public static string HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry { + get { + return ResourceManager.GetString("HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings (*.json)|*.json|All files (*.*). + /// + public static string HighlightDialog_UI_Export_Filter { + get { + return ResourceManager.GetString("HighlightDialog_UI_Export_Filter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New group. + /// + public static string HighlightDialog_UI_NewGroup_BaseName { + get { + return ResourceManager.GetString("HighlightDialog_UI_NewGroup_BaseName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings could not be imported: {exSettings could not be imported: {0}. + /// + public static string HighlightDialog_UI_SettingsCouldNotBeImported { + get { + return ResourceManager.GetString("HighlightDialog_UI_SettingsCouldNotBeImported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings imported. + /// + public static string HighlightDialog_UI_SettingsImported { + get { + return ResourceManager.GetString("HighlightDialog_UI_SettingsImported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy of. + /// + public static string HighlightDialog_UI_Snippet_CopyOf { + get { + return ResourceManager.GetString("HighlightDialog_UI_Snippet_CopyOf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Export Settings to file. + /// + public static string HighlightDialog_UI_Title_ExportSettings { + get { + return ResourceManager.GetString("HighlightDialog_UI_Title_ExportSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adding window to list. + /// + public static string LogExpertProxy_Logger_Info_AddWindow { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_AddWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating new LogTabWindow. + /// + public static string LogExpertProxy_Logger_Info_CreatingNewWindow { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_CreatingNewWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Last LogTabWindow was closed. + /// + public static string LogExpertProxy_Logger_Info_LastTabWindowClosed { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_LastTabWindowClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading files into existing LogTabWindow. + /// + public static string LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No windows left. New created window will be the new 'first' GUI window. + /// + public static string LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing window from list. + /// + public static string LogExpertProxy_Logger_Info_RemoveWindow { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Info_RemoveWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to first GUI thread window is disposed. Setting a new one.. + /// + public static string LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne { + get { + return ResourceManager.GetString("LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -301,119 +481,119 @@ public static System.Drawing.Bitmap Pro_Filter { } /// - /// Looks up a localized string similar to Config file not found. + /// Looks up a localized string similar to IpcClientChannel error, giving up: {0}. /// - public static string Program_Error_ConfigFileNotFound { + public static string Program_Logger_Error_IPCChannel_ClientError { get { - return ResourceManager.GetString("Program_Error_ConfigFileNotFound", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_IPCChannel_ClientError", resourceCulture); } } /// - /// Looks up a localized string similar to Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}). + /// Looks up a localized string similar to IpcClientChannel error: {0}. /// - public static string Program_Error_InsufficiantRights { + public static string Program_Logger_Error_IPCChannel_ClientError_Default { get { - return ResourceManager.GetString("Program_Error_InsufficiantRights", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_IPCChannel_ClientError_Default", resourceCulture); } } /// - /// Looks up a localized string similar to IpcClientChannel error, giving up: {0}. + /// Looks up a localized string similar to Mutex error, giving up: {0}. /// - public static string Program_Error_IPCChannel_ClientError { + public static string Program_Logger_Error_MutexError { get { - return ResourceManager.GetString("Program_Error_IPCChannel_ClientError", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_MutexError", resourceCulture); } } /// - /// Looks up a localized string similar to IpcClientChannel error: {0}. + /// Looks up a localized string similar to Invalid payload command: null. /// - public static string Program_Error_IPCChannel_ClientError_Default { + public static string Program_Logger_Error_Payload_InvalidCommand { get { - return ResourceManager.GetString("Program_Error_IPCChannel_ClientError_Default", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_Payload_InvalidCommand", resourceCulture); } } /// - /// Looks up a localized string similar to Mutex error, giving up: {0}. + /// Looks up a localized string similar to Timeout connecting to pipe server. /// - public static string Program_Error_MutexError { + public static string Program_Logger_Error_Pipe_TimeoutException { get { - return ResourceManager.GetString("Program_Error_MutexError", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_Pipe_TimeoutException", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid payload command: null. + /// Looks up a localized string similar to Unknown IPC Message Type: {0}; with payload: {1}. /// - public static string Program_Error_Payload_InvalidCommand { + public static string Program_Logger_Error_Pipe_UnkownIPCMessage { get { - return ResourceManager.GetString("Program_Error_Payload_InvalidCommand", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_Pipe_UnkownIPCMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Cannot open connection to first instance ({0}). + /// Looks up a localized string similar to An I/O error occurred while connecting to the pipe server: {0}. /// - public static string Program_Error_Pipe_CannotConnectToFirstInstance { + public static string Program_Logger_Warn_Error_Pipe_IOException { get { - return ResourceManager.GetString("Program_Error_Pipe_CannotConnectToFirstInstance", resourceCulture); + return ResourceManager.GetString("Program_Logger_Warn_Error_Pipe_IOException", resourceCulture); } } /// /// Looks up a localized string similar to Pipe server error: {0}. /// - public static string Program_Error_Pipe_CommonError { + public static string Program_Logger_Warn_Pipe_CommonError { get { - return ResourceManager.GetString("Program_Error_Pipe_CommonError", resourceCulture); + return ResourceManager.GetString("Program_Logger_Warn_Pipe_CommonError", resourceCulture); } } /// /// Looks up a localized string similar to Invalid Operation while connecting to the pipe server: {0}. /// - public static string Program_Error_Pipe_InvalidOperationException { + public static string Program_Logger_Warn_Pipe_InvalidOperationException { get { - return ResourceManager.GetString("Program_Error_Pipe_InvalidOperationException", resourceCulture); + return ResourceManager.GetString("Program_Logger_Warn_Pipe_InvalidOperationException", resourceCulture); } } /// - /// Looks up a localized string similar to An I/O error occurred while connecting to the pipe server: {0}. + /// Looks up a localized string similar to Unauthorized access while connecting to the pipe server: {0}. /// - public static string Program_Error_Pipe_IOException { + public static string Program_Logger_Warn_Pipe_UnauthorizedAccessException { get { - return ResourceManager.GetString("Program_Error_Pipe_IOException", resourceCulture); + return ResourceManager.GetString("Program_Logger_Warn_Pipe_UnauthorizedAccessException", resourceCulture); } } /// - /// Looks up a localized string similar to Timeout connecting to pipe server. + /// Looks up a localized string similar to Config file not found. /// - public static string Program_Error_Pipe_TimeoutException { + public static string Program_UI_Error_ConfigFileNotFound { get { - return ResourceManager.GetString("Program_Error_Pipe_TimeoutException", resourceCulture); + return ResourceManager.GetString("Program_UI_Error_ConfigFileNotFound", resourceCulture); } } /// - /// Looks up a localized string similar to Unauthorized access while connecting to the pipe server: {0}. + /// Looks up a localized string similar to Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}). /// - public static string Program_Error_Pipe_UnauthorizedAccessException { + public static string Program_UI_Error_InsufficiantRights { get { - return ResourceManager.GetString("Program_Error_Pipe_UnauthorizedAccessException", resourceCulture); + return ResourceManager.GetString("Program_UI_Error_InsufficiantRights", resourceCulture); } } /// - /// Looks up a localized string similar to Unknown IPC Message Type: {0}; with payload: {1}. + /// Looks up a localized string similar to Cannot open connection to first instance ({0}). /// - public static string Program_Error_Pipe_UnkownIPCMessage { + public static string Program_UI_Error_Pipe_CannotConnectToFirstInstance { get { - return ResourceManager.GetString("Program_Error_Pipe_UnkownIPCMessage", resourceCulture); + return ResourceManager.GetString("Program_UI_Error_Pipe_CannotConnectToFirstInstance", resourceCulture); } } diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index ba120f6b..1b07cb9c 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -195,10 +195,10 @@ images\gif\LogLover.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Logexpert Logo - + Konfigurationsdatei konnte nicht gefunden werden - + LogExpert besitzt nicht alle Systemrechte. Vielleicht wurde LogExpert aus einem Netzwerklaufwerk gestartet. Bitte LogExpert von einem lokalen Laufwerk starten!\n ({0}) @@ -220,37 +220,97 @@ LogExpert Fehler - + Beim versuch den Pipe-Server zu erreichen kam es zu einem Timeoutfehler - + Beim Versuch den Pipe-Server zu erreich kam es zu einem I/O Fehler: {0} - + Beim Versuch den Pipe-Server zu erreich kam es zu einem Zugriffsfehler: {0} - + Pipeserver Fehler: {0} - + Falsche Payload: null - + Unbekannte IPC Nachricht Type: {0}; mit payload: {1} - + Die Verbindung zur ersten Instanz kann nicht geöffnet werden: {0} - + Problem beim Mutex, Program wird beendet: {0} - + Fehler des IPC Client Channels, Program wird beendet: {0} - + Fehler des IPC Client Channels: {0} - + Eine invalide Operation wurde durchgeführt, während des Verbindungsversuches zum Pipeserver: {0} + + Laden der Dateien in einen existierendes LogTabWindow + + + Erstes Fenster wurde geschlossen. Ein neues wird erstellt + + + Kein offenes Fenster übrig. Ein neues Fenster wird erstellt es wird als primäres GUI Fenster benutzt + + + Neues LogTabWindow erstellen + + + Das letzte LogTabWindow wurde geschlossen + + + Fenster wird zur Liste hinzugefügt + + + Fenster wird aus der Liste entfernt + + + Settings importiert + + + Fehler während des Zugriffes auf die Datei: {0}, Fehlermeldung: {1} + + + Settings konnte nicht importiert werden: {0} + + + Exportieren der Settings in eine Datei + + + Settings (*.json)|*.json|Alle Dateien (*.*)|*.* + + + Kopie von + + + Neue Gruppe + + + Fehler während des Hinzufügens eines Highlighteintrages: {0} + + + Fehler während des Hinzufügens eines Highlighteintrages.\r\n{0} + + + Die Regex ist "null" oder besteht nur aus Leerzeichen + + + [Default] + + + Während des Speichern des Highlighteintrages ist ein Fehler aufgetreten: {0} + + + Während des Speichern des Highlighteintrages ist ein Fehler aufgetreten: {0} + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 4177be33..f12bacfd 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -196,10 +196,10 @@ images\gif\LogLover.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Logexpert Logo - + Config file not found - + Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}) @@ -222,38 +222,98 @@ LogExpert Error LogExpert Error Title - + Timeout connecting to pipe server Timeout Exception thrown from the Named Pipe - + An I/O error occurred while connecting to the pipe server: {0} - + Unauthorized access while connecting to the pipe server: {0} - + Pipe server error: {0} - + Invalid payload command: null - + Unknown IPC Message Type: {0}; with payload: {1} - + Cannot open connection to first instance ({0}) - + Mutex error, giving up: {0} - + IpcClientChannel error, giving up: {0} - + IpcClientChannel error: {0} - + Invalid Operation while connecting to the pipe server: {0} + + Loading files into existing LogTabWindow + + + first GUI thread window is disposed. Setting a new one. + + + No windows left. New created window will be the new 'first' GUI window + + + Creating new LogTabWindow + + + Last LogTabWindow was closed + + + Adding window to list + + + Removing window from list + + + Settings imported + + + Error while trying to access file: {0}, exception: {1} + + + Settings could not be imported: {exSettings could not be imported: {0} + + + Export Settings to file + + + Settings (*.json)|*.json|All files (*.*) + + + Copy of + + + New group + + + Error during add of highlight entry: {0} + + + Error during add of entry.\r\n{0} + + + Regex value is null or whitespace + + + [Default] + + + Error during save of save highlight entry: {0} + + + Error during save of entry.\r\n{0} + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs index d772f4da..25b3cd75 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs @@ -1,4 +1,6 @@ +using System.Globalization; using System.Runtime.Versioning; +using System.Security; using System.Text.RegularExpressions; using LogExpert.Core.Classes.Highlight; @@ -85,8 +87,11 @@ private void OnBtnApplyClick (object sender, EventArgs e) private void OnBtnBookmarkCommentClick (object sender, EventArgs e) { - BookmarkCommentDlg dlg = new(); - dlg.Comment = _bookmarkComment; + BookmarkCommentDlg dlg = new() + { + Comment = _bookmarkComment + }; + if (dlg.ShowDialog() == DialogResult.OK) { _bookmarkComment = dlg.Comment; @@ -99,7 +104,7 @@ private void OnBtnCopyGroupClick (object sender, EventArgs e) if (comboBoxGroups.SelectedIndex >= 0 && comboBoxGroups.SelectedIndex < HighlightGroupList.Count) { var newGroup = (HighlightGroup)HighlightGroupList[comboBoxGroups.SelectedIndex].Clone(); - newGroup.GroupName = "Copy of " + newGroup.GroupName; + newGroup.GroupName = $"{Resources.HighlightDialog_UI_Snippet_CopyOf} {newGroup.GroupName}"; HighlightGroupList.Add(newGroup); FillGroupComboBox(); @@ -148,10 +153,10 @@ private void OnBtnExportGroupClick (object sender, EventArgs e) { SaveFileDialog dlg = new() { - Title = @"Export Settings to file", + Title = Resources.HighlightDialog_UI_Title_ExportSettings, DefaultExt = "json", AddExtension = true, - Filter = @"Settings (*.json)|*.json|All files (*.*)|*.*" + Filter = Resources.HighlightDialog_UI_Export_Filter }; if (dlg.ShowDialog() == DialogResult.OK) @@ -218,10 +223,15 @@ private void OnBtnImportGroupClick (object sender, EventArgs e) { fileInfo = new FileInfo(dlg.FileName); } - catch (Exception ex) + catch (Exception ex) when (ex is ArgumentNullException + or SecurityException + or ArgumentException + or UnauthorizedAccessException + or PathTooLongException + or NotSupportedException) { - MessageBox.Show(this, $@"Settings could not be imported: {ex}", @"LogExpert"); - _logger.Error($"Error while trying to access file: {dlg.FileName}: {ex}"); + _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsCouldNotBeImported, Resources.Title_LogExpert); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_FileAccessError, dlg.FileName, ex)); return; } @@ -232,7 +242,8 @@ private void OnBtnImportGroupClick (object sender, EventArgs e) FillGroupComboBox(); - MessageBox.Show(this, @"Settings imported", @"LogExpert"); + _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsImported, Resources.Title_LogExpert); + } private void OnBtnMoveDownClick (object sender, EventArgs e) @@ -265,7 +276,7 @@ private void OnBtnMoveUpClick (object sender, EventArgs e) private void OnBtnNewGroupClick (object sender, EventArgs e) { // Propose a unique name - const string baseName = "New group"; + var baseName = Resources.HighlightDialog_UI_NewGroup_BaseName; var name = baseName; var uniqueName = false; var i = 1; @@ -344,7 +355,7 @@ private void OnCmbBoxGroupDrawItem (object sender, DrawItemEventArgs e) e.DrawBackground(); if (e.Index >= 0) { - HighlightGroup group = HighlightGroupList[e.Index]; + var group = HighlightGroupList[e.Index]; Rectangle rectangle = new(0, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height); Brush brush = new SolidBrush(SystemColors.ControlText); @@ -479,16 +490,20 @@ private void AddNewEntry () NoBackground = checkBoxNoBackground.Checked }; - listBoxHighlight.Items.Add(entry); + _ = listBoxHighlight.Items.Add(entry); // Select the newly created item _currentGroup.HighlightEntryList.Add(entry); listBoxHighlight.SelectedItem = entry; } - catch (Exception ex) + catch (Exception ex) when (ex is ArgumentException + or RegexMatchTimeoutException + or ArgumentNullException + or InvalidOperationException + or SystemException) { - _logger.Error(ex, "Error during add of highlight entry"); - MessageBox.Show($"Error during add of entry.\r\n{ex.Message}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry, ex)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message, Resources.Title_LogExpert_Error)); } } } @@ -504,20 +519,22 @@ private void CheckRegex () { if (string.IsNullOrWhiteSpace(textBoxSearchString.Text)) { - throw new ArgumentException("Regex value is null or whitespace"); + throw new ArgumentException(Resources.HighlightDialog_RegexError); } - // ReSharper disable once ReturnValueOfPureMethodIsNotUsed - Regex.IsMatch("", textBoxSearchString.Text); + _ = Regex.IsMatch(string.Empty, textBoxSearchString.Text); } } - private void ChooseColor (ColorComboBox comboBox) + private static void ChooseColor (ColorComboBox comboBox) { - ColorDialog colorDialog = new(); - colorDialog.AllowFullOpen = true; - colorDialog.ShowHelp = false; - colorDialog.Color = comboBox.CustomColor; + ColorDialog colorDialog = new() + { + AllowFullOpen = true, + ShowHelp = false, + Color = comboBox.CustomColor + }; + if (colorDialog.ShowDialog() == DialogResult.OK) { comboBox.CustomColor = colorDialog.Color; @@ -543,9 +560,9 @@ private void FillGroupComboBox () comboBoxGroups.Items.Clear(); - foreach (HighlightGroup group in HighlightGroupList) + foreach (var group in HighlightGroupList) { - comboBoxGroups.Items.Add(group); + _ = comboBoxGroups.Items.Add(group); } ReEvaluateGroupButtonStates(); @@ -556,23 +573,22 @@ private void FillHighlightListBox () listBoxHighlight.Items.Clear(); if (_currentGroup != null) { - foreach (HighlightEntry entry in _currentGroup.HighlightEntryList) + foreach (var entry in _currentGroup.HighlightEntryList) { - listBoxHighlight.Items.Add(entry); + _ = listBoxHighlight.Items.Add(entry); } } } private void InitData () { - const string def = "[Default]"; HighlightGroupList ??= []; if (HighlightGroupList.Count == 0) { HighlightGroup highlightGroup = new() { - GroupName = def, + GroupName = Resources.HighlightDialog_UI_DefaultGroupName, HighlightEntryList = [] }; @@ -585,10 +601,10 @@ private void InitData () var groupToSelect = PreSelectedGroupName; if (string.IsNullOrEmpty(groupToSelect)) { - groupToSelect = def; + groupToSelect = Resources.HighlightDialog_UI_DefaultGroupName; } - foreach (HighlightGroup group in HighlightGroupList) + foreach (var group in HighlightGroupList) { if (group.GroupName.Equals(groupToSelect, StringComparison.Ordinal)) { @@ -657,10 +673,14 @@ private void SaveEntry () entry.NoBackground = checkBoxNoBackground.Checked; listBoxHighlight.Refresh(); } - catch (Exception ex) + catch (Exception ex) when (ex is ArgumentException + or RegexMatchTimeoutException + or ArgumentNullException + or InvalidOperationException + or SystemException) { - _logger.Error(ex, "Error during save of save highlight entry"); - MessageBox.Show($"Error during save of entry.\r\n{ex.Message}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry, ex)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message, Resources.Title_LogExpert_Error)); } } diff --git a/src/LogExpert/Classes/LogExpertApplicationContext.cs b/src/LogExpert/Classes/LogExpertApplicationContext.cs index 1b3940bb..8b6d6986 100644 --- a/src/LogExpert/Classes/LogExpertApplicationContext.cs +++ b/src/LogExpert/Classes/LogExpertApplicationContext.cs @@ -1,7 +1,8 @@ -using LogExpert.Core.Interface; -using System; +using System.Runtime.Versioning; using System.Windows.Forms; +using LogExpert.Core.Interface; + namespace LogExpert.Classes; internal class LogExpertApplicationContext : ApplicationContext @@ -14,7 +15,8 @@ internal class LogExpertApplicationContext : ApplicationContext #region cTor - public LogExpertApplicationContext(LogExpertProxy proxy, ILogTabWindow firstLogWin) + [SupportedOSPlatform("windows")] + public LogExpertApplicationContext (LogExpertProxy proxy, ILogTabWindow firstLogWin) { _proxy = proxy; _proxy.LastWindowClosed += OnProxyLastWindowClosed; @@ -25,7 +27,8 @@ public LogExpertApplicationContext(LogExpertProxy proxy, ILogTabWindow firstLogW #region Events handler - private void OnProxyLastWindowClosed(object sender, EventArgs e) + [SupportedOSPlatform("windows")] + private void OnProxyLastWindowClosed (object sender, EventArgs e) { ExitThread(); Application.Exit(); diff --git a/src/LogExpert/Classes/LogExpertProxy.cs b/src/LogExpert/Classes/LogExpertProxy.cs index 558899ab..6bf58334 100644 --- a/src/LogExpert/Classes/LogExpertProxy.cs +++ b/src/LogExpert/Classes/LogExpertProxy.cs @@ -1,15 +1,12 @@ +using System.Runtime.Versioning; +using System.Windows.Forms; + using LogExpert.Config; using LogExpert.Core.Interface; -using LogExpert.UI.Controls.LogWindow; using LogExpert.UI.Extensions.LogWindow; using NLog; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows.Forms; - namespace LogExpert.Classes; internal class LogExpertProxy : ILogExpertProxy @@ -28,7 +25,7 @@ internal class LogExpertProxy : ILogExpertProxy #region cTor - public LogExpertProxy(ILogTabWindow logTabWindow) + public LogExpertProxy (ILogTabWindow logTabWindow) { AddWindow(logTabWindow); logTabWindow.LogExpertProxy = this; @@ -60,25 +57,26 @@ public LogExpertProxy(ILogTabWindow logTabWindow) #region Public methods - public void LoadFiles(string[] fileNames) + public void LoadFiles (string[] fileNames) { - _logger.Info(CultureInfo.InvariantCulture, "Loading files into existing LogTabWindow"); - ILogTabWindow logWin = _windowList[^1]; + _logger.Info(Resources.LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab); + var logWin = _windowList[^1]; _ = logWin.Invoke(new MethodInvoker(logWin.SetForeground)); logWin.LoadFiles(fileNames); } - public void NewWindow(string[] fileNames) + [SupportedOSPlatform("windows")] + public void NewWindow (string[] fileNames) { if (_firstLogTabWindow.IsDisposed) { - _logger.Warn(CultureInfo.InvariantCulture, "first GUI thread window is disposed. Setting a new one."); + _logger.Warn(Resources.LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne); // may occur if a window is closed because of unhandled exception. // Determine a new 'firstWindow'. If no window is left, start a new one. RemoveWindow(_firstLogTabWindow); if (_windowList.Count == 0) { - _logger.Info(CultureInfo.InvariantCulture, "No windows left. New created window will be the new 'first' GUI window"); + _logger.Info(Resources.LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne); LoadFiles(fileNames); } else @@ -93,7 +91,8 @@ public void NewWindow(string[] fileNames) } } - public void NewWindowOrLockedWindow(string[] fileNames) + [SupportedOSPlatform("windows")] + public void NewWindowOrLockedWindow (string[] fileNames) { foreach (var logWin in _windowList) { @@ -108,25 +107,29 @@ public void NewWindowOrLockedWindow(string[] fileNames) NewWindow(fileNames); } - - public void NewWindowWorker(string[] fileNames) + [SupportedOSPlatform("windows")] + public void NewWindowWorker (string[] fileNames) { - _logger.Info(CultureInfo.InvariantCulture, "Creating new LogTabWindow"); + _logger.Info(Resources.LogExpertProxy_Logger_Info_CreatingNewWindow); IConfigManager configManager = ConfigManager.Instance; - ILogTabWindow logWin = AbstractLogTabWindow.Create(fileNames.Length > 0 ? fileNames : null, _logWindowIndex++, true, configManager); + var logWin = AbstractLogTabWindow.Create(fileNames.Length > 0 + ? fileNames + : null, + _logWindowIndex++, + true, + configManager); logWin.LogExpertProxy = this; AddWindow(logWin); logWin.Show(); logWin.Activate(); } - - public void WindowClosed(ILogTabWindow logWin) + public void WindowClosed (ILogTabWindow logWin) { RemoveWindow(logWin); if (_windowList.Count == 0) { - _logger.Info(CultureInfo.InvariantCulture, "Last LogTabWindow was closed"); + _logger.Info(Resources.LogExpertProxy_Logger_Info_LastTabWindowClosed); PluginRegistry.PluginRegistry.Instance.CleanupPlugins(); OnLastWindowClosed(); } @@ -140,7 +143,7 @@ public void WindowClosed(ILogTabWindow logWin) } } - public int GetLogWindowCount() + public int GetLogWindowCount () { return _windowList.Count; } @@ -154,24 +157,24 @@ public int GetLogWindowCount() #region Private Methods - private void AddWindow(ILogTabWindow window) + private void AddWindow (ILogTabWindow window) { - _logger.Info(CultureInfo.InvariantCulture, "Adding window to list"); + _logger.Info(Resources.LogExpertProxy_Logger_Info_AddWindow); _windowList.Add(window); } - private void RemoveWindow(ILogTabWindow window) + private void RemoveWindow (ILogTabWindow window) { - _logger.Info(CultureInfo.InvariantCulture, "Removing window from list"); + _logger.Info(Resources.LogExpertProxy_Logger_Info_RemoveWindow); _ = _windowList.Remove(window); } #endregion - protected void OnLastWindowClosed() + protected void OnLastWindowClosed () { LastWindowClosed?.Invoke(this, new EventArgs()); } - private delegate void NewWindowFx(string[] fileNames); + private delegate void NewWindowFx (string[] fileNames); } \ No newline at end of file diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index 23213246..cdaa1bb3 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -94,20 +94,20 @@ public void Export (FileInfo fileInfo) Instance.Save(fileInfo, Settings); } - public void Export (FileInfo fileInfo, SettingsFlags flags) + public void Export (FileInfo fileInfo, SettingsFlags highlightSettings) { - Instance.Save(fileInfo, Settings, flags); + Instance.Save(fileInfo, Settings, highlightSettings); } - public void Import (FileInfo fileInfo, ExportImportFlags flags) + public void Import (FileInfo fileInfo, ExportImportFlags importFlags) { - Instance._settings = Instance.Import(Instance._settings, fileInfo, flags); + Instance._settings = Instance.Import(Instance._settings, fileInfo, importFlags); Save(SettingsFlags.All); } - public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags flags) + public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags importFlags) { - Instance._settings.Preferences.HighlightGroupList = Instance.Import(Instance._settings.Preferences.HighlightGroupList, fileInfo, flags); + Instance._settings.Preferences.HighlightGroupList = Instance.Import(Instance._settings.Preferences.HighlightGroupList, fileInfo, importFlags); Save(SettingsFlags.All); } @@ -120,7 +120,7 @@ private Settings Load () _logger.Info(CultureInfo.InvariantCulture, "Loading settings"); string dir; - + if (!File.Exists(Path.Combine(PortableModeDir, PortableModeSettingsFileName))) { _logger.Info(CultureInfo.InvariantCulture, "Load settings standard mode"); diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 0d984b47..beb5c1c7 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -69,7 +69,7 @@ private static void Main (string[] args) } else { - _ = MessageBox.Show(Resources.Program_Error_ConfigFileNotFound, Resources.Title_LogExpert); + _ = MessageBox.Show(Resources.Program_UI_Error_ConfigFileNotFound, Resources.Title_LogExpert); } } @@ -119,7 +119,7 @@ or ArgumentOutOfRangeException or ArgumentException or SecurityException) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_IPCChannel_ClientError_Default, ex)); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_IPCChannel_ClientError_Default, ex)); errMsg = ex; counter--; Thread.Sleep(500); @@ -128,8 +128,8 @@ or ArgumentException if (counter == 0) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_IPCChannel_ClientError, errMsg)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.Title_LogExpert); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_IPCChannel_ClientError, errMsg)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.Title_LogExpert); } //TODO: Remove this from here? Why is it called from the Main project and not from the main window? @@ -157,14 +157,14 @@ or SecurityException or ArgumentNullException or ArgumentException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_MutexError, ex)); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_MutexError, ex)); cts.Cancel(); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.Title_LogExpert); } } catch (SecurityException se) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_InsufficiantRights, se.Message), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_InsufficiantRights, se.Message), Resources.Title_LogExpert_Error); cts.Cancel(); } } @@ -208,6 +208,7 @@ or PathTooLongException return [.. argsList]; } + [SupportedOSPlatform("windows")] private static void SendMessageToProxy (IpcMessage message, LogExpertProxy proxy) { var payLoad = message.Payload.ToObject(); @@ -226,7 +227,7 @@ private static void SendMessageToProxy (IpcMessage message, LogExpertProxy proxy proxy.NewWindowOrLockedWindow([.. payLoad.Files]); break; default: - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_UnkownIPCMessage, message.Type, payLoad)); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_Pipe_UnkownIPCMessage, message.Type, payLoad)); break; } } @@ -236,7 +237,7 @@ private static bool CheckPayload (LoadPayload payLoad) { if (payLoad == null) { - _logger.Error(Resources.Program_Error_Payload_InvalidCommand); + _logger.Error(Resources.Program_Logger_Error_Payload_InvalidCommand); return false; } @@ -253,22 +254,22 @@ private static void SendCommandToServer (string command) } catch (TimeoutException) { - _logger.Error(Resources.Program_Error_Pipe_TimeoutException); + _logger.Error(Resources.Program_Logger_Error_Pipe_TimeoutException); return; } catch (IOException ex) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_IOException, ex)); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Error_Pipe_IOException, ex)); return; } catch (InvalidOperationException ioe) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_InvalidOperationException, ioe)); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_InvalidOperationException, ioe)); return; } catch (UnauthorizedAccessException ex) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_UnauthorizedAccessException, ex)); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_UnauthorizedAccessException, ex)); return; } @@ -314,7 +315,7 @@ or ArgumentNullException or ArgumentOutOfRangeException or ArgumentException) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Error_Pipe_CommonError, ex)); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_CommonError, ex)); } } } From 71b92c9b9f7ba93a024d15695f638de01bfdc80d Mon Sep 17 00:00:00 2001 From: Hirogen Date: Mon, 7 Jul 2025 16:27:47 +0200 Subject: [PATCH 04/38] resources --- src/LogExpert.Resources/Resources.Designer.cs | 135 ++++++++++++++++++ src/LogExpert.Resources/Resources.de.resx | 57 +++++++- src/LogExpert.Resources/Resources.resx | 45 ++++++ .../Controls/LogWindow/LogWindow.cs | 2 +- src/LogExpert.UI/Entities/PaintHelper.cs | 9 +- .../Extensions/BookmarkExporter.cs | 39 ++--- src/LogExpert.UI/Extensions/LockFinder.cs | 59 ++++---- src/LogExpert.UI/Extensions/NativeMethods.cs | 18 +-- src/LogExpert.UI/Extensions/Utils.cs | 4 +- src/LogExpert/Config/ConfigManager.cs | 107 ++++++++++---- 10 files changed, 375 insertions(+), 100 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index ff6917f1..e47927b6 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -210,6 +210,78 @@ public static System.Drawing.Bitmap Close { } } + /// + /// Looks up a localized string similar to Access denied: {0}. + /// + public static string ConfigManager_Logger_Error_AccessDeniedExMessage { + get { + return ResourceManager.GetString("ConfigManager_Logger_Error_AccessDeniedExMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while deserializing config data: {0}. + /// + public static string ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData { + get { + return ResourceManager.GetString("ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File system error: {0}. + /// + public static string ConfigManager_Logger_Error_FileSystemErrorExMessage { + get { + return ResourceManager.GetString("ConfigManager_Logger_Error_FileSystemErrorExMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected error: {0}. + /// + public static string ConfigManager_Logger_Error_UnexpectedErrorExMessage { + get { + return ResourceManager.GetString("ConfigManager_Logger_Error_UnexpectedErrorExMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading settings. + /// + public static string ConfigManager_Logger_Info_LoadingSettings { + get { + return ResourceManager.GetString("ConfigManager_Logger_Info_LoadingSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load settings portable mode. + /// + public static string ConfigManager_Logger_Info_LoadSettingsPortableMode { + get { + return ResourceManager.GetString("ConfigManager_Logger_Info_LoadSettingsPortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load settings standard mode. + /// + public static string ConfigManager_Logger_Info_LoadSettingsStandardMode { + get { + return ResourceManager.GetString("ConfigManager_Logger_Info_LoadSettingsStandardMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Saving settings. + /// + public static string ConfigManager_Logger_Info_SavingSettings { + get { + return ResourceManager.GetString("ConfigManager_Logger_Info_SavingSettings", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -397,6 +469,60 @@ public static string HighlightDialog_UI_Title_ExportSettings { } } + /// + /// Looks up a localized string similar to Could not begin restart session. Unable to determine file locker.. + /// + public static string Lockfinder_Exception_CouldNotBeginRestartSessionUnableToDetermineFileLocker { + get { + return ResourceManager.GetString("Lockfinder_Exception_CouldNotBeginRestartSessionUnableToDetermineFileLocker", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not list processes locking resource. + /// + public static string Lockfinder_Exception_CouldNotListProcessesLockingResource { + get { + return ResourceManager.GetString("Lockfinder_Exception_CouldNotListProcessesLockingResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not list processes locking resource. Failed to get size of result.. + /// + public static string Lockfinder_Exception_CouldNotListProcessesLockingResourceFailedToGetSizeOfResult { + get { + return ResourceManager.GetString("Lockfinder_Exception_CouldNotListProcessesLockingResourceFailedToGetSizeOfResult", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not register resource.. + /// + public static string Lockfinder_Exception_CouldNotRegisterResource { + get { + return ResourceManager.GetString("Lockfinder_Exception_CouldNotRegisterResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No processes are locking the path specified. + /// + public static string Lockfinder_Exception_NoProcessesAreLockingThePathSpecified { + get { + return ResourceManager.GetString("Lockfinder_Exception_NoProcessesAreLockingThePathSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RmEndSession: {0}. + /// + public static string Lockfinder_Trace_RmEndSessionNativeMethodsRmEndSessionHandle { + get { + return ResourceManager.GetString("Lockfinder_Trace_RmEndSessionNativeMethodsRmEndSessionHandle", resourceCulture); + } + } + /// /// Looks up a localized string similar to Adding window to list. /// @@ -470,6 +596,15 @@ public static System.Drawing.Bitmap LogLover { } } + /// + /// Looks up a localized string similar to Line. + /// + public static string PaintHelper_HeaderText_LineNumberColumn { + get { + return ResourceManager.GetString("PaintHelper_HeaderText_LineNumberColumn", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 1b07cb9c..766e686a 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -257,7 +257,7 @@ Laden der Dateien in einen existierendes LogTabWindow - Erstes Fenster wurde geschlossen. Ein neues wird erstellt + Erstes Fenster wurde geschlossen. Ein neues wird erstellt. Kein offenes Fenster übrig. Ein neues Fenster wird erstellt es wird als primäres GUI Fenster benutzt @@ -275,22 +275,22 @@ Fenster wird aus der Liste entfernt - Settings importiert + Einstellungen importiert Fehler während des Zugriffes auf die Datei: {0}, Fehlermeldung: {1} - Settings konnte nicht importiert werden: {0} + Einstellungen konnte nicht importiert werden: {0} - Exportieren der Settings in eine Datei + Exportieren der Einstellungen in eine Datei - Settings (*.json)|*.json|Alle Dateien (*.*)|*.* + Einstellungen (*.json)|*.json|Alle Dateien (*.*) - Kopie von + Kopie von Neue Gruppe @@ -313,4 +313,49 @@ Während des Speichern des Highlighteintrages ist ein Fehler aufgetreten: {0} + + Laden der Einstellungen + + + Laden der Einstellungen im Standard Modus + + + Laden der Einstellungen im portablen Modus + + + Filesystem Fehler: {0} + + + Zugriff verweigert: {0} + + + Unerwarteter Fehler: {0} + + + Fehler während der Deserialisierung der Konfigurationsdaten: {0} + + + Speichern der Einstellungen + + + Zeile + + + RmEndSession: {0} + + + Die Liste der Prozesse, die, die Ressource sperren, kann nicht angezeigt werden. Die Länge des Resultats konnte nicht gefunden werden. + + + Die Liste der Prozesse, die, die Ressource sperren, kann nicht angezeigt werden + + + Die Ressource kann nicht registriert werden. + + + Die Session konnte nicht neu gestartet werden. Die Dateisperre konnte nicht festgestellt werden. + + + Kein Prozess sperrt den angegebenen Pfad + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index f12bacfd..da7a1208 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -316,4 +316,49 @@ Error during save of entry.\r\n{0} + + Loading settings + + + Load settings standard mode + + + Load settings portable mode + + + File system error: {0} + + + Access denied: {0} + + + Unexpected error: {0} + + + Error while deserializing config data: {0} + + + Saving settings + + + No processes are locking the path specified + + + Could not begin restart session. Unable to determine file locker. + + + Could not register resource. + + + Could not list processes locking resource + + + Could not list processes locking resource. Failed to get size of result. + + + RmEndSession: {0} + + + Line + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index 271af9a6..b2d1a3ee 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -357,7 +357,7 @@ public bool IsMultiFile private readonly IConfigManager ConfigManager; - public string TempTitleName { get; set; } = ""; + public string TempTitleName { get; set; } = string.Empty; internal FilterPipe FilterPipe { get; set; } diff --git a/src/LogExpert.UI/Entities/PaintHelper.cs b/src/LogExpert.UI/Entities/PaintHelper.cs index b58b26a4..4e2a4f43 100644 --- a/src/LogExpert.UI/Entities/PaintHelper.cs +++ b/src/LogExpert.UI/Entities/PaintHelper.cs @@ -122,7 +122,7 @@ public static DataGridViewTextBoxColumn CreateLineNumberColumn () { DataGridViewTextBoxColumn lineNumberColumn = new() { - HeaderText = "Line", + HeaderText = Resources.PaintHelper_HeaderText_LineNumberColumn, AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet, Resizable = DataGridViewTriState.NotSet, DividerWidth = 1, @@ -306,6 +306,11 @@ private static int GetBorderSize (DataGridViewAdvancedCellBorderStyle borderStyl { DataGridViewAdvancedCellBorderStyle.None => 0, DataGridViewAdvancedCellBorderStyle.InsetDouble or DataGridViewAdvancedCellBorderStyle.OutsetDouble => 2, + DataGridViewAdvancedCellBorderStyle.NotSet => throw new NotImplementedException(), + DataGridViewAdvancedCellBorderStyle.Single => throw new NotImplementedException(), + DataGridViewAdvancedCellBorderStyle.Inset => throw new NotImplementedException(), + DataGridViewAdvancedCellBorderStyle.Outset => throw new NotImplementedException(), + DataGridViewAdvancedCellBorderStyle.OutsetPartial => throw new NotImplementedException(), _ => 1 }; } @@ -377,7 +382,6 @@ private static void PaintHighlightedCell (ILogPaintContextUI logPaintCtx, DataGr valBounds.Height -= e.CellStyle.Padding.Vertical; } - var flags = TextFormatFlags.Left | TextFormatFlags.SingleLine @@ -434,7 +438,6 @@ private static void PaintHighlightedCell (ILogPaintContextUI logPaintCtx, DataGr { e.Graphics.FillRectangle(bgBrush, wordRect); } - } TextRenderer.DrawText(e.Graphics, matchWord, font, wordRect, foreColor, flags); diff --git a/src/LogExpert.UI/Extensions/BookmarkExporter.cs b/src/LogExpert.UI/Extensions/BookmarkExporter.cs index 70381f9a..dc5e7416 100644 --- a/src/LogExpert.UI/Extensions/BookmarkExporter.cs +++ b/src/LogExpert.UI/Extensions/BookmarkExporter.cs @@ -16,16 +16,23 @@ internal static class BookmarkExporter public static void ExportBookmarkList (SortedList bookmarkList, string logfileName, string fileName) { ArgumentNullException.ThrowIfNull(bookmarkList, nameof(bookmarkList)); - FileStream fs = new(fileName, FileMode.Create, FileAccess.Write); - StreamWriter writer = new(fs); + using FileStream fs = new(fileName, FileMode.Create, FileAccess.Write); + using StreamWriter writer = new(fs); + writer.WriteLine("Log file name;Line number;Comment"); + foreach (var bookmark in bookmarkList.Values) { - var line = $"{logfileName};{bookmark.LineNum};{bookmark.Text.Replace(replacementForNewLine, @"\" + replacementForNewLine, StringComparison.OrdinalIgnoreCase).Replace("\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase)}"; + var text = bookmark.Text ?? string.Empty; + + text = text + .Replace(replacementForNewLine, @"\" + replacementForNewLine, StringComparison.OrdinalIgnoreCase) + .Replace("\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase); + + var line = $"{logfileName};{bookmark.LineNum};{text}"; + writer.WriteLine(line); } - writer.Close(); - fs.Close(); } public static void ImportBookmarkList (string logfileName, string fileName, SortedList bookmarkList) @@ -42,25 +49,21 @@ public static void ImportBookmarkList (string logfileName, string fileName, Sort try { var line = reader.ReadLine(); - line = line.Replace(replacementForNewLine, "\r\n", StringComparison.OrdinalIgnoreCase).Replace("\\\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase); + line = line + .Replace(replacementForNewLine, "\r\n", StringComparison.OrdinalIgnoreCase) + .Replace("\\\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase); // Line is formatted: logfileName ";" bookmark.LineNum ";" bookmark.Text; - var firstSeparator = line.IndexOf(';', StringComparison.OrdinalIgnoreCase); - var secondSeparator = line.IndexOf(';', firstSeparator + 1); - - var fileStr = line[..firstSeparator]; - var lineStr = line.Substring(firstSeparator + 1, secondSeparator - firstSeparator - 1); - var comment = line[(secondSeparator + 1)..]; + var parts = line.Split(';', 3, StringSplitOptions.RemoveEmptyEntries); - if (int.TryParse(lineStr, out var lineNum)) + // parts[0] = fileStr + // parts[1] = line number + // parts[2] = comment + if (int.TryParse(parts[1], out var lineNum) && parts[0] == logfileName) { - Bookmark bookmark = new(lineNum, comment); + Bookmark bookmark = new(lineNum, parts[2]); bookmarkList.Add(lineNum, bookmark); } - else - { - //!!!log error: skipping a line entry - } } catch { diff --git a/src/LogExpert.UI/Extensions/LockFinder.cs b/src/LogExpert.UI/Extensions/LockFinder.cs index ad4c74c7..b7bf8cae 100644 --- a/src/LogExpert.UI/Extensions/LockFinder.cs +++ b/src/LogExpert.UI/Extensions/LockFinder.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; +using System.Globalization; +using System.Runtime.Versioning; // Expanded with some helpers from: https://code.msdn.microsoft.com/windowsapps/How-to-know-the-process-704839f4/ -// Uses Windows Restart Manager. +// Uses Windows Restart Manager. // A more involved and cross platform solution to this problem is here: https://github.com/cklutz/LockCheck @@ -17,21 +16,19 @@ internal class LockFinder /// Method FindLockedProcessName Retrieve the first process name /// that is locking the file at the specified path /// - /// The path of a file with a write lock held by a + /// The path of a file with a write lock held by a /// process /// The name of the first process found with a lock /// /// Thrown when the file path is not locked /// - static public string FindLockedProcessName (string path) + [SupportedOSPlatform("windows")] + public static string FindLockedProcessName (string path) { var list = FindLockProcesses(path); - if (list.Count == 0) - { - throw new Exception( - "No processes are locking the path specified"); - } - return list[0].ProcessName; + return list.Count == 0 + ? throw new Exception(Resources.Lockfinder_Exception_NoProcessesAreLockingThePathSpecified) + : list[0].ProcessName; } /// @@ -41,23 +38,23 @@ static public string FindLockedProcessName (string path) /// The path of a file being checked if a write lock /// held by a process /// true when one or more processes with lock - static public bool CheckIfFileIsLocked (string path) + [SupportedOSPlatform("windows")] + public static bool CheckIfFileIsLocked (string path) { var list = FindLockProcesses(path); - if (list.Count > 0) - { return true; } - return false; + return list.Count > 0; } /// /// Used to find processes holding a lock on the file. This would cause /// other usage, such as file truncation or write opretions to throw - /// IOException if an exclusive lock is attempted. + /// IOException if an exclusive lock is attempted. /// /// Path being checked /// List of processes holding file lock to path /// - static public List FindLockProcesses (string path) + [SupportedOSPlatform("windows")] + public static List FindLockProcesses (string path) { var key = Guid.NewGuid().ToString(); var processes = new List(); @@ -65,8 +62,7 @@ static public List FindLockProcesses (string path) var res = NativeMethods.RmStartSession(out var handle, 0, key); if (res != 0) { - throw new Exception("Could not begin restart session. " + - "Unable to determine file locker."); + throw new Exception(Resources.Lockfinder_Exception_CouldNotBeginRestartSessionUnableToDetermineFileLocker); } try @@ -75,19 +71,17 @@ static public List FindLockProcesses (string path) uint lpdwRebootReasons = NativeMethods.RmRebootReasonNone; string[] resources = [path]; - res = NativeMethods.RmRegisterResources(handle, (uint)resources.Length, - resources, 0, null, 0, null); + res = NativeMethods.RmRegisterResources(handle, (uint)resources.Length, resources, 0, null, 0, null); if (res != 0) { - throw new Exception("Could not register resource."); + throw new Exception(Resources.Lockfinder_Exception_CouldNotRegisterResource); } - res = NativeMethods.RmGetList(handle, out var pnProcInfoNeeded, ref pnProcInfo, null, - ref lpdwRebootReasons); + + res = NativeMethods.RmGetList(handle, out var pnProcInfoNeeded, ref pnProcInfo, null, ref lpdwRebootReasons); const int ERROR_MORE_DATA = 234; if (res == ERROR_MORE_DATA) { - var processInfo = - new NativeMethods.RM_PROCESS_INFO[pnProcInfoNeeded]; + var processInfo = new NativeMethods.RM_PROCESS_INFO[pnProcInfoNeeded]; pnProcInfo = pnProcInfoNeeded; // Get the list. res = NativeMethods.RmGetList(handle, out pnProcInfoNeeded, ref pnProcInfo, processInfo, ref lpdwRebootReasons); @@ -106,22 +100,21 @@ static public List FindLockProcesses (string path) } else { - throw new Exception("Could not list processes locking resource"); + throw new Exception(Resources.Lockfinder_Exception_CouldNotListProcessesLockingResource); } } else if (res != 0) { - throw new Exception("Could not list processes locking resource." + - "Failed to get size of result."); + throw new Exception(Resources.Lockfinder_Exception_CouldNotListProcessesLockingResourceFailedToGetSizeOfResult); } } - catch (Exception exception) + catch (Exception e) { - Trace.WriteLine(exception.Message); + Trace.WriteLine(e.Message); } finally { - Trace.WriteLine($"RmEndSession: {NativeMethods.RmEndSession(handle)}"); + Trace.WriteLine(string.Format(CultureInfo.InvariantCulture, Resources.Lockfinder_Trace_RmEndSessionNativeMethodsRmEndSessionHandle, NativeMethods.RmEndSession(handle))); } return processes; diff --git a/src/LogExpert.UI/Extensions/NativeMethods.cs b/src/LogExpert.UI/Extensions/NativeMethods.cs index 41d97fa1..9f330d7f 100644 --- a/src/LogExpert.UI/Extensions/NativeMethods.cs +++ b/src/LogExpert.UI/Extensions/NativeMethods.cs @@ -151,27 +151,29 @@ public static partial int RmStartSession ( public static Icon LoadIconFromExe (string fileName, int index) { - nint smallIcons = new(); - nint largeIcons = new(); - int num = (int)ExtractIconEx(fileName, index, out largeIcons, out smallIcons, 1); + var num = (int)ExtractIconEx(fileName, index, out var largeIcons, out var smallIcons, 1); + if (num > 0 && smallIcons != nint.Zero) { var icon = (Icon)Icon.FromHandle(smallIcons).Clone(); - DestroyIcon(smallIcons); + _ = DestroyIcon(smallIcons); return icon; } + if (num > 0 && largeIcons != nint.Zero) { var icon = (Icon)Icon.FromHandle(largeIcons).Clone(); - DestroyIcon(largeIcons); + _ = DestroyIcon(largeIcons); return icon; } + return null; } public static Icon[,] ExtractIcons (string fileName) { - var iconCount = ExtractIconEx(fileName, -1, out var largeIcon, out var smallIcon, 0); + var iconCount = ExtractIconEx(fileName, -1, out var _, out var _, 0); + if (iconCount <= 0) { return null; @@ -185,7 +187,7 @@ public static Icon LoadIconFromExe (string fileName, int index) if (smallIcons != nint.Zero) { result[0, i] = (Icon)Icon.FromHandle(smallIcons).Clone(); - DestroyIcon(smallIcons); + _ = DestroyIcon(smallIcons); } else { @@ -195,7 +197,7 @@ public static Icon LoadIconFromExe (string fileName, int index) if (num > 0 && largeIcons != nint.Zero) { result[1, i] = (Icon)Icon.FromHandle(largeIcons).Clone(); - DestroyIcon(largeIcons); + _ = DestroyIcon(largeIcons); } else { diff --git a/src/LogExpert.UI/Extensions/Utils.cs b/src/LogExpert.UI/Extensions/Utils.cs index 27d000b0..fc6622e3 100644 --- a/src/LogExpert.UI/Extensions/Utils.cs +++ b/src/LogExpert.UI/Extensions/Utils.cs @@ -31,13 +31,13 @@ public static string GetWordFromPos (int xPos, string text, Graphics g, Font fon stringFormat.SetMeasurableCharacterRanges(crArray); RectangleF rect = new(0, 0, 3000, 20); - Region[] stringRegions = g.MeasureCharacterRanges(text, font, rect, stringFormat); + var stringRegions = g.MeasureCharacterRanges(text, font, rect, stringFormat); var found = false; var y = 0; - foreach (Region regio in stringRegions) + foreach (var regio in stringRegions) { if (regio.IsVisible(xPos, 3, g)) { diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index cdaa1bb3..23ae77bd 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -1,11 +1,11 @@ using System.Drawing; using System.Globalization; using System.Reflection; +using System.Runtime.Versioning; using System.Text; using System.Windows.Forms; using LogExpert.Core.Classes; -using LogExpert.Core.Classes.Filter; using LogExpert.Core.Config; using LogExpert.Core.Entities; using LogExpert.Core.EventArguments; @@ -28,10 +28,12 @@ public class ConfigManager : IConfigManager private readonly object _loadSaveLock = new(); private Settings _settings; + private const string SettingsFileName = "settings.json"; #endregion #region cTor + [SupportedOSPlatform("windows")] private ConfigManager () { _settings = Load(); @@ -48,6 +50,7 @@ private ConfigManager () #region Properties //TODO: Change to init + [SupportedOSPlatform("windows")] public static ConfigManager Instance { get @@ -56,6 +59,7 @@ public static ConfigManager Instance { _instance ??= new ConfigManager(); } + return _instance; } } @@ -65,6 +69,7 @@ public static ConfigManager Instance /// /// Application.StartupPath + portable /// + [SupportedOSPlatform("windows")] public string PortableModeDir => Application.StartupPath + Path.DirectorySeparatorChar + "portable"; /// @@ -72,8 +77,10 @@ public static ConfigManager Instance /// public string PortableModeSettingsFileName => "portableMode.json"; + [SupportedOSPlatform("windows")] public Settings Settings => Instance._settings; + [SupportedOSPlatform("windows")] IConfigManager IConfigManager.Instance => Instance; // Action IConfigManager.ConfigChanged { get => ((IConfigManager)_instance).ConfigChanged; set => ((IConfigManager)_instance).ConfigChanged = value; } @@ -84,30 +91,35 @@ public static ConfigManager Instance #region Public methods + [SupportedOSPlatform("windows")] public void Save (SettingsFlags flags) { Instance.Save(Settings, flags); } + [SupportedOSPlatform("windows")] public void Export (FileInfo fileInfo) { - Instance.Save(fileInfo, Settings); + Save(fileInfo, Settings); } + [SupportedOSPlatform("windows")] public void Export (FileInfo fileInfo, SettingsFlags highlightSettings) { Instance.Save(fileInfo, Settings, highlightSettings); } + [SupportedOSPlatform("windows")] public void Import (FileInfo fileInfo, ExportImportFlags importFlags) { Instance._settings = Instance.Import(Instance._settings, fileInfo, importFlags); Save(SettingsFlags.All); } + [SupportedOSPlatform("windows")] public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags importFlags) { - Instance._settings.Preferences.HighlightGroupList = Instance.Import(Instance._settings.Preferences.HighlightGroupList, fileInfo, importFlags); + Instance._settings.Preferences.HighlightGroupList = Import(Instance._settings.Preferences.HighlightGroupList, fileInfo, importFlags); Save(SettingsFlags.All); } @@ -115,20 +127,21 @@ public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags import #region Private Methods + [SupportedOSPlatform("windows")] private Settings Load () { - _logger.Info(CultureInfo.InvariantCulture, "Loading settings"); + _logger.Info(Resources.ConfigManager_Logger_Info_LoadingSettings); string dir; if (!File.Exists(Path.Combine(PortableModeDir, PortableModeSettingsFileName))) { - _logger.Info(CultureInfo.InvariantCulture, "Load settings standard mode"); + _logger.Info(Resources.ConfigManager_Logger_Info_LoadSettingsStandardMode); dir = ConfigDir; } else { - _logger.Info("Load settings portable mode"); + _logger.Info(Resources.ConfigManager_Logger_Info_LoadSettingsPortableMode); dir = Application.StartupPath; } @@ -137,27 +150,27 @@ private Settings Load () _ = Directory.CreateDirectory(dir); } - if (!File.Exists(Path.Combine(dir, "settings.json"))) + if (!File.Exists(Path.Combine(dir, SettingsFileName))) { return LoadOrCreateNew(null); } try { - FileInfo fileInfo = new(Path.Combine(dir, "settings.json")); + FileInfo fileInfo = new(Path.Combine(dir, SettingsFileName)); return LoadOrCreateNew(fileInfo); } catch (IOException ex) { - _logger.Error($"File system error: {ex.Message}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_FileSystemErrorExMessage, ex.Message)); } catch (UnauthorizedAccessException ex) { - _logger.Error($"Access denied: {ex.Message}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_AccessDeniedExMessage, ex)); } catch (Exception ex) when (ex is not OperationCanceledException) { - _logger.Error($"Unexpected error: {ex.Message}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_UnexpectedErrorExMessage, ex)); } return LoadOrCreateNew(null); @@ -169,13 +182,14 @@ private Settings Load () /// /// file that has settings saved /// loaded or created settings + [SupportedOSPlatform("windows")] private Settings LoadOrCreateNew (FileInfo fileInfo) { lock (_loadSaveLock) { Settings settings; - if (fileInfo == null || fileInfo.Exists == false) + if (fileInfo == null || !fileInfo.Exists) { settings = new Settings(); } @@ -185,9 +199,14 @@ private Settings LoadOrCreateNew (FileInfo fileInfo) { settings = JsonConvert.DeserializeObject(File.ReadAllText($"{fileInfo.FullName}")); } - catch (Exception e) + catch (Exception e) when (e is JsonException + or JsonReaderException + or JsonSerializationException + or JsonWriterException + or ArgumentNullException + or ArgumentException) { - _logger.Error($"Error while deserializing config data: {e}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData, e)); settings = new Settings(); } } @@ -232,7 +251,7 @@ private Settings LoadOrCreateNew (FileInfo fileInfo) settings.FilterRangeHistoryList ??= []; - foreach (FilterParams filterParams in settings.FilterList) + foreach (var filterParams in settings.FilterList) { filterParams.Init(); } @@ -274,19 +293,20 @@ private Settings LoadOrCreateNew (FileInfo fileInfo) /// /// Settings to be saved /// Settings that "changed" + [SupportedOSPlatform("windows")] private void Save (Settings settings, SettingsFlags flags) { lock (_loadSaveLock) { - _logger.Info(CultureInfo.InvariantCulture, "Saving settings"); + _logger.Info(Resources.ConfigManager_Logger_Info_SavingSettings); var dir = Settings.Preferences.PortableMode ? Application.StartupPath : ConfigDir; if (!Directory.Exists(dir)) { - Directory.CreateDirectory(dir); + _ = Directory.CreateDirectory(dir); } - FileInfo fileInfo = new(dir + Path.DirectorySeparatorChar + "settings.json"); + FileInfo fileInfo = new(dir + Path.DirectorySeparatorChar + SettingsFileName); Save(fileInfo, settings); OnConfigChanged(flags); @@ -298,7 +318,7 @@ private void Save (Settings settings, SettingsFlags flags) /// /// FileInfo for creating the file (if exists will be overwritten) /// Current Settings - private void Save (FileInfo fileInfo, Settings settings) + private static void Save (FileInfo fileInfo, Settings settings) { //Currently only fileFormat, maybe add some other formats later (YAML or XML?) SaveAsJSON(fileInfo, settings); @@ -311,6 +331,28 @@ private void Save (FileInfo fileInfo, Settings settings, SettingsFlags flags) case SettingsFlags.HighlightSettings: SaveHighlightgroupsAsJSON(fileInfo, settings.Preferences.HighlightGroupList); break; + case SettingsFlags.None: + break; + case SettingsFlags.WindowPosition: + break; + case SettingsFlags.FileHistory: + break; + case SettingsFlags.FilterList: + break; + case SettingsFlags.RegexHistory: + break; + case SettingsFlags.ToolSettings: + break; + case SettingsFlags.GuiOrColors: + break; + case SettingsFlags.FilterHistory: + break; + case SettingsFlags.All: + break; + case SettingsFlags.Settings: + break; + default: + break; } OnConfigChanged(flags); @@ -332,7 +374,7 @@ private static void SaveHighlightgroupsAsJSON (FileInfo fileInfo, List Import (List currentGroups, FileInfo fileInfo, ExportImportFlags flags) + private static List Import (List currentGroups, FileInfo fileInfo, ExportImportFlags flags) { List newGroups; @@ -340,9 +382,14 @@ private List Import (List currentGroups, FileInf { newGroups = JsonConvert.DeserializeObject>(File.ReadAllText($"{fileInfo.FullName}")); } - catch (Exception e) + catch (Exception e) when (e is JsonException + or JsonReaderException + or JsonSerializationException + or JsonWriterException + or ArgumentNullException + or ArgumentException) { - _logger.Error($"Error while deserializing config data: {e}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData, e)); newGroups = []; } @@ -366,6 +413,7 @@ private List Import (List currentGroups, FileInf /// /// /// Flags to indicate which parts shall be imported + [SupportedOSPlatform("windows")] private Settings Import (Settings currentSettings, FileInfo fileInfo, ExportImportFlags flags) { var importSettings = LoadOrCreateNew(fileInfo); @@ -391,14 +439,17 @@ private Settings Import (Settings currentSettings, FileInfo fileInfo, ExportImpo { newSettings.Preferences.ColumnizerMaskList = ReplaceOrKeepExisting(flags, ownSettings.Preferences.ColumnizerMaskList, importSettings.Preferences.ColumnizerMaskList); } + if ((flags & ExportImportFlags.HighlightMasks) == ExportImportFlags.HighlightMasks) { newSettings.Preferences.HighlightMaskList = ReplaceOrKeepExisting(flags, ownSettings.Preferences.HighlightMaskList, importSettings.Preferences.HighlightMaskList); } + if ((flags & ExportImportFlags.HighlightSettings) == ExportImportFlags.HighlightSettings) { newSettings.Preferences.HighlightGroupList = ReplaceOrKeepExisting(flags, ownSettings.Preferences.HighlightGroupList, importSettings.Preferences.HighlightGroupList); } + if ((flags & ExportImportFlags.ToolEntries) == ExportImportFlags.ToolEntries) { newSettings.Preferences.ToolEntries = ReplaceOrKeepExisting(flags, ownSettings.Preferences.ToolEntries, importSettings.Preferences.ToolEntries); @@ -409,17 +460,15 @@ private Settings Import (Settings currentSettings, FileInfo fileInfo, ExportImpo private static List ReplaceOrKeepExisting (ExportImportFlags flags, List existingList, List newList) { - if ((flags & ExportImportFlags.KeepExisting) == ExportImportFlags.KeepExisting) - { - return existingList.Union(newList).ToList(); - } - - return newList; + return (flags & ExportImportFlags.KeepExisting) == ExportImportFlags.KeepExisting + ? [.. existingList.Union(newList)] + : newList; } // Checking if the appBounds values are outside the current virtual screen. // If so, the appBounds values are set to 0. - private void SetBoundsWithinVirtualScreen (Settings settings) + [SupportedOSPlatform("windows")] + private static void SetBoundsWithinVirtualScreen (Settings settings) { var vs = SystemInformation.VirtualScreen; if (vs.X + vs.Width < settings.AppBounds.X + settings.AppBounds.Width || From fa3eb1a968d77669297a610bbae1f3cb0fd7f077 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Tue, 8 Jul 2025 11:18:45 +0200 Subject: [PATCH 05/38] logWindow resources --- src/LogExpert.Resources/Resources.Designer.cs | 811 ++++++++++++++++++ src/LogExpert.Resources/Resources.resx | 270 ++++++ .../Controls/LogWindow/LogWindow.cs | 632 +++++++------- .../Dialogs/LogTabWindow/LogTabWindow.cs | 2 +- 4 files changed, 1410 insertions(+), 305 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index e47927b6..86206c06 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -586,6 +586,15 @@ public static string LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne { } } + /// + /// Looks up a localized string similar to Error in {0}: {1}. + /// + public static string Logger_Error_In_Function { + get { + return ResourceManager.GetString("Logger_Error_In_Function", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -596,6 +605,808 @@ public static System.Drawing.Bitmap LogLover { } } + /// + /// Looks up a localized string similar to AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2}. + /// + public static string LogWindow_Logger_Debug_AddBookmarkOverlays { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_AddBookmarkOverlays", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "GetTimestampForLine({0}) enter. + /// + public static string LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to GetTimestampForLine() leave with lineNum={0}. + /// + public static string LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preventing reload because of recursive calls.. + /// + public static string LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reloading invoked.. + /// + public static string LogWindow_Logger_Debug_ReloadingInvoked { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_ReloadingInvoked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selection changed trigger. + /// + public static string LogWindow_Logger_Debug_SelectionChangedTrigger { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_SelectionChangedTrigger", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting columnizer {0}. + /// + public static string LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found block: {0}. + /// + public static string LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TestStatistic(): i={0} searchLine={1}. + /// + public static string LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2}. + /// + public static string LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover { + get { + return ResourceManager.GetString("LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error occured while clearing filter list: {0}. + /// + public static string LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while deleting temp file {0}: {1}. + /// + public static string LogWindow_Logger_Error_CloseLogWindow_ErrorWhileDeletingTempFile { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_CloseLogWindow_ErrorWhileDeletingTempFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error saving persistence: {0}. + /// + public static string LogWindow_Logger_Error_ErrorSavingPersistence { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_ErrorSavingPersistence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in selectionChangedTrigger_Signal selcount {0}, Exception: {1}. + /// + public static string LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in UpdateProgress Callback: {0}. + /// + public static string LogWindow_Logger_Error_InUpdateProgressCallback { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_InUpdateProgressCallback", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line count of event is: {0}, should be greater than last line count: {1}. + /// + public static string LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error loading bookmarks: {0}. + /// + public static string LogWindow_Logger_Error_LoadingBookmarks { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_LoadingBookmarks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error loading persistence data: {0}. + /// + public static string LogWindow_Logger_Error_LoadingPersistenceData { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_LoadingPersistenceData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error LoadingStarted Callback: {0}. + /// + public static string LogWindow_Logger_Error_LoadingStartedCallback { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_LoadingStartedCallback", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while selecting line: {0}. + /// + public static string LogWindow_Logger_Error_SelectLine_WhileSelectingLine { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_SelectLine_WhileSelectingLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error setting splitter distance: {0}. + /// + public static string LogWindow_Logger_Error_SettingSplitterDistance { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_SettingSplitterDistance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while resizing columns: {0}. + /// + public static string LogWindow_Logger_Error_WhileResizingColumns { + get { + return ResourceManager.GetString("LogWindow_Logger_Error_WhileResizingColumns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syncing window for {0} to {1}. + /// + public static string LogWindow_Logger_Info_AddToTimeSync_SyncingWindow { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_AddToTimeSync_SyncingWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting temp file {0}. + /// + public static string LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detected MultiFile name list in persistence options. + /// + public static string LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} events in queue. + /// + public static string LogWindow_Logger_Info_EventsInQueue { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_EventsInQueue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File loading complete.. + /// + public static string LogWindow_Logger_Info_FileLoadingComplete { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_FileLoadingComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Single threaded filter duration: {0} ms.. + /// + public static string LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finished loading.. + /// + public static string LogWindow_Logger_Info_FinishedLoading { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_FinishedLoading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De-Syncing window for {0}. + /// + public static string LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Got FileSizeChanged event. prevLines:{0}, curr lines: {1}. + /// + public static string LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1 { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Handling file not found event.. + /// + public static string LogWindow_Logger_Info_HandlingFileNotFoundEvent { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_HandlingFileNotFoundEvent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading logfile: {0}. + /// + public static string LogWindow_Logger_Info_LoadFile_LoadingLogfile { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_LoadFile_LoadingLogfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Picked new columnizer '{0}. + /// + public static string LogWindow_Logger_Info_LoadFile_PickedNewColumnizer { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_LoadFile_PickedNewColumnizer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LoadFilesAsMulti: File: {0}. + /// + public static string LogWindow_Logger_Info_LoadFilesAsMulti_FileName { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_LoadFilesAsMulti_FileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multi threaded filter duration: {0} ms.. + /// + public static string LogWindow_Logger_Info_MultiThreadedFilter_Duration { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_MultiThreadedFilter_Duration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to new File created.. + /// + public static string LogWindow_Logger_Info_NewFileCreated { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_NewFileCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No persistence data for {0} found.. + /// + public static string LogWindow_Logger_Info_NoPersistenceDataForFileNameFound { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_NoPersistenceDataForFileNameFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Persistence data for {0} is outdated. It was discarded.. + /// + public static string LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Refreshing filter view because of reload.. + /// + public static string LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reloading file because it has been respawned.. + /// + public static string LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ReloadNewFile(): counter = {0}. + /// + public static string LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SetColumnizerInternal(): {0}. + /// + public static string LogWindow_Logger_Info_SetColumnizerInternal { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_SetColumnizerInternal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit control in logWindow was null. + /// + public static string LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TestStatistics() ended. + /// + public static string LogWindow_Logger_Info_TestStatistic_Ended { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_TestStatistic_Ended", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TestStatistics() called with start line {0}. + /// + public static string LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SelStart: {0}, SelLen: {1}. + /// + public static string LogWindow_Logger_Info_UpdateEditColumnDisplay { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_UpdateEditColumnDisplay", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UpdateGrid(): new RowCount={0}. + /// + public static string LogWindow_Logger_Info_UpdateGridNewRowCount { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_UpdateGridNewRowCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for loading to be complete.. + /// + public static string LogWindow_Logger_Info_WaitingForLoadingToBeComplete { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_WaitingForLoadingToBeComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for signal. + /// + public static string LogWindow_Logger_Info_WaitingForSignal { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_WaitingForSignal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wakeup signal received.. + /// + public static string LogWindow_Logger_Info_WakeupSignalReceived { + get { + return ResourceManager.GetString("LogWindow_Logger_Info_WakeupSignalReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FilterRestore(): Columnizer {0} not found. + /// + public static string LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound { + get { + return ResourceManager.GetString("LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected issue truncating file: {0}. + /// + public static string LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage { + get { + return ResourceManager.GetString("LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 0. + /// + public static string LogWindow_UI_ClearFilterList_ResetFilterCounterToZero { + get { + return ResourceManager.GetString("LogWindow_UI_ClearFilterList_ResetFilterCounterToZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}->Clip. + /// + public static string LogWindow_UI_CopyMarkedLinesToTab_Clip { + get { + return ResourceManager.GetString("LogWindow_UI_CopyMarkedLinesToTab_Clip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}->C. + /// + public static string LogWindow_UI_CopyMarkedLinesToTab_Copy { + get { + return ResourceManager.GetString("LogWindow_UI_CopyMarkedLinesToTab_Copy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while exporting bookmark list: {0}. + /// + public static string LogWindow_UI_ErrorWhileExportingBookmarkList { + get { + return ResourceManager.GetString("LogWindow_UI_ErrorWhileExportingBookmarkList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while importing bookmark list: {0}. + /// + public static string LogWindow_UI_ErrorWhileImportingBookmarkList { + get { + return ResourceManager.GetString("LogWindow_UI_ErrorWhileImportingBookmarkList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exception while filtering. Please report to developer: \n\n{0}\n\n{1}. + /// + public static string LogWindow_UI_Filter_ExceptionWhileFiltering { + get { + return ResourceManager.GetString("LogWindow_UI_Filter_ExceptionWhileFiltering", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CSV file (*.csv)|*.csv|Bookmark file (*.bmk)|*.bmk. + /// + public static string LogWindow_UI_ImportExportBookmarkList_Filter { + get { + return ResourceManager.GetString("LogWindow_UI_ImportExportBookmarkList_Filter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot load file\n{0}. + /// + public static string LogWindow_UI_LoadFile_CannotLoadFile { + get { + return ResourceManager.GetString("LogWindow_UI_LoadFile_CannotLoadFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected error while saving persistence: {0}. + /// + public static string LogWindow_UI_SavePersistenceData_ErrorWhileSaving { + get { + return ResourceManager.GetString("LogWindow_UI_SavePersistenceData_ErrorWhileSaving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search result not found. + /// + public static string LogWindow_UI_SelectLine_SearchResultNotFound { + get { + return ResourceManager.GetString("LogWindow_UI_SelectLine_SearchResultNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid regular expression. + /// + public static string LogWindow_UI_StatusLineError_InvalidRegularExpression { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineError_InvalidRegularExpression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not found: {0}. + /// + public static string LogWindow_UI_StatusLineError_NotFound { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineError_NotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started from beginning of file. + /// + public static string LogWindow_UI_StatusLineError_StartedFromBeginningOfFile { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineError_StartedFromBeginningOfFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started from end of file. + /// + public static string LogWindow_UI_StatusLineError_StartedFromEndOfFile { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineError_StartedFromEndOfFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File not found. + /// + public static string LogWindow_UI_StatusLineText_FileNotFound { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_FileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter duration: " + ({0}) + " ms.. + /// + public static string LogWindow_UI_StatusLineText_Filter_FilterDurationMs { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_Filter_FilterDurationMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filtering... Press ESC to cancel. + /// + public static string LogWindow_UI_StatusLineText_FilterSearch_Filtering { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_FilterSearch_Filtering", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Searching... Press ESC to cancel.. + /// + public static string LogWindow_UI_StatusLineText_SearchingPressESCToCancel { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_SearchingPressESCToCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} selected lines. + /// + public static string LogWindow_UI_StatusLineText_SelCountSelectedLines { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_SelCountSelectedLines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time diff is {0}. + /// + public static string LogWindow_UI_StatusLineText_TimeDiff { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_TimeDiff", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Truncate failed: file is locked by {0}. + /// + public static string LogWindow_UI_StatusLineText_TruncateFailedFileIsLockedByName { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_TruncateFailedFileIsLockedByName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected issue truncating file. + /// + public static string LogWindow_UI_StatusLineText_UnexpectedIssueTruncatingFile { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_UnexpectedIssueTruncatingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}. + /// + public static string LogWindow_UI_StatusLineText_UpdateEditColumnDisplay { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_UpdateEditColumnDisplay", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing to temp file... Press ESC to cancel.. + /// + public static string LogWindow_UI_StatusLineText_WritePipeToTab_WritingToTempFile { + get { + return ResourceManager.GetString("LogWindow_UI_StatusLineText_WritePipeToTab_WritingToTempFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading file.... + /// + public static string LogWindow_UI_StatusText_LoadingFile { + get { + return ResourceManager.GetString("LogWindow_UI_StatusText_LoadingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading {0}. + /// + public static string LogWindow_UI_StatusText_LoadingWithParameter { + get { + return ResourceManager.GetString("LogWindow_UI_StatusText_LoadingWithParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sure to close?. + /// + public static string LogWindow_UI_SureToClose { + get { + return ResourceManager.GetString("LogWindow_UI_SureToClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Freeze left columns until here ({0}). + /// + public static string LogWindow_UI_Text_FreezeLeftColumnsUntilHereGridViewColumns_selectedColHeaderText { + get { + return ResourceManager.GetString("LogWindow_UI_Text_FreezeLeftColumnsUntilHereGridViewColumns_selectedColHeaderText" + + "", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Frozen. + /// + public static string LogWindow_UI_Text_Frozen { + get { + return ResourceManager.GetString("LogWindow_UI_Text_Frozen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide advanced.... + /// + public static string LogWindow_UI_Text_ShowAdvancedFilterPanel_HideAdvanced { + get { + return ResourceManager.GetString("LogWindow_UI_Text_ShowAdvancedFilterPanel_HideAdvanced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show advanced.... + /// + public static string LogWindow_UI_Text_ShowAdvancedFilterPanel_ShowAdvanced { + get { + return ResourceManager.GetString("LogWindow_UI_Text_ShowAdvancedFilterPanel_ShowAdvanced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are some comments in the bookmarks. Really remove bookmarks?. + /// + public static string LogWindow_UI_ThereAreSomeCommentsInTheBookmarksReallyRemoveBookmarks { + get { + return ResourceManager.GetString("LogWindow_UI_ThereAreSomeCommentsInTheBookmarksReallyRemoveBookmarks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose a file to save bookmarks into. + /// + public static string LogWindow_UI_Title_ExportBookMarkList { + get { + return ResourceManager.GetString("LogWindow_UI_Title_ExportBookMarkList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose a file to load bookmarks from. + /// + public static string LogWindow_UI_Title_ImportBookmarkList { + get { + return ResourceManager.GetString("LogWindow_UI_Title_ImportBookmarkList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There's a comment attached to the bookmark. Really remove the bookmark?. + /// + public static string LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt { + get { + return ResourceManager.GetString("LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ->F. + /// + public static string LogWindow_UI_WriteFilterToTab_NamePrefix_ForFilter { + get { + return ResourceManager.GetString("LogWindow_UI_WriteFilterToTab_NamePrefix_ForFilter", resourceCulture); + } + } + /// /// Looks up a localized string similar to Line. /// diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index da7a1208..08db84c7 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -361,4 +361,274 @@ Line + + Setting columnizer {0} + + + Finished loading. + + + Refreshing filter view because of reload. + + + Handling file not found event. + + + Sure to close? + + + new File created. + + + Reloading invoked. + + + Got FileSizeChanged event. prevLines:{0}, curr lines: {1} + + + Selection changed trigger + + + {0} selected lines + + + Error in selectionChangedTrigger_Signal selcount {0}, Exception: {1} + + + Frozen + + + Freeze left columns until here ({0}) + + + No persistence data for {0} found. + + + Detected MultiFile name list in persistence options + + + Error loading persistence data: {0} + + + Error loading bookmarks: {0} + + + Persistence data for {0} is outdated. It was discarded. + + + Error setting splitter distance: {0} + + + Invalid regular expression + + + Loading file... + + + File not found + + + Reloading file because it has been respawned. + + + Preventing reload because of recursive calls. + + + ReloadNewFile(): counter = {0} + + + Waiting for loading to be complete. + + + Error in UpdateProgress Callback: {0} + + + Loading {0} + + + Error LoadingStarted Callback: {0} + + + File loading complete. + + + Waiting for signal + + + Wakeup signal received. + + + {0} events in queue + + + Line count of event is: {0}, should be greater than last line count: {1} + + + UpdateGrid(): new RowCount={0} + + + UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2} + + + Error in {0}: {1} + + + SetColumnizerInternal(): {0} + + + Error while resizing columns: {0} + + + Time diff is {0} + + + Not found: {0} + + + Started from beginning of file + + + Started from end of file + + + Searching... Press ESC to cancel. + + + There are some comments in the bookmarks. Really remove bookmarks? + + + Error while importing bookmark list: {0} + + + Choose a file to load bookmarks from + + + CSV file (*.csv)|*.csv|Bookmark file (*.bmk)|*.bmk + + + Error while exporting bookmark list: {0} + + + Choose a file to save bookmarks into + + + "GetTimestampForLine({0}) enter + + + GetTimestampForLine() leave with lineNum={0} + + + {0}->Clip + + + {0}->C + + + There's a comment attached to the bookmark. Really remove the bookmark? + + + AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2} + + + Unexpected issue truncating file + + + Unexpected issue truncating file: {0} + + + Truncate failed: file is locked by {0} + + + Error while deleting temp file {0}: {1} + + + Deleting temp file {0} + + + Error saving persistence: {0} + + + Unexpected error while saving persistence: {0} + + + LoadFilesAsMulti: File: {0} + + + Picked new columnizer '{0} + + + Loading logfile: {0} + + + Cannot load file\n{0} + + + TestStatistics() called with start line {0} + + + TestStatistic(): i={0} searchLine={1} + + + Found block: {0} + + + TestStatistics() ended + + + FilterRestore(): Columnizer {0} not found + + + Writing to temp file... Press ESC to cancel. + + + ->F + + + Hide advanced... + + + Show advanced... + + + Error occured while clearing filter list: {0} + + + 0 + + + Search result not found + + + Error while selecting line: {0} + + + Exception while filtering. Please report to developer: \n\n{0}\n\n{1} + + + Single threaded filter duration: {0} ms. + + + Filter duration: " + ({0}) + " ms. + + + Multi threaded filter duration: {0} ms. + + + Filtering... Press ESC to cancel + + + {0} + + + SelStart: {0}, SelLen: {1} + + + Edit control in logWindow was null + + + De-Syncing window for {0} + + + Syncing window for {0} to {1} + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index b2d1a3ee..1e17e2bf 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -40,6 +40,10 @@ internal partial class LogWindow : DockContent, ILogPaintContextUI, ILogView, IL private const int SPREAD_MAX = 99; private const int PROGRESS_BAR_MODULO = 1000; private const int FILTER_ADVANCED_SPLITTER_DISTANCE = 110; + private const int WAIT_TIME = 500; + private const int OVERSCAN = 20; + private const string FONT_COURIER_NEW = "Courier New"; + private const string FONT_VERDANA = "Verdana"; private static readonly Logger _logger = LogManager.GetCurrentClassLogger(); private readonly Image _advancedButtonImage; @@ -323,7 +327,7 @@ private set lock (_currentColumnizerLock) { _currentColumnizer = value; - _logger.Debug($"Setting columnizer {_currentColumnizer.GetName()} "); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName, _currentColumnizer.GetName())); } } } @@ -485,12 +489,12 @@ internal void ToggleColumnFinder (bool show, bool setFocus) if (setFocus) { - columnComboBox.Focus(); + _ = columnComboBox.Focus(); } } else { - dataGridView.Focus(); + _ = dataGridView.Focus(); } tableLayoutPanel1.RowStyles[0].Height = show ? 28 : 0; @@ -660,7 +664,7 @@ protected void OnDeRegisterCancelHandler (IBackgroundProcessCancelHandler handle { lock (_cancelHandlerList) { - _cancelHandlerList.Remove(handler); + _ = _cancelHandlerList.Remove(handler); } } @@ -688,34 +692,34 @@ private void OnLogWindowDisposed (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnLogFileReaderLoadingStarted (object sender, LoadFileEventArgs e) { - Invoke(LoadingStarted, e); + _ = Invoke(LoadingStarted, e); } [SupportedOSPlatform("windows")] private void OnLogFileReaderFinishedLoading (object sender, EventArgs e) { //Thread.CurrentThread.Name = "FinishedLoading event thread"; - _logger.Info(CultureInfo.InvariantCulture, "Finished loading."); + _logger.Info(Resources.LogWindow_Logger_Info_FinishedLoading); _isLoading = false; _isDeadFile = false; if (!_waitingForClose) { - Invoke(new MethodInvoker(LoadingFinished)); - Invoke(new MethodInvoker(LoadPersistenceData)); - Invoke(new MethodInvoker(SetGuiAfterLoading)); - _loadingFinishedEvent.Set(); - _externaLoadingFinishedEvent.Set(); + _ = Invoke(new MethodInvoker(LoadingFinished)); + _ = Invoke(new MethodInvoker(LoadPersistenceData)); + _ = Invoke(new MethodInvoker(SetGuiAfterLoading)); + _ = _loadingFinishedEvent.Set(); + _ = _externaLoadingFinishedEvent.Set(); _timeSpreadCalc.SetLineCount(_logFileReader.LineCount); if (_reloadMemento != null) { - Invoke(new PositionAfterReloadFx(PositionAfterReload), _reloadMemento); + _ = Invoke(new PositionAfterReloadFx(PositionAfterReload), _reloadMemento); } if (filterTailCheckBox.Checked) { - _logger.Info(CultureInfo.InvariantCulture, "Refreshing filter view because of reload."); - Invoke(new MethodInvoker(FilterSearch)); // call on proper thread + _logger.Info(Resources.LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload); + _ = Invoke(new MethodInvoker(FilterSearch)); // call on proper thread } HandleChangedFilterList(); @@ -729,16 +733,16 @@ private void OnLogFileReaderFileNotFound (object sender, EventArgs e) { if (!IsDisposed && !Disposing) { - _logger.Info(CultureInfo.InvariantCulture, "Handling file not found event."); + _logger.Info(Resources.LogWindow_Logger_Info_HandlingFileNotFoundEvent); _isDeadFile = true; - BeginInvoke(new MethodInvoker(LogfileDead)); + _ = BeginInvoke(new MethodInvoker(LogfileDead)); } } [SupportedOSPlatform("windows")] private void OnLogFileReaderRespawned (object sender, EventArgs e) { - BeginInvoke(new MethodInvoker(LogfileRespawned)); + _ = BeginInvoke(new MethodInvoker(LogfileRespawned)); } [SupportedOSPlatform("windows")] @@ -746,7 +750,7 @@ private void OnLogWindowClosing (object sender, CancelEventArgs e) { if (Preferences.AskForClose) { - if (MessageBox.Show("Sure to close?", "LogExpert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + if (MessageBox.Show(Resources.LogWindow_UI_SureToClose, Resources.Title_LogExpert, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { e.Cancel = true; return; @@ -772,28 +776,28 @@ private void OnLogFileReaderLoadFile (object sender, LoadFileEventArgs e) { if (e.NewFile) { - _logger.Info(CultureInfo.InvariantCulture, "File created anew."); + _logger.Info(Resources.LogWindow_Logger_Info_NewFileCreated); // File was new created (e.g. rollover) _isDeadFile = false; UnRegisterLogFileReaderEvents(); dataGridView.CurrentCellChanged -= OnDataGridViewCurrentCellChanged; MethodInvoker invoker = ReloadNewFile; - BeginInvoke(invoker); + _ = BeginInvoke(invoker); //Thread loadThread = new Thread(new ThreadStart(ReloadNewFile)); //loadThread.Start(); - _logger.Debug(CultureInfo.InvariantCulture, "Reloading invoked."); + _logger.Debug(Resources.LogWindow_Logger_Debug_ReloadingInvoked); } else if (_isLoading) { - BeginInvoke(UpdateProgress, e); + _ = BeginInvoke(UpdateProgress, e); } } private void OnFileSizeChanged (object sender, LogEventArgs e) { //OnFileSizeChanged(e); // now done in UpdateGrid() - _logger.Info(CultureInfo.InvariantCulture, "Got FileSizeChanged event. prevLines:{0}, curr lines: {1}", e.PrevLineCount, e.LineCount); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1, e.PrevLineCount, e.LineCount)); // - now done in the thread that works on the event args list //if (e.IsRollover) @@ -984,7 +988,7 @@ private void OnFilterGridViewColumnDividerDoubleClick (object sender, { e.Handled = true; AutoResizeColumnsFx fx = AutoResizeColumns; - BeginInvoke(fx, filterGridView); + _ = BeginInvoke(fx, filterGridView); } [SupportedOSPlatform("windows")] @@ -1155,28 +1159,28 @@ private void OnSelectionChangedTriggerSignal (object sender, EventArgs e) var selCount = 0; try { - _logger.Debug(CultureInfo.InvariantCulture, "Selection changed trigger"); + _logger.Debug(Resources.LogWindow_Logger_Debug_SelectionChangedTrigger); selCount = dataGridView.SelectedRows.Count; if (selCount > 1) { - StatusLineText(selCount + " selected lines"); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_SelCountSelectedLines, selCount)); } else { if (IsMultiFile) { MethodInvoker invoker = DisplayCurrentFileOnStatusline; - invoker.BeginInvoke(null, null); + _ = invoker.BeginInvoke(null, null); } else { - StatusLineText(""); + StatusLineText(string.Empty); } } } catch (Exception ex) { - _logger.Error(ex, "Error in selectionChangedTrigger_Signal selcount {0}", selCount); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount, selCount, ex)); } } @@ -1198,7 +1202,7 @@ private void OnPipeDisconnected (object sender, EventArgs e) { lock (_filterPipeList) { - _filterPipeList.Remove((FilterPipe)sender); + _ = _filterPipeList.Remove((FilterPipe)sender); if (_filterPipeList.Count == 0) // reset naming counter to 0 if no more open filter tabs for this source window { @@ -1337,7 +1341,7 @@ private void OnDataGridContextMenuStripOpening (object sender, CancelEventArgs e // enable/disable Temp Highlight item tempHighlightsToolStripMenuItem.Enabled = _tempHighlightEntryList.Count > 0; - markCurrentFilterRangeToolStripMenuItem.Enabled = string.IsNullOrEmpty(filterRangeComboBox.Text) == false; + markCurrentFilterRangeToolStripMenuItem.Enabled = !string.IsNullOrEmpty(filterRangeComboBox.Text); if (CurrentColumnizer.IsTimeshiftImplemented()) { @@ -1560,13 +1564,13 @@ private void OnColumnContextMenuStripOpening (object sender, CancelEventArgs e) if (frozen) { - freezeLeftColumnsUntilHereToolStripMenuItem.Text = "Frozen"; + freezeLeftColumnsUntilHereToolStripMenuItem.Text = Resources.LogWindow_UI_Text_Frozen; } else { if (ctl is BufferedDataGridView) { - freezeLeftColumnsUntilHereToolStripMenuItem.Text = $"Freeze left columns until here ({gridView.Columns[_selectedCol].HeaderText})"; + freezeLeftColumnsUntilHereToolStripMenuItem.Text = string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_Text_FreezeLeftColumnsUntilHereGridViewColumns_selectedColHeaderText, gridView.Columns[_selectedCol].HeaderText); } } @@ -1726,8 +1730,8 @@ private void OnHighlightSelectionInLogFileToolStripMenuItemClick (object sender, _tempHighlightEntryList.Add(he); } - dataGridView.CancelEdit(); - dataGridView.EndEdit(); + _ = dataGridView.CancelEdit(); + _ = dataGridView.EndEdit(); RefreshAllGrids(); } } @@ -1757,8 +1761,8 @@ private void OnHighlightSelectionInLogFilewordModeToolStripMenuItemClick (object _tempHighlightEntryList.Add(he); } - dataGridView.CancelEdit(); - dataGridView.EndEdit(); + _ = dataGridView.CancelEdit(); + _ = dataGridView.EndEdit(); RefreshAllGrids(); } } @@ -1768,7 +1772,7 @@ private void OnEditModeCopyToolStripMenuItemClick (object sender, EventArgs e) { if (dataGridView.EditingControl is DataGridViewTextBoxEditingControl ctl) { - if (Util.IsNull(ctl.SelectedText) == false) + if (!Util.IsNull(ctl.SelectedText)) { Clipboard.SetText(ctl.SelectedText); } @@ -1893,7 +1897,7 @@ private void OnDeleteFilterButtonClick (object sender, EventArgs e) if (index >= 0) { var filterParams = (FilterParams)filterListBox.Items[index]; - ConfigManager.Settings.FilterList.Remove(filterParams); + _ = ConfigManager.Settings.FilterList.Remove(filterParams); OnFilterListChanged(this); if (filterListBox.Items.Count > 0) { @@ -2243,6 +2247,7 @@ private void UnRegisterLogFileReaderEvents () } [SupportedOSPlatform("windows")] + //TODO This should be part of the Persister private bool LoadPersistenceOptions () { if (InvokeRequired) @@ -2263,7 +2268,7 @@ private bool LoadPersistenceOptions () if (persistenceData == null) { - _logger.Info($"No persistence data for {FileName} found."); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_NoPersistenceDataForFileNameFound, FileName)); return false; } @@ -2300,7 +2305,7 @@ private bool LoadPersistenceOptions () if (persistenceData.MultiFileNames.Count > 0) { - _logger.Info(CultureInfo.InvariantCulture, "Detected MultiFile name list in persistence options"); + _logger.Info(Resources.LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions); _fileNames = new string[persistenceData.MultiFileNames.Count]; persistenceData.MultiFileNames.CopyTo(_fileNames); } @@ -2313,9 +2318,9 @@ private bool LoadPersistenceOptions () SetExplicitEncoding(persistenceData.Encoding); return true; } - catch (Exception ex) + catch (Exception e) { - _logger.Error(ex, "Error loading persistence data: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(LoadPersistenceOptions), e)); return false; } } @@ -2330,11 +2335,12 @@ private void SetDefaultsFromPrefs () } [SupportedOSPlatform("windows")] + //TODO This should be part of the Persister private void LoadPersistenceData () { if (InvokeRequired) { - Invoke(new MethodInvoker(LoadPersistenceData)); + _ = Invoke(new MethodInvoker(LoadPersistenceData)); return; } @@ -2362,7 +2368,7 @@ private void LoadPersistenceData () { // outdated persistence data (logfile rollover) // MessageBox.Show(this, "Persistence data for " + this.FileName + " is outdated. It was discarded.", "Log Expert"); - _logger.Info($"Persistence data for {FileName} is outdated. It was discarded."); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded, FileName)); _ = LoadPersistenceOptions(); return; } @@ -2405,10 +2411,10 @@ private void LoadPersistenceData () RestoreFilters(persistenceData); } } - catch (IOException ex) + catch (IOException e) { SetDefaultsFromPrefs(); - _logger.Error(ex, "Error loading bookmarks: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(LoadPersistenceData), e)); } } @@ -2422,7 +2428,8 @@ private void RestoreFilters (PersistenceData persistenceData) } ApplyFilterParams(); // re-loaded filter settingss - BeginInvoke(new MethodInvoker(FilterSearch)); + _ = BeginInvoke(new MethodInvoker(FilterSearch)); + try { splitContainerLogWindow.SplitterDistance = persistenceData.FilterPosition; @@ -2430,7 +2437,7 @@ private void RestoreFilters (PersistenceData persistenceData) } catch (InvalidOperationException e) { - _logger.Error(e, "Error setting splitter distance: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SettingSplitterDistance, e)); } ShowAdvancedFilterPanel(persistenceData.FilterAdvanced); @@ -2468,22 +2475,20 @@ private void ReInitFilterParams (FilterParams filterParams) } catch (ArgumentException) { - StatusLineError("Invalid regular expression"); + StatusLineError(Resources.LogWindow_UI_StatusLineError_InvalidRegularExpression); } } } private void EnterLoadFileStatus () { - _logger.Debug(CultureInfo.InvariantCulture, "EnterLoadFileStatus begin"); - if (InvokeRequired) { - Invoke(new MethodInvoker(EnterLoadFileStatus)); + _ = Invoke(new MethodInvoker(EnterLoadFileStatus)); return; } - _statusEventArgs.StatusText = "Loading file..."; + _statusEventArgs.StatusText = Resources.LogWindow_UI_StatusText_LoadingFile; _statusEventArgs.LineCount = 0; _statusEventArgs.FileSize = 0; SendStatusLineUpdate(); @@ -2500,7 +2505,6 @@ private void EnterLoadFileStatus () ClearBookmarkList(); dataGridView.ClearSelection(); dataGridView.RowCount = 0; - _logger.Debug(CultureInfo.InvariantCulture, "EnterLoadFileStatus end"); } [SupportedOSPlatform("windows")] @@ -2520,7 +2524,6 @@ private void PositionAfterReload (ReloadMemento reloadMemento) [SupportedOSPlatform("windows")] private void LogfileDead () { - _logger.Info(CultureInfo.InvariantCulture, "File not found."); _isDeadFile = true; //this.logFileReader.FileSizeChanged -= this.FileSizeChangedHandler; @@ -2540,17 +2543,17 @@ private void LogfileDead () ClearFilterList(); ClearBookmarkList(); - StatusLineText("File not found"); + StatusLineText(Resources.LogWindow_UI_StatusLineText_FileNotFound); OnFileNotFound(EventArgs.Empty); } [SupportedOSPlatform("windows")] private void LogfileRespawned () { - _logger.Info(CultureInfo.InvariantCulture, "LogfileDead(): Reloading file because it has been respawned."); + _logger.Info(Resources.LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned); _isDeadFile = false; dataGridView.Enabled = true; - StatusLineText(""); + StatusLineText(string.Empty); OnFileRespawned(EventArgs.Empty); Reload(); } @@ -2597,7 +2600,7 @@ private void SetGuiAfterLoading () } } - Invoke(new SetColumnizerFx(SetColumnizer), columnizer); + _ = Invoke(new SetColumnizerFx(SetColumnizer), columnizer); } dataGridView.Enabled = true; @@ -2646,12 +2649,12 @@ private void ReloadNewFile () lock (_reloadLock) { _reloadOverloadCounter++; - _logger.Info($"ReloadNewFile(): counter = {_reloadOverloadCounter}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter, _reloadOverloadCounter)); if (_reloadOverloadCounter <= 1) { SavePersistenceData(false); - _loadingFinishedEvent.Reset(); - _externaLoadingFinishedEvent.Reset(); + _ = _loadingFinishedEvent.Reset(); + _ = _externaLoadingFinishedEvent.Reset(); Thread reloadFinishedThread = new(ReloadFinishedThreadFx) { IsBackground = true @@ -2673,7 +2676,7 @@ private void ReloadNewFile () } else { - _logger.Debug(CultureInfo.InvariantCulture, "Preventing reload because of recursive calls."); + _logger.Debug(Resources.LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls); } _reloadOverloadCounter--; @@ -2683,59 +2686,59 @@ private void ReloadNewFile () [SupportedOSPlatform("windows")] private void ReloadFinishedThreadFx () { - _logger.Info(CultureInfo.InvariantCulture, "Waiting for loading to be complete."); - _loadingFinishedEvent.WaitOne(); - _logger.Info(CultureInfo.InvariantCulture, "Refreshing filter view because of reload."); - Invoke(new MethodInvoker(FilterSearch)); + _logger.Info(Resources.LogWindow_Logger_Info_WaitingForLoadingToBeComplete); + _ = _loadingFinishedEvent.WaitOne(); + _logger.Info(Resources.LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload); + _ = Invoke(new MethodInvoker(FilterSearch)); LoadFilterPipes(); } - private void UpdateProgress (LoadFileEventArgs e) + private void UpdateProgress (LoadFileEventArgs loadFileEventArgs) { try { - if (e.ReadPos >= e.FileSize) + if (loadFileEventArgs.ReadPos >= loadFileEventArgs.FileSize) { //_logger.Warn(CultureInfo.InvariantCulture, "UpdateProgress(): ReadPos (" + e.ReadPos + ") is greater than file size (" + e.FileSize + "). Aborting Update"); return; } - _statusEventArgs.FileSize = e.ReadPos; + _statusEventArgs.FileSize = loadFileEventArgs.ReadPos; //this.progressEventArgs.Visible = true; - _progressEventArgs.MaxValue = (int)e.FileSize; - _progressEventArgs.Value = (int)e.ReadPos; + _progressEventArgs.MaxValue = (int)loadFileEventArgs.FileSize; + _progressEventArgs.Value = (int)loadFileEventArgs.ReadPos; SendProgressBarUpdate(); SendStatusLineUpdate(); } - catch (Exception ex) + catch (Exception e) { - _logger.Error(ex, "UpdateProgress(): "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(UpdateProgress), e)); } } - private void LoadingStarted (LoadFileEventArgs e) + private void LoadingStarted (LoadFileEventArgs loadFileEventArgs) { try { - _statusEventArgs.FileSize = e.ReadPos; - _statusEventArgs.StatusText = "Loading " + Util.GetNameFromPath(e.FileName); + _statusEventArgs.FileSize = loadFileEventArgs.ReadPos; + _statusEventArgs.StatusText = string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusText_LoadingWithParameter, Util.GetNameFromPath(loadFileEventArgs.FileName)); _progressEventArgs.Visible = true; - _progressEventArgs.MaxValue = (int)e.FileSize; - _progressEventArgs.Value = (int)e.ReadPos; + _progressEventArgs.MaxValue = (int)loadFileEventArgs.FileSize; + _progressEventArgs.Value = (int)loadFileEventArgs.ReadPos; SendProgressBarUpdate(); SendStatusLineUpdate(); } - catch (Exception ex) + catch (Exception e) { - _logger.Error(ex, "LoadingStarted(): "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(LoadingStarted), e)); } } private void LoadingFinished () { - _logger.Info(CultureInfo.InvariantCulture, "File loading complete."); + _logger.Info(Resources.LogWindow_Logger_Info_FileLoadingComplete); - StatusLineText(""); + StatusLineText(string.Empty); _logFileReader.FileSizeChanged += OnFileSizeChanged; _isLoading = false; _shouldCancel = false; @@ -2773,19 +2776,19 @@ private void LogEventWorker () Thread.CurrentThread.Name = "LogEventWorker"; while (true) { - _logger.Debug(CultureInfo.InvariantCulture, "Waiting for signal"); - _logEventArgsEvent.WaitOne(); - _logger.Debug(CultureInfo.InvariantCulture, "Wakeup signal received."); + _logger.Debug(Resources.LogWindow_Logger_Info_WaitingForSignal); + _ = _logEventArgsEvent.WaitOne(); + _logger.Debug(Resources.LogWindow_Logger_Info_WakeupSignalReceived); while (true) { LogEventArgs e; var lastLineCount = 0; lock (_logEventArgsList) { - _logger.Info(CultureInfo.InvariantCulture, "{0} events in queue", _logEventArgsList.Count); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_EventsInQueue, _logEventArgsList.Count)); if (_logEventArgsList.Count == 0) { - _logEventArgsEvent.Reset(); + _ = _logEventArgsEvent.Reset(); break; } @@ -2804,11 +2807,11 @@ private void LogEventWorker () { if (e.LineCount < lastLineCount) { - _logger.Error("Line count of event is: {0}, should be greater than last line count: {1}", e.LineCount, lastLineCount); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount, e.LineCount, lastLineCount)); } } - Invoke(UpdateGrid, [e]); + _ = Invoke(UpdateGrid, [e]); CheckFilterAndHighlight(e); _timeSpreadCalc.SetLineCount(e.LineCount); } @@ -2817,23 +2820,23 @@ private void LogEventWorker () private void StopLogEventWorkerThread () { - _logEventArgsEvent.Set(); + _ = _logEventArgsEvent.Set(); cts.Cancel(); //_logEventHandlerThread.Abort(); //_logEventHandlerThread.Join(); } - private void OnFileSizeChanged (LogEventArgs e) + private void OnFileSizeChanged (LogEventArgs logEventArgs) { - FileSizeChanged?.Invoke(this, e); + FileSizeChanged?.Invoke(this, logEventArgs); } - private void UpdateGrid (LogEventArgs e) + private void UpdateGrid (LogEventArgs logEventArgs) { var oldRowCount = dataGridView.RowCount; var firstDisplayedLine = dataGridView.FirstDisplayedScrollingRowIndex; - if (dataGridView.CurrentCellAddress.Y >= e.LineCount) + if (dataGridView.CurrentCellAddress.Y >= logEventArgs.LineCount) { //this.dataGridView.Rows[this.dataGridView.CurrentCellAddress.Y].Selected = false; //this.dataGridView.CurrentCell = this.dataGridView.Rows[0].Cells[0]; @@ -2841,12 +2844,12 @@ private void UpdateGrid (LogEventArgs e) try { - if (dataGridView.RowCount > e.LineCount) + if (dataGridView.RowCount > logEventArgs.LineCount) { var currentLineNum = dataGridView.CurrentCellAddress.Y; dataGridView.RowCount = 0; - dataGridView.RowCount = e.LineCount; - if (_guiStateArgs.FollowTail == false) + dataGridView.RowCount = logEventArgs.LineCount; + if (!_guiStateArgs.FollowTail) { if (currentLineNum >= dataGridView.RowCount) { @@ -2858,26 +2861,26 @@ private void UpdateGrid (LogEventArgs e) } else { - dataGridView.RowCount = e.LineCount; + dataGridView.RowCount = logEventArgs.LineCount; } - _logger.Debug(CultureInfo.InvariantCulture, "UpdateGrid(): new RowCount={0}", dataGridView.RowCount); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_UpdateGridNewRowCount, dataGridView.RowCount)); - if (e.IsRollover) + if (logEventArgs.IsRollover) { // Multifile rollover // keep selection and view range, if no follow tail mode if (!_guiStateArgs.FollowTail) { var currentLineNum = dataGridView.CurrentCellAddress.Y; - currentLineNum -= e.RolloverOffset; + currentLineNum -= logEventArgs.RolloverOffset; if (currentLineNum < 0) { currentLineNum = 0; } - _logger.Debug(CultureInfo.InvariantCulture, "UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2}", e.RolloverOffset, dataGridView.CurrentCellAddress.Y, currentLineNum); - firstDisplayedLine -= e.RolloverOffset; + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover, logEventArgs.RolloverOffset, dataGridView.CurrentCellAddress.Y, currentLineNum)); + firstDisplayedLine -= logEventArgs.RolloverOffset; if (firstDisplayedLine < 0) { firstDisplayedLine = 0; @@ -2889,8 +2892,8 @@ private void UpdateGrid (LogEventArgs e) } } - _statusEventArgs.LineCount = e.LineCount; - StatusLineFileSize(e.FileSize); + _statusEventArgs.LineCount = logEventArgs.LineCount; + StatusLineFileSize(logEventArgs.FileSize); if (!_isLoading) { @@ -2913,9 +2916,9 @@ private void UpdateGrid (LogEventArgs e) SetTimestampLimits(); } } - catch (Exception ex) + catch (Exception e) { - _logger.Error(ex, "Fehler bei UpdateGrid(): "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(UpdateGrid), e)); } //this.dataGridView.Refresh(); @@ -2925,10 +2928,6 @@ private void UpdateGrid (LogEventArgs e) private void CheckFilterAndHighlight (LogEventArgs e) { var noLed = true; - bool suppressLed; - bool setBookmark; - bool stopTail; - string bookmarkComment; if (filterTailCheckBox.Checked || _filterPipeList.Count > 0) { @@ -2958,8 +2957,7 @@ private void CheckFilterAndHighlight (LogEventArgs e) //AddFilterLineFx addFx = new AddFilterLineFx(AddFilterLine); //this.Invoke(addFx, new object[] { i, true }); filterLineAdded = true; - AddFilterLine(i, false, _filterParams, _filterResultList, _lastFilterLinesList, - _filterHitList); + AddFilterLine(i, false, _filterParams, _filterResultList, _lastFilterLinesList, _filterHitList); } } @@ -2969,11 +2967,11 @@ private void CheckFilterAndHighlight (LogEventArgs e) var matchingList = FindMatchingHilightEntries(line); LaunchHighlightPlugins(matchingList, i); - GetHighlightActions(matchingList, out suppressLed, out stopTail, out setBookmark, out bookmarkComment); + var (suppressLed, stopTail, setBookmark, bookmarkComment) = GetHighlightActions(matchingList); if (setBookmark) { SetBookmarkFx fx = SetBookmarkFromTrigger; - fx.BeginInvoke(i, bookmarkComment, null, null); + _ = fx.BeginInvoke(i, bookmarkComment, null, null); } if (stopTail && _guiStateArgs.FollowTail) @@ -2982,7 +2980,7 @@ private void CheckFilterAndHighlight (LogEventArgs e) FollowTailChanged(false, true); if (firstStopTail && wasFollow) { - Invoke(new SelectLineFx(SelectAndEnsureVisible), [i, false]); + _ = Invoke(new SelectLineFx(SelectAndEnsureVisible), [i, false]); firstStopTail = false; } } @@ -3017,12 +3015,11 @@ private void CheckFilterAndHighlight (LogEventArgs e) { var matchingList = FindMatchingHilightEntries(line); LaunchHighlightPlugins(matchingList, i); - GetHighlightActions(matchingList, out suppressLed, out stopTail, out setBookmark, - out bookmarkComment); + var (suppressLed, stopTail, setBookmark, bookmarkComment) = GetHighlightActions(matchingList); if (setBookmark) { SetBookmarkFx fx = SetBookmarkFromTrigger; - fx.BeginInvoke(i, bookmarkComment, null, null); + _ = fx.BeginInvoke(i, bookmarkComment, null, null); } if (stopTail && _guiStateArgs.FollowTail) @@ -3031,7 +3028,7 @@ private void CheckFilterAndHighlight (LogEventArgs e) FollowTailChanged(false, true); if (firstStopTail && wasFollow) { - Invoke(new SelectLineFx(SelectAndEnsureVisible), [i, false]); + _ = Invoke(new SelectLineFx(SelectAndEnsureVisible), [i, false]); firstStopTail = false; } } @@ -3065,7 +3062,7 @@ private void LaunchHighlightPlugins (IList matchingList, int lin if (plugin != null) { ActionPluginExecuteFx fx = plugin.Execute; - fx.BeginInvoke(entry.SearchText, entry.ActionEntry.ActionParam, callback, CurrentColumnizer, null, null); + _ = fx.BeginInvoke(entry.SearchText, entry.ActionEntry.ActionParam, callback, CurrentColumnizer, null, null); } } } @@ -3098,7 +3095,7 @@ private void SetColumnizer (ILogLineColumnizer columnizer) private void SetColumnizerInternal (ILogLineColumnizer columnizer) { - _logger.Info(CultureInfo.InvariantCulture, "SetColumnizerInternal(): {0}", columnizer.GetName()); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_SetColumnizerInternal, columnizer.GetName())); var oldColumnizer = CurrentColumnizer; var oldColumnizerIsXmlType = CurrentColumnizer is ILogLineXmlColumnizer; @@ -3230,7 +3227,7 @@ private void SetColumnizerInternal (ILogLineColumnizer columnizer) foreach (var columnName in columnizer.GetColumnNames()) { - columnComboBox.Items.Add(columnName); + _ = columnComboBox.Items.Add(columnName); } columnComboBox.SelectedIndex = 0; @@ -3258,7 +3255,7 @@ private void AutoResizeColumns (BufferedDataGridView gridView) // possible solution => https://stackoverflow.com/questions/36287553/nullreferenceexception-when-trying-to-set-datagridview-column-width-brings-th // There are some rare situations with null ref exceptions when resizing columns and on filter finished // So catch them here. Better than crashing. - _logger.Error(e, "Error while resizing columns: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_WhileResizingColumns, e)); } } @@ -3380,7 +3377,7 @@ private void PaintHighlightedCell (DataGridViewCellPaintingEventArgs e, Highligh /// List of all highlight matches for the current cell /// The entry that is used as the default. /// List of HighlightMatchEntry objects. The list spans over the whole cell and contains color infos for every substring. - private IList MergeHighlightMatchEntries (IList matchList, HighlightMatchEntry groundEntry) + private static IList MergeHighlightMatchEntries (IList matchList, HighlightMatchEntry groundEntry) { // Fill an area with lenth of whole text with a default hilight entry var entryArray = new HighlightEntry[groundEntry.Length]; @@ -3459,7 +3456,7 @@ private HighlightEntry FindFirstNoWordMatchHilightEntry (ITextValue line) return FindHighlightEntry(line, true); } - private bool CheckHighlightEntryMatch (HighlightEntry entry, ITextValue column) + private static bool CheckHighlightEntryMatch (HighlightEntry entry, ITextValue column) { if (entry.IsRegEx) { @@ -3513,7 +3510,7 @@ private IList FindMatchingHilightEntries (ITextValue line) return resultList; } - private void GetHighlightEntryMatches (ITextValue line, IList hilightEntryList, IList resultList) + private static void GetHighlightEntryMatches (ITextValue line, IList hilightEntryList, IList resultList) { foreach (var entry in hilightEntryList) { @@ -3549,10 +3546,12 @@ private void GetHighlightEntryMatches (ITextValue line, IList hi } } - private void GetHighlightActions (IList matchingList, out bool noLed, out bool stopTail, out bool setBookmark, out string bookmarkComment) + private static (bool NoLed, bool StopTail, bool SetBookmark, string BookmarkComment) GetHighlightActions (IList matchingList) { - noLed = stopTail = setBookmark = false; - bookmarkComment = string.Empty; + var noLed = false; + var stopTail = false; + var setBookmark = false; + var bookmarkComment = string.Empty; foreach (var entry in matchingList) { @@ -3577,6 +3576,8 @@ private void GetHighlightActions (IList matchingList, out bool n } bookmarkComment = bookmarkComment.TrimEnd(['\r', '\n']); + + return (noLed, stopTail, setBookmark, bookmarkComment); } private void StopTimespreadThread () @@ -3616,7 +3617,6 @@ private void SyncTimestampDisplay (int lineNum) [SupportedOSPlatform("windows")] private void SyncTimestampDisplayWorker () { - const int WAIT_TIME = 500; Thread.CurrentThread.Name = "SyncTimestampDisplayWorker"; _shouldTimestampDisplaySyncingCancel = false; _isTimestampDisplaySyncing = true; @@ -3680,7 +3680,7 @@ private void SyncTimestampDisplayWorker () ? new DateTime(timeStamp1.Ticks - timeStamp2.Ticks) : new DateTime(timeStamp2.Ticks - timeStamp1.Ticks); - StatusLineText($"Time diff is {diff:HH:mm:ss.fff}"); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_TimeDiff, $"{diff:HH:mm:ss.fff}")); } else { @@ -3716,7 +3716,7 @@ private void SyncFilterGridPos () } catch (Exception e) { - _logger.Error(e, "SyncFilterGridPos(): "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(SyncFilterGridPos), e)); } } @@ -3738,7 +3738,7 @@ private int Search (SearchParams searchParams) ? 0 : searchParams.CurrentLine; - var lowerSearchText = searchParams.SearchText.ToLowerInvariant(); + var lowerSearchText = searchParams.SearchText.ToUpperInvariant(); var count = 0; var hasWrapped = false; @@ -3750,14 +3750,14 @@ private int Search (SearchParams searchParams) { if (hasWrapped) { - StatusLineError("Not found: " + searchParams.SearchText); + StatusLineError(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineError_NotFound, searchParams.SearchText)); return -1; } lineNum = 0; count = 0; hasWrapped = true; - StatusLineError("Started from beginning of file"); + StatusLineError(Resources.LogWindow_UI_StatusLineError_StartedFromBeginningOfFile); } } else @@ -3766,14 +3766,14 @@ private int Search (SearchParams searchParams) { if (hasWrapped) { - StatusLineError("Not found: " + searchParams.SearchText); + StatusLineError(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineError_NotFound, searchParams.SearchText)); return -1; } count = 0; lineNum = _logFileReader.LineCount - 1; hasWrapped = true; - StatusLineError("Started from end of file"); + StatusLineError(Resources.LogWindow_UI_StatusLineError_StartedFromEndOfFile); } } @@ -3785,7 +3785,9 @@ private int Search (SearchParams searchParams) if (searchParams.IsRegex) { - Regex rex = new(searchParams.SearchText, searchParams.IsCaseSensitive ? RegexOptions.None : RegexOptions.IgnoreCase); + Regex rex = new(searchParams.SearchText, searchParams.IsCaseSensitive + ? RegexOptions.None + : RegexOptions.IgnoreCase); if (rex.IsMatch(line.FullLine)) { return lineNum; @@ -3829,7 +3831,7 @@ private int Search (SearchParams searchParams) { if (!Disposing) { - Invoke(UpdateProgressBar, [count]); + _ = Invoke(UpdateProgressBar, [count]); } } catch (ObjectDisposedException ex) // can occur when closing the app while searching @@ -3867,7 +3869,7 @@ private void SelectLine (int lineNum, bool triggerSyncCall, bool shouldScroll) if (lineNum == -1) { // Hmm... is that experimental code from early days? - MessageBox.Show(this, "Not found:", "Search result"); + _ = MessageBox.Show(this, Resources.LogWindow_UI_SelectLine_SearchResultNotFound, Resources.Title_LogExpert); return; } @@ -3887,12 +3889,12 @@ private void SelectLine (int lineNum, bool triggerSyncCall, bool shouldScroll) } catch (ArgumentOutOfRangeException e) { - _logger.Error(e, "Error while selecting line: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SelectLine_WhileSelectingLine, e)); } catch (IndexOutOfRangeException e) { // Occures sometimes (but cannot reproduce) - _logger.Error(e, "Error while selecting line: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SelectLine_WhileSelectingLine, e)); } } @@ -3915,7 +3917,7 @@ private void StartEditMode () } else { - _logger.Warn(CultureInfo.InvariantCulture, "Edit control in logWindow was null"); + _logger.Warn(Resources.LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull); } } } @@ -3928,8 +3930,8 @@ private void UpdateEditColumnDisplay (DataGridViewTextBoxEditingControl editCont if (dataGridView.EditingControl != null) { var pos = editControl.SelectionStart + editControl.SelectionLength; - StatusLineText(" " + pos); - _logger.Debug(CultureInfo.InvariantCulture, "SelStart: {0}, SelLen: {1}", editControl.SelectionStart, editControl.SelectionLength); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_UpdateEditColumnDisplay, pos)); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_UpdateEditColumnDisplay, editControl.SelectionStart, editControl.SelectionLength)); } } @@ -4175,7 +4177,7 @@ private async void FilterSearch (string text) } catch (ArgumentException) { - StatusLineError("Invalid regular expression"); + StatusLineError(Resources.LogWindow_UI_StatusLineError_InvalidRegularExpression); return; } } @@ -4190,7 +4192,7 @@ private async void FilterSearch (string text) _shouldCancel = false; _isSearching = true; - StatusLineText("Filtering... Press ESC to cancel"); + StatusLineText(Resources.LogWindow_UI_StatusLineText_FilterSearch_Filtering); filterSearchButton.Enabled = false; ClearFilterList(); @@ -4206,7 +4208,7 @@ private async void FilterSearch (string text) FilterFxAction = settings.Preferences.MultiThreadFilter ? MultiThreadedFilter : Filter; //Task.Run(() => fx.Invoke(_filterParams, _filterResultList, _lastFilterLinesList, _filterHitList)); - var filterFxActionTask = Task.Run(() => Filter(_filterParams, _filterResultList, _lastFilterLinesList, _filterHitList)); + var filterFxActionTask = Task.Run(() => Filter(_filterParams, _filterResultList, _lastFilterLinesList, _filterHitList)).ConfigureAwait(false); await filterFxActionTask; FilterComplete(); @@ -4234,10 +4236,10 @@ private void MultiThreadedFilter (FilterParams filterParams, List filterRes long endTime = Environment.TickCount; - _logger.Debug($"Multi threaded filter duration: {endTime - startTime} ms."); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_MultiThreadedFilter_Duration, endTime - startTime)); OnDeRegisterCancelHandler(cancelHandler); - StatusLineText("Filter duration: " + (endTime - startTime) + " ms."); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_Filter_FilterDurationMs, endTime - startTime)); } private void FilterProgressCallback (int lineCount) @@ -4284,15 +4286,14 @@ private void Filter (FilterParams filterParams, List filterResultLines, Lis } catch (Exception ex) { - _logger.Error(ex, "Exception while filtering. Please report to developer: "); - MessageBox.Show(null, $"Exception while filtering. Please report to developer: \n\n{ex}\n\n{ex.StackTrace}", "LogExpert"); + _ = MessageBox.Show(null, string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_Filter_ExceptionWhileFiltering, ex, ex.StackTrace), Resources.Title_LogExpert_Error); } long endTime = Environment.TickCount; - _logger.Info($"Single threaded filter duration: {endTime - startTime} ms."); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration, endTime - startTime)); - StatusLineText("Filter duration: " + (endTime - startTime) + " ms."); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_Filter_FilterDurationMs, endTime - startTime)); } /// @@ -4386,7 +4387,7 @@ private void TriggerFilterLineGuiUpdate () // this.filterEventCount++; // this.filterUpdateEvent.Set(); //} - Invoke(new MethodInvoker(AddFilterLineGuiUpdate)); + _ = Invoke(new MethodInvoker(AddFilterLineGuiUpdate)); } //private void FilterUpdateWorker() @@ -4470,7 +4471,7 @@ private void AddFilterLineGuiUpdate () } catch (Exception e) { - _logger.Error(e, "AddFilterLineGuiUpdate(): "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(AddFilterLineGuiUpdate), e)); } } @@ -4491,16 +4492,7 @@ private void FilterComplete () { if (!IsDisposed && !_waitingForClose && !Disposing) { - Invoke(new MethodInvoker(ResetStatusAfterFilter)); - } - } - - [SupportedOSPlatform("windows")] - private void FilterComplete (IAsyncResult result) - { - if (!IsDisposed && !_waitingForClose && !Disposing) - { - Invoke(new MethodInvoker(ResetStatusAfterFilter)); + _ = Invoke(new MethodInvoker(ResetStatusAfterFilter)); } } @@ -4517,10 +4509,10 @@ private void ResetStatusAfterFilter () filterGridView.RowCount = _filterResultList.Count; //this.filterGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells); AutoResizeColumns(filterGridView); - lblFilterCount.Text = "" + _filterResultList.Count; + lblFilterCount.Text = string.Empty + _filterResultList.Count; if (filterGridView.RowCount > 0) { - filterGridView.Focus(); + _ = filterGridView.Focus(); } filterSearchButton.Enabled = true; @@ -4530,7 +4522,7 @@ private void ResetStatusAfterFilter () // See https://connect.microsoft.com/VisualStudio/feedback/details/366943/autoresizecolumns-in-datagridview-throws-nullreferenceexception // There are some rare situations with null ref exceptions when resizing columns and on filter finished // So catch them here. Better than crashing. - _logger.Error(e, "Error: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(ResetStatusAfterFilter), e)); } } @@ -4544,7 +4536,7 @@ private void ClearFilterList () { filterGridView.SuspendLayout(); filterGridView.RowCount = 0; - lblFilterCount.Text = "0"; + lblFilterCount.Text = Resources.LogWindow_UI_ClearFilterList_ResetFilterCounterToZero; _filterResultList = []; _lastFilterLinesList = []; _filterHitList = []; @@ -4552,11 +4544,11 @@ private void ClearFilterList () filterGridView.ResumeLayout(); } } - catch (Exception ex) + catch (Exception e) { - _logger.Error(ex, "Wieder dieser sporadische Fehler: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(ClearFilterList), e)); - MessageBox.Show(null, ex.StackTrace, "Wieder dieser sporadische Fehler:"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList, e), Resources.Title_LogExpert_Error); } } @@ -4699,7 +4691,7 @@ private void AdjustMinimumGridWith () } [SupportedOSPlatform("windows")] - private void InvalidateCurrentRow (BufferedDataGridView gridView) + private static void InvalidateCurrentRow (BufferedDataGridView gridView) { if (gridView.CurrentCellAddress.Y > -1) { @@ -4755,13 +4747,13 @@ private void UpdateFilterHistoryFromSettings () filterComboBox.Items.Clear(); foreach (var item in ConfigManager.Settings.FilterHistoryList) { - filterComboBox.Items.Add(item); + _ = filterComboBox.Items.Add(item); } filterRangeComboBox.Items.Clear(); foreach (var item in ConfigManager.Settings.FilterRangeHistoryList) { - filterRangeComboBox.Items.Add(item); + _ = filterRangeComboBox.Items.Add(item); } } @@ -4779,7 +4771,7 @@ private void StatusLineError (string text) private void RemoveStatusLineError () { - StatusLineText(""); + StatusLineText(string.Empty); _isErrorShowing = false; } @@ -4803,12 +4795,12 @@ private void ShowAdvancedFilterPanel (bool show) { if (show) { - advancedButton.Text = "Hide advanced..."; + advancedButton.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_HideAdvanced; advancedButton.Image = null; } else { - advancedButton.Text = "Show advanced..."; + advancedButton.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_ShowAdvanced; CheckForAdvancedButtonDirty(); } @@ -4829,7 +4821,7 @@ private void CheckForAdvancedButtonDirty () private void FilterToTab () { filterSearchButton.Enabled = false; - Task.Run(() => WriteFilterToTab()); + _ = Task.Run(WriteFilterToTab); } [SupportedOSPlatform("windows")] @@ -4838,7 +4830,7 @@ private void WriteFilterToTab () FilterPipe pipe = new(_filterParams.Clone(), this); lock (_filterResultList) { - var namePrefix = "->F"; + var namePrefix = Resources.LogWindow_UI_WriteFilterToTab_NamePrefix_ForFilter; var title = IsTempFile ? TempTitleName + namePrefix + ++_filterPipeNameCounter : Util.GetNameFromPath(FileName) + namePrefix + ++_filterPipeNameCounter; @@ -4850,15 +4842,14 @@ private void WriteFilterToTab () [SupportedOSPlatform("windows")] private void WritePipeToTab (FilterPipe pipe, List lineNumberList, string name, PersistenceData persistenceData) { - _logger.Info(CultureInfo.InvariantCulture, "WritePipeToTab(): {0} lines.", lineNumberList.Count); - StatusLineText("Writing to temp file... Press ESC to cancel."); + StatusLineText(Resources.LogWindow_UI_StatusLineText_WritePipeToTab_WritingToTempFile); _guiStateArgs.MenuEnabled = false; SendGuiStateUpdate(); _progressEventArgs.MinValue = 0; _progressEventArgs.MaxValue = lineNumberList.Count; _progressEventArgs.Value = 0; _progressEventArgs.Visible = true; - Invoke(new MethodInvoker(SendProgressBarUpdate)); + _ = Invoke(new MethodInvoker(SendProgressBarUpdate)); _isSearching = true; _shouldCancel = false; @@ -4885,17 +4876,16 @@ private void WritePipeToTab (FilterPipe pipe, List lineNumberList, string n line = (CurrentColumnizer as ILogLineXmlColumnizer).GetLineTextForClipboard(line, callback); } - pipe.WriteToPipe(line, i); + _ = pipe.WriteToPipe(line, i); if (++count % PROGRESS_BAR_MODULO == 0) { _progressEventArgs.Value = count; - Invoke(new MethodInvoker(SendProgressBarUpdate)); + _ = Invoke(new MethodInvoker(SendProgressBarUpdate)); } } pipe.CloseFile(); - _logger.Info(CultureInfo.InvariantCulture, "WritePipeToTab(): finished"); - Invoke(new WriteFilterToTabFinishedFx(WriteFilterToTabFinished), pipe, name, persistenceData); + _ = Invoke(new WriteFilterToTabFinishedFx(WriteFilterToTabFinished), pipe, name, persistenceData); } [SupportedOSPlatform("windows")] @@ -4916,7 +4906,7 @@ private void WriteFilterToTabFinished (FilterPipe pipe, string name, Persistence pipe.OwnLogWindow = newWin; if (persistenceData != null) { - Task.Run(() => FilterRestore(newWin, persistenceData)); + _ = Task.Run(() => FilterRestore(newWin, persistenceData)); } } @@ -4946,30 +4936,30 @@ internal void WritePipeTab (IList lineEntryList, string title) pipe.OpenFile(); foreach (var entry in lineEntryList) { - pipe.WriteToPipe(entry.LogLine, entry.LineNum); + _ = pipe.WriteToPipe(entry.LogLine, entry.LineNum); } pipe.CloseFile(); - Invoke(new WriteFilterToTabFinishedFx(WriteFilterToTabFinished), [pipe, title, null]); + _ = Invoke(new WriteFilterToTabFinishedFx(WriteFilterToTabFinished), [pipe, title, null]); } [SupportedOSPlatform("windows")] - private void FilterRestore (LogWindow newWin, PersistenceData persistenceData) + private static void FilterRestore (LogWindow newWin, PersistenceData persistenceData) { newWin.WaitForLoadingFinished(); - var columnizer = ColumnizerPicker.FindColumnizerByName(persistenceData.ColumnizerName, - PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers); + var columnizer = ColumnizerPicker.FindColumnizerByName(persistenceData.ColumnizerName, PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers); + if (columnizer != null) { SetColumnizerFx fx = newWin.ForceColumnizer; - newWin.Invoke(fx, [columnizer]); + _ = newWin.Invoke(fx, [columnizer]); } else { - _logger.Warn($"FilterRestore(): Columnizer {persistenceData.ColumnizerName} not found"); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound, persistenceData.ColumnizerName)); } - newWin.BeginInvoke(new RestoreFiltersFx(newWin.RestoreFilters), [persistenceData]); + _ = newWin.BeginInvoke(new RestoreFiltersFx(newWin.RestoreFilters), [persistenceData]); } [SupportedOSPlatform("windows")] @@ -4985,6 +4975,7 @@ private void ProcessFilterPipes (int lineNum) { LineNum = lineNum }; + IList deleteList = []; lock (_filterPipeList) { @@ -5027,7 +5018,7 @@ private void ProcessFilterPipes (int lineNum) foreach (var pipe in deleteList) { - _filterPipeList.Remove(pipe); + _ = _filterPipeList.Remove(pipe); } } @@ -5054,18 +5045,16 @@ private void CopyMarkedLinesToClipboard () StringBuilder clipText = new(); LogExpertCallback callback = new(this); - var xmlColumnizer = _currentColumnizer as ILogLineXmlColumnizer; - foreach (var lineNum in lineNumList) { var line = _logFileReader.GetLogLine(lineNum); - if (xmlColumnizer != null) + if (_currentColumnizer is ILogLineXmlColumnizer xmlColumnizer) { callback.LineNum = lineNum; line = xmlColumnizer.GetLineTextForClipboard(line, callback); } - clipText.AppendLine(line.ToClipBoardText()); + _ = clipText.AppendLine(line.ToClipBoardText()); } Clipboard.SetText(clipText.ToString()); @@ -5110,7 +5099,7 @@ private void ApplyDataGridViewPrefs (BufferedDataGridView dataGridView, bool set } [SupportedOSPlatform("windows")] - private IList GetSelectedContent () + private List GetSelectedContent () { if (dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect) { @@ -5150,7 +5139,8 @@ private void SetTimestampLimits () SendGuiStateUpdate(); } - private void AdjustHighlightSplitterWidth () + //TODO Reimplement + private static void AdjustHighlightSplitterWidth () { //int size = this.editHighlightsSplitContainer.Panel2Collapsed ? 600 : 660; //int distance = this.highlightSplitContainer.Width - size; @@ -5196,8 +5186,8 @@ private string CalculateColumnNames (FilterParams filter) names += ", "; } - names += dataGridView.Columns[2 + colIndex] - .HeaderText; // skip first two columns: marker + line number + // skip first two columns: marker + line number + names += dataGridView.Columns[2 + colIndex].HeaderText; } } } @@ -5217,7 +5207,7 @@ private void ApplyFrozenState (BufferedDataGridView gridView) foreach (var col in dict.Values) { col.Frozen = _freezeStateMap.ContainsKey(gridView) && _freezeStateMap[gridView]; - var sel = col.HeaderCell.Selected; + if (col.Index == _selectedCol) { break; @@ -5259,7 +5249,7 @@ private void InitPatternWindow () private void TestStatistic (PatternArgs patternArgs) { var beginLine = patternArgs.StartLine; - _logger.Info($"TestStatistics() called with start line {beginLine}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine, beginLine)); _patternArgs = patternArgs; @@ -5290,7 +5280,7 @@ private void TestStatistic (PatternArgs patternArgs) PatternBlock block; var maxBlockLen = patternArgs.EndLine - patternArgs.StartLine; //int searchLine = i + 1; - _logger.Debug(CultureInfo.InvariantCulture, "TestStatistic(): i={0} searchLine={1}", i, searchLine); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo, i, searchLine)); //bool firstBlock = true; searchLine++; UpdateProgressBar(searchLine); @@ -5300,7 +5290,7 @@ private void TestStatistic (PatternArgs patternArgs) _patternArgs.MaxMisses, processedLinesDict)) != null) { - _logger.Debug(CultureInfo.InvariantCulture, "Found block: {0}", block); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock, block)); if (block.Weigth >= _patternArgs.MinWeight) { //PatternBlock existingBlock = FindExistingBlock(block, blockList); @@ -5346,10 +5336,10 @@ private void TestStatistic (PatternArgs patternArgs) // this.Invoke(new MethodInvoker(CreatePatternWindow)); //} _patternWindow.SetBlockList(blockList, _patternArgs); - _logger.Info(CultureInfo.InvariantCulture, "TestStatistics() ended"); + _logger.Info(Resources.LogWindow_Logger_Info_TestStatistic_Ended); } - private void AddBlockTargetLinesToDict (Dictionary dict, PatternBlock block) + private static void AddBlockTargetLinesToDict (Dictionary dict, PatternBlock block) { foreach (var lineNum in block.TargetLines.Keys) { @@ -5358,7 +5348,7 @@ private void AddBlockTargetLinesToDict (Dictionary dict, PatternBlock } //Well keep this for the moment because there is some other commented code which calls this one - private PatternBlock FindExistingBlock (PatternBlock block, List blockList) + private static PatternBlock FindExistingBlock (PatternBlock block, List blockList) { foreach (var searchBlock in blockList) { @@ -5516,6 +5506,7 @@ private void PrepareDict () } } + //TODO Reimplement private int FindSimilarLine (int srcLine, int startLine) { var value = _lineHashList[srcLine]; @@ -5532,9 +5523,9 @@ private int FindSimilarLine (int srcLine, int startLine) return -1; } + //TODO Reimplement this cache to speed up the similar line search // int[,] similarCache; - - private void ResetCache (int num) + private static void ResetCache (int num) { //this.similarCache = new int[num, num]; //for (int i = 0; i < num; ++i) @@ -5639,7 +5630,7 @@ private void ChangeRowHeight (bool decrease) entry.Height -= _lineHeight; if (entry.Height <= _lineHeight) { - _rowHeightList.Remove(rowNum); + _ = _rowHeightList.Remove(rowNum); } } } @@ -5705,6 +5696,7 @@ private void AddBookmarkComment (string text) { var lineNum = dataGridView.CurrentCellAddress.Y; Bookmark bookmark; + if (!_bookmarkProvider.IsBookmarkAtLine(lineNum)) { _bookmarkProvider.AddBookmark(bookmark = new Bookmark(lineNum)); @@ -5781,13 +5773,14 @@ private void SetBookmarksForSelectedFilterLines () private void SetDefaultHighlightGroup () { var group = _parentLogTabWin.FindHighlightGroupByFileMask(FileName); + if (group != null) { SetCurrentHighlightGroup(group.GroupName); } else { - SetCurrentHighlightGroup("[Default]"); + SetCurrentHighlightGroup(Resources.HighlightDialog_UI_DefaultGroupName); } } @@ -5851,7 +5844,7 @@ private void AddSlaveToTimesync (LogWindow slave) OnSyncModeChanged(); } - private void FreeSlaveFromTimesync (LogWindow slave) + private static void FreeSlaveFromTimesync (LogWindow slave) { slave.FreeFromTimeSync(); } @@ -5909,7 +5902,7 @@ private void RemoveAllSearchHighlightEntries () } [SupportedOSPlatform("windows")] - private DataGridViewColumn GetColumnByName (BufferedDataGridView dataGridView, string name) + private static DataGridViewColumn GetColumnByName (BufferedDataGridView dataGridView, string name) { foreach (DataGridViewColumn col in dataGridView.Columns) { @@ -6011,8 +6004,8 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) } catch (LogFileException lfe) { - _logger.Error(lfe); - MessageBox.Show($"Cannot load file\n{lfe.Message}", "LogExpert"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(LoadFile), lfe)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_LoadFile_CannotLoadFile, lfe.Message), Resources.Title_LogExpert); _ = BeginInvoke(new FunctionWith1BoolParam(Close), true); _isLoadError = true; return; @@ -6032,7 +6025,7 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) _logFileReader.PreProcessColumnizer = CurrentColumnizer is IPreProcessColumnizer processColumnizer ? processColumnizer : null; RegisterLogFileReaderEvents(); - _logger.Info($"Loading logfile: {fileName}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFile_LoadingLogfile, fileName)); _logFileReader.StartMonitoring(); if (isUsingDefaultColumnizer) @@ -6043,7 +6036,7 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) if (newColumnizer != null) { - _logger.Debug($"Picked new columnizer '{newColumnizer}'"); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFile_PickedNewColumnizer, newColumnizer.GetName())); PreSelectColumnizer(newColumnizer); } @@ -6054,13 +6047,11 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) public void LoadFilesAsMulti (string[] fileNames, EncodingOptions encodingOptions) { - _logger.Info("Loading given files as MultiFile:"); - EnterLoadFileStatus(); foreach (var name in fileNames) { - _logger.Info($"File: {name}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFilesAsMulti_FileName, name)); } if (_logFileReader != null) @@ -6088,7 +6079,8 @@ public void LoadFilesAsMulti (string[] fileNames, EncodingOptions encodingOption // this.Text = Util.GetNameFromPath(this.FileName); } - public string SavePersistenceData (bool force) + //TODO move to Persister class + public string SavePersistenceDataAndReturnFileName (bool force) { if (!force) { @@ -6111,18 +6103,23 @@ public string SavePersistenceData (bool force) ? Persister.SavePersistenceData(FileName, persistenceData, Preferences) : Persister.SavePersistenceDataWithFixedName(ForcedPersistenceFileName, persistenceData); } - catch (IOException ex) + catch (IOException e) { - _logger.Error(ex, "Error saving persistence: "); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(SavePersistenceDataAndReturnFileName), e)); } catch (Exception e) { - MessageBox.Show($"Unexpected error while saving persistence: {e.Message}"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_SavePersistenceData_ErrorWhileSaving, e), Resources.Title_LogExpert_Error); } return null; } + public void SavePersistenceData (bool force) + { + _ = SavePersistenceDataAndReturnFileName(force); + } + public PersistenceData GetPersistenceData () { PersistenceData persistenceData = new() @@ -6207,7 +6204,7 @@ public void CloseLogWindow () if (IsTempFile) { - _logger.Info($"Deleting temp file {FileName}"); + _logger.Info(Resources.LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile); try { @@ -6215,7 +6212,7 @@ public void CloseLogWindow () } catch (IOException e) { - _logger.Error(e, $"Error while deleting temp file {FileName}: {e}"); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(CloseLogWindow), e)); } } @@ -6225,7 +6222,7 @@ public void CloseLogWindow () public void WaitForLoadingFinished () { - _externaLoadingFinishedEvent.WaitOne(); + _ = _externaLoadingFinishedEvent.WaitOne(); } public void ForceColumnizer (ILogLineColumnizer columnizer) @@ -6372,7 +6369,7 @@ public void CellPainting (bool focused, int rowIndex, int columnIndex, bool isFi }; //Todo Add this as a Settings Option - var fontName = isFilteredGridView ? "Verdana" : "Courier New"; + var fontName = isFilteredGridView ? FONT_VERDANA : FONT_COURIER_NEW; var stringToDraw = isFilteredGridView ? "!" : "i"; using var brush2 = new SolidBrush(Color.FromArgb(255, 190, 100, 0)); //dark orange @@ -6469,7 +6466,7 @@ public void FollowTailChanged (bool isChecked, bool byTrigger) } } - BeginInvoke(new MethodInvoker(dataGridView.Refresh)); + _ = BeginInvoke(new MethodInvoker(dataGridView.Refresh)); //this.dataGridView.Refresh(); _parentLogTabWin.FollowTailChanged(this, isChecked, byTrigger); SendGuiStateUpdate(); @@ -6482,17 +6479,17 @@ public void TryToTruncate () if (LockFinder.CheckIfFileIsLocked(Title)) { var name = LockFinder.FindLockedProcessName(Title); - StatusLineText($"Truncate failed: file is locked by {name}"); + StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_TruncateFailedFileIsLockedByName, name)); } else { - File.WriteAllText(Title, ""); + File.WriteAllText(Title, string.Empty); } } catch (Exception ex) { - _logger.Warn($"Unexpected issue truncating file: {ex.Message}"); - StatusLineText("Unexpected issue truncating file"); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage, ex.Message)); + StatusLineText(Resources.LogWindow_UI_StatusLineText_UnexpectedIssueTruncatingFile); throw; } } @@ -6528,7 +6525,7 @@ public void StartSearch () _isSearching = true; _shouldCancel = false; - StatusLineText("Searching... Press ESC to cancel."); + StatusLineText(Resources.LogWindow_UI_StatusLineText_SearchingPressESCToCancel); _progressEventArgs.MinValue = 0; _progressEventArgs.MaxValue = dataGridView.RowCount; @@ -6536,7 +6533,7 @@ public void StartSearch () _progressEventArgs.Visible = true; SendProgressBarUpdate(); - Task.Run(() => Search(searchParams)).ContinueWith(SearchComplete); + _ = Task.Run(() => Search(searchParams)).ContinueWith(SearchComplete, TaskScheduler.Default); RemoveAllSearchHighlightEntries(); AddSearchHitHighlightEntry(searchParams); @@ -6551,7 +6548,7 @@ private void SearchComplete (Task task) try { - Invoke(new MethodInvoker(ResetProgressBar)); + _ = Invoke(new MethodInvoker(ResetProgressBar)); var line = task.Result; _guiStateArgs.MenuEnabled = true; GuiStateUpdate(this, _guiStateArgs); @@ -6560,7 +6557,7 @@ private void SearchComplete (Task task) return; } - dataGridView.Invoke(new SelectLineFx((line1, triggerSyncCall) => SelectLine(line1, triggerSyncCall, true)), line, true); + _ = dataGridView.Invoke(new SelectLineFx((line1, triggerSyncCall) => SelectLine(line1, triggerSyncCall, true)), line, true); } catch (Exception ex) // in the case the windows is already destroyed { @@ -6568,9 +6565,9 @@ private void SearchComplete (Task task) } } - public void SelectLogLine (int line) + public void SelectLogLine (int lineNumber) { - Invoke(new SelectLineFx((line1, triggerSyncCall) => SelectLine(line1, triggerSyncCall, true)), line, true); + _ = Invoke(new SelectLineFx((line1, triggerSyncCall) => SelectLine(line1, triggerSyncCall, true)), lineNumber, true); } public void SelectAndEnsureVisible (int line, bool triggerSyncCall) @@ -6600,7 +6597,7 @@ public void SelectAndEnsureVisible (int line, bool triggerSyncCall) { // In rare situations there seems to be an invalid argument exceptions (or something like this). Concrete location isn't visible in stack // trace because use of Invoke(). So catch it, and log (better than crashing the app). - _logger.Error(e); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(SelectAndEnsureVisible), e)); } } @@ -6705,8 +6702,6 @@ public void OnLogWindowKeyDown (object sender, KeyEventArgs e) public void AddBookmarkOverlays () { - const int OVERSCAN = 20; - var firstLine = dataGridView.FirstDisplayedScrollingRowIndex; if (firstLine < 0) { @@ -6777,7 +6772,8 @@ public void AddBookmarkOverlays () if (_logger.IsDebugEnabled) { - _logger.Debug($"AddBookmarkOverlay() r.Location={r.Location.X}, width={r.Width}, scroll_offset={dataGridView.HorizontalScrollingOffset}"); + //r.Location={r.Location.X}, width={r.Width}, scroll_offset={dataGridView.HorizontalScrollingOffset} + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_AddBookmarkOverlays, r.Location.X, r.Width, dataGridView.HorizontalScrollingOffset)); } overlay.Position = r.Location - new Size(dataGridView.HorizontalScrollingOffset, 0); @@ -6810,6 +6806,7 @@ public void ToggleBookmark () { return; } + lineNum = dataGridView.CurrentCellAddress.Y; } @@ -6822,19 +6819,21 @@ public void ToggleBookmark (int lineNum) { var bookmark = _bookmarkProvider.GetBookmarkForLine(lineNum); - if (string.IsNullOrEmpty(bookmark.Text) == false) + if (!string.IsNullOrEmpty(bookmark.Text)) { - if (DialogResult.No == MessageBox.Show("There's a comment attached to the bookmark. Really remove the bookmark?", "LogExpert", MessageBoxButtons.YesNo)) + if (MessageBox.Show(Resources.LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt, Resources.Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.No) { return; } } + _bookmarkProvider.RemoveBookmarkForLine(lineNum); } else { _bookmarkProvider.AddBookmark(new Bookmark(lineNum)); } + dataGridView.Refresh(); filterGridView.Refresh(); OnBookmarkAdded(); @@ -6845,11 +6844,14 @@ public void SetBookmarkFromTrigger (int lineNum, string comment) lock (_bookmarkLock) { var line = _logFileReader.GetLogLine(lineNum); + if (line == null) { return; } + var paramParser = new ParamParser(comment); + try { comment = paramParser.ReplaceParams(line, lineNum, FileName); @@ -6858,10 +6860,12 @@ public void SetBookmarkFromTrigger (int lineNum, string comment) { // occurs on invalid regex } + if (_bookmarkProvider.IsBookmarkAtLine(lineNum)) { _bookmarkProvider.RemoveBookmarkForLine(lineNum); } + _bookmarkProvider.AddBookmark(new Bookmark(lineNum, comment)); OnBookmarkAdded(); } @@ -6886,12 +6890,14 @@ public void JumpNextBookmark () filterGridView.CurrentCell = filterGridView.Rows[filterLine].Cells[0]; break; } + index++; if (index > _bookmarkProvider.Bookmarks.Count - 1) { index = 0; wrapped = true; } + if (index >= startIndex && wrapped) { break; @@ -6927,11 +6933,14 @@ public void JumpPrevBookmark () { index = _bookmarkProvider.Bookmarks.Count - 1; } + var startIndex = index; var wrapped = false; + while (true) { var lineNum = _bookmarkProvider.Bookmarks[index].LineNum; + if (_filterResultList.Contains(lineNum)) { var filterLine = _filterResultList.IndexOf(lineNum); @@ -6939,12 +6948,15 @@ public void JumpPrevBookmark () filterGridView.CurrentCell = filterGridView.Rows[filterLine].Cells[0]; break; } + index--; + if (index < 0) { index = _bookmarkProvider.Bookmarks.Count - 1; wrapped = true; } + if (index <= startIndex && wrapped) { break; @@ -6979,10 +6991,13 @@ public void DeleteBookmarks (List lineNumList) } } } + if (bookmarksPresent) { if ( - MessageBox.Show("There are some comments in the bookmarks. Really remove bookmarks?", "LogExpert", + MessageBox.Show( + Resources.LogWindow_UI_ThereAreSomeCommentsInTheBookmarksReallyRemoveBookmarks, + Resources.Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.No) { return; @@ -7004,15 +7019,18 @@ public void SetTimeshiftValue (string value) try { var text = _guiStateArgs.TimeshiftText; - if (text.StartsWith("+")) + if (text.StartsWith('+')) { - text = text.Substring(1); + text = text[1..]; } - var timeSpan = TimeSpan.Parse(text); + + var timeSpan = TimeSpan.Parse(text, CultureInfo.InvariantCulture); var diff = (int)(timeSpan.Ticks / TimeSpan.TicksPerMillisecond); CurrentColumnizer.SetTimeOffset(diff); } - catch (Exception) + catch (Exception ex) when (ex is FormatException + or ArgumentOutOfRangeException + or OverflowException) { CurrentColumnizer.SetTimeOffset(0); } @@ -7021,6 +7039,7 @@ public void SetTimeshiftValue (string value) { CurrentColumnizer.SetTimeOffset(0); } + dataGridView.Refresh(); filterGridView.Refresh(); if (CurrentColumnizer.IsTimeshiftImplemented()) @@ -7029,9 +7048,9 @@ public void SetTimeshiftValue (string value) SyncTimestampDisplay(); } } - catch (FormatException ex) + catch (FormatException e) { - _logger.Error(ex); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(SetTimeshiftValue), e)); } } } @@ -7039,14 +7058,9 @@ public void SetTimeshiftValue (string value) public void ToggleFilterPanel () { splitContainerLogWindow.Panel2Collapsed = !splitContainerLogWindow.Panel2Collapsed; - if (!splitContainerLogWindow.Panel2Collapsed) - { - filterComboBox.Focus(); - } - else - { - dataGridView.Focus(); - } + _ = !splitContainerLogWindow.Panel2Collapsed + ? filterComboBox.Focus() + : dataGridView.Focus(); } public void LogWindowActivated () @@ -7062,7 +7076,7 @@ public void LogWindowActivated () SyncTimestampDisplay(); } - dataGridView.Focus(); + _ = dataGridView.Focus(); SendGuiStateUpdate(); SendStatusLineUpdate(); @@ -7111,7 +7125,9 @@ public void CopyMarkedLinesToTab () { IsStopped = true }; - WritePipeToTab(pipe, lineNumList, Text + "->C", null); + + var name = string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_CopyMarkedLinesToTab_Copy, Text); + WritePipeToTab(pipe, lineNumList, name, null); } else { @@ -7124,8 +7140,8 @@ public void CopyMarkedLinesToTab () writer.Write(text); writer.Close(); - var title = Util.GetNameFromPath(FileName) + "->Clip"; - _parentLogTabWin.AddTempFileTab(fileName, title); + var title = string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_CopyMarkedLinesToTab_Clip, Util.GetNameFromPath(FileName)); + _ = _parentLogTabWin.AddTempFileTab(fileName, title); } } @@ -7147,6 +7163,7 @@ public void ChangeEncoding (Encoding encoding) dataGridView.Refresh(); SendGuiStateUpdate(); } + _guiStateArgs.CurrentEncoding = _logFileReader.CurrentEncoding; } @@ -7159,6 +7176,7 @@ public void Reload () CurrentLine = dataGridView.CurrentCellAddress.Y, FirstDisplayedLine = dataGridView.FirstDisplayedScrollingRowIndex }; + _forcedColumnizerForLoading = CurrentColumnizer; if (_fileNames == null || !IsMultiFile) @@ -7187,7 +7205,7 @@ public void PreferencesChanged (string fontName, float fontSize, bool setLastCol { NormalFont = new Font(new FontFamily(fontName), fontSize); BoldFont = new Font(NormalFont, FontStyle.Bold); - MonospacedFont = new Font("Courier New", Preferences.FontSize, FontStyle.Bold); + MonospacedFont = new Font(FONT_COURIER_NEW, Preferences.FontSize, FontStyle.Bold); var lineSpacing = NormalFont.FontFamily.GetLineSpacing(FontStyle.Regular); var lineSpacingPixel = NormalFont.Size * lineSpacing / NormalFont.FontFamily.GetEmHeight(FontStyle.Regular); @@ -7221,7 +7239,7 @@ public void PreferencesChanged (string fontName, float fontSize, bool setLastCol if (CurrentColumnizer.IsTimeshiftImplemented()) { - timeSpreadingControl.Invoke(new MethodInvoker(timeSpreadingControl.Refresh)); + _ = timeSpreadingControl.Invoke(new MethodInvoker(timeSpreadingControl.Refresh)); ShowTimeSpread(Preferences.ShowTimeSpread); } @@ -7248,7 +7266,7 @@ public bool ScrollToTimestamp (DateTime timestamp, bool roundToSeconds, bool tri { if (InvokeRequired) { - BeginInvoke(new ScrollToTimestampFx(ScrollToTimestampWorker), timestamp, roundToSeconds, triggerSyncCall); + _ = BeginInvoke(new ScrollToTimestampFx(ScrollToTimestampWorker), timestamp, roundToSeconds, triggerSyncCall); return true; } @@ -7269,12 +7287,14 @@ public bool ScrollToTimestampWorker (DateTime timestamp, bool roundToSeconds, bo { currentLine = 0; } + var foundLine = FindTimestampLine(currentLine, timestamp, roundToSeconds); if (foundLine >= 0) { SelectAndEnsureVisible(foundLine, triggerSyncCall); hasScrolled = true; } + //this.Cursor = Cursors.Default; return hasScrolled; } @@ -7282,22 +7302,25 @@ public bool ScrollToTimestampWorker (DateTime timestamp, bool roundToSeconds, bo public int FindTimestampLine (int lineNum, DateTime timestamp, bool roundToSeconds) { var foundLine = FindTimestampLineInternal(lineNum, 0, dataGridView.RowCount - 1, timestamp, roundToSeconds); + if (foundLine >= 0) { // go backwards to the first occurence of the hit var foundTimestamp = GetTimestampForLine(ref foundLine, roundToSeconds); + while (foundTimestamp.CompareTo(timestamp) == 0 && foundLine >= 0) { foundLine--; foundTimestamp = GetTimestampForLine(ref foundLine, roundToSeconds); } + if (foundLine < 0) { return 0; } foundLine++; - GetTimestampForLineForward(ref foundLine, roundToSeconds); // fwd to next valid timestamp + _ = GetTimestampForLineForward(ref foundLine, roundToSeconds); // fwd to next valid timestamp return foundLine; } @@ -7306,7 +7329,6 @@ public int FindTimestampLine (int lineNum, DateTime timestamp, bool roundToSecon public int FindTimestampLineInternal (int lineNum, int rangeStart, int rangeEnd, DateTime timestamp, bool roundToSeconds) { - _logger.Debug($"FindTimestampLine_Internal(): timestamp={timestamp}, lineNum={lineNum}, rangeStart={rangeStart}, rangeEnd={rangeEnd}"); var refLine = lineNum; var currentTimestamp = GetTimestampForLine(ref refLine, roundToSeconds); if (currentTimestamp.CompareTo(timestamp) == 0) @@ -7355,7 +7377,7 @@ public int FindTimestampLineInternal (int lineNum, int rangeStart, int rangeEnd, * has no timestamp, the previous line will be checked until a * timestamp is found. */ - public DateTime GetTimestampForLine (ref int lineNum, bool roundToSeconds) + public DateTime GetTimestampForLine (ref int lastLineNum, bool roundToSeconds) { lock (_currentColumnizerLock) { @@ -7364,12 +7386,12 @@ public DateTime GetTimestampForLine (ref int lineNum, bool roundToSeconds) return DateTime.MinValue; } - _logger.Debug($"GetTimestampForLine({lineNum}) enter"); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter, lastLineNum)); var timeStamp = DateTime.MinValue; var lookBack = false; - if (lineNum >= 0 && lineNum < dataGridView.RowCount) + if (lastLineNum >= 0 && lastLineNum < dataGridView.RowCount) { - while (timeStamp.CompareTo(DateTime.MinValue) == 0 && lineNum >= 0) + while (timeStamp.CompareTo(DateTime.MinValue) == 0 && lastLineNum >= 0) { if (_isTimestampDisplaySyncing && _shouldTimestampDisplaySyncingCancel) { @@ -7377,29 +7399,29 @@ public DateTime GetTimestampForLine (ref int lineNum, bool roundToSeconds) } lookBack = true; - var logLine = _logFileReader.GetLogLine(lineNum); + var logLine = _logFileReader.GetLogLine(lastLineNum); if (logLine == null) { return DateTime.MinValue; } - ColumnizerCallbackObject.LineNum = lineNum; + ColumnizerCallbackObject.LineNum = lastLineNum; timeStamp = CurrentColumnizer.GetTimestamp(ColumnizerCallbackObject, logLine); if (roundToSeconds) { timeStamp = timeStamp.Subtract(TimeSpan.FromMilliseconds(timeStamp.Millisecond)); } - lineNum--; + lastLineNum--; } } if (lookBack) { - lineNum++; + lastLineNum++; } - _logger.Debug($"GetTimestampForLine() leave with lineNum={lineNum}"); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum, lastLineNum)); return timeStamp; } } @@ -7531,6 +7553,7 @@ public void PatternStatisticSelectRange (PatternArgs patternArgs) lineNumList.Add(row.Index); } } + lineNumList.Sort(); patternArgs.StartLine = lineNumList[0]; patternArgs.EndLine = lineNumList[^1]; @@ -7547,17 +7570,17 @@ public void PatternStatisticSelectRange (PatternArgs patternArgs) public void PatternStatistic (PatternArgs patternArgs) { var fx = new PatternStatisticFx(TestStatistic); - fx.BeginInvoke(patternArgs, null, null); + _ = fx.BeginInvoke(patternArgs, null, null); } public void ExportBookmarkList () { SaveFileDialog dlg = new() { - Title = "Choose a file to save bookmarks into", + Title = Resources.LogWindow_UI_Title_ExportBookMarkList, AddExtension = true, DefaultExt = "csv", - Filter = "CSV file (*.csv)|*.csv|Bookmark file (*.bmk)|*.bmk", + Filter = Resources.LogWindow_UI_ImportExportBookmarkList_Filter, FilterIndex = 1, FileName = Path.GetFileNameWithoutExtension(FileName) }; @@ -7571,8 +7594,7 @@ public void ExportBookmarkList () } catch (IOException e) { - _logger.Error(e); - MessageBox.Show("Error while exporting bookmark list: " + e.Message, "LogExpert"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileExportingBookmarkList, e.Message), Resources.Title_LogExpert); } } } @@ -7581,10 +7603,10 @@ public void ImportBookmarkList () { OpenFileDialog dlg = new() { - Title = "Choose a file to load bookmarks from", + Title = Resources.LogWindow_UI_Title_ImportBookmarkList, AddExtension = true, DefaultExt = "csv", - Filter = "CSV file (*.csv)|*.csv|Bookmark file (*.bmk)|*.bmk", + Filter = Resources.LogWindow_UI_ImportExportBookmarkList_Filter, FilterIndex = 1, FileName = Path.GetFileNameWithoutExtension(FileName) }; @@ -7609,8 +7631,8 @@ public void ImportBookmarkList () else { var existingBookmark = _bookmarkProvider.BookmarkList[b.LineNum]; - existingBookmark.Text = - b.Text; // replace existing bookmark for that line, preserving the overlay + // replace existing bookmark for that line, preserving the overlay + existingBookmark.Text = b.Text; OnBookmarkTextChanged(b); } } @@ -7620,13 +7642,13 @@ public void ImportBookmarkList () { OnBookmarkAdded(); } + dataGridView.Refresh(); filterGridView.Refresh(); } catch (IOException e) { - _logger.Error(e); - MessageBox.Show($"Error while importing bookmark list: {e.Message}", "LogExpert"); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileImportingBookmarkList, e.Message), Resources.Title_LogExpert); } } } @@ -7643,7 +7665,7 @@ public bool IsAdvancedOptionActive () public void HandleChangedFilterList () { - Invoke(new MethodInvoker(HandleChangedFilterListWorker)); + _ = Invoke(new MethodInvoker(HandleChangedFilterListWorker)); } public void HandleChangedFilterListWorker () @@ -7652,13 +7674,15 @@ public void HandleChangedFilterListWorker () filterListBox.Items.Clear(); foreach (var filterParam in ConfigManager.Settings.FilterList) { - filterListBox.Items.Add(filterParam); + _ = filterListBox.Items.Add(filterParam); } + filterListBox.Refresh(); if (index >= 0 && index < filterListBox.Items.Count) { filterListBox.SelectedIndex = index; } + filterOnLoadCheckBox.Checked = Preferences.IsFilterOnLoad; hideFilterListOnLoadCheckBox.Checked = Preferences.IsAutoHideFilterList; } @@ -7678,7 +7702,7 @@ public void SetCurrentHighlightGroup (string groupName) } SendGuiStateUpdate(); - BeginInvoke(new MethodInvoker(RefreshAllGrids)); + _ = BeginInvoke(new MethodInvoker(RefreshAllGrids)); } public void SwitchMultiFile (bool enabled) @@ -7709,7 +7733,7 @@ public void AddOtherWindowToTimesync (LogWindow other) public void AddToTimeSync (LogWindow master) { - _logger.Info($"Syncing window for {Util.GetNameFromPath(FileName)} to {Util.GetNameFromPath(master.FileName)}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_AddToTimeSync_SyncingWindow, Util.GetNameFromPath(FileName), Util.GetNameFromPath(master.FileName))); lock (_timeSyncListLock) { if (IsTimeSynced && master.TimeSyncList != TimeSyncList) @@ -7720,7 +7744,7 @@ public void AddToTimeSync (LogWindow master) TimeSyncList = master.TimeSyncList; TimeSyncList.AddWindow(this); - ScrollToTimestamp(TimeSyncList.CurrentTimestamp, false, false); + _ = ScrollToTimestamp(TimeSyncList.CurrentTimestamp, false, false); } OnSyncModeChanged(); @@ -7732,7 +7756,7 @@ public void FreeFromTimeSync () { if (TimeSyncList != null) { - _logger.Info($"De-Syncing window for {Util.GetNameFromPath(FileName)}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow, Util.GetNameFromPath(FileName))); TimeSyncList.WindowRemoved -= OnTimeSyncListWindowRemoved; TimeSyncList.RemoveWindow(this); TimeSyncList = null; diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index b75a674c..d438403b 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -2753,7 +2753,7 @@ private void OnSaveProjectToolStripMenuItemClick (object sender, EventArgs e) { foreach (var logWindow in dockPanel.Contents.OfType()) { - var persistenceFileName = logWindow?.SavePersistenceData(true); + var persistenceFileName = logWindow?.SavePersistenceDataAndReturnFileName(true); if (persistenceFileName != null) { fileNames.Add(persistenceFileName); From 5f56cb462863cce08b3a2bbe5fa1507c465516d3 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Tue, 8 Jul 2025 12:44:24 +0200 Subject: [PATCH 06/38] Zerman Translation --- src/LogExpert.Resources/Resources.Designer.cs | 716 +++++++++++++++++- src/LogExpert.Resources/Resources.de.resx | 504 ++++++++++++ src/LogExpert.Resources/Resources.resx | 244 +++++- .../Controls/LogWindow/LogWindow.cs | 272 ++++--- .../Controls/LogWindow/LogWindow.designer.cs | 335 ++++---- 5 files changed, 1797 insertions(+), 274 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 86206c06..12a4b4de 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -615,7 +615,7 @@ public static string LogWindow_Logger_Debug_AddBookmarkOverlays { } /// - /// Looks up a localized string similar to "GetTimestampForLine({0}) enter. + /// Looks up a localized string similar to GetTimestampForLine({0}) enter. /// public static string LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter { get { @@ -903,7 +903,7 @@ public static string LogWindow_Logger_Info_LoadFile_LoadingLogfile { } /// - /// Looks up a localized string similar to Picked new columnizer '{0}. + /// Looks up a localized string similar to Picked new columnizer {0}. /// public static string LogWindow_Logger_Info_LoadFile_PickedNewColumnizer { get { @@ -1083,11 +1083,308 @@ public static string LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncati } /// - /// Looks up a localized string similar to 0. + /// Looks up a localized string similar to Columns.... + /// + public static string LogWindow_UI_Button_Column { + get { + return ResourceManager.GetString("LogWindow_UI_Button_Column", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string LogWindow_UI_Button_Delete { + get { + return ResourceManager.GetString("LogWindow_UI_Button_Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter to Tab. + /// + public static string LogWindow_UI_Button_FilterToTab { + get { + return ResourceManager.GetString("LogWindow_UI_Button_FilterToTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save filter. + /// + public static string LogWindow_UI_Button_SaveFilter { + get { + return ResourceManager.GetString("LogWindow_UI_Button_SaveFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search. + /// + public static string LogWindow_UI_Button_Search { + get { + return ResourceManager.GetString("LogWindow_UI_Button_Search", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show advanced.... + /// + public static string LogWindow_UI_Button_ShowAdvanced { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ShowAdvanced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose columns for 'Column restrict'. + /// + public static string LogWindow_UI_Button_ToolTip_Column { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_Column", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move the selected entry down in the list. + /// + public static string LogWindow_UI_Button_ToolTip_FilterDown { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_FilterDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Launch a new tab with filtered content. + /// + public static string LogWindow_UI_Button_ToolTip_FilterToTab { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_FilterToTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move the selected entry up in the list. + /// + public static string LogWindow_UI_Button_ToolTip_FilterUp { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_FilterUp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start the filter search. + /// + public static string LogWindow_UI_Button_ToolTip_Search { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_Search", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Toggel the advanced filter options panel. + /// + public static string LogWindow_UI_Button_ToolTip_ShowAdvanced { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_ShowAdvanced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open or close a list with saved filters. + /// + public static string LogWindow_UI_Button_ToolTip_ToggleHighlightPanel { + get { + return ResourceManager.GetString("LogWindow_UI_Button_ToolTip_ToggleHighlightPanel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto hide. + /// + public static string LogWindow_UI_CheckBox_AutoHide { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_AutoHide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Column restrict. + /// + public static string LogWindow_UI_CheckBox_ColumnRestrict { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ColumnRestrict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Case sensitive. + /// + public static string LogWindow_UI_CheckBox_FilterCaseSensitive { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_FilterCaseSensitive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto start. + /// + public static string LogWindow_UI_CheckBox_FilterOnLoad { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_FilterOnLoad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regex. + /// + public static string LogWindow_UI_CheckBox_FilterRegex { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_FilterRegex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sync. + /// + public static string LogWindow_UI_CheckBox_FilterSync { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_FilterSync", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter tail. + /// + public static string LogWindow_UI_CheckBox_FilterTail { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_FilterTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invert Match. + /// + public static string LogWindow_UI_CheckBox_InvertMatch { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_InvertMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range search. + /// + public static string LogWindow_UI_CheckBox_RangeSearch { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_RangeSearch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hides the filter list after loading a filter. + /// + public static string LogWindow_UI_CheckBox_ToolTip_AutoHide { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_AutoHide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restrict search to columns. + /// + public static string LogWindow_UI_CheckBox_ToolTip_ColumnRestrict { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_ColumnRestrict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Makes the filter case sensitive. + /// + public static string LogWindow_UI_CheckBox_ToolTip_FilterCaseSensitive { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_FilterCaseSensitive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start immediate filtering after loading a saved filter. + /// + public static string LogWindow_UI_CheckBox_ToolTip_FilterOnLoad { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_FilterOnLoad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use regular expressions. (right-click for RegEx helper window). + /// + public static string LogWindow_UI_CheckBox_ToolTip_FilterRegex { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_FilterRegex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sync the current selected line in the filter view to the selection in the log file view. + /// + public static string LogWindow_UI_CheckBox_ToolTip_FilterSync { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_FilterSync", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter tailed file content (keeps filter view up to date on file changes). + /// + public static string LogWindow_UI_CheckBox_ToolTip_FilterTail { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_FilterTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invert the search result. + /// + public static string LogWindow_UI_CheckBox_ToolTip_InvertMatch { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_InvertMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable a special search mode which filters all content between the 2 given search terms.. + /// + public static string LogWindow_UI_CheckBox_ToolTip_RangeSearch { + get { + return ResourceManager.GetString("LogWindow_UI_CheckBox_ToolTip_RangeSearch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select column to scroll to. + /// + public static string LogWindow_UI_ColumnComboBox_ToolTip { + get { + return ResourceManager.GetString("LogWindow_UI_ColumnComboBox_ToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search string for the filter. + /// + public static string LogWindow_UI_ComboBox_ToolTip_Filter { + get { + return ResourceManager.GetString("LogWindow_UI_ComboBox_ToolTip_Filter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 2nd search string ('end string') when using the range search. /// - public static string LogWindow_UI_ClearFilterList_ResetFilterCounterToZero { + public static string LogWindow_UI_ComboBox_ToolTip_FilterRange { get { - return ResourceManager.GetString("LogWindow_UI_ClearFilterList_ResetFilterCounterToZero", resourceCulture); + return ResourceManager.GetString("LogWindow_UI_ComboBox_ToolTip_FilterRange", resourceCulture); } } @@ -1136,6 +1433,15 @@ public static string LogWindow_UI_Filter_ExceptionWhileFiltering { } } + /// + /// Looks up a localized string similar to 0. + /// + public static string LogWindow_UI_FilterCount_ZeroValue { + get { + return ResourceManager.GetString("LogWindow_UI_FilterCount_ZeroValue", resourceCulture); + } + } + /// /// Looks up a localized string similar to CSV file (*.csv)|*.csv|Bookmark file (*.bmk)|*.bmk. /// @@ -1145,6 +1451,96 @@ public static string LogWindow_UI_ImportExportBookmarkList_Filter { } } + /// + /// Looks up a localized string similar to Add preceding lines to search result (Drag up/down, press Shift for finer pitch). + /// + public static string LogWindow_UI_KnobControl_FilterBackSpread { + get { + return ResourceManager.GetString("LogWindow_UI_KnobControl_FilterBackSpread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add following lines to search result (Drag up/down, press Shift for finer pitch). + /// + public static string LogWindow_UI_KnobControl_FilterForeSpread { + get { + return ResourceManager.GetString("LogWindow_UI_KnobControl_FilterForeSpread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fuzzy search level (0 = fuzzy off). + /// + public static string LogWindow_UI_KnobControl_Fuzzy { + get { + return ResourceManager.GetString("LogWindow_UI_KnobControl_Fuzzy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Back Spread. + /// + public static string LogWindow_UI_Label_BackSpread { + get { + return ResourceManager.GetString("LogWindow_UI_Label_BackSpread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Column name:. + /// + public static string LogWindow_UI_Label_ColumnName { + get { + return ResourceManager.GetString("LogWindow_UI_Label_ColumnName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to column names. + /// + public static string LogWindow_UI_Label_ColumnNames { + get { + return ResourceManager.GetString("LogWindow_UI_Label_ColumnNames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fore Spread. + /// + public static string LogWindow_UI_Label_ForeSpread { + get { + return ResourceManager.GetString("LogWindow_UI_Label_ForeSpread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fuzzyness. + /// + public static string LogWindow_UI_Label_Fuzzyness { + get { + return ResourceManager.GetString("LogWindow_UI_Label_Fuzzyness", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Text &filter:. + /// + public static string LogWindow_UI_Label_TextFilter { + get { + return ResourceManager.GetString("LogWindow_UI_Label_TextFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Doubleclick to load a saved filter. + /// + public static string LogWindow_UI_ListBox_ToolTip_Filter { + get { + return ResourceManager.GetString("LogWindow_UI_ListBox_ToolTip_Filter", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cannot load file\n{0}. /// @@ -1218,7 +1614,7 @@ public static string LogWindow_UI_StatusLineText_FileNotFound { } /// - /// Looks up a localized string similar to Filter duration: " + ({0}) + " ms.. + /// Looks up a localized string similar to Filter duration: {0} ms.. /// public static string LogWindow_UI_StatusLineText_Filter_FilterDurationMs { get { @@ -1227,7 +1623,7 @@ public static string LogWindow_UI_StatusLineText_Filter_FilterDurationMs { } /// - /// Looks up a localized string similar to Filtering... Press ESC to cancel. + /// Looks up a localized string similar to Filtering... Press ESC to cancel.. /// public static string LogWindow_UI_StatusLineText_FilterSearch_Filtering { get { @@ -1398,6 +1794,312 @@ public static string LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt { } } + /// + /// Looks up a localized string similar to Bookmark comment.... + /// + public static string LogWindow_UI_ToolStripMenuItem_BookmarkComment { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_BookmarkComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Color.... + /// + public static string LogWindow_UI_ToolStripMenuItem_Color { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_Color", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy. + /// + public static string LogWindow_UI_ToolStripMenuItem_Copy { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_Copy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy to clipboard. + /// + public static string LogWindow_UI_ToolStripMenuItem_CopyToClipboard { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_CopyToClipboard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy to new tab. + /// + public static string LogWindow_UI_ToolStripMenuItem_CopyToNewTab { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_CopyToNewTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter for selection. + /// + public static string LogWindow_UI_ToolStripMenuItem_FilterForSelection { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_FilterForSelection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter to new tab. + /// + public static string LogWindow_UI_ToolStripMenuItem_FilterToNewTab { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_FilterToNewTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Free this window from time sync. + /// + public static string LogWindow_UI_ToolStripMenuItem_FreeThisWindowFromTimeSync { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_FreeThisWindowFromTimeSync", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Freeze left columns until here. + /// + public static string LogWindow_UI_ToolStripMenuItem_FreezeLeftColumnsUntilHere { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_FreezeLeftColumnsUntilHere", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide column. + /// + public static string LogWindow_UI_ToolStripMenuItem_HideColumn { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_HideColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Highlight selection in log file (full line). + /// + public static string LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileFullLine { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileFullLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Highlight selection in log file (word mode). + /// + public static string LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileWordMode { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileWordMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Locate filtered line in original file. + /// + public static string LogWindow_UI_ToolStripMenuItem_LocateFilteredLineInOriginalFile { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_LocateFilteredLineInOriginalFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make all permanent. + /// + public static string LogWindow_UI_ToolStripMenuItem_MakeAllPermanent { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MakeAllPermanent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mark current filter range. + /// + public static string LogWindow_UI_ToolStripMenuItem_MarkCurrentFilterRange { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MarkCurrentFilterRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mark/Edit-Mode. + /// + public static string LogWindow_UI_ToolStripMenuItem_MarkEditMode { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MarkEditMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mark filter hits in log view. + /// + public static string LogWindow_UI_ToolStripMenuItem_MarkFilterHitsInLogView { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MarkFilterHitsInLogView", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move left. + /// + public static string LogWindow_UI_ToolStripMenuItem_MoveLeft { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MoveLeft", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move right. + /// + public static string LogWindow_UI_ToolStripMenuItem_MoveRight { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MoveRight", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move to last column. + /// + public static string LogWindow_UI_ToolStripMenuItem_MoveToLastColumn { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_MoveToLastColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove all. + /// + public static string LogWindow_UI_ToolStripMenuItem_RemoveAll { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_RemoveAll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restore columns. + /// + public static string LogWindow_UI_ToolStripMenuItem_RestoreColumns { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_RestoreColumns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scroll all tabs to current timestamp. + /// + public static string LogWindow_UI_ToolStripMenuItem_ScrollAllTabsToCurrentTimestamp { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ScrollAllTabsToCurrentTimestamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scroll to column.... + /// + public static string LogWindow_UI_ToolStripMenuItem_ScrollToColumn { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ScrollToColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set bookmarks on selected lines. + /// + public static string LogWindow_UI_ToolStripMenuItem_SetBookmarksOnSelectedLines { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_SetBookmarksOnSelectedLines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set selected text as bookmark comment. + /// + public static string LogWindow_UI_ToolStripMenuItem_SetSelectedTextAsBookmarkComment { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_SetSelectedTextAsBookmarkComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp Highlights. + /// + public static string LogWindow_UI_ToolStripMenuItem_TempHighlights { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_TempHighlights", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time synced files. + /// + public static string LogWindow_UI_ToolStripMenuItem_TimeSyncedFiles { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_TimeSyncedFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Toggle Boomark. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToggleBoomark { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToggleBoomark", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit the comment for a bookmark. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToolTip_BookmarkComment { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToolTip_BookmarkComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy marked lines into a new tab window. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToolTip_CopyToNewTab { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToolTip_CopyToNewTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide this column. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToolTip_HideColumn { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToolTip_HideColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move this column to the last position. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToolTip_MoveToLastColumn { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToolTip_MoveToLastColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scolls all open tabs to the selected timestamp, if possible. + /// + public static string LogWindow_UI_ToolStripMenuItem_ToolTip_ScrollAllTabsToCurrentTimestamp { + get { + return ResourceManager.GetString("LogWindow_UI_ToolStripMenuItem_ToolTip_ScrollAllTabsToCurrentTimestamp", resourceCulture); + } + } + /// /// Looks up a localized string similar to ->F. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 766e686a..d15cb1cd 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -358,4 +358,508 @@ Kein Prozess sperrt den angegebenen Pfad + + ->F + + + 0 + + + {0}->C + + + {0}->Clip + + + Löschen + + + In Tab filtern + + + Filter speichern + + + Suchen + + + Erweiterung anzeigen... + + + Starten des Filters + + + Automatisch verstecken + + + Regex + + + Sync + + + Ende Filtern + + + Match invertieren + + + Bereich durchsuchen + + + Rückstreuung + + + Vorwärtsstreuung + + + Fuzzyness + + + Spaltenname: + + + Spaltenamen + + + Text & Filter: + + + {0} + + + Datei wird geladen... + + + Laden {0} + + + Wirklich schließen? + + + Eingefroren + + + Erweiterung verstecken... + + + Erweiterung anzeigen... + + + Farbe... + + + Kopieren + + + Fehler in {0}: {1} + + + Spalten... + + + Spalten, für die Restriktion, auswählen + + + Ausgewählten Eintrag nach unten verschieben + + + Alle Tabs werden auf den selektierten Zeitstempel verschoben, sofern möglich + + + Verschiebe diese Spalte an die letzte Position + + + Verstecke diese Spalte + + + Kopieren der markierten Zeilen in einen neuen Tab + + + Editieren des Lesezeichenkommentars + + + Umschalter Lesezeichen + + + Zeitsynchronisierte Dateien + + + Temp Highlights + + + Den markierten Text als Lesezeichenkommentar setzen + + + Lesezeichen auf markierte Zeile setzen + + + Zur Spalte scrollen... + + + Alle Tabs zum aktuellen Zeitstempel scrollen + + + Spalten wiederherstellen + + + Alle entfernen + + + Verschieben zur letzten Spalte + + + Verschieben nach rechts + + + Verschieben nach links + + + Markiere die getroffenen Filter in der Loganzeige + + + Markier/Editier Modus + + + Markiere den derzeitigen Filterbereich + + + Alles permanent machen + + + Lokalisiere die gefilterten Zeilen in der originalen Datei + + + Markiere die Selektion in der Logdatei (Wörter Modus) + + + Markiere die Selektion in der Logdatei (Zeilen Modus) + + + Verstecke Spalte + + + Friere alle Spalten von der links markieren bis hier her + + + Befreie das Fenster von der Zeitsynchronisierung + + + Filtere in einen neuen Tab + + + Filter die Markierung + + + In einen neuen Tab kopieren + + + In die Zwischenablage kopieren + + + Lesezeichenkommentar... + + + An diesem Lesezeichen hängt ein Kommentar. Soll es wirklich gelöscht werden? + + + Wähle eine Datei, aus der die Lesezeichen geladen werden sollen + + + Wähle eine Datei, in die, die Lesezeichen gespeichert werden sollen + + + Es gibt einige Kommentare in den Lesezeichen. Sollen diese wirklich gelöscht werden? + + + Friere alle Spalten von der links markieren bis hier her ({0}) + + + Schreiben der Temporären Datei.... ESC drücken um diesen Vorgang abzubrechen. + + + Unbekanntes Problem beim abschneiden der Datei + + + Abschneiden der Datei ist fehlgeschlagen: Datei ist gesperrt von {0} + + + Zeitdifferenz ist {0} + + + {0} ausgewählte Zeilen + + + Suche... ESC drücken um diesen Vorgang abzubrechen. + + + Filterung... ESC drücken um diesen Vorgang abzubrechen. + + + Filterzeit: {0} ms. + + + Datei nicht gefunden + + + Gestartet vom Ende der Datei + + + Gestartet vom Anfang der Datei + + + Nicht gefunden: {0} + + + Ungültige Regular Expression + + + Suchresultat nicht gefunden + + + Unbekannter Fehler beim Speichern der Persistenten Daten: {0} + + + Kann die Datei nicht laden\n{0} + + + Doppelklick um den gespeicherten Filter zu laden + + + Fuzzy Suchlevel (0 = fuzzy aus) + + + Hinzufügen der nachfolgenden Zeilen zum Suchresultat (Nach ob/unten ziehen, Shift drücken für eine feiner Einstellung) + + + Hinzufügen der vorausfolgenden Zeilen zum Suchresultat (Nach ob/unten ziehen, Shift drücken für eine feiner Einstellung) + + + CSV Datei (*.csv)|*.csv|Lesezeichen Datei (*.bmk)|*.bmk + + + Ausnahmefehler während der Filterung. Bitte an den Entwickler weiterleiten: \n\n{0}\n\n{1} + + + Fehler während des Imports der Lesezeichenliste: {0} + + + Fehler während des Exports der Lesezeichenliste: {0} + + + zweiter Suchtext ('End Text') wenn ein Suchbereich benutzt wird + + + Suchtext für den Filter + + + Auswahl der Spalte zu der gesprungen werden soll + + + Aktiviere einen speziellen Suchmodus in welchem alles zwischen zwei gegebenen Suchtermen gefiltert wird. + + + Invertieren des Suchresultats + + + Filterung des Dateiendes (dadurch wird die Filteranzeige aktuelle gehalten, wenn Dateiänderungen stattfinden) + + + Synchronisierung der ausgewählten Zeile in der Filteranzeige zu der Zeile in der Loganzeige + + + Benutzen eines regulären Ausdrucks (rechts klick für den RegeEx-Helfer Dialog) + + + Sofortiges Filtern nachdem ein gespeicherter Filter geladen wurde + + + Macht den Filter Schreibempfindlich (Groß/Kleinschreibung wird beachtet) + + + Schränke die Suche auf die Spalten ein + + + Versteckt die Filterliste nachdem die Filter geladen wurden + + + Autostart + + + Schreibabhängig + + + Spaltenrestriktion + + + Öffnen oder Schließen einer Liste mit gespeicherten Filter + + + Aktivieren/Deaktivieren der Erweiterten Filteranzeige + + + Verschiebe den selektierten Eintrag nach oben + + + Öffne einen neuen Tab mit dem gefilterten Bereich + + + Unerwartetes Problem beim abschneiden der Datei: {0} + + + FilterRestore(): Columnizer {0} nicht gefunden + + + Aufwachsignal erhalten. + + + Warten auf Signal + + + Warten bis das Laden abgeschlossen ist. + + + UpdateGrid(): neue Spaltenanzahl={0} + + + SelStart: {0}, SelLen: {1} + + + TestStatistics() aufgerufen mit Startzeile {0} + + + TestStatistics() beendet + + + Dialog im LogWindow war NULL + + + SetColumnizerInternal(): {0} + + + ReloadNewFile(): Anzahl = {0} + + + Datei neu laden, weil diese neu erstellt wurde. + + + AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2} + + + GetTimestampForLine({0}) Funktionsaufruf + + + GetTimestampForLine() verlasse Funktion mit Zeilennummer ={0} + + + Verhindern des Neuladens aufgrund von Rekursivenaufrufen. + + + Neuladen angeworfen. + + + Selection changed trigger + + + Einstellungen Columnizer {0} + + + Gefundener block: {0} + + + TestStatistic(): i={0} searchLine={1} + + + UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2} + + + Fehler während des Löschens der Filterliste: {0} + + + Fehler während des Löschens der temporären Datei {0}: {1} + + + Fehler während des Speicherns der persistierten Daten: {0} + + + Fehler im, selectionChangedTrigger_Signal selcount {0}, Fehlermeldung: {1} + + + Fehler im UpdateProgress Callback: {0} + + + Zeilenanzahl des Events: {0}, sollte größer als die letzte Zeilenanzahl sein: {1} + + + Filteranzeige neuladen weil die Filter neugeladen wurden. + + + Persistierte Daten {0} sind nicht mehr aktuell. Sind verworfen worden. + + + Keine Persistierten Daten gefunden. {0}. + + + neue Datei erstellt. + + + Zeit der Multi-Thread Filterung {0} in ms. + + + LoadFilesAsMulti: Datei: {0} + + + Neuer Columnizer ausgewählt: {0} + + + Laden der Logdatei: {0} + + + Datei nicht gefunden Event wird behandelt. + + + Dateigröße hat sich geändert. prevLines:{0}, curr lines: {1} + + + Desynchronisierung des Fensters {0} + + + Laden erledigt. + + + Zeit der Single-Thread Filterung {0} in ms. + + + Datei laden erledigt. + + + {0} Events in der Warteschlange + + + MultiDateiname in den Persistierten Daten gefunden + + + Löschen der temporären Datei {0} + + + Synchronisierung des Fenster von {0} zu {1} + + + Fehler während der Vergrößerung der Spalten {0} + + + Fehler während die Splitterdistanz verändert wurde {0} + + + Fehler während des selektierens der Zeile: {0} + + + Fehler im LoadingStarted Callback {0} + + + Fehler während des Ladens der persistierten Daten {0} + + + Fehler während des Ladens der Lesezeichen {0} + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 08db84c7..b5c05d38 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -512,7 +512,7 @@ Choose a file to save bookmarks into - "GetTimestampForLine({0}) enter + GetTimestampForLine({0}) enter GetTimestampForLine() leave with lineNum={0} @@ -554,7 +554,7 @@ LoadFilesAsMulti: File: {0} - Picked new columnizer '{0} + Picked new columnizer {0} Loading logfile: {0} @@ -592,7 +592,7 @@ Error occured while clearing filter list: {0} - + 0 @@ -608,13 +608,13 @@ Single threaded filter duration: {0} ms. - Filter duration: " + ({0}) + " ms. + Filter duration: {0} ms. Multi threaded filter duration: {0} ms. - Filtering... Press ESC to cancel + Filtering... Press ESC to cancel. {0} @@ -631,4 +631,238 @@ Syncing window for {0} to {1} + + Select column to scroll to + + + Column name: + + + Copy to clipboard + + + Copy to new tab + + + Copy marked lines into a new tab window + + + Scroll all tabs to current timestamp + + + Scolls all open tabs to the selected timestamp, if possible + + + Time synced files + + + Free this window from time sync + + + Locate filtered line in original file + + + Toggle Boomark + + + Bookmark comment... + + + Mark/Edit-Mode + + + Temp Highlights + + + Remove all + + + Make all permanent + + + Mark current filter range + + + Color... + + + Move to last column + + + Freeze left columns until here + + + Move left + + + Move right + + + Hide column + + + Restore columns + + + Scroll to column... + + + Copy + + + Highlight selection in log file (full line) + + + Highlight selection in log file (word mode) + + + Filter for selection + + + Set selected text as bookmark comment + + + Mark filter hits in log view + + + Set bookmarks on selected lines + + + Hide this column + + + Move this column to the last position + + + Edit the comment for a bookmark + + + Columns... + + + Save filter + + + Delete + + + Show advanced... + + + Search + + + Start the filter search + + + Toggel the advanced filter options panel + + + Choose columns for 'Column restrict' + + + Move the selected entry down in the list + + + Move the selected entry up in the list + + + Column restrict + + + Range search + + + Invert Match + + + Auto hide + + + Auto start + + + Sync + + + Filter tail + + + Regex + + + Case sensitive + + + Restrict search to columns + + + Enable a special search mode which filters all content between the 2 given search terms. + + + Invert the search result + + + Hides the filter list after loading a filter + + + Start immediate filtering after loading a saved filter + + + Sync the current selected line in the filter view to the selection in the log file view + + + Filter tailed file content (keeps filter view up to date on file changes) + + + Use regular expressions. (right-click for RegEx helper window) + + + Makes the filter case sensitive + + + 2nd search string ('end string') when using the range search + + + column names + + + Text &filter: + + + Fuzzyness + + + Back Spread + + + Fore Spread + + + Fuzzy search level (0 = fuzzy off) + + + Add preceding lines to search result (Drag up/down, press Shift for finer pitch) + + + Add following lines to search result (Drag up/down, press Shift for finer pitch) + + + Filter to new tab + + + Filter to Tab + + + Launch a new tab with filtered content + + + Open or close a list with saved filters + + + Doubleclick to load a saved filter + + + Search string for the filter + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index 1e17e2bf..f2a9f25a 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -156,6 +156,7 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp AutoScaleMode = AutoScaleMode.Dpi; InitializeComponent(); + SetResources(); CreateDefaultViewStyle(); @@ -175,8 +176,8 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp filterGridView.CellValueNeeded += OnFilterGridViewCellValueNeeded; filterGridView.CellPainting += OnFilterGridViewCellPainting; - filterListBox.DrawMode = DrawMode.OwnerDrawVariable; - filterListBox.MeasureItem += MeasureItem; + listBoxFilter.DrawMode = DrawMode.OwnerDrawVariable; + listBoxFilter.MeasureItem += MeasureItem; Closing += OnLogWindowClosing; Disposed += OnLogWindowDisposed; @@ -206,10 +207,10 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp _filterParams = new FilterParams(); foreach (var item in configManager.Settings.FilterHistoryList) { - _ = filterComboBox.Items.Add(item); + _ = comboBoxFilter.Items.Add(item); } - filterComboBox.DropDownHeight = filterComboBox.ItemHeight * configManager.Settings.Preferences.MaximumFilterEntriesDisplayed; + comboBoxFilter.DropDownHeight = comboBoxFilter.ItemHeight * configManager.Settings.Preferences.MaximumFilterEntriesDisplayed; AutoResizeFilterBox(); filterRegexCheckBox.Checked = _filterParams.IsRegex; @@ -228,9 +229,9 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp //this.filterUpdateThread = new Thread(new ThreadStart(this.FilterUpdateWorker)); //this.filterUpdateThread.Start(); - _advancedButtonImage = advancedButton.Image; - _searchButtonImage = filterSearchButton.Image; - filterSearchButton.Image = null; + _advancedButtonImage = btnAdvanced.Image; + _searchButtonImage = btnFilterSearch.Image; + btnFilterSearch.Image = null; dataGridView.EditModeMenuStrip = editModeContextMenuStrip; markEditModeToolStripMenuItem.Enabled = true; @@ -249,14 +250,14 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp dataGridView.Enabled = false; dataGridView.ColumnDividerDoubleClick += OnDataGridViewColumnDividerDoubleClick; ShowAdvancedFilterPanel(false); - filterKnobBackSpread.MinValue = 0; - filterKnobBackSpread.MaxValue = SPREAD_MAX; - filterKnobBackSpread.ValueChanged += OnFilterKnobControlValueChanged; - filterKnobForeSpread.MinValue = 0; - filterKnobForeSpread.MaxValue = SPREAD_MAX; - filterKnobForeSpread.ValueChanged += OnFilterKnobControlValueChanged; - fuzzyKnobControl.MinValue = 0; - fuzzyKnobControl.MaxValue = 10; + knobControlFilterBackSpread.MinValue = 0; + knobControlFilterBackSpread.MaxValue = SPREAD_MAX; + knobControlFilterBackSpread.ValueChanged += OnFilterKnobControlValueChanged; + knobControlFilterForeSpread.MinValue = 0; + knobControlFilterForeSpread.MaxValue = SPREAD_MAX; + knobControlFilterForeSpread.ValueChanged += OnFilterKnobControlValueChanged; + knobControlFuzzy.MinValue = 0; + knobControlFuzzy.MaxValue = 10; //PreferencesChanged(settings.preferences, true); AdjustHighlightSplitterWidth(); ToggleHighlightPanel(false); // hidden @@ -448,6 +449,89 @@ internal IColumnizedLogLine GetColumnsForLine (int lineNumber) //} } + private void SetResources () + { + helpToolTip.SetToolTip(columnComboBox, Resources.LogWindow_UI_ColumnComboBox_ToolTip); + lblColumnName.Text = Resources.LogWindow_UI_Label_ColumnName; + copyToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_CopyToClipboard; + copyToTabToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_CopyToNewTab; + copyToTabToolStripMenuItem.ToolTipText = Resources.LogWindow_UI_ToolStripMenuItem_ToolTip_CopyToNewTab; + scrollAllTabsToTimestampToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_ScrollAllTabsToCurrentTimestamp; + scrollAllTabsToTimestampToolStripMenuItem.ToolTipText = Resources.LogWindow_UI_ToolStripMenuItem_ToolTip_ScrollAllTabsToCurrentTimestamp; + syncTimestampsToToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_TimeSyncedFiles; + freeThisWindowFromTimeSyncToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_FreeThisWindowFromTimeSync; + locateLineInOriginalFileToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_LocateFilteredLineInOriginalFile; + toggleBoomarkToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_ToggleBoomark; + bookmarkCommentToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_BookmarkComment; + bookmarkCommentToolStripMenuItem.ToolTipText = Resources.LogWindow_UI_ToolStripMenuItem_ToolTip_BookmarkComment; + markEditModeToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MarkEditMode; + tempHighlightsToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_TempHighlights; + removeAllToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_RemoveAll; + makePermanentToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MakeAllPermanent; + markCurrentFilterRangeToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MarkCurrentFilterRange; + btnColumn.Text = Resources.LogWindow_UI_Button_Column; + helpToolTip.SetToolTip(btnColumn, Resources.LogWindow_UI_Button_ToolTip_Column); + columnRestrictCheckBox.Text = Resources.LogWindow_UI_CheckBox_ColumnRestrict; + helpToolTip.SetToolTip(columnRestrictCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_ColumnRestrict); + rangeCheckBox.Text = Resources.LogWindow_UI_CheckBox_RangeSearch; + helpToolTip.SetToolTip(rangeCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_RangeSearch); + helpToolTip.SetToolTip(filterRangeComboBox, Resources.LogWindow_UI_ComboBox_ToolTip_FilterRange); + columnNamesLabel.Text = Resources.LogWindow_UI_Label_ColumnNames; + lblfuzzy.Text = Resources.LogWindow_UI_Label_Fuzzyness; + helpToolTip.SetToolTip(knobControlFuzzy, Resources.LogWindow_UI_KnobControl_Fuzzy); + invertFilterCheckBox.Text = Resources.LogWindow_UI_CheckBox_InvertMatch; + helpToolTip.SetToolTip(invertFilterCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_InvertMatch); + lblBackSpread.Text = Resources.LogWindow_UI_Label_BackSpread; + helpToolTip.SetToolTip(knobControlFilterBackSpread, Resources.LogWindow_UI_KnobControl_FilterBackSpread); + lblForeSpread.Text = Resources.LogWindow_UI_Label_ForeSpread; + helpToolTip.SetToolTip(knobControlFilterForeSpread, Resources.LogWindow_UI_KnobControl_FilterForeSpread); + btnFilterToTab.Text = Resources.LogWindow_UI_Button_FilterToTab; + helpToolTip.SetToolTip(btnFilterToTab, Resources.LogWindow_UI_Button_ToolTip_FilterToTab); + helpToolTip.SetToolTip(btnToggleHighlightPanel, Resources.LogWindow_UI_Button_ToolTip_ToggleHighlightPanel); + setBookmarksOnSelectedLinesToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_SetBookmarksOnSelectedLines; + filterToTabToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_FilterToNewTab; + markFilterHitsInLogViewToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MarkFilterHitsInLogView; + hideFilterListOnLoadCheckBox.Text = Resources.LogWindow_UI_CheckBox_AutoHide; + helpToolTip.SetToolTip(hideFilterListOnLoadCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_AutoHide); + helpToolTip.SetToolTip(btnFilterDown, Resources.LogWindow_UI_Button_ToolTip_FilterDown); + helpToolTip.SetToolTip(btnFilterUp, Resources.LogWindow_UI_Button_ToolTip_FilterUp); + filterOnLoadCheckBox.Text = Resources.LogWindow_UI_CheckBox_FilterOnLoad; + helpToolTip.SetToolTip(filterOnLoadCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_FilterOnLoad); + bntSaveFilter.Text = Resources.LogWindow_UI_Button_SaveFilter; + btnDeleteFilter.Text = Resources.LogWindow_UI_Button_Delete; + helpToolTip.SetToolTip(listBoxFilter, Resources.LogWindow_UI_ListBox_ToolTip_Filter); + colorToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_Color; + helpToolTip.SetToolTip(comboBoxFilter, Resources.LogWindow_UI_ComboBox_ToolTip_Filter); + lblTextFilter.Text = Resources.LogWindow_UI_Label_TextFilter; + btnAdvanced.Text = Resources.LogWindow_UI_Button_ShowAdvanced; + helpToolTip.SetToolTip(btnAdvanced, Resources.LogWindow_UI_Button_ToolTip_ShowAdvanced); + syncFilterCheckBox.Text = Resources.LogWindow_UI_CheckBox_FilterSync; + helpToolTip.SetToolTip(syncFilterCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_FilterSync); + lblFilterCount.Text = Resources.LogWindow_UI_FilterCount_ZeroValue; + filterTailCheckBox.Text = Resources.LogWindow_UI_CheckBox_FilterTail; + helpToolTip.SetToolTip(filterTailCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_FilterTail); + filterRegexCheckBox.Text = Resources.LogWindow_UI_CheckBox_FilterRegex; + helpToolTip.SetToolTip(filterRegexCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_FilterRegex); + filterCaseSensitiveCheckBox.Text = Resources.LogWindow_UI_CheckBox_FilterCaseSensitive; + helpToolTip.SetToolTip(filterCaseSensitiveCheckBox, Resources.LogWindow_UI_CheckBox_ToolTip_FilterCaseSensitive); + btnFilterSearch.Text = Resources.LogWindow_UI_Button_Search; + helpToolTip.SetToolTip(btnFilterSearch, Resources.LogWindow_UI_Button_ToolTip_Search); + freezeLeftColumnsUntilHereToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_FreezeLeftColumnsUntilHere; + moveToLastColumnToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MoveToLastColumn; + moveToLastColumnToolStripMenuItem.ToolTipText = Resources.LogWindow_UI_ToolStripMenuItem_ToolTip_MoveToLastColumn; + moveLeftToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MoveLeft; + moveRightToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_MoveRight; + hideColumnToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_HideColumn; + hideColumnToolStripMenuItem.ToolTipText = Resources.LogWindow_UI_ToolStripMenuItem_ToolTip_HideColumn; + restoreColumnsToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_RestoreColumns; + allColumnsToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_ScrollToColumn; + editModecopyToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_Copy; + highlightSelectionInLogFileToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileFullLine; + highlightSelectionInLogFilewordModeToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_HighlightSelectionInLogFileWordMode; + filterForSelectionToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_FilterForSelection; + setSelectedTextAsBookmarkCommentToolStripMenuItem.Text = Resources.LogWindow_UI_ToolStripMenuItem_SetSelectedTextAsBookmarkComment; + } + [SupportedOSPlatform("windows")] internal void RefreshAllGrids () { @@ -587,7 +671,7 @@ void ILogWindow.WritePipeTab (IList lineEntryList, string title) [SupportedOSPlatform("windows")] private void AutoResizeFilterBox () { - filterSplitContainer.SplitterDistance = filterComboBox.Left + filterComboBox.GetMaxTextWidth(); + filterSplitContainer.SplitterDistance = comboBoxFilter.Left + comboBoxFilter.GetMaxTextWidth(); } #region Events handler @@ -1474,7 +1558,7 @@ private void OnLogWindowSizeChanged (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnColumnRestrictCheckBoxCheckedChanged (object sender, EventArgs e) { - columnButton.Enabled = columnRestrictCheckBox.Checked; + btnColumn.Enabled = columnRestrictCheckBox.Checked; if (columnRestrictCheckBox.Checked) // disable when nothing to filter { columnNamesLabel.Visible = true; @@ -1499,8 +1583,8 @@ private void OnColumnButtonClick (object sender, EventArgs e) columnNamesLabel.Text = CalculateColumnNames(_filterParams); //CheckForFilterDirty(); //!!!GBro: Indicate to redo the search if search columns were changed - filterSearchButton.Image = _searchButtonImage; - saveFilterButton.Enabled = false; + btnFilterSearch.Image = _searchButtonImage; + bntSaveFilter.Enabled = false; } } @@ -1856,7 +1940,7 @@ private void OnFilterRegexCheckBoxMouseUp (object sender, MouseEventArgs e) TesttextHistoryList = ConfigManager.Settings.RegexHistory.TesttextHistoryList, Owner = this, CaseSensitive = filterCaseSensitiveCheckBox.Checked, - Pattern = filterComboBox.Text + Pattern = comboBoxFilter.Text }; if (dlg.ShowDialog() == DialogResult.OK) @@ -1865,7 +1949,7 @@ private void OnFilterRegexCheckBoxMouseUp (object sender, MouseEventArgs e) ConfigManager.Settings.RegexHistory.TesttextHistoryList = dlg.TesttextHistoryList; filterCaseSensitiveCheckBox.Checked = dlg.CaseSensitive; - filterComboBox.Text = dlg.Pattern; + comboBoxFilter.Text = dlg.Pattern; ConfigManager.Save(SettingsFlags.RegexHistory); } @@ -1893,15 +1977,15 @@ private void OnSaveFilterButtonClick (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnDeleteFilterButtonClick (object sender, EventArgs e) { - var index = filterListBox.SelectedIndex; + var index = listBoxFilter.SelectedIndex; if (index >= 0) { - var filterParams = (FilterParams)filterListBox.Items[index]; + var filterParams = (FilterParams)listBoxFilter.Items[index]; _ = ConfigManager.Settings.FilterList.Remove(filterParams); OnFilterListChanged(this); - if (filterListBox.Items.Count > 0) + if (listBoxFilter.Items.Count > 0) { - filterListBox.SelectedIndex = filterListBox.Items.Count - 1; + listBoxFilter.SelectedIndex = listBoxFilter.Items.Count - 1; } } } @@ -1909,44 +1993,44 @@ private void OnDeleteFilterButtonClick (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnFilterUpButtonClick (object sender, EventArgs e) { - var i = filterListBox.SelectedIndex; + var i = listBoxFilter.SelectedIndex; if (i > 0) { - var filterParams = (FilterParams)filterListBox.Items[i]; + var filterParams = (FilterParams)listBoxFilter.Items[i]; ConfigManager.Settings.FilterList.RemoveAt(i); i--; ConfigManager.Settings.FilterList.Insert(i, filterParams); OnFilterListChanged(this); - filterListBox.SelectedIndex = i; + listBoxFilter.SelectedIndex = i; } } [SupportedOSPlatform("windows")] private void OnFilterDownButtonClick (object sender, EventArgs e) { - var i = filterListBox.SelectedIndex; + var i = listBoxFilter.SelectedIndex; if (i < 0) { return; } - if (i < filterListBox.Items.Count - 1) + if (i < listBoxFilter.Items.Count - 1) { - var filterParams = (FilterParams)filterListBox.Items[i]; + var filterParams = (FilterParams)listBoxFilter.Items[i]; ConfigManager.Settings.FilterList.RemoveAt(i); i++; ConfigManager.Settings.FilterList.Insert(i, filterParams); OnFilterListChanged(this); - filterListBox.SelectedIndex = i; + listBoxFilter.SelectedIndex = i; } } [SupportedOSPlatform("windows")] private void OnFilterListBoxMouseDoubleClick (object sender, MouseEventArgs e) { - if (filterListBox.SelectedIndex >= 0) + if (listBoxFilter.SelectedIndex >= 0) { - var filterParams = (FilterParams)filterListBox.Items[filterListBox.SelectedIndex]; + var filterParams = (FilterParams)listBoxFilter.Items[listBoxFilter.SelectedIndex]; var newParams = filterParams.Clone(); //newParams.historyList = ConfigManager.Settings.filterHistoryList; _filterParams = newParams; @@ -1954,8 +2038,8 @@ private void OnFilterListBoxMouseDoubleClick (object sender, MouseEventArgs e) ApplyFilterParams(); CheckForAdvancedButtonDirty(); CheckForFilterDirty(); - filterSearchButton.Image = _searchButtonImage; - saveFilterButton.Enabled = false; + btnFilterSearch.Image = _searchButtonImage; + bntSaveFilter.Enabled = false; if (hideFilterListOnLoadCheckBox.Checked) { ToggleHighlightPanel(false); @@ -1974,11 +2058,11 @@ private void OnFilterListBoxDrawItem (object sender, DrawItemEventArgs e) e.DrawBackground(); if (e.Index >= 0) { - var filterParams = (FilterParams)filterListBox.Items[e.Index]; + var filterParams = (FilterParams)listBoxFilter.Items[e.Index]; Rectangle rectangle = new(0, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height); using var brush = (e.State & DrawItemState.Selected) == DrawItemState.Selected - ? new SolidBrush(filterListBox.BackColor) + ? new SolidBrush(listBoxFilter.BackColor) : new SolidBrush(filterParams.Color); e.Graphics.DrawString(filterParams.SearchText, e.Font, brush, new PointF(rectangle.Left, rectangle.Top)); @@ -1990,10 +2074,10 @@ private void OnFilterListBoxDrawItem (object sender, DrawItemEventArgs e) // Color for filter list entry private void OnColorToolStripMenuItemClick (object sender, EventArgs e) { - var i = filterListBox.SelectedIndex; - if (i < filterListBox.Items.Count && i >= 0) + var i = listBoxFilter.SelectedIndex; + if (i < listBoxFilter.Items.Count && i >= 0) { - var filterParams = (FilterParams)filterListBox.Items[i]; + var filterParams = (FilterParams)listBoxFilter.Items[i]; ColorDialog dlg = new() { CustomColors = [filterParams.Color.ToArgb()], @@ -2003,7 +2087,7 @@ private void OnColorToolStripMenuItemClick (object sender, EventArgs e) if (dlg.ShowDialog() == DialogResult.OK) { filterParams.Color = dlg.Color; - filterListBox.Refresh(); + listBoxFilter.Refresh(); } } } @@ -2017,8 +2101,8 @@ private void OnFilterCaseSensitiveCheckBoxCheckedChanged (object sender, EventAr [SupportedOSPlatform("windows")] private void OnFilterRegexCheckBoxCheckedChanged (object sender, EventArgs e) { - fuzzyKnobControl.Enabled = !filterRegexCheckBox.Checked; - fuzzyLabel.Enabled = !filterRegexCheckBox.Checked; + knobControlFuzzy.Enabled = !filterRegexCheckBox.Checked; + lblfuzzy.Enabled = !filterRegexCheckBox.Checked; CheckForFilterDirty(); } @@ -2205,7 +2289,7 @@ private void OnDataGridViewRowUnshared (object sender, DataGridViewRowEventArgs [SupportedOSPlatform("windows")] private void MeasureItem (object sender, MeasureItemEventArgs e) { - e.ItemHeight = filterListBox.Font.Height; + e.ItemHeight = listBoxFilter.Font.Height; } #endregion @@ -4076,50 +4160,50 @@ private void DisconnectFilterPipes () [SupportedOSPlatform("windows")] private void ApplyFilterParams () { - filterComboBox.Text = _filterParams.SearchText; + comboBoxFilter.Text = _filterParams.SearchText; filterCaseSensitiveCheckBox.Checked = _filterParams.IsCaseSensitive; filterRegexCheckBox.Checked = _filterParams.IsRegex; filterTailCheckBox.Checked = _filterParams.IsFilterTail; invertFilterCheckBox.Checked = _filterParams.IsInvert; - filterKnobBackSpread.Value = _filterParams.SpreadBefore; - filterKnobForeSpread.Value = _filterParams.SpreadBehind; + knobControlFilterBackSpread.Value = _filterParams.SpreadBefore; + knobControlFilterForeSpread.Value = _filterParams.SpreadBehind; rangeCheckBox.Checked = _filterParams.IsRangeSearch; columnRestrictCheckBox.Checked = _filterParams.ColumnRestrict; - fuzzyKnobControl.Value = _filterParams.FuzzyValue; + knobControlFuzzy.Value = _filterParams.FuzzyValue; filterRangeComboBox.Text = _filterParams.RangeSearchText; } [SupportedOSPlatform("windows")] private void ResetFilterControls () { - filterComboBox.Text = ""; + comboBoxFilter.Text = ""; filterCaseSensitiveCheckBox.Checked = false; filterRegexCheckBox.Checked = false; //this.filterTailCheckBox.Checked = this.Preferences.filterTail; invertFilterCheckBox.Checked = false; - filterKnobBackSpread.Value = 0; - filterKnobForeSpread.Value = 0; + knobControlFilterBackSpread.Value = 0; + knobControlFilterForeSpread.Value = 0; rangeCheckBox.Checked = false; columnRestrictCheckBox.Checked = false; - fuzzyKnobControl.Value = 0; + knobControlFuzzy.Value = 0; filterRangeComboBox.Text = ""; } [SupportedOSPlatform("windows")] private void FilterSearch () { - if (filterComboBox.Text.Length == 0) + if (comboBoxFilter.Text.Length == 0) { _filterParams.SearchText = string.Empty; _filterParams.IsRangeSearch = false; ClearFilterList(); - filterSearchButton.Image = null; + btnFilterSearch.Image = null; ResetFilterControls(); - saveFilterButton.Enabled = false; + bntSaveFilter.Enabled = false; return; } - FilterSearch(filterComboBox.Text); + FilterSearch(comboBoxFilter.Text); } [SupportedOSPlatform("windows")] @@ -4134,16 +4218,16 @@ private async void FilterSearch (string text) if (ConfigManager.Settings.FilterHistoryList.Count > maxHistory) { - ConfigManager.Settings.FilterHistoryList.RemoveAt(filterComboBox.Items.Count - 1); + ConfigManager.Settings.FilterHistoryList.RemoveAt(comboBoxFilter.Items.Count - 1); } - filterComboBox.Items.Clear(); + comboBoxFilter.Items.Clear(); foreach (var item in ConfigManager.Settings.FilterHistoryList) { - _ = filterComboBox.Items.Add(item); + _ = comboBoxFilter.Items.Add(item); } - filterComboBox.Text = text; + comboBoxFilter.Text = text; _filterParams.IsRangeSearch = rangeCheckBox.Checked; _filterParams.RangeSearchText = filterRangeComboBox.Text; @@ -4182,9 +4266,9 @@ private async void FilterSearch (string text) } } - _filterParams.FuzzyValue = fuzzyKnobControl.Value; - _filterParams.SpreadBefore = filterKnobBackSpread.Value; - _filterParams.SpreadBehind = filterKnobForeSpread.Value; + _filterParams.FuzzyValue = knobControlFuzzy.Value; + _filterParams.SpreadBefore = knobControlFilterBackSpread.Value; + _filterParams.SpreadBehind = knobControlFilterForeSpread.Value; _filterParams.ColumnRestrict = columnRestrictCheckBox.Checked; //ConfigManager.SaveFilterParams(this.filterParams); @@ -4193,7 +4277,7 @@ private async void FilterSearch (string text) _shouldCancel = false; _isSearching = true; StatusLineText(Resources.LogWindow_UI_StatusLineText_FilterSearch_Filtering); - filterSearchButton.Enabled = false; + btnFilterSearch.Enabled = false; ClearFilterList(); _progressEventArgs.MinValue = 0; @@ -4449,7 +4533,7 @@ private void AddFilterLineGuiUpdate () { lock (_filterResultList) { - lblFilterCount.Text = "" + _filterResultList.Count; + lblFilterCount.Text = string.Empty + _filterResultList.Count; if (filterGridView.RowCount > _filterResultList.Count) { filterGridView.RowCount = 0; // helps to prevent hang ? @@ -4515,7 +4599,7 @@ private void ResetStatusAfterFilter () _ = filterGridView.Focus(); } - filterSearchButton.Enabled = true; + btnFilterSearch.Enabled = true; } catch (NullReferenceException e) { @@ -4536,7 +4620,7 @@ private void ClearFilterList () { filterGridView.SuspendLayout(); filterGridView.RowCount = 0; - lblFilterCount.Text = Resources.LogWindow_UI_ClearFilterList_ResetFilterCounterToZero; + lblFilterCount.Text = Resources.LogWindow_UI_FilterCount_ZeroValue; _filterResultList = []; _lastFilterLinesList = []; _filterHitList = []; @@ -4610,20 +4694,20 @@ private void CheckForFilterDirty () { if (IsFilterSearchDirty(_filterParams)) { - filterSearchButton.Image = _searchButtonImage; - saveFilterButton.Enabled = false; + btnFilterSearch.Image = _searchButtonImage; + bntSaveFilter.Enabled = false; } else { - filterSearchButton.Image = null; - saveFilterButton.Enabled = true; + btnFilterSearch.Image = null; + bntSaveFilter.Enabled = true; } } [SupportedOSPlatform("windows")] private bool IsFilterSearchDirty (FilterParams filterParams) { - if (!filterParams.SearchText.Equals(filterComboBox.Text, StringComparison.Ordinal)) + if (!filterParams.SearchText.Equals(comboBoxFilter.Text, StringComparison.Ordinal)) { return true; } @@ -4648,17 +4732,17 @@ private bool IsFilterSearchDirty (FilterParams filterParams) return true; } - if (filterParams.SpreadBefore != filterKnobBackSpread.Value) + if (filterParams.SpreadBefore != knobControlFilterBackSpread.Value) { return true; } - if (filterParams.SpreadBehind != filterKnobForeSpread.Value) + if (filterParams.SpreadBehind != knobControlFilterForeSpread.Value) { return true; } - if (filterParams.FuzzyValue != fuzzyKnobControl.Value) + if (filterParams.FuzzyValue != knobControlFuzzy.Value) { return true; } @@ -4744,10 +4828,10 @@ private void UpdateSelectionDisplay () private void UpdateFilterHistoryFromSettings () { ConfigManager.Settings.FilterHistoryList = ConfigManager.Settings.FilterHistoryList; - filterComboBox.Items.Clear(); + comboBoxFilter.Items.Clear(); foreach (var item in ConfigManager.Settings.FilterHistoryList) { - _ = filterComboBox.Items.Add(item); + _ = comboBoxFilter.Items.Add(item); } filterRangeComboBox.Items.Clear(); @@ -4795,12 +4879,12 @@ private void ShowAdvancedFilterPanel (bool show) { if (show) { - advancedButton.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_HideAdvanced; - advancedButton.Image = null; + btnAdvanced.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_HideAdvanced; + btnAdvanced.Image = null; } else { - advancedButton.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_ShowAdvanced; + btnAdvanced.Text = Resources.LogWindow_UI_Text_ShowAdvancedFilterPanel_ShowAdvanced; CheckForAdvancedButtonDirty(); } @@ -4812,7 +4896,7 @@ private void ShowAdvancedFilterPanel (bool show) [SupportedOSPlatform("windows")] private void CheckForAdvancedButtonDirty () { - advancedButton.Image = IsAdvancedOptionActive() && !_showAdvanced + btnAdvanced.Image = IsAdvancedOptionActive() && !_showAdvanced ? _advancedButtonImage : null; } @@ -4820,7 +4904,7 @@ private void CheckForAdvancedButtonDirty () [SupportedOSPlatform("windows")] private void FilterToTab () { - filterSearchButton.Enabled = false; + btnFilterSearch.Enabled = false; _ = Task.Run(WriteFilterToTab); } @@ -4916,7 +5000,7 @@ private void WriteFilterToTabFinished (FilterPipe pipe, string name, Persistence _guiStateArgs.MenuEnabled = true; SendGuiStateUpdate(); StatusLineText(""); - filterSearchButton.Enabled = true; + btnFilterSearch.Enabled = true; } /// @@ -7059,7 +7143,7 @@ public void ToggleFilterPanel () { splitContainerLogWindow.Panel2Collapsed = !splitContainerLogWindow.Panel2Collapsed; _ = !splitContainerLogWindow.Panel2Collapsed - ? filterComboBox.Focus() + ? comboBoxFilter.Focus() : dataGridView.Focus(); } @@ -7656,9 +7740,9 @@ public void ImportBookmarkList () public bool IsAdvancedOptionActive () { return rangeCheckBox.Checked || - fuzzyKnobControl.Value > 0 || - filterKnobBackSpread.Value > 0 || - filterKnobForeSpread.Value > 0 || + knobControlFuzzy.Value > 0 || + knobControlFilterBackSpread.Value > 0 || + knobControlFilterForeSpread.Value > 0 || invertFilterCheckBox.Checked || columnRestrictCheckBox.Checked; } @@ -7670,17 +7754,17 @@ public void HandleChangedFilterList () public void HandleChangedFilterListWorker () { - var index = filterListBox.SelectedIndex; - filterListBox.Items.Clear(); + var index = listBoxFilter.SelectedIndex; + listBoxFilter.Items.Clear(); foreach (var filterParam in ConfigManager.Settings.FilterList) { - _ = filterListBox.Items.Add(filterParam); + _ = listBoxFilter.Items.Add(filterParam); } - filterListBox.Refresh(); - if (index >= 0 && index < filterListBox.Items.Count) + listBoxFilter.Refresh(); + if (index >= 0 && index < listBoxFilter.Items.Count) { - filterListBox.SelectedIndex = index; + listBoxFilter.SelectedIndex = index; } filterOnLoadCheckBox.Checked = Preferences.IsFilterOnLoad; diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs index 2e032551..4872f5b8 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs @@ -64,19 +64,19 @@ private void InitializeComponent () advancedBackPanel = new Panel(); advancedFilterSplitContainer = new SplitContainer(); pnlProFilter = new Panel(); - columnButton = new Button(); + btnColumn = new Button(); columnRestrictCheckBox = new CheckBox(); rangeCheckBox = new CheckBox(); filterRangeComboBox = new ComboBox(); columnNamesLabel = new Label(); - fuzzyLabel = new Label(); - fuzzyKnobControl = new KnobControl(); + lblfuzzy = new Label(); + knobControlFuzzy = new KnobControl(); invertFilterCheckBox = new CheckBox(); pnlProFilterLabel = new Panel(); lblBackSpread = new Label(); - filterKnobBackSpread = new KnobControl(); + knobControlFilterBackSpread = new KnobControl(); lblForeSpread = new Label(); - filterKnobForeSpread = new KnobControl(); + knobControlFilterForeSpread = new KnobControl(); btnFilterToTab = new Button(); panelBackgroundAdvancedFilterSplitContainer = new Panel(); btnToggleHighlightPanel = new Button(); @@ -88,25 +88,25 @@ private void InitializeComponent () markFilterHitsInLogViewToolStripMenuItem = new ToolStripMenuItem(); highlightSplitContainerBackPanel = new Panel(); hideFilterListOnLoadCheckBox = new CheckBox(); - filterDownButton = new Button(); - filterUpButton = new Button(); + btnFilterDown = new Button(); + btnFilterUp = new Button(); filterOnLoadCheckBox = new CheckBox(); - saveFilterButton = new Button(); - deleteFilterButton = new Button(); - filterListBox = new ListBox(); + bntSaveFilter = new Button(); + btnDeleteFilter = new Button(); + listBoxFilter = new ListBox(); filterListContextMenuStrip = new ContextMenuStrip(components); colorToolStripMenuItem = new ToolStripMenuItem(); pnlFilterInput = new Panel(); filterSplitContainer = new SplitContainer(); - filterComboBox = new ComboBox(); + comboBoxFilter = new ComboBox(); lblTextFilter = new Label(); - advancedButton = new Button(); + btnAdvanced = new Button(); syncFilterCheckBox = new CheckBox(); lblFilterCount = new Label(); filterTailCheckBox = new CheckBox(); filterRegexCheckBox = new CheckBox(); filterCaseSensitiveCheckBox = new CheckBox(); - filterSearchButton = new Button(); + btnFilterSearch = new Button(); bookmarkContextMenuStrip = new ContextMenuStrip(components); deleteBookmarksToolStripMenuItem = new ToolStripMenuItem(); columnContextMenuStrip = new ContextMenuStrip(components); @@ -222,7 +222,6 @@ private void InitializeComponent () columnComboBox.Name = "columnComboBox"; columnComboBox.Size = new Size(181, 21); columnComboBox.TabIndex = 1; - helpToolTip.SetToolTip(columnComboBox, "Select column to scroll to"); columnComboBox.SelectionChangeCommitted += OnColumnComboBoxSelectionChangeCommitted; columnComboBox.KeyDown += OnColumnComboBoxKeyDown; columnComboBox.PreviewKeyDown += OnColumnComboBoxPreviewKeyDown; @@ -462,19 +461,19 @@ private void InitializeComponent () // pnlProFilter // pnlProFilter.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; - pnlProFilter.Controls.Add(columnButton); + pnlProFilter.Controls.Add(btnColumn); pnlProFilter.Controls.Add(columnRestrictCheckBox); pnlProFilter.Controls.Add(rangeCheckBox); pnlProFilter.Controls.Add(filterRangeComboBox); pnlProFilter.Controls.Add(columnNamesLabel); - pnlProFilter.Controls.Add(fuzzyLabel); - pnlProFilter.Controls.Add(fuzzyKnobControl); + pnlProFilter.Controls.Add(lblfuzzy); + pnlProFilter.Controls.Add(knobControlFuzzy); pnlProFilter.Controls.Add(invertFilterCheckBox); pnlProFilter.Controls.Add(pnlProFilterLabel); pnlProFilter.Controls.Add(lblBackSpread); - pnlProFilter.Controls.Add(filterKnobBackSpread); + pnlProFilter.Controls.Add(knobControlFilterBackSpread); pnlProFilter.Controls.Add(lblForeSpread); - pnlProFilter.Controls.Add(filterKnobForeSpread); + pnlProFilter.Controls.Add(knobControlFilterForeSpread); pnlProFilter.Controls.Add(btnFilterToTab); pnlProFilter.Location = new Point(0, 3); pnlProFilter.Name = "pnlProFilter"; @@ -483,15 +482,15 @@ private void InitializeComponent () // // columnButton // - columnButton.Enabled = false; - columnButton.Location = new Point(750, 41); - columnButton.Name = "columnButton"; - columnButton.Size = new Size(85, 35); - columnButton.TabIndex = 15; - columnButton.Text = "Columns..."; - helpToolTip.SetToolTip(columnButton, "Choose columns for 'Column restrict'"); - columnButton.UseVisualStyleBackColor = true; - columnButton.Click += OnColumnButtonClick; + btnColumn.Enabled = false; + btnColumn.Location = new Point(750, 41); + btnColumn.Name = "columnButton"; + btnColumn.Size = new Size(85, 35); + btnColumn.TabIndex = 15; + btnColumn.Text = "Columns..."; + helpToolTip.SetToolTip(btnColumn, "Choose columns for 'Column restrict'"); + btnColumn.UseVisualStyleBackColor = true; + btnColumn.Click += OnColumnButtonClick; // // columnRestrictCheckBox // @@ -539,27 +538,27 @@ private void InitializeComponent () // // fuzzyLabel // - fuzzyLabel.AutoSize = true; - fuzzyLabel.Location = new Point(502, 38); - fuzzyLabel.Name = "fuzzyLabel"; - fuzzyLabel.Size = new Size(56, 13); - fuzzyLabel.TabIndex = 11; - fuzzyLabel.Text = "Fuzzyness"; + lblfuzzy.AutoSize = true; + lblfuzzy.Location = new Point(502, 38); + lblfuzzy.Name = "fuzzyLabel"; + lblfuzzy.Size = new Size(56, 13); + lblfuzzy.TabIndex = 11; + lblfuzzy.Text = "Fuzzyness"; // // fuzzyKnobControl // - fuzzyKnobControl.DragSensitivity = 6; - fuzzyKnobControl.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); - fuzzyKnobControl.Location = new Point(521, 7); - fuzzyKnobControl.Margin = new Padding(2); - fuzzyKnobControl.MaxValue = 0; - fuzzyKnobControl.MinValue = 0; - fuzzyKnobControl.Name = "fuzzyKnobControl"; - fuzzyKnobControl.Size = new Size(17, 29); - fuzzyKnobControl.TabIndex = 10; - helpToolTip.SetToolTip(fuzzyKnobControl, "Fuzzy search level (0 = fuzzy off)"); - fuzzyKnobControl.Value = 0; - fuzzyKnobControl.ValueChanged += OnFuzzyKnobControlValueChanged; + knobControlFuzzy.DragSensitivity = 6; + knobControlFuzzy.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); + knobControlFuzzy.Location = new Point(521, 7); + knobControlFuzzy.Margin = new Padding(2); + knobControlFuzzy.MaxValue = 0; + knobControlFuzzy.MinValue = 0; + knobControlFuzzy.Name = "fuzzyKnobControl"; + knobControlFuzzy.Size = new Size(17, 29); + knobControlFuzzy.TabIndex = 10; + helpToolTip.SetToolTip(knobControlFuzzy, "Fuzzy search level (0 = fuzzy off)"); + knobControlFuzzy.Value = 0; + knobControlFuzzy.ValueChanged += OnFuzzyKnobControlValueChanged; // // invertFilterCheckBox // @@ -593,17 +592,17 @@ private void InitializeComponent () // // filterKnobBackSpread // - filterKnobBackSpread.DragSensitivity = 3; - filterKnobBackSpread.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); - filterKnobBackSpread.Location = new Point(313, 7); - filterKnobBackSpread.Margin = new Padding(2); - filterKnobBackSpread.MaxValue = 0; - filterKnobBackSpread.MinValue = 0; - filterKnobBackSpread.Name = "filterKnobBackSpread"; - filterKnobBackSpread.Size = new Size(17, 29); - filterKnobBackSpread.TabIndex = 5; - helpToolTip.SetToolTip(filterKnobBackSpread, "Add preceding lines to search result (Drag up/down, press Shift for finer pitch)"); - filterKnobBackSpread.Value = 0; + knobControlFilterBackSpread.DragSensitivity = 3; + knobControlFilterBackSpread.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); + knobControlFilterBackSpread.Location = new Point(313, 7); + knobControlFilterBackSpread.Margin = new Padding(2); + knobControlFilterBackSpread.MaxValue = 0; + knobControlFilterBackSpread.MinValue = 0; + knobControlFilterBackSpread.Name = "filterKnobBackSpread"; + knobControlFilterBackSpread.Size = new Size(17, 29); + knobControlFilterBackSpread.TabIndex = 5; + helpToolTip.SetToolTip(knobControlFilterBackSpread, "Add preceding lines to search result (Drag up/down, press Shift for finer pitch)"); + knobControlFilterBackSpread.Value = 0; // // lblForeSpread // @@ -616,17 +615,17 @@ private void InitializeComponent () // // filterKnobForeSpread // - filterKnobForeSpread.DragSensitivity = 3; - filterKnobForeSpread.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); - filterKnobForeSpread.Location = new Point(420, 7); - filterKnobForeSpread.Margin = new Padding(2); - filterKnobForeSpread.MaxValue = 0; - filterKnobForeSpread.MinValue = 0; - filterKnobForeSpread.Name = "filterKnobForeSpread"; - filterKnobForeSpread.Size = new Size(17, 29); - filterKnobForeSpread.TabIndex = 1; - helpToolTip.SetToolTip(filterKnobForeSpread, "Add following lines to search result (Drag up/down, press Shift for finer pitch)"); - filterKnobForeSpread.Value = 0; + knobControlFilterForeSpread.DragSensitivity = 3; + knobControlFilterForeSpread.Font = new Font("Verdana", 6F, FontStyle.Regular, GraphicsUnit.Point, 0); + knobControlFilterForeSpread.Location = new Point(420, 7); + knobControlFilterForeSpread.Margin = new Padding(2); + knobControlFilterForeSpread.MaxValue = 0; + knobControlFilterForeSpread.MinValue = 0; + knobControlFilterForeSpread.Name = "filterKnobForeSpread"; + knobControlFilterForeSpread.Size = new Size(17, 29); + knobControlFilterForeSpread.TabIndex = 1; + helpToolTip.SetToolTip(knobControlFilterForeSpread, "Add following lines to search result (Drag up/down, press Shift for finer pitch)"); + knobControlFilterForeSpread.Value = 0; // // btnFilterToTab // @@ -756,12 +755,12 @@ private void InitializeComponent () // highlightSplitContainerBackPanel // highlightSplitContainerBackPanel.Controls.Add(hideFilterListOnLoadCheckBox); - highlightSplitContainerBackPanel.Controls.Add(filterDownButton); - highlightSplitContainerBackPanel.Controls.Add(filterUpButton); + highlightSplitContainerBackPanel.Controls.Add(btnFilterDown); + highlightSplitContainerBackPanel.Controls.Add(btnFilterUp); highlightSplitContainerBackPanel.Controls.Add(filterOnLoadCheckBox); - highlightSplitContainerBackPanel.Controls.Add(saveFilterButton); - highlightSplitContainerBackPanel.Controls.Add(deleteFilterButton); - highlightSplitContainerBackPanel.Controls.Add(filterListBox); + highlightSplitContainerBackPanel.Controls.Add(bntSaveFilter); + highlightSplitContainerBackPanel.Controls.Add(btnDeleteFilter); + highlightSplitContainerBackPanel.Controls.Add(listBoxFilter); highlightSplitContainerBackPanel.Dock = DockStyle.Fill; highlightSplitContainerBackPanel.Location = new Point(0, 0); highlightSplitContainerBackPanel.Name = "highlightSplitContainerBackPanel"; @@ -782,29 +781,29 @@ private void InitializeComponent () // // filterDownButton // - filterDownButton.BackgroundImage = LogExpert.Resources.ArrowDown; - filterDownButton.BackgroundImageLayout = ImageLayout.Stretch; - filterDownButton.Location = new Point(296, 85); - filterDownButton.Name = "filterDownButton"; - filterDownButton.Size = new Size(35, 35); - filterDownButton.TabIndex = 19; - helpToolTip.SetToolTip(filterDownButton, "Move the selected entry down in the list"); - filterDownButton.UseVisualStyleBackColor = true; - filterDownButton.SizeChanged += OnButtonSizeChanged; - filterDownButton.Click += OnFilterDownButtonClick; + btnFilterDown.BackgroundImage = LogExpert.Resources.ArrowDown; + btnFilterDown.BackgroundImageLayout = ImageLayout.Stretch; + btnFilterDown.Location = new Point(296, 85); + btnFilterDown.Name = "filterDownButton"; + btnFilterDown.Size = new Size(35, 35); + btnFilterDown.TabIndex = 19; + helpToolTip.SetToolTip(btnFilterDown, "Move the selected entry down in the list"); + btnFilterDown.UseVisualStyleBackColor = true; + btnFilterDown.SizeChanged += OnButtonSizeChanged; + btnFilterDown.Click += OnFilterDownButtonClick; // // filterUpButton // - filterUpButton.BackgroundImage = LogExpert.Resources.ArrowUp; - filterUpButton.BackgroundImageLayout = ImageLayout.Stretch; - filterUpButton.Location = new Point(258, 85); - filterUpButton.Name = "filterUpButton"; - filterUpButton.Size = new Size(35, 35); - filterUpButton.TabIndex = 18; - helpToolTip.SetToolTip(filterUpButton, "Move the selected entry up in the list"); - filterUpButton.UseVisualStyleBackColor = true; - filterUpButton.SizeChanged += OnButtonSizeChanged; - filterUpButton.Click += OnFilterUpButtonClick; + btnFilterUp.BackgroundImage = LogExpert.Resources.ArrowUp; + btnFilterUp.BackgroundImageLayout = ImageLayout.Stretch; + btnFilterUp.Location = new Point(258, 85); + btnFilterUp.Name = "filterUpButton"; + btnFilterUp.Size = new Size(35, 35); + btnFilterUp.TabIndex = 18; + helpToolTip.SetToolTip(btnFilterUp, "Move the selected entry up in the list"); + btnFilterUp.UseVisualStyleBackColor = true; + btnFilterUp.SizeChanged += OnButtonSizeChanged; + btnFilterUp.Click += OnFilterUpButtonClick; // // filterOnLoadCheckBox // @@ -821,40 +820,40 @@ private void InitializeComponent () // // saveFilterButton // - saveFilterButton.Location = new Point(258, 11); - saveFilterButton.Name = "saveFilterButton"; - saveFilterButton.Size = new Size(75, 35); - saveFilterButton.TabIndex = 16; - saveFilterButton.Text = "Save filter"; - saveFilterButton.UseVisualStyleBackColor = true; - saveFilterButton.Click += OnSaveFilterButtonClick; + bntSaveFilter.Location = new Point(258, 11); + bntSaveFilter.Name = "saveFilterButton"; + bntSaveFilter.Size = new Size(75, 35); + bntSaveFilter.TabIndex = 16; + bntSaveFilter.Text = "Save filter"; + bntSaveFilter.UseVisualStyleBackColor = true; + bntSaveFilter.Click += OnSaveFilterButtonClick; // // deleteFilterButton // - deleteFilterButton.Location = new Point(258, 47); - deleteFilterButton.Name = "deleteFilterButton"; - deleteFilterButton.Size = new Size(75, 35); - deleteFilterButton.TabIndex = 3; - deleteFilterButton.Text = "Delete"; - deleteFilterButton.UseVisualStyleBackColor = true; - deleteFilterButton.Click += OnDeleteFilterButtonClick; + btnDeleteFilter.Location = new Point(258, 47); + btnDeleteFilter.Name = "deleteFilterButton"; + btnDeleteFilter.Size = new Size(75, 35); + btnDeleteFilter.TabIndex = 3; + btnDeleteFilter.Text = "Delete"; + btnDeleteFilter.UseVisualStyleBackColor = true; + btnDeleteFilter.Click += OnDeleteFilterButtonClick; // // filterListBox // - filterListBox.ContextMenuStrip = filterListContextMenuStrip; - filterListBox.Dock = DockStyle.Left; - filterListBox.DrawMode = DrawMode.OwnerDrawFixed; - filterListBox.Font = new Font("Courier New", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - filterListBox.FormattingEnabled = true; - filterListBox.IntegralHeight = false; - filterListBox.ItemHeight = 25; - filterListBox.Location = new Point(0, 0); - filterListBox.Name = "filterListBox"; - filterListBox.Size = new Size(252, 469); - filterListBox.TabIndex = 0; - helpToolTip.SetToolTip(filterListBox, "Doubleclick to load a saved filter"); - filterListBox.DrawItem += OnFilterListBoxDrawItem; - filterListBox.MouseDoubleClick += OnFilterListBoxMouseDoubleClick; + listBoxFilter.ContextMenuStrip = filterListContextMenuStrip; + listBoxFilter.Dock = DockStyle.Left; + listBoxFilter.DrawMode = DrawMode.OwnerDrawFixed; + listBoxFilter.Font = new Font("Courier New", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); + listBoxFilter.FormattingEnabled = true; + listBoxFilter.IntegralHeight = false; + listBoxFilter.ItemHeight = 25; + listBoxFilter.Location = new Point(0, 0); + listBoxFilter.Name = "filterListBox"; + listBoxFilter.Size = new Size(252, 469); + listBoxFilter.TabIndex = 0; + helpToolTip.SetToolTip(listBoxFilter, "Doubleclick to load a saved filter"); + listBoxFilter.DrawItem += OnFilterListBoxDrawItem; + listBoxFilter.MouseDoubleClick += OnFilterListBoxMouseDoubleClick; // // filterListContextMenuStrip // @@ -887,19 +886,19 @@ private void InitializeComponent () // // filterSplitContainer.Panel1 // - filterSplitContainer.Panel1.Controls.Add(filterComboBox); + filterSplitContainer.Panel1.Controls.Add(comboBoxFilter); filterSplitContainer.Panel1.Controls.Add(lblTextFilter); filterSplitContainer.Panel1MinSize = 200; // // filterSplitContainer.Panel2 // - filterSplitContainer.Panel2.Controls.Add(advancedButton); + filterSplitContainer.Panel2.Controls.Add(btnAdvanced); filterSplitContainer.Panel2.Controls.Add(syncFilterCheckBox); filterSplitContainer.Panel2.Controls.Add(lblFilterCount); filterSplitContainer.Panel2.Controls.Add(filterTailCheckBox); filterSplitContainer.Panel2.Controls.Add(filterRegexCheckBox); filterSplitContainer.Panel2.Controls.Add(filterCaseSensitiveCheckBox); - filterSplitContainer.Panel2.Controls.Add(filterSearchButton); + filterSplitContainer.Panel2.Controls.Add(btnFilterSearch); filterSplitContainer.Panel2MinSize = 550; filterSplitContainer.Size = new Size(1855, 46); filterSplitContainer.SplitterDistance = 518; @@ -911,16 +910,16 @@ private void InitializeComponent () // // filterComboBox // - filterComboBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; - filterComboBox.Font = new Font("Courier New", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - filterComboBox.FormattingEnabled = true; - filterComboBox.Location = new Point(89, 5); - filterComboBox.Name = "filterComboBox"; - filterComboBox.Size = new Size(426, 26); - filterComboBox.TabIndex = 4; - helpToolTip.SetToolTip(filterComboBox, "Search string for the filter"); - filterComboBox.TextChanged += OnFilterComboBoxTextChanged; - filterComboBox.KeyDown += OnFilterComboBoxKeyDown; + comboBoxFilter.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + comboBoxFilter.Font = new Font("Courier New", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); + comboBoxFilter.FormattingEnabled = true; + comboBoxFilter.Location = new Point(89, 5); + comboBoxFilter.Name = "filterComboBox"; + comboBoxFilter.Size = new Size(426, 26); + comboBoxFilter.TabIndex = 4; + helpToolTip.SetToolTip(comboBoxFilter, "Search string for the filter"); + comboBoxFilter.TextChanged += OnFilterComboBoxTextChanged; + comboBoxFilter.KeyDown += OnFilterComboBoxKeyDown; // // lblTextFilter // @@ -933,17 +932,17 @@ private void InitializeComponent () // // advancedButton // - advancedButton.DialogResult = DialogResult.Cancel; - advancedButton.Image = (Image)resources.GetObject("advancedButton.Image"); - advancedButton.ImageAlign = ContentAlignment.MiddleRight; - advancedButton.Location = new Point(539, 5); - advancedButton.Name = "advancedButton"; - advancedButton.Size = new Size(110, 35); - advancedButton.TabIndex = 17; - advancedButton.Text = "Show advanced..."; - helpToolTip.SetToolTip(advancedButton, "Toggel the advanced filter options panel"); - advancedButton.UseVisualStyleBackColor = true; - advancedButton.Click += OnAdvancedButtonClick; + btnAdvanced.DialogResult = DialogResult.Cancel; + btnAdvanced.Image = (Image)resources.GetObject("advancedButton.Image"); + btnAdvanced.ImageAlign = ContentAlignment.MiddleRight; + btnAdvanced.Location = new Point(539, 5); + btnAdvanced.Name = "advancedButton"; + btnAdvanced.Size = new Size(110, 35); + btnAdvanced.TabIndex = 17; + btnAdvanced.Text = "Show advanced..."; + helpToolTip.SetToolTip(btnAdvanced, "Toggel the advanced filter options panel"); + btnAdvanced.UseVisualStyleBackColor = true; + btnAdvanced.Click += OnAdvancedButtonClick; // // syncFilterCheckBox // @@ -1006,16 +1005,16 @@ private void InitializeComponent () // // filterSearchButton // - filterSearchButton.Image = (Image)resources.GetObject("filterSearchButton.Image"); - filterSearchButton.ImageAlign = ContentAlignment.MiddleRight; - filterSearchButton.Location = new Point(3, 5); - filterSearchButton.Name = "filterSearchButton"; - filterSearchButton.Size = new Size(128, 35); - filterSearchButton.TabIndex = 11; - filterSearchButton.Text = "Search"; - helpToolTip.SetToolTip(filterSearchButton, "Start the filter search"); - filterSearchButton.UseVisualStyleBackColor = true; - filterSearchButton.Click += OnFilterSearchButtonClick; + btnFilterSearch.Image = (Image)resources.GetObject("filterSearchButton.Image"); + btnFilterSearch.ImageAlign = ContentAlignment.MiddleRight; + btnFilterSearch.Location = new Point(3, 5); + btnFilterSearch.Name = "filterSearchButton"; + btnFilterSearch.Size = new Size(128, 35); + btnFilterSearch.TabIndex = 11; + btnFilterSearch.Text = "Search"; + helpToolTip.SetToolTip(btnFilterSearch, "Start the filter search"); + btnFilterSearch.UseVisualStyleBackColor = true; + btnFilterSearch.Click += OnFilterSearchButtonClick; // // bookmarkContextMenuStrip // @@ -1216,14 +1215,14 @@ private void InitializeComponent () private System.Windows.Forms.SplitContainer advancedFilterSplitContainer; private System.Windows.Forms.Panel pnlProFilter; private System.Windows.Forms.Button btnFilterToTab; - private KnobControl filterKnobForeSpread; + private KnobControl knobControlFilterForeSpread; private System.Windows.Forms.Label lblForeSpread; - private KnobControl filterKnobBackSpread; + private KnobControl knobControlFilterBackSpread; private System.Windows.Forms.Label lblBackSpread; private System.Windows.Forms.Panel pnlProFilterLabel; private System.Windows.Forms.CheckBox invertFilterCheckBox; - private System.Windows.Forms.Label fuzzyLabel; - private KnobControl fuzzyKnobControl; + private System.Windows.Forms.Label lblfuzzy; + private KnobControl knobControlFuzzy; private System.Windows.Forms.CheckBox rangeCheckBox; private System.Windows.Forms.ComboBox filterRangeComboBox; private System.Windows.Forms.ContextMenuStrip dataGridContextMenuStrip; @@ -1236,7 +1235,7 @@ private void InitializeComponent () private System.Windows.Forms.ContextMenuStrip bookmarkContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem deleteBookmarksToolStripMenuItem; private System.Windows.Forms.CheckBox columnRestrictCheckBox; - private System.Windows.Forms.Button columnButton; + private System.Windows.Forms.Button btnColumn; private System.Windows.Forms.ContextMenuStrip columnContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem freezeLeftColumnsUntilHereToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem moveToLastColumnToolStripMenuItem; @@ -1257,17 +1256,17 @@ private void InitializeComponent () private System.Windows.Forms.SplitContainer highlightSplitContainer; private System.Windows.Forms.Button btnToggleHighlightPanel; private System.Windows.Forms.Panel highlightSplitContainerBackPanel; - private System.Windows.Forms.Button saveFilterButton; - private System.Windows.Forms.Button deleteFilterButton; - private System.Windows.Forms.ListBox filterListBox; + private System.Windows.Forms.Button bntSaveFilter; + private System.Windows.Forms.Button btnDeleteFilter; + private System.Windows.Forms.ListBox listBoxFilter; private System.Windows.Forms.ContextMenuStrip filterContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem setBookmarksOnSelectedLinesToolStripMenuItem; private System.Windows.Forms.CheckBox filterOnLoadCheckBox; private System.Windows.Forms.ToolStripMenuItem markCurrentFilterRangeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem syncTimestampsToToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem freeThisWindowFromTimeSyncToolStripMenuItem; - private System.Windows.Forms.Button filterDownButton; - private System.Windows.Forms.Button filterUpButton; + private System.Windows.Forms.Button btnFilterDown; + private System.Windows.Forms.Button btnFilterUp; private System.Windows.Forms.ContextMenuStrip filterListContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem colorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem filterToTabToolStripMenuItem; @@ -1284,14 +1283,14 @@ private void InitializeComponent () private System.Windows.Forms.Label lblColumnName; private System.Windows.Forms.SplitContainer filterSplitContainer; private System.Windows.Forms.Label lblTextFilter; - private System.Windows.Forms.ComboBox filterComboBox; - private System.Windows.Forms.Button advancedButton; + private System.Windows.Forms.ComboBox comboBoxFilter; + private System.Windows.Forms.Button btnAdvanced; private System.Windows.Forms.CheckBox syncFilterCheckBox; private System.Windows.Forms.Label lblFilterCount; private System.Windows.Forms.CheckBox filterTailCheckBox; private System.Windows.Forms.CheckBox filterRegexCheckBox; private System.Windows.Forms.CheckBox filterCaseSensitiveCheckBox; - private System.Windows.Forms.Button filterSearchButton; + private System.Windows.Forms.Button btnFilterSearch; private System.Windows.Forms.Panel panelBackgroundAdvancedFilterSplitContainer; private ToolStripSeparator pluginSeparator; private ToolStripSeparator menuToolStripSeparator1; From a5cbc4a6d9168970bd28befb775f50670802c69b Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Tue, 8 Jul 2025 21:33:04 +0200 Subject: [PATCH 07/38] Update src/LogExpert.Resources/Resources.resx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.Resources/Resources.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index b5c05d38..2de6ca87 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -284,7 +284,7 @@ Error while trying to access file: {0}, exception: {1} - Settings could not be imported: {exSettings could not be imported: {0} + Settings could not be imported: {0} Export Settings to file From 87148b895adbc1f178c5cbc80d2dd27fb316ac6b Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Tue, 8 Jul 2025 21:33:26 +0200 Subject: [PATCH 08/38] Update src/LogExpert.Resources/Resources.resx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.Resources/Resources.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 2de6ca87..282519ab 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -238,7 +238,7 @@ Invalid payload command: null - + Unknown IPC Message Type: {0}; with payload: {1} From a78c3c76bda63035d6e39007d74e6929766a1361 Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Tue, 8 Jul 2025 21:33:48 +0200 Subject: [PATCH 09/38] Update src/LogExpert.UI/Entities/PaintHelper.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.UI/Entities/PaintHelper.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LogExpert.UI/Entities/PaintHelper.cs b/src/LogExpert.UI/Entities/PaintHelper.cs index 4e2a4f43..487bb547 100644 --- a/src/LogExpert.UI/Entities/PaintHelper.cs +++ b/src/LogExpert.UI/Entities/PaintHelper.cs @@ -306,11 +306,11 @@ private static int GetBorderSize (DataGridViewAdvancedCellBorderStyle borderStyl { DataGridViewAdvancedCellBorderStyle.None => 0, DataGridViewAdvancedCellBorderStyle.InsetDouble or DataGridViewAdvancedCellBorderStyle.OutsetDouble => 2, - DataGridViewAdvancedCellBorderStyle.NotSet => throw new NotImplementedException(), - DataGridViewAdvancedCellBorderStyle.Single => throw new NotImplementedException(), - DataGridViewAdvancedCellBorderStyle.Inset => throw new NotImplementedException(), - DataGridViewAdvancedCellBorderStyle.Outset => throw new NotImplementedException(), - DataGridViewAdvancedCellBorderStyle.OutsetPartial => throw new NotImplementedException(), + DataGridViewAdvancedCellBorderStyle.NotSet => 1, // Default border size for NotSet + DataGridViewAdvancedCellBorderStyle.Single => 1, // Default border size for Single + DataGridViewAdvancedCellBorderStyle.Inset => 1, // Default border size for Inset + DataGridViewAdvancedCellBorderStyle.Outset => 1, // Default border size for Outset + DataGridViewAdvancedCellBorderStyle.OutsetPartial => 1, // Default border size for OutsetPartial _ => 1 }; } From c5ac440b5a98bc834561b8b00d9e1d2dd01ab592 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 13:15:39 +0200 Subject: [PATCH 10/38] resources more resources --- README.md | 1 - build/Build.cs | 22 +- src/ColumnizerLib/ColumnizerLib.nuspec | 11 +- src/Directory.Build.props | 9 + .../JsonCompactColumnizer.csproj | 6 +- .../{GuiStateArgs.cs => GuiStateEventArgs.cs} | 2 +- src/LogExpert.Resources/Resources.Designer.cs | 1256 +++++++++++++++++ src/LogExpert.Resources/Resources.de.resx | 69 + src/LogExpert.Resources/Resources.resx | 417 ++++++ .../Controls/LogWindow/LogWindow.cs | 6 +- .../FilterSelectorForm.Designer.cs | 0 .../{LogTabWindow => }/FilterSelectorForm.cs | 0 .../FilterSelectorForm.resx | 0 .../HighlightDialog.Designer.cs | 0 .../{LogTabWindow => }/HighlightDialog.cs | 0 .../{LogTabWindow => }/HighlightDialog.resx | 0 .../Dialogs/LogTabWindow/LogTabWindow.cs | 225 ++- .../SettingsDialog.Designer.cs | 84 +- .../{LogTabWindow => }/SettingsDialog.cs | 254 +++- .../{LogTabWindow => }/SettingsDialog.resx | 3 - src/LogExpert.UI/LogExpert.UI.csproj | 4 +- src/LogExpert.sln | 1 + 22 files changed, 2107 insertions(+), 263 deletions(-) rename src/LogExpert.Core/EventArguments/{GuiStateArgs.cs => GuiStateEventArgs.cs} (95%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/FilterSelectorForm.Designer.cs (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/FilterSelectorForm.cs (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/FilterSelectorForm.resx (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/HighlightDialog.Designer.cs (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/HighlightDialog.cs (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/HighlightDialog.resx (100%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/SettingsDialog.Designer.cs (97%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/SettingsDialog.cs (67%) rename src/LogExpert.UI/Dialogs/{LogTabWindow => }/SettingsDialog.resx (96%) diff --git a/README.md b/README.md index 8821a046..fff51840 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Or Install via chocolatey Requirements - https://dotnet.microsoft.com/en-us/download/dotnet/8.0 - .NET 8 (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x64-installer or https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.13-windows-x86-installer) -- ASP.NET Core Runtime (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.13-windows-x64-installer, https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.13-windows-x86-installer or https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.13-windows-hosting-bundle-installer) ## CI This is a continous integration build. So always the latest and greates changes. It should be stable but no promises. Can be viewed as Beta. diff --git a/build/Build.cs b/build/Build.cs index 0e700887..09c9a979 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -34,7 +34,7 @@ partial class Build : NukeBuild /// - JetBrains Rider https://nuke.build/rider /// - Microsoft VisualStudio https://nuke.build/visualstudio /// - Microsoft VSCode https://nuke.build/vscode - public static int Main() => Execute(x => x.Test); + public static int Main () => Execute(x => x.Test); [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; @@ -78,7 +78,7 @@ Version Version patch = AppVeyor.Instance.BuildNumber; } - return new Version(1, 12, 0, patch); + return new Version(1, 20, 0, patch); } } @@ -119,7 +119,7 @@ Version Version ChocolateyDirectory / $"logexpert.{VersionString}.nupkg" ]; - protected override void OnBuildInitialized() + protected override void OnBuildInitialized () { SetVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1"); @@ -479,7 +479,7 @@ protected override void OnBuildInitialized() logExpertDocuments.DeleteDirectory(); }); - private void ExecuteInnoSetup(AbsolutePath innoPath) + private void ExecuteInnoSetup (AbsolutePath innoPath) { Process proc = new(); @@ -501,12 +501,12 @@ private void ExecuteInnoSetup(AbsolutePath innoPath) } } - private string ReplaceVersionMatch(Match match, string replacement) + private string ReplaceVersionMatch (Match match, string replacement) { return $"{match.Groups[1]}{replacement}{match.Groups[3]}"; } - private void TransformTemplateFile(AbsolutePath path, bool deleteTemplate) + private void TransformTemplateFile (AbsolutePath path, bool deleteTemplate) { string text = path.ReadAllText(); text = text.Replace("##version##", VersionString); @@ -520,17 +520,17 @@ private void TransformTemplateFile(AbsolutePath path, bool deleteTemplate) } [GeneratedRegex(@"(\[assembly: AssemblyInformationalVersion\("")([^""]*)(""\)\])")] - private static partial Regex AssemblyInformationalVersion(); + private static partial Regex AssemblyInformationalVersion (); [GeneratedRegex(@"(\[assembly: AssemblyVersion\("")([^""]*)(""\)\])")] - private static partial Regex AssemblyVersion(); + private static partial Regex AssemblyVersion (); [GeneratedRegex(@"(\[assembly: AssemblyConfiguration\()(""[^""]*"")(\)\])")] - private static partial Regex AssemblyConfiguration(); + private static partial Regex AssemblyConfiguration (); [GeneratedRegex(@"(\[assembly: AssemblyFileVersion\("")([^""]*)(""\)\])")] - private static partial Regex AssemblyFileVersion(); + private static partial Regex AssemblyFileVersion (); [GeneratedRegex(@"\w\w{2}[_]p?[tso]?[erzliasx]+[_rhe]{5}", RegexOptions.IgnoreCase, "en-GB")] - private static partial Regex SFTPPlugin(); + private static partial Regex SFTPPlugin (); } diff --git a/src/ColumnizerLib/ColumnizerLib.nuspec b/src/ColumnizerLib/ColumnizerLib.nuspec index 0a242fbf..c87720cb 100644 --- a/src/ColumnizerLib/ColumnizerLib.nuspec +++ b/src/ColumnizerLib/ColumnizerLib.nuspec @@ -6,13 +6,18 @@ LogExpert ColumnizerLib Zarunbal, Hagen Raab, Hirogen, RandallFlagg and others Zarunbal, Hirogen - MIT - https://github.com/LogExperts/LogExpert + + https://github.com/LogExperts/LogExpert + false https://github.com/LogExperts/LogExpert/issues - https://github.com/LogExperts/LogExpert/releases/tag/v$version$ + https://github.com/LogExperts/LogExpert/releases/tag/v.$version$ Columnizer Lib for Logexpert plugins + docs\README.md Copyright 2025 LogExpert Columnizer + + + \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 76e48ec8..f76a1211 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -17,9 +17,17 @@ false true + https://github.com/LogExperts/LogExpert + https://github.com/LogExperts/LogExpert + LogExpert, Columnizer, Logging, Windows, Winforms + git + https://github.com/LogExperts/LogExpert/releases/tag/v.1.20.0 + 1.20.0.0 true LogExpert Copyright © LogExpert 2025 + MIT + README.md false false false @@ -49,6 +57,7 @@ + diff --git a/src/JsonCompactColumnizer/JsonCompactColumnizer.csproj b/src/JsonCompactColumnizer/JsonCompactColumnizer.csproj index 48c72fcc..bd18a3cc 100644 --- a/src/JsonCompactColumnizer/JsonCompactColumnizer.csproj +++ b/src/JsonCompactColumnizer/JsonCompactColumnizer.csproj @@ -8,11 +8,11 @@ - - + - + + diff --git a/src/LogExpert.Core/EventArguments/GuiStateArgs.cs b/src/LogExpert.Core/EventArguments/GuiStateEventArgs.cs similarity index 95% rename from src/LogExpert.Core/EventArguments/GuiStateArgs.cs rename to src/LogExpert.Core/EventArguments/GuiStateEventArgs.cs index 82ccc963..d323395c 100644 --- a/src/LogExpert.Core/EventArguments/GuiStateArgs.cs +++ b/src/LogExpert.Core/EventArguments/GuiStateEventArgs.cs @@ -2,7 +2,7 @@ namespace LogExpert.Core.EventArguments; -public class GuiStateArgs : System.EventArgs +public class GuiStateEventArgs : EventArgs { #region Properties diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 12a4b4de..587a05bd 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -523,6 +523,60 @@ public static string Lockfinder_Trace_RmEndSessionNativeMethodsRmEndSessionHandl } } + /// + /// Looks up a localized string similar to Error during {0} value {1}, min {2}, max {3}, visible {4}: {5}. + /// + public static string LogExpert_Common_Error_5Parameters_ErrorDuring0Value1Min2Max3Visible45 { + get { + return ResourceManager.GetString("LogExpert_Common_Error_5Parameters_ErrorDuring0Value1Min2Max3Visible45", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient rights {0}: {1} . + /// + public static string LogExpert_Common_Error_InsufficientRights_For_Parameter_ErrorMessage { + get { + return ResourceManager.GetString("LogExpert_Common_Error_InsufficientRights_For_Parameter_ErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string LogExpert_Common_UI_Button_Cancel { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Button_Cancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Export.... + /// + public static string LogExpert_Common_UI_Button_Export { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Button_Export", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Import.... + /// + public static string LogExpert_Common_UI_Button_Import { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Button_Import", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OK. + /// + public static string LogExpert_Common_UI_Button_OK { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Button_OK", resourceCulture); + } + } + /// /// Looks up a localized string similar to Adding window to list. /// @@ -605,6 +659,200 @@ public static System.Drawing.Bitmap LogLover { } } + /// + /// Looks up a localized string similar to Dropped formats: . + /// + public static string LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RegEx-error while finding columnizer: {0}. + /// + public static string LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dragging something over LogExpert. Formats: . + /// + public static string LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFormats { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFo" + + "rmats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting external tool: {0} {1}. + /// + public static string LogTabWindow_Logger_Info_StartingExternalTool { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Info_StartingExternalTool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting external tool with sysout redirection: {0} {1}. + /// + public static string LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Layout data contains non-existing LogWindow for {0}. + /// + public static string LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogWindowForFileName { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogW" + + "indowForFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Encoding {0} is not a valid encoding. + /// + public static string LogTabWindow_Logger_Warn_EncodingIsNotValid { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Warn_EncodingIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received SyncModeChanged event while disposing. Event ignored.. + /// + public static string LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventWhileDisposingEventIgnored { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventW" + + "hileDisposingEventIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The preferences have changed. + /// + public static string LogTabWindow_Logger_Warn_ThePreferencesHaveChanged { + get { + return ResourceManager.GetString("LogTabWindow_Logger_Warn_ThePreferencesHaveChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is a test exception thrown by the GUI thread. + /// + public static string LogTabWindow_OnThrowTestExceptionGUIThread_ThisIsATestExceptionThrownByTheGUIThread { + get { + return ResourceManager.GetString("LogTabWindow_OnThrowTestExceptionGUIThread_ThisIsATestExceptionThrownByTheGUIThre" + + "ad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to lines. + /// + public static string LogTabWindow_StatusLineText_lowerCase_Lines { + get { + return ResourceManager.GetString("LogTabWindow_StatusLineText_lowerCase_Lines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line. + /// + public static string LogTabWindow_StatusLineText_UpperCase_Lines { + get { + return ResourceManager.GetString("LogTabWindow_StatusLineText_UpperCase_Lines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is a test exception thrown by an async delegate. + /// + public static string LogTabWindow_ThrowTestException_ThisIsATestExceptionThrownByAnAsyncDelegate { + get { + return ResourceManager.GetString("LogTabWindow_ThrowTestException_ThisIsATestExceptionThrownByAnAsyncDelegate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is a test exception thrown by a background thread. + /// + public static string LogTabWindow_ThrowTestExceptionThread_ThisIsATestExceptionThrownByABackgroundThread { + get { + return ResourceManager.GetString("LogTabWindow_ThrowTestExceptionThread_ThisIsATestExceptionThrownByABackgroundThre" + + "ad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ->E. + /// + public static string LogTabWindow_UI_LogWindow_Title_ExternalStartTool_Suffix { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_Title_ExternalStartTool_Suffix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Clipboard. + /// + public static string LogTabWindow_UI_LogWindow_Title_Text_From_Clipboard { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_Title_Text_From_Clipboard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pasted on {0}. + /// + public static string LogTabWindow_UI_LogWindow_Title_ToolTip_PastedOn { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_Title_ToolTip_PastedOn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to \nColumn restrict. + /// + public static string LogTabWindow_UI_LogWindow_Tooltip_ColumnRestrict { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_Tooltip_ColumnRestrict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter: \"{0}\"{1}{3}. + /// + public static string LogTabWindow_UI_LogWindow_ToolTip_Filter { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_ToolTip_Filter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (Invert match). + /// + public static string LogTabWindow_UI_LogWindow_ToolTip_InvertMatch { + get { + return ResourceManager.GetString("LogTabWindow_UI_LogWindow_ToolTip_InvertMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LogExpert session {0}. + /// + public static string LogTabWindow_UI_Project_Session_Default_Filter { + get { + return ResourceManager.GetString("LogTabWindow_UI_Project_Session_Default_Filter", resourceCulture); + } + } + /// /// Looks up a localized string similar to AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2}. /// @@ -2275,6 +2523,1014 @@ public static System.Drawing.Bitmap Settings { } } + /// + /// Looks up a localized string similar to Settings. + /// + public static string SettingsDialog_Form_Text { + get { + return ResourceManager.GetString("SettingsDialog_Form_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Activate Portable Mode. + /// + public static string SettingsDialog_UI_ActivatePortableMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_ActivatePortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .... + /// + public static string SettingsDialog_UI_Button_Arguments { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_Arguments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change.... + /// + public static string SettingsDialog_UI_Button_ChangeFont { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ChangeFont", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Color.... + /// + public static string SettingsDialog_UI_Button_Color { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_Color", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configure.... + /// + public static string SettingsDialog_UI_Button_ConfigurePlugin { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ConfigurePlugin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string SettingsDialog_UI_Button_Delete { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Icon.... + /// + public static string SettingsDialog_UI_Button_Icon { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_Icon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .... + /// + public static string SettingsDialog_UI_Button_SessionSaveDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_SessionSaveDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Color.... + /// + public static string SettingsDialog_UI_Button_TimespreadColor { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_TimespreadColor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .... + /// + public static string SettingsDialog_UI_Button_Tool { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_Tool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add new. + /// + public static string SettingsDialog_UI_Button_ToolAdd { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ToolAdd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove. + /// + public static string SettingsDialog_UI_Button_ToolDelete { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ToolDelete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Down. + /// + public static string SettingsDialog_UI_Button_ToolDown { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ToolDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Up. + /// + public static string SettingsDialog_UI_Button_ToolUp { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_ToolUp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .... + /// + public static string SettingsDialog_UI_Button_WorkingDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_Button_WorkingDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ask before closing tabs. + /// + public static string SettingsDialog_UI_CheckBox_AskCloseTabs { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_AskCloseTabs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Automatically pick for new files. + /// + public static string SettingsDialog_UI_CheckBox_AutoPick { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_AutoPick", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show column finder. + /// + public static string SettingsDialog_UI_CheckBox_ColumnFinder { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ColumnFinder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set last column width. + /// + public static string SettingsDialog_UI_CheckBox_ColumnSize { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ColumnSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dark Mode (restart required). + /// + public static string SettingsDialog_UI_CheckBox_DarkMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_DarkMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter tail enabled. + /// + public static string SettingsDialog_UI_CheckBox_FilterTail { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_FilterTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Follow tail enabled. + /// + public static string SettingsDialog_UI_CheckBox_FollowTail { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_FollowTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use legacy file reader (slower). + /// + public static string SettingsDialog_UI_CheckBox_LegacyReader { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_LegacyReader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mask has priority before history. + /// + public static string SettingsDialog_UI_CheckBox_MaskPrio { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_MaskPrio", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multi threaded filter. + /// + public static string SettingsDialog_UI_CheckBox_MultiThread { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_MultiThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Re-open last used files. + /// + public static string SettingsDialog_UI_CheckBox_OpenLastFiles { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_OpenLastFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Activate Portable Mode. + /// + public static string SettingsDialog_UI_CheckBox_PortableMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_PortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reverse alpha. + /// + public static string SettingsDialog_UI_CheckBox_ReverseAlpha { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ReverseAlpha", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save and restore filter and filter tabs. + /// + public static string SettingsDialog_UI_CheckBox_SaveFilter { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SaveFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Automatically save persistence files (.lxp). + /// + public static string SettingsDialog_UI_CheckBox_SaveSessions { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SaveSessions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Error Message?. + /// + public static string SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Allow only 1 Instance. + /// + public static string SettingsDialog_UI_CheckBox_SingleInstance { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SingleInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sync filter list enabled. + /// + public static string SettingsDialog_UI_CheckBox_SyncFilter { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SyncFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pipe sysout to tab. + /// + public static string SettingsDialog_UI_CheckBox_Sysout { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_Sysout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show tail state on tabs. + /// + public static string SettingsDialog_UI_CheckBox_TailState { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_TailState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show time spread. + /// + public static string SettingsDialog_UI_CheckBox_TimeSpread { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_TimeSpread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show timestamp control, if supported by columnizer. + /// + public static string SettingsDialog_UI_CheckBox_Timestamp { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_Timestamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Slower but more compatible with strange linefeeds and encodings. + /// + public static string SettingsDialog_UI_CheckBox_ToolTip_LegacyReader { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_LegacyReader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If this mode is activated, the save file will be loaded from the Executable Location. + /// + public static string SettingsDialog_UI_CheckBox_ToolTip_PortableMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_PortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HeaderName. + /// + public static string SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName { + get { + return ResourceManager.GetString("SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Encoding to be used when no BOM header and no persistence data is available.. + /// + public static string SettingsDialog_UI_ComboBox_ToolTip_Encoding { + get { + return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_Encoding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not create / delete marker for Portable Mode: {0}. + /// + public static string SettingsDialog_UI_CouldNotCreatePortableMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_CouldNotCreatePortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Columnizer. + /// + public static string SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer { + get { + return ResourceManager.GetString("SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Highlight group. + /// + public static string SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup { + get { + return ResourceManager.GetString("SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File name mask (RegEx). + /// + public static string SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask { + get { + return ResourceManager.GetString("SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File name mask (RegEx). + /// + public static string SettingsDialog_UI_DataGridViewTextBoxColumn_FileName { + get { + return ResourceManager.GetString("SettingsDialog_UI_DataGridViewTextBoxColumn_FileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deactivate Portable Mode. + /// + public static string SettingsDialog_UI_DeActivatePortableMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_DeActivatePortableMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings could not be imported: {0}. + /// + public static string SettingsDialog_UI_Error_SettingsCouldNotBeImported { + get { + return ResourceManager.GetString("SettingsDialog_UI_Error_SettingsCouldNotBeImported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to @"Settings {0}|All files {1}. + /// + public static string SettingsDialog_UI_Filter_ExportSettings { + get { + return ResourceManager.GetString("SettingsDialog_UI_Filter_ExportSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose folder for LogExpert's session files. + /// + public static string SettingsDialog_UI_FolderBrowser_SessionSaveDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_SessionSaveDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select a working directory. + /// + public static string SettingsDialog_UI_FolderBrowser_WorkingDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_WorkingDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CPU and stuff. + /// + public static string SettingsDialog_UI_GroupBox_CPUAndStuff { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_CPUAndStuff", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default filename pattern. + /// + public static string SettingsDialog_UI_GroupBox_DefaultFilenamePattern { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_DefaultFilenamePattern", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Defaults. + /// + public static string SettingsDialog_UI_GroupBox_Defaults { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Defaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Display mode. + /// + public static string SettingsDialog_UI_GroupBox_DisplayMode { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_DisplayMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Font. + /// + public static string SettingsDialog_UI_GroupBox_Font { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Font", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line buffer usage. + /// + public static string SettingsDialog_UI_GroupBox_LineBufferUsage { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_LineBufferUsage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Misc. + /// + public static string SettingsDialog_UI_GroupBox_Misc { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Misc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mouse Drag Default. + /// + public static string SettingsDialog_UI_GroupBox_MouseDragDefault { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_MouseDragDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Persistence file location. + /// + public static string SettingsDialog_UI_GroupBox_PersistenceFileLocation { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_PersistenceFileLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Plugins. + /// + public static string SettingsDialog_UI_GroupBox_Plugins { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Plugins", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings. + /// + public static string SettingsDialog_UI_GroupBox_Settings { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Settings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time spread display. + /// + public static string SettingsDialog_UI_GroupBox_TimeSpreadDisplay { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_TimeSpreadDisplay", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timestamp navigation control. + /// + public static string SettingsDialog_UI_GroupBox_TimestampNavigationControl { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_TimestampNavigationControl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tool settings. + /// + public static string SettingsDialog_UI_GroupBox_ToolSettings { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_ToolSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When opening multiple files.... + /// + public static string SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles { + get { + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Arguments:. + /// + public static string SettingsDialog_UI_Label_Arguments { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Arguments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default encoding. + /// + public static string SettingsDialog_UI_Label_DefaultEncoding { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_DefaultEncoding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File polling interval (ms):. + /// + public static string SettingsDialog_UI_Label_FilePollingInterval { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_FilePollingInterval", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Font. + /// + public static string SettingsDialog_UI_Label_Font { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Font", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa.";. + /// + public static string SettingsDialog_UI_Label_HintMultiFile { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_HintMultiFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changes will take effect on next file load. + /// + public static string SettingsDialog_UI_Label_Info { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Info", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lines/block. + /// + public static string SettingsDialog_UI_Label_LinesPerBlock { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_LinesPerBlock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Max days:. + /// + public static string SettingsDialog_UI_Label_MaxDays { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_MaxDays", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum filter entries. + /// + public static string SettingsDialog_UI_Label_MaximumFilterEntries { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumFilterEntries", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum filter entries displayed. + /// + public static string SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum Line Length (restart required). + /// + public static string SettingsDialog_UI_Label_MaximumLineLengthRestartRequired { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumLineLengthRestartRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file.. + /// + public static string SettingsDialog_UI_Label_NoteMultifile { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_NoteMultifile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number of blocks. + /// + public static string SettingsDialog_UI_Label_NumberOfBlocks { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_NumberOfBlocks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pattern:. + /// + public static string SettingsDialog_UI_Label_Pattern { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Pattern", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to sessionSaveOwnDirLabel. + /// + public static string SettingsDialog_UI_Label_SessionSaveOwnDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_SessionSaveOwnDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Program:. + /// + public static string SettingsDialog_UI_Label_Tool { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Tool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Columnizer for output:. + /// + public static string SettingsDialog_UI_Label_ToolColumnizerForOutput { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_ToolColumnizerForOutput", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name:. + /// + public static string SettingsDialog_UI_Label_ToolName { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_ToolName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can configure as many tools as you want. \r\nChecked tools will appear in the icon bar. All other tools are available in the tools menu.. + /// + public static string SettingsDialog_UI_Label_ToolsDescription { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_ToolsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ! Changing the Maximum Line Length can impact performance and is not recommended !. + /// + public static string SettingsDialog_UI_Label_WarningMaximumLineLength { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_WarningMaximumLineLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Working dir:. + /// + public static string SettingsDialog_UI_Label_WorkingDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_WorkingDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ask what to do. + /// + public static string SettingsDialog_UI_RadioButton_AskWhatToDo { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_AskWhatToDo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Horizontal. + /// + public static string SettingsDialog_UI_RadioButton_HorizMouseDrag { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_HorizMouseDrag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line view. + /// + public static string SettingsDialog_UI_RadioButton_LineView { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_LineView", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load every file into a separate tab. + /// + public static string SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Application startup directory. + /// + public static string SettingsDialog_UI_RadioButton_SessionApplicationStartupDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionApplicationStartupDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Same directory as log file. + /// + public static string SettingsDialog_UI_RadioButton_SessionSameDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSameDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MyDocuments/LogExpert. + /// + public static string SettingsDialog_UI_RadioButton_SessionSaveDocuments { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSaveDocuments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Own directory. + /// + public static string SettingsDialog_UI_RadioButton_SessionSaveOwn { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSaveOwn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time view. + /// + public static string SettingsDialog_UI_RadioButton_TimeView { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_TimeView", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This path is based on the executable and where it has been started from.. + /// + public static string SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Treat all files as one 'MultiFile. + /// + public static string SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vertical. + /// + public static string SettingsDialog_UI_RadioButton_VerticalMouseDrag { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_VerticalMouseDrag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vertical Inverted. + /// + public static string SettingsDialog_UI_RadioButton_VerticalMouseDragInverted { + get { + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_VerticalMouseDragInverted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings imported. + /// + public static string SettingsDialog_UI_SettingsImported { + get { + return ResourceManager.GetString("SettingsDialog_UI_SettingsImported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Columnizers. + /// + public static string SettingsDialog_UI_TabPage_Columnizers { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_Columnizers", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to External Tools. + /// + public static string SettingsDialog_UI_TabPage_ExternalTools { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_ExternalTools", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Highlight. + /// + public static string SettingsDialog_UI_TabPage_Highlight { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_Highlight", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memory/CPU. + /// + public static string SettingsDialog_UI_TabPage_Memory { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_Memory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MultiFile. + /// + public static string SettingsDialog_UI_TabPage_MultiFile { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_MultiFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Plugins. + /// + public static string SettingsDialog_UI_TabPage_Plugins { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_Plugins", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Persistence. + /// + public static string SettingsDialog_UI_TabPage_Sessions { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_Sessions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timestamp features. + /// + public static string SettingsDialog_UI_TabPage_TimestampFeatures { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_TimestampFeatures", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to View settings. + /// + public static string SettingsDialog_UI_TabPage_ViewSettings { + get { + return ResourceManager.GetString("SettingsDialog_UI_TabPage_ViewSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Export Settings to file. + /// + public static string SettingsDialog_UI_Title_ExportSettings { + get { + return ResourceManager.GetString("SettingsDialog_UI_Title_ExportSettings", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index d15cb1cd..4bd554cc 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -862,4 +862,73 @@ Fehler während des Ladens der Lesezeichen {0} + + RegEx-Fehler während der Suche eines Columnizers: {0} + + + (Invertiere Match) + + + \nSpalten restriktion + + + Filter: \"{0}\"{1}{3} + + + Zwischenablage + + + Eingfügt am {0} + + + Encoding {0} ist nicht valide + + + Unzureichende Rechte {0}: {1} + + + Fehler während {0} value {1}, min {2}, max {3}, visible {4}: {5} + + + linien + + + Linien + + + Die Einstellungen haben sich geändert + + + Starten eines externen Tools mit sysout Redirektion: {0} {1} + + + Starten eines externen Tools: {0} {1} + + + ->E + + + Das ist eine Test Fehlermeldung, geworfen durch einen Async Delegate + + + Das ist eine Test Fehlermeldung, geworfen durch einen Hintergrund Thread + + + Layoutdaten besitz ein nicht existierendes LogWindow für {0} + + + Über Logexpert etwas ziehen. Formate: + + + Fallengelassene Formate: + + + Ein SyncModeChanged Event erhalten während Disposed wurde. Event wird Ignoriert. + + + LogExpert Session {0} + + + Das ist eine Test Fehlermeldung, geworfen durch den GUI Thread + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index b5c05d38..adb8f098 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -865,4 +865,421 @@ Search string for the filter + + RegEx-error while finding columnizer: {0} + + + (Invert match) + + + \nColumn restrict + + + Filter: \"{0}\"{1}{3} + + + Clipboard + + + Pasted on {0} + + + Encoding {0} is not a valid encoding + + + Insufficient rights {0}: {1} + + + Error during {0} value {1}, min {2}, max {3}, visible {4}: {5} + + + lines + + + Line + + + The preferences have changed + + + Starting external tool with sysout redirection: {0} {1} + + + Starting external tool: {0} {1} + + + ->E + + + This is a test exception thrown by an async delegate + + + This is a test exception thrown by a background thread + + + Layout data contains non-existing LogWindow for {0} + + + Dragging something over LogExpert. Formats: + + + Dropped formats: + + + Received SyncModeChanged event while disposing. Event ignored. + + + LogExpert session {0} + + + This is a test exception thrown by the GUI thread + + + ! Changing the Maximum Line Length can impact performance and is not recommended ! + + + Maximum Line Length (restart required) + + + Maximum filter entries displayed + + + Maximum filter entries + + + Default encoding + + + Font + + + You can configure as many tools as you want. \r\nChecked tools will appear in the icon bar. All other tools are available in the tools menu. + + + Working dir: + + + Name: + + + Columnizer for output: + + + Program: + + + Arguments: + + + Max days: + + + Pattern: + + + Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa."; + + + Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file. + + + sessionSaveOwnDirLabel + + + File polling interval (ms): + + + Changes will take effect on next file load + + + Number of blocks + + + Lines/block + + + Color... + + + Change... + + + Color... + + + Remove + + + Add new + + + Down + + + Up + + + ... + + + Icon... + + + ... + + + ... + + + Delete + + + Configure... + + + ... + + + Cancel + + + OK + + + Export... + + + Import... + + + Misc + + + Defaults + + + Font + + + Time spread display + + + Display mode + + + Timestamp navigation control + + + Mouse Drag Default + + + Tool settings + + + Default filename pattern + + + When opening multiple files... + + + Plugins + + + Settings + + + Persistence file location + + + CPU and stuff + + + Line buffer usage + + + Show Error Message? + + + Set last column width + + + Show tail state on tabs + + + Re-open last used files + + + Allow only 1 Instance + + + Ask before closing tabs + + + Dark Mode (restart required) + + + Follow tail enabled + + + Show column finder + + + Sync filter list enabled + + + Filter tail enabled + + + Reverse alpha + + + Show time spread + + + Show timestamp control, if supported by columnizer + + + Pipe sysout to tab + + + Automatically pick for new files + + + Mask has priority before history + + + Activate Portable Mode + + + Save and restore filter and filter tabs + + + Automatically save persistence files (.lxp) + + + Use legacy file reader (slower) + + + Multi threaded filter + + + View settings + + + Timestamp features + + + External Tools + + + Columnizers + + + Highlight + + + MultiFile + + + Plugins + + + Persistence + + + Memory/CPU + + + Line view + + + Time view + + + Vertical Inverted + + + Horizontal + + + Vertical + + + Ask what to do + + + Treat all files as one 'MultiFile + + + Load every file into a separate tab + + + Own directory + + + MyDocuments/LogExpert + + + Same directory as log file + + + Application startup directory + + + This path is based on the executable and where it has been started from. + + + File name mask (RegEx) + + + File name mask (RegEx) + + + Columnizer + + + Highlight group + + + Encoding to be used when no BOM header and no persistence data is available. + + + If this mode is activated, the save file will be loaded from the Executable Location + + + Slower but more compatible with strange linefeeds and encodings + + + Settings + + + Select a working directory + + + HeaderName + + + Choose folder for LogExpert's session files + + + Activate Portable Mode + + + Deactivate Portable Mode + + + Could not create / delete marker for Portable Mode: {0} + + + Export Settings to file + + + @"Settings {0}|All files {1} + + + Settings could not be imported: {0} + + + Settings imported + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index f2a9f25a..0f6af15f 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -61,7 +61,7 @@ internal partial class LogWindow : DockContent, ILogPaintContextUI, ILogView, IL private readonly IList _filterPipeList = []; private readonly Dictionary _freezeStateMap = []; - private readonly GuiStateArgs _guiStateArgs = new(); + private readonly GuiStateEventArgs _guiStateArgs = new(); private readonly List _lineHashList = []; @@ -292,7 +292,7 @@ public LogWindow (LogTabWindow.LogTabWindow parent, string fileName, bool isTemp public event EventHandler StatusLineEvent; - public event EventHandler GuiStateUpdate; + public event EventHandler GuiStateUpdate; public event TailFollowedEventHandler TailFollowed; @@ -686,7 +686,7 @@ protected void OnStatusLine (StatusLineEventArgs e) StatusLineEvent?.Invoke(this, e); } - protected void OnGuiState (GuiStateArgs e) + protected void OnGuiState (GuiStateEventArgs e) { GuiStateUpdate?.Invoke(this, e); } diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.Designer.cs b/src/LogExpert.UI/Dialogs/FilterSelectorForm.Designer.cs similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.Designer.cs rename to src/LogExpert.UI/Dialogs/FilterSelectorForm.Designer.cs diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.cs b/src/LogExpert.UI/Dialogs/FilterSelectorForm.cs similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.cs rename to src/LogExpert.UI/Dialogs/FilterSelectorForm.cs diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.resx b/src/LogExpert.UI/Dialogs/FilterSelectorForm.resx similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/FilterSelectorForm.resx rename to src/LogExpert.UI/Dialogs/FilterSelectorForm.resx diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.Designer.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.Designer.cs similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.Designer.cs rename to src/LogExpert.UI/Dialogs/HighlightDialog.Designer.cs diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.cs rename to src/LogExpert.UI/Dialogs/HighlightDialog.cs diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.resx b/src/LogExpert.UI/Dialogs/HighlightDialog.resx similarity index 100% rename from src/LogExpert.UI/Dialogs/LogTabWindow/HighlightDialog.resx rename to src/LogExpert.UI/Dialogs/HighlightDialog.resx diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index d438403b..43e78b3f 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -141,10 +141,11 @@ public LogTabWindow (string[] fileNames, int instanceNumber, bool showInstanceNu _tabStringFormat.LineAlignment = StringAlignment.Center; _tabStringFormat.Alignment = StringAlignment.Near; - ToolStripControlHost host = new(checkBoxFollowTail); - - host.Padding = new Padding(20, 0, 0, 0); - host.BackColor = Color.FromKnownColor(KnownColor.Transparent); + ToolStripControlHost host = new(checkBoxFollowTail) + { + Padding = new Padding(20, 0, 0, 0), + BackColor = Color.FromKnownColor(KnownColor.Transparent) + }; var index = buttonToolStrip.Items.IndexOfKey("toolStripButtonTail"); @@ -169,7 +170,7 @@ public LogTabWindow (string[] fileNames, int instanceNumber, bool showInstanceNu // get a list of resource names from the manifest var resNames = a.GetManifestResourceNames(); - Bitmap bmp = Resources.Deceased; + var bmp = Resources.Deceased; _deadIcon = Icon.FromHandle(bmp.GetHicon()); bmp.Dispose(); Closing += OnLogTabWindowClosing; @@ -236,7 +237,7 @@ internal HighlightGroup FindHighlightGroup (string groupName) { lock (HighlightGroupList) { - foreach (HighlightGroup group in HighlightGroupList) + foreach (var group in HighlightGroupList) { if (group.GroupName.Equals(groupName, StringComparison.Ordinal)) { @@ -297,12 +298,10 @@ public LogWindow.LogWindow AddFilterTab (FilterPipe pipe, string title, ILogLine { ToolTip tip = new(components); - tip.SetToolTip(logWin, - "Filter: \"" + pipe.FilterParams.SearchText + "\"" + - (pipe.FilterParams.IsInvert ? " (Invert match)" : "") + - (pipe.FilterParams.ColumnRestrict ? "\nColumn restrict" : "") - ); - + //Resources.LogTabWindow_UI_LogWindow_ToolTip_Filter + var isInvertText = pipe.FilterParams.IsInvert ? Resources.LogTabWindow_UI_LogWindow_ToolTip_InvertMatch : string.Empty; + var isColumnRestrictText = pipe.FilterParams.ColumnRestrict ? Resources.LogTabWindow_UI_LogWindow_Tooltip_ColumnRestrict : string.Empty; + tip.SetToolTip(logWin, string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_UI_LogWindow_ToolTip_Filter, pipe.FilterParams.SearchText, isInvertText, isColumnRestrictText)); tip.AutomaticDelay = 10; tip.AutoPopDelay = 5000; var data = logWin.Tag as LogWindowData; @@ -386,7 +385,7 @@ public LogWindow.LogWindow AddFileTab (string givenFileName, bool isTempFile, st } // this.BeginInvoke(new LoadFileDelegate(logWindow.LoadFile), new object[] { logFileName, encoding }); - Task.Run(() => logWindow.LoadFile(logFileName, encodingOptions)); + _ = Task.Run(() => logWindow.LoadFile(logFileName, encodingOptions)); return logWindow; } @@ -404,7 +403,7 @@ public LogWindow.LogWindow AddMultiFileTab (string[] fileNames) multiFileEnabledStripMenuItem.Checked = true; EncodingOptions encodingOptions = new(); FillDefaultEncodingFromSettings(encodingOptions); - BeginInvoke(new LoadMultiFilesDelegate(logWindow.LoadFilesAsMulti), fileNames, encodingOptions); + _ = BeginInvoke(new LoadMultiFilesDelegate(logWindow.LoadFilesAsMulti), fileNames, encodingOptions); AddToFileHistory(fileNames[0]); return logWindow; } @@ -412,7 +411,7 @@ public LogWindow.LogWindow AddMultiFileTab (string[] fileNames) [SupportedOSPlatform("windows")] public void LoadFiles (string[] fileNames) { - Invoke(new AddFileTabsDelegate(AddFileTabs), [fileNames]); + _ = Invoke(new AddFileTabsDelegate(AddFileTabs), [fileNames]); } [SupportedOSPlatform("windows")] @@ -450,7 +449,7 @@ public ILogLineColumnizer GetColumnizerHistoryEntry (string fileName) } } - ConfigManager.Settings.ColumnizerHistoryList.Remove(entry); // no valid name -> remove entry + _ = ConfigManager.Settings.ColumnizerHistoryList.Remove(entry); // no valid name -> remove entry } return null; @@ -520,8 +519,7 @@ public ILogLineColumnizer FindColumnizerByFileMask (string fileName) } catch (ArgumentException e) { - _logger.Error(e, "RegEx-error while finding columnizer: "); - // occurs on invalid regex patterns + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer, e)); } } } @@ -545,8 +543,7 @@ public HighlightGroup FindHighlightGroupByFileMask (string fileName) } catch (ArgumentException e) { - _logger.Error(e, "RegEx-error while finding columnizer: "); - // occurs on invalid regex patterns + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer, e)); } } } @@ -562,17 +559,12 @@ public void SelectTab (ILogWindow logWindow) [SupportedOSPlatform("windows")] public void SetForeground () { - NativeMethods.SetForegroundWindow(Handle); + _ = NativeMethods.SetForegroundWindow(Handle); if (WindowState == FormWindowState.Minimized) { - if (_wasMaximized) - { - WindowState = FormWindowState.Maximized; - } - else - { - WindowState = FormWindowState.Normal; - } + WindowState = _wasMaximized + ? FormWindowState.Maximized + : FormWindowState.Normal; } } @@ -585,19 +577,16 @@ public void FollowTailChanged (LogWindow.LogWindow logWindow, bool isEnabled, bo return; } - if (isEnabled) - { - data.TailState = 0; - } - else - { - data.TailState = offByTrigger ? 2 : 1; - } + data.TailState = isEnabled + ? 0 + : offByTrigger + ? 2 + : 1; if (Preferences.ShowTailState) { var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); } } @@ -646,11 +635,11 @@ private void PasteFromClipboard () writer.Close(); } - var title = "Clipboard"; + var title = Resources.LogTabWindow_UI_LogWindow_Title_Text_From_Clipboard; var logWindow = AddTempFileTab(fileName, title); - if (logWindow.Tag is LogWindowData data) + if (logWindow.Tag is LogWindowData) { - SetTooltipText(logWindow, "Pasted on " + DateTime.Now); + SetTooltipText(logWindow, string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_UI_LogWindow_Title_ToolTip_PastedOn, DateTime.Now)); } } } @@ -743,7 +732,8 @@ private void FillDefaultEncodingFromSettings (EncodingOptions encodingOptions) } catch (ArgumentException) { - _logger.Warn(CultureInfo.InvariantCulture, "Encoding " + ConfigManager.Settings.Preferences.DefaultEncoding + " is not a valid encoding"); + //ConfigManager.Settings.Preferences.DefaultEncoding + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Warn_EncodingIsNotValid, ConfigManager.Settings.Preferences.DefaultEncoding)); encodingOptions.DefaultEncoding = null; } } @@ -756,13 +746,13 @@ private void AddFileTabs (string[] fileNames) { if (!string.IsNullOrEmpty(fileName)) { - if (fileName.EndsWith(".lxj")) + if (fileName.EndsWith(".lxj", StringComparison.OrdinalIgnoreCase)) { LoadProject(fileName, false); } else { - AddFileTab(fileName, false, null, false, null); + _ = AddFileTab(fileName, false, null, false, null); } } } @@ -875,7 +865,7 @@ private LogWindow.LogWindow FindWindowForFile (string fileName) /// private string FindFilenameForSettings (string fileName) { - if (fileName.EndsWith(".lxp")) + if (fileName.EndsWith(".lxp", StringComparison.OrdinalIgnoreCase)) { var persistenceData = Persister.LoadOptionsOnly(fileName); if (persistenceData == null) @@ -915,7 +905,8 @@ private void FillHistoryMenu () foreach (var file in ConfigManager.Settings.FileHistoryList) { ToolStripItem item = new ToolStripMenuItem(file); - strip.Items.Add(item); + _ = strip.Items.Add(item); + } strip.ItemClicked += OnHistoryItemClicked; @@ -928,7 +919,7 @@ private void RemoveLogWindow (LogWindow.LogWindow logWindow) { lock (_logWindowList) { - _logWindowList.Remove(logWindow); + _ = _logWindowList.Remove(logWindow); } DisconnectEventHandlers(logWindow); @@ -944,7 +935,7 @@ private void RemoveAndDisposeLogWindow (LogWindow.LogWindow logWindow, bool dont lock (_logWindowList) { - _logWindowList.Remove(logWindow); + _ = _logWindowList.Remove(logWindow); } logWindow.Close(dontAsk); @@ -981,7 +972,7 @@ private void FillHighlightComboBox () groupsComboBoxHighlightGroups.Items.Clear(); foreach (var group in HighlightGroupList) { - groupsComboBoxHighlightGroups.Items.Add(group.GroupName); + _ = groupsComboBoxHighlightGroups.Items.Add(group.GroupName); if (group.GroupName.Equals(currentGroupName, StringComparison.Ordinal)) { groupsComboBoxHighlightGroups.Text = group.GroupName; @@ -1013,7 +1004,7 @@ private void OpenFileDialog () } catch (SecurityException e) { - _logger.Warn(e, "Insufficient rights for GetFolderPath(): "); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogExpert_Common_Error_InsufficientRights_For_Parameter_ErrorMessage, nameof(Environment.GetFolderPath), e)); // no initial directory if insufficient rights } } @@ -1044,7 +1035,7 @@ private void LoadFiles (string[] names, bool invertLogic) if (names.Length == 1) { - if (names[0].EndsWith(".lxj")) + if (names[0].EndsWith(".lxj", StringComparison.OrdinalIgnoreCase)) { LoadProject(names[0], true); return; @@ -1089,7 +1080,7 @@ private void LoadFiles (string[] names, bool invertLogic) } else { - AddMultiFileTab(names); + _ = AddMultiFileTab(names); } } @@ -1192,7 +1183,7 @@ private void ChangeCurrentLogWindow (LogWindow.LogWindow newLogWindow) mainMenuStrip.Enabled = true; timeshiftToolStripMenuItem.Enabled = false; timeshiftToolStripMenuItem.Checked = false; - timeshiftMenuTextBox.Text = ""; + timeshiftMenuTextBox.Text = string.Empty; timeshiftMenuTextBox.Enabled = false; multiFileToolStripMenuItem.Enabled = false; cellSelectModeToolStripMenuItem.Checked = false; @@ -1222,6 +1213,7 @@ private void DisconnectToolWindows (LogWindow.LogWindow logWindow) DisconnectBookmarkWindow(logWindow); } + //TODO Find out if logwindow is necessary here private void DisconnectBookmarkWindow (LogWindow.LogWindow logWindow) { _bookmarkWindow.SetBookmarkData(null); @@ -1229,7 +1221,7 @@ private void DisconnectBookmarkWindow (LogWindow.LogWindow logWindow) } [SupportedOSPlatform("windows")] - private void GuiStateUpdateWorker (GuiStateArgs e) + private void GuiStateUpdateWorker (GuiStateEventArgs e) { _skipEvents = true; checkBoxFollowTail.Checked = e.FollowTail; @@ -1280,10 +1272,10 @@ private void ProgressBarUpdateWorker (ProgressEventArgs e) } catch (Exception ex) { - _logger.Error(ex, "Error during ProgressBarUpdateWorker value {0}, min {1}, max {2}, visible {3}", e.Value, e.MinValue, e.MaxValue, e.Visible); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogExpert_Common_Error_5Parameters_ErrorDuring0Value1Min2Max3Visible45, e.Value, e.MinValue, e.MaxValue, e.Visible, ex)); } - Invoke(new System.Windows.Forms.MethodInvoker(statusStrip.Refresh)); + _ = Invoke(new System.Windows.Forms.MethodInvoker(statusStrip.Refresh)); } } @@ -1296,15 +1288,15 @@ private void StatusLineEventWorker (StatusLineEventArgs e) //_logger.logDebug("StatusLineEvent: text = " + e.StatusText); labelStatus.Text = e.StatusText; labelStatus.Size = TextRenderer.MeasureText(labelStatus.Text, labelStatus.Font); - labelLines.Text = $" {e.LineCount} lines"; + labelLines.Text = $" {e.LineCount} {Resources.LogTabWindow_StatusLineText_lowerCase_Lines}"; labelLines.Size = TextRenderer.MeasureText(labelLines.Text, labelLines.Font); labelSize.Text = Util.GetFileSizeAsText(e.FileSize); labelSize.Size = TextRenderer.MeasureText(labelSize.Text, labelSize.Font); - labelCurrentLine.Text = $"Line: {e.CurrentLineNum}"; + labelCurrentLine.Text = $"{Resources.LogTabWindow_StatusLineText_UpperCase_Lines}: {e.CurrentLineNum}"; labelCurrentLine.Size = TextRenderer.MeasureText(labelCurrentLine.Text, labelCurrentLine.Font); if (statusStrip.InvokeRequired) { - statusStrip.BeginInvoke(new System.Windows.Forms.MethodInvoker(statusStrip.Refresh)); + _ = statusStrip.BeginInvoke(new System.Windows.Forms.MethodInvoker(statusStrip.Refresh)); } else { @@ -1383,7 +1375,7 @@ private Icon CreateLedIcon (int level, bool dirty, int tailState, int syncMode) // a managed copy of icon. then the unmanaged win32 handle is destroyed var iconHandle = bmp.GetHicon(); var icon = Icon.FromHandle(iconHandle).Clone() as Icon; - NativeMethods.DestroyIcon(iconHandle); + _ = NativeMethods.DestroyIcon(iconHandle); gfx.Dispose(); bmp.Dispose(); @@ -1414,7 +1406,7 @@ private void CreateIcons () private void FileNotFound (LogWindow.LogWindow logWin) { var data = logWin.Tag as LogWindowData; - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, _deadIcon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, _deadIcon); dragControlDateTime.Visible = false; } @@ -1423,7 +1415,7 @@ private void FileRespawned (LogWindow.LogWindow logWin) { var data = logWin.Tag as LogWindowData; var icon = GetIcon(0, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, icon); } [SupportedOSPlatform("windows")] @@ -1436,7 +1428,7 @@ private void ShowLedPeak (LogWindow.LogWindow logWin) } var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWin, icon); } private int GetLevelFromDiff (int diff) @@ -1488,7 +1480,7 @@ private void LedThreadProc () } var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); } } } @@ -1572,7 +1564,7 @@ private void OpenSettings (int tabToOpen) [SupportedOSPlatform("windows")] private void NotifyWindowsForChangedPrefs (SettingsFlags flags) { - _logger.Info(CultureInfo.InvariantCulture, "The preferences have changed"); + _logger.Info(Resources.LogTabWindow_Logger_Warn_ThePreferencesHaveChanged); ApplySettings(ConfigManager.Settings, flags); var setLastColumnWidth = ConfigManager.Settings.Preferences.SetLastColumnWidth; @@ -1639,7 +1631,7 @@ private void SetTabIcons (Preferences preferences) { var data = logWindow.Tag as LogWindowData; var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), logWindow, icon); } } } @@ -1657,7 +1649,7 @@ private void SetToolIcon (ToolEntry entry, ToolStripItem item) ? ToolStripItemDisplayStyle.ImageAndText : ToolStripItemDisplayStyle.Image; - NativeMethods.DestroyIcon(icon.Handle); + _ = NativeMethods.DestroyIcon(icon.Handle); icon.Dispose(); } @@ -1715,7 +1707,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni { var columnizer = ColumnizerPicker.DecideColumnizerByName(columnizerName, PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers); - _logger.Info(CultureInfo.InvariantCulture, "Starting external tool with sysout redirection: {0} {1}", cmd, args); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection, cmd, args)); startInfo.UseShellExecute = false; startInfo.RedirectStandardOutput = true; //process.OutputDataReceived += pipe.DataReceivedEventHandler; @@ -1726,7 +1718,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni catch (Win32Exception e) { _logger.Error(e); - MessageBox.Show(e.Message); + _ = MessageBox.Show(e.Message); return; } @@ -1735,7 +1727,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni var logWin = AddTempFileTab(pipe.FileName, CurrentLogWindow.IsTempFile ? CurrentLogWindow.TempTitleName - : Util.GetNameFromPath(CurrentLogWindow.FileName) + "->E"); + : $"{Util.GetNameFromPath(CurrentLogWindow.FileName)}{Resources.LogTabWindow_UI_LogWindow_Title_ExternalStartTool_Suffix}"); logWin.ForceColumnizer(columnizer); process.Exited += pipe.ProcessExitedEventHandler; @@ -1743,7 +1735,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni } else { - _logger.Info(CultureInfo.InvariantCulture, "Starting external tool: {0} {1}", cmd, args); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Info_StartingExternalTool, cmd, args)); try { @@ -1753,7 +1745,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni catch (Exception e) { _logger.Error(e); - MessageBox.Show(e.Message); + _ = MessageBox.Show(e.Message); } } } @@ -1764,7 +1756,7 @@ private void CloseAllTabs () IList
closeList = []; lock (_logWindowList) { - foreach (DockContent content in dockPanel.Contents) + foreach (var content in dockPanel.Contents.Cast()) { if (content is LogWindow.LogWindow window) { @@ -1779,7 +1771,7 @@ private void CloseAllTabs () } } - //TODO Reimplement + //TODO Reimplementation needs a new UI Framework since, DockpanelSuite has no easy way to change TabColor private void SetTabColor (LogWindow.LogWindow logWindow, Color color) { //tabPage.BackLowColor = color; @@ -1820,14 +1812,9 @@ private void LoadProject (string projectFileName, bool restoreLayout) { foreach (var fileName in projectData.MemberList) { - if (hasLayoutData) - { - AddFileTabDeferred(fileName, false, null, true, null); - } - else - { - AddFileTab(fileName, false, null, true, null); - } + _ = hasLayoutData + ? AddFileTabDeferred(fileName, false, null, true, null) + : AddFileTab(fileName, false, null, true, null); } if (hasLayoutData && restoreLayout) @@ -1856,8 +1843,8 @@ private void FillToolLauncherBar () 'U', 'V', 'W', 'X', 'Y', 'Z' ]; toolsToolStripMenuItem.DropDownItems.Clear(); - toolsToolStripMenuItem.DropDownItems.Add(configureToolStripMenuItem); - toolsToolStripMenuItem.DropDownItems.Add(configureToolStripSeparator); + _ = toolsToolStripMenuItem.DropDownItems.Add(configureToolStripMenuItem); + _ = toolsToolStripMenuItem.DropDownItems.Add(configureToolStripSeparator); externalToolsToolStrip.Items.Clear(); var num = 0; externalToolsToolStrip.SuspendLayout(); @@ -1872,7 +1859,7 @@ private void FillToolLauncherBar () }; SetToolIcon(tool, button); - externalToolsToolStrip.Items.Add(button); + _ = externalToolsToolStrip.Items.Add(button); } num++; @@ -1882,7 +1869,7 @@ private void FillToolLauncherBar () }; SetToolIcon(tool, menuItem); - toolsToolStripMenuItem.DropDownItems.Add(menuItem); + _ = toolsToolStripMenuItem.DropDownItems.Add(menuItem); } externalToolsToolStrip.ResumeLayout(); @@ -1910,12 +1897,12 @@ private void DumpGCInfo () private void ThrowExceptionFx () { - throw new Exception("This is a test exception thrown by an async delegate"); + throw new Exception(Resources.LogTabWindow_ThrowTestException_ThisIsATestExceptionThrownByAnAsyncDelegate); } private void ThrowExceptionThreadFx () { - throw new Exception("This is a test exception thrown by a background thread"); + throw new Exception(Resources.LogTabWindow_ThrowTestExceptionThread_ThisIsATestExceptionThrownByABackgroundThread); } private string SaveLayout () @@ -1924,7 +1911,7 @@ private string SaveLayout () using StreamReader r = new(memStream); dockPanel.SaveAsXml(memStream, Encoding.UTF8, true); - memStream.Seek(0, SeekOrigin.Begin); + _ = memStream.Seek(0, SeekOrigin.Begin); var resultXml = r.ReadToEnd(); r.Close(); @@ -1940,7 +1927,7 @@ private void RestoreLayout (string layoutXml) w.Write(layoutXml); w.Flush(); - memStream.Seek(0, SeekOrigin.Begin); + _ = memStream.Seek(0, SeekOrigin.Begin); dockPanel.LoadFromXml(memStream, DeserializeDockContent, true); } @@ -1953,7 +1940,7 @@ private IDockContent DeserializeDockContent (string persistString) return _bookmarkWindow; } - if (persistString.StartsWith(WindowTypes.LogWindow.ToString())) + if (persistString.StartsWith(WindowTypes.LogWindow.ToString(), StringComparison.OrdinalIgnoreCase)) { var fileName = persistString[(WindowTypes.LogWindow.ToString().Length + 1)..]; var win = FindWindowForFile(fileName); @@ -1962,7 +1949,7 @@ private IDockContent DeserializeDockContent (string persistString) return win; } - _logger.Warn($"Layout data contains non-existing LogWindow for {fileName}"); + _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogWindowForFileName, fileName)); } return null; @@ -2005,7 +1992,7 @@ private void OnLogTabWindowLoad (object sender, EventArgs e) foreach (var name in tmpList) { - if (string.IsNullOrEmpty(name) == false) + if (!string.IsNullOrEmpty(name)) { AddFileTab(name, false, null, false, null); } @@ -2070,15 +2057,15 @@ private void OnStripMouseUp (object sender, MouseEventArgs e) { if (sender is ToolStripDropDown dropDown) { - AddFileTab(dropDown.Text, false, null, false, null); + _ = AddFileTab(dropDown.Text, false, null, false, null); } } private void OnHistoryItemClicked (object sender, ToolStripItemClickedEventArgs e) { - if (string.IsNullOrEmpty(e.ClickedItem.Text) == false) + if (!string.IsNullOrEmpty(e.ClickedItem.Text)) { - AddFileTab(e.ClickedItem.Text, false, null, false, null); + _ = AddFileTab(e.ClickedItem.Text, false, null, false, null); } } @@ -2128,7 +2115,7 @@ private void OnSelectFilterToolStripMenuItemClick (object sender, EventArgs e) { //logWindow.SetColumnizer(form.SelectedColumnizer); SetColumnizerFx fx = logWindow.ForceColumnizer; - logWindow.Invoke(fx, form.SelectedColumnizer); + _ = logWindow.Invoke(fx, form.SelectedColumnizer); SetColumnizerHistoryEntry(logWindow.FileName, form.SelectedColumnizer); } else @@ -2146,7 +2133,7 @@ private void OnSelectFilterToolStripMenuItemClick (object sender, EventArgs e) if (CurrentLogWindow.CurrentColumnizer.GetType() != form.SelectedColumnizer.GetType()) { SetColumnizerFx fx = CurrentLogWindow.ForceColumnizer; - CurrentLogWindow.Invoke(fx, form.SelectedColumnizer); + _ = CurrentLogWindow.Invoke(fx, form.SelectedColumnizer); SetColumnizerHistoryEntry(CurrentLogWindow.FileName, form.SelectedColumnizer); } @@ -2205,7 +2192,7 @@ private void OnLogTabWindowDragEnter (object sender, DragEventArgs e) { #if DEBUG var formats = e.Data.GetFormats(); - var s = "Dragging something over LogExpert. Formats: "; + var s = Resources.LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFormats; foreach (var format in formats) { s += format; @@ -2233,7 +2220,7 @@ private void OnLogWindowDragDrop (object sender, DragEventArgs e) { #if DEBUG var formats = e.Data.GetFormats(); - var s = "Dropped formats: "; + var s = Resources.LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats; foreach (var format in formats) { s += format; @@ -2276,7 +2263,7 @@ private void OnAboutToolStripMenuItemClick (object sender, EventArgs e) TopMost = TopMost }; - aboutBox.ShowDialog(); + _ = aboutBox.ShowDialog(); } private void OnFilterToolStripMenuItemClick (object sender, EventArgs e) @@ -2292,9 +2279,9 @@ private void OnMultiFileToolStripMenuItemClick (object sender, EventArgs e) } [SupportedOSPlatform("windows")] - private void OnGuiStateUpdate (object sender, GuiStateArgs e) + private void OnGuiStateUpdate (object sender, GuiStateEventArgs e) { - BeginInvoke(GuiStateUpdateWorker, e); + _ = BeginInvoke(GuiStateUpdateWorker, e); } private void OnColumnizerChanged (object sender, ColumnizerEventArgs e) @@ -2319,7 +2306,7 @@ private void OnBookmarkRemoved (object sender, EventArgs e) private void OnProgressBarUpdate (object sender, ProgressEventArgs e) { - Invoke(ProgressBarUpdateWorker, e); + _ = Invoke(ProgressBarUpdateWorker, e); } private void OnStatusLineEvent (object sender, StatusLineEventArgs e) @@ -2413,19 +2400,19 @@ private void OnFileSizeChanged (object sender, LogEventArgs e) data.Dirty = true; } var icon = GetIcon(diff, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); } } } private void OnLogWindowFileNotFound (object sender, EventArgs e) { - Invoke(new FileNotFoundDelegate(FileNotFound), sender); + _ = Invoke(new FileNotFoundDelegate(FileNotFound), sender); } private void OnLogWindowFileRespawned (object sender, EventArgs e) { - Invoke(new FileRespawnedDelegate(FileRespawned), sender); + _ = Invoke(new FileRespawnedDelegate(FileRespawned), sender); } private void OnLogWindowFilterListChanged (object sender, FilterListChangedEventArgs e) @@ -2440,6 +2427,7 @@ private void OnLogWindowFilterListChanged (object sender, FilterListChangedEvent } } } + ConfigManager.Save(SettingsFlags.FilterList); } @@ -2456,6 +2444,7 @@ private void OnTailFollowed (object sender, EventArgs e) { return; } + if (sender.GetType().IsAssignableFrom(typeof(LogWindow.LogWindow))) { if (dockPanel.ActiveContent == sender) @@ -2463,7 +2452,7 @@ private void OnTailFollowed (object sender, EventArgs e) var data = ((LogWindow.LogWindow)sender).Tag as LogWindowData; data.Dirty = false; var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); } } } @@ -2476,11 +2465,11 @@ private void OnLogWindowSyncModeChanged (object sender, SyncModeEventArgs e) var data = ((LogWindow.LogWindow)sender).Tag as LogWindowData; data.SyncMode = e.IsTimeSynced ? 1 : 0; var icon = GetIcon(data.DiffSum, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); } else { - _logger.Warn(CultureInfo.InvariantCulture, "Received SyncModeChanged event while disposing. Event ignored."); + _logger.Warn(Resources.LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventWhileDisposingEventIgnored); } } @@ -2539,7 +2528,7 @@ private void OnReloadToolStripMenuItemClick (object sender, EventArgs e) { var data = CurrentLogWindow.Tag as LogWindowData; var icon = GetIcon(0, data); - BeginInvoke(new SetTabIconDelegate(SetTabIcon), CurrentLogWindow, icon); + _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), CurrentLogWindow, icon); CurrentLogWindow.Reload(); } } @@ -2562,7 +2551,7 @@ private void OnDateTimeDragControlValueDragged (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnDateTimeDragControlValueChanged (object sender, EventArgs e) { - CurrentLogWindow?.ScrollToTimestamp(dragControlDateTime.DateTime, true, true); + _ = CurrentLogWindow?.ScrollToTimestamp(dragControlDateTime.DateTime, true, true); } [SupportedOSPlatform("windows")] @@ -2642,6 +2631,7 @@ private void OnShowHelpToolStripMenuItemClick (object sender, EventArgs e) private void OnHideLineColumnToolStripMenuItemClick (object sender, EventArgs e) { ConfigManager.Settings.HideLineColumn = hideLineColumnToolStripMenuItem.Checked; + lock (_logWindowList) { foreach (var logWin in _logWindowList) @@ -2649,6 +2639,7 @@ private void OnHideLineColumnToolStripMenuItemClick (object sender, EventArgs e) logWin.ShowLineColumn(!ConfigManager.Settings.HideLineColumn); } } + _bookmarkWindow.LineColumnVisible = ConfigManager.Settings.HideLineColumn; } @@ -2741,7 +2732,7 @@ private void OnSaveProjectToolStripMenuItemClick (object sender, EventArgs e) SaveFileDialog dlg = new() { DefaultExt = "lxj", - Filter = @"LogExpert session (*.lxj)|*.lxj" + Filter = string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_UI_Project_Session_Default_Filter, "(*.lxj)|*.lxj") }; if (dlg.ShowDialog() == DialogResult.OK) @@ -2776,7 +2767,7 @@ private void OnLoadProjectToolStripMenuItemClick (object sender, EventArgs e) OpenFileDialog dlg = new() { DefaultExt = "lxj", - Filter = @"LogExpert sessions (*.lxj)|*.lxj" + Filter = string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_UI_Project_Session_Default_Filter, "(*.lxj)|*.lxj") }; if (dlg.ShowDialog() == DialogResult.OK) @@ -2810,7 +2801,7 @@ private void OnFindInExplorerToolStripMenuItemClick (object sender, EventArgs e) explorer.StartInfo.FileName = "explorer.exe"; explorer.StartInfo.Arguments = "/e,/select," + logWindow.Title; explorer.StartInfo.UseShellExecute = false; - explorer.Start(); + _ = explorer.Start(); } private void TruncateFileToolStripMenuItem_Click (object sender, EventArgs e) @@ -2902,13 +2893,13 @@ private void OnConfigureToolStripMenuItemClick (object sender, EventArgs e) private void OnThrowExceptionGUIThreadToolStripMenuItemClick (object sender, EventArgs e) { - throw new Exception("This is a test exception thrown by the GUI thread"); + throw new Exception(Resources.LogTabWindow_OnThrowTestExceptionGUIThread_ThisIsATestExceptionThrownByTheGUIThread); } private void OnThrowExceptionBackgroundThToolStripMenuItemClick (object sender, EventArgs e) { ExceptionFx fx = ThrowExceptionFx; - fx.BeginInvoke(null, null); + _ = fx.BeginInvoke(null, null); } private void OnThrowExceptionBackgroundThreadToolStripMenuItemClick (object sender, EventArgs e) diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs similarity index 97% rename from src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.Designer.cs rename to src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs index b4d5bad8..d51606e8 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.Designer.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.Dialogs; +namespace LogExpert.Dialogs; partial class SettingsDialog { @@ -32,7 +32,7 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsDialog)); tabControlSettings = new System.Windows.Forms.TabControl(); tabPageViewSettings = new System.Windows.Forms.TabPage(); - labelWarningMaximumLineLenght = new System.Windows.Forms.Label(); + labelWarningMaximumLineLength = new System.Windows.Forms.Label(); upDownMaximumLineLength = new System.Windows.Forms.NumericUpDown(); labelMaximumLineLength = new System.Windows.Forms.Label(); upDownMaximumFilterEntriesDisplayed = new System.Windows.Forms.NumericUpDown(); @@ -101,12 +101,12 @@ private void InitializeComponent() checkBoxMaskPrio = new System.Windows.Forms.CheckBox(); buttonDelete = new System.Windows.Forms.Button(); dataGridViewColumnizer = new System.Windows.Forms.DataGridView(); - columnFileMask = new System.Windows.Forms.DataGridViewTextBoxColumn(); - columnColumnizer = new System.Windows.Forms.DataGridViewComboBoxColumn(); + dataGridViewTextBoxColumnFileMask = new System.Windows.Forms.DataGridViewTextBoxColumn(); + dataGridViewComboBoxColumnColumnizer = new System.Windows.Forms.DataGridViewComboBoxColumn(); tabPageHighlightMask = new System.Windows.Forms.TabPage(); dataGridViewHighlightMask = new System.Windows.Forms.DataGridView(); - columnFileName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - columnHighlightGroup = new System.Windows.Forms.DataGridViewComboBoxColumn(); + dataGridViewTextBoxColumnFileName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + dataGridViewComboBoxColumnHighlightGroup = new System.Windows.Forms.DataGridViewComboBoxColumn(); tabPageMultiFile = new System.Windows.Forms.TabPage(); groupBoxDefaultFileNamePattern = new System.Windows.Forms.GroupBox(); labelMaxDays = new System.Windows.Forms.Label(); @@ -154,8 +154,6 @@ private void InitializeComponent() toolTip = new System.Windows.Forms.ToolTip(components); buttonExport = new System.Windows.Forms.Button(); buttonImport = new System.Windows.Forms.Button(); - dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); tabControlSettings.SuspendLayout(); tabPageViewSettings.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)upDownMaximumLineLength).BeginInit(); @@ -214,7 +212,7 @@ private void InitializeComponent() // // tabPageViewSettings // - tabPageViewSettings.Controls.Add(labelWarningMaximumLineLenght); + tabPageViewSettings.Controls.Add(labelWarningMaximumLineLength); tabPageViewSettings.Controls.Add(upDownMaximumLineLength); tabPageViewSettings.Controls.Add(labelMaximumLineLength); tabPageViewSettings.Controls.Add(upDownMaximumFilterEntriesDisplayed); @@ -237,12 +235,12 @@ private void InitializeComponent() // // labelWarningMaximumLineLenght // - labelWarningMaximumLineLenght.AutoSize = true; - labelWarningMaximumLineLenght.Location = new System.Drawing.Point(446, 118); - labelWarningMaximumLineLenght.Name = "labelWarningMaximumLineLenght"; - labelWarningMaximumLineLenght.Size = new System.Drawing.Size(482, 15); - labelWarningMaximumLineLenght.TabIndex = 16; - labelWarningMaximumLineLenght.Text = "! Changing the Maximum Line Length can impact performance and is not recommended !"; + labelWarningMaximumLineLength.AutoSize = true; + labelWarningMaximumLineLength.Location = new System.Drawing.Point(446, 118); + labelWarningMaximumLineLength.Name = "labelWarningMaximumLineLenght"; + labelWarningMaximumLineLength.Size = new System.Drawing.Size(482, 15); + labelWarningMaximumLineLength.TabIndex = 16; + labelWarningMaximumLineLength.Text = "! Changing the Maximum Line Length can impact performance and is not recommended !"; // // upDownMaximumLineLength // @@ -1024,7 +1022,7 @@ private void InitializeComponent() dataGridViewColumnizer.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; dataGridViewColumnizer.BackgroundColor = System.Drawing.SystemColors.ControlLight; dataGridViewColumnizer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewColumnizer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { columnFileMask, columnColumnizer }); + dataGridViewColumnizer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumnFileMask, dataGridViewComboBoxColumnColumnizer }); dataGridViewColumnizer.Dock = System.Windows.Forms.DockStyle.Top; dataGridViewColumnizer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; dataGridViewColumnizer.Location = new System.Drawing.Point(4, 5); @@ -1037,15 +1035,15 @@ private void InitializeComponent() // // columnFileMask // - columnFileMask.HeaderText = "File name mask (RegEx)"; - columnFileMask.MinimumWidth = 40; - columnFileMask.Name = "columnFileMask"; + dataGridViewTextBoxColumnFileMask.HeaderText = "File name mask (RegEx)"; + dataGridViewTextBoxColumnFileMask.MinimumWidth = 40; + dataGridViewTextBoxColumnFileMask.Name = "columnFileMask"; // // columnColumnizer // - columnColumnizer.HeaderText = "Columnizer"; - columnColumnizer.MinimumWidth = 230; - columnColumnizer.Name = "columnColumnizer"; + dataGridViewComboBoxColumnColumnizer.HeaderText = "Columnizer"; + dataGridViewComboBoxColumnColumnizer.MinimumWidth = 230; + dataGridViewComboBoxColumnColumnizer.Name = "columnColumnizer"; // // tabPageHighlightMask // @@ -1063,7 +1061,7 @@ private void InitializeComponent() // dataGridViewHighlightMask.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; dataGridViewHighlightMask.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewHighlightMask.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { columnFileName, columnHighlightGroup }); + dataGridViewHighlightMask.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumnFileName, dataGridViewComboBoxColumnHighlightGroup }); dataGridViewHighlightMask.Dock = System.Windows.Forms.DockStyle.Fill; dataGridViewHighlightMask.Location = new System.Drawing.Point(4, 5); dataGridViewHighlightMask.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); @@ -1074,15 +1072,15 @@ private void InitializeComponent() // // columnFileName // - columnFileName.HeaderText = "File name mask (RegEx)"; - columnFileName.MinimumWidth = 40; - columnFileName.Name = "columnFileName"; + dataGridViewTextBoxColumnFileName.HeaderText = "File name mask (RegEx)"; + dataGridViewTextBoxColumnFileName.MinimumWidth = 40; + dataGridViewTextBoxColumnFileName.Name = "columnFileName"; // // columnHighlightGroup // - columnHighlightGroup.HeaderText = "Highlight group"; - columnHighlightGroup.MinimumWidth = 50; - columnHighlightGroup.Name = "columnHighlightGroup"; + dataGridViewComboBoxColumnHighlightGroup.HeaderText = "Highlight group"; + dataGridViewComboBoxColumnHighlightGroup.MinimumWidth = 50; + dataGridViewComboBoxColumnHighlightGroup.Name = "columnHighlightGroup"; // // tabPageMultiFile // @@ -1170,7 +1168,7 @@ private void InitializeComponent() labelNoteMultiFile.Name = "labelNoteMultiFile"; labelNoteMultiFile.Size = new System.Drawing.Size(705, 82); labelNoteMultiFile.TabIndex = 1; - labelNoteMultiFile.Text = resources.GetString("labelNoteMultiFile.Text"); + labelNoteMultiFile.Text = "Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (, .1, .2, ...). Simply choose 'MultiFile' from the File menu after loading the first file."; // // groupBoxWhenOpeningMultiFile // @@ -1624,20 +1622,6 @@ private void InitializeComponent() buttonImport.UseVisualStyleBackColor = true; buttonImport.Click += OnBtnImportClick; // - // dataGridViewTextBoxColumn1 - // - dataGridViewTextBoxColumn1.HeaderText = "File name mask (RegEx)"; - dataGridViewTextBoxColumn1.MinimumWidth = 40; - dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - dataGridViewTextBoxColumn1.Width = 99; - // - // dataGridViewTextBoxColumn2 - // - dataGridViewTextBoxColumn2.HeaderText = "File name mask (RegEx)"; - dataGridViewTextBoxColumn2.MinimumWidth = 40; - dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - dataGridViewTextBoxColumn2.Width = 259; - // // SettingsDialog // AcceptButton = buttonOk; @@ -1743,10 +1727,9 @@ private void InitializeComponent() private System.Windows.Forms.Button buttonArguments; private System.Windows.Forms.TabPage tabPageColumnizers; private System.Windows.Forms.DataGridView dataGridViewColumnizer; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.Button buttonDelete; - private System.Windows.Forms.DataGridViewTextBoxColumn columnFileMask; - private System.Windows.Forms.DataGridViewComboBoxColumn columnColumnizer; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumnFileMask; + private System.Windows.Forms.DataGridViewComboBoxColumn dataGridViewComboBoxColumnColumnizer; private System.Windows.Forms.CheckBox checkBoxSysout; private System.Windows.Forms.CheckBox checkBoxMaskPrio; private System.Windows.Forms.GroupBox groupBoxMisc; @@ -1798,9 +1781,8 @@ private void InitializeComponent() private System.Windows.Forms.Label labelInfo; private System.Windows.Forms.TabPage tabPageHighlightMask; private System.Windows.Forms.DataGridView dataGridViewHighlightMask; - private System.Windows.Forms.DataGridViewTextBoxColumn columnFileName; - private System.Windows.Forms.DataGridViewComboBoxColumn columnHighlightGroup; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumnFileName; + private System.Windows.Forms.DataGridViewComboBoxColumn dataGridViewComboBoxColumnHighlightGroup; private System.Windows.Forms.CheckBox checkBoxMultiThread; private System.Windows.Forms.Label labelFilePollingInterval; private System.Windows.Forms.NumericUpDown upDownPollingInterval; @@ -1841,5 +1823,5 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxDarkMode; private System.Windows.Forms.NumericUpDown upDownMaximumLineLength; private System.Windows.Forms.Label labelMaximumLineLength; - private System.Windows.Forms.Label labelWarningMaximumLineLenght; + private System.Windows.Forms.Label labelWarningMaximumLineLength; } diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs similarity index 67% rename from src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.cs rename to src/LogExpert.UI/Dialogs/SettingsDialog.cs index bdf5df26..3752e612 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Runtime.Versioning; using System.Text; @@ -34,6 +35,7 @@ private SettingsDialog (Preferences prefs, LogTabWindow logTabWin) Preferences = prefs; _logTabWin = logTabWin; //TODO: uses only HighlightGroupList. Can we pass IList instead? InitializeComponent(); + LoadResources(); AutoScaleDimensions = new SizeF(96F, 96F); AutoScaleMode = AutoScaleMode.Dpi; @@ -58,6 +60,118 @@ public SettingsDialog (Preferences prefs, LogTabWindow logTabWin, int tabToOpen, #region Private Methods + private void LoadResources () + { + labelWarningMaximumLineLength.Text = Resources.SettingsDialog_UI_Label_WarningMaximumLineLength; + labelMaximumLineLength.Text = Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired; + labelMaximumFilterEntriesDisplayed.Text = Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed; + labelMaximumFilterEntries.Text = Resources.SettingsDialog_UI_Label_MaximumFilterEntries; + labelDefaultEncoding.Text = Resources.SettingsDialog_UI_Label_DefaultEncoding; + groupBoxMisc.Text = Resources.SettingsDialog_UI_GroupBox_Misc; + checkBoxShowErrorMessageOnlyOneInstance.Text = Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance; + checkBoxColumnSize.Text = Resources.SettingsDialog_UI_CheckBox_ColumnSize; + buttonTailColor.Text = Resources.SettingsDialog_UI_Button_Color; + checkBoxTailState.Text = Resources.SettingsDialog_UI_CheckBox_TailState; + checkBoxOpenLastFiles.Text = Resources.SettingsDialog_UI_CheckBox_OpenLastFiles; + checkBoxSingleInstance.Text = Resources.SettingsDialog_UI_CheckBox_SingleInstance; + checkBoxAskCloseTabs.Text = Resources.SettingsDialog_UI_CheckBox_AskCloseTabs; + groupBoxDefaults.Text = Resources.SettingsDialog_UI_GroupBox_Defaults; + checkBoxDarkMode.Text = Resources.SettingsDialog_UI_CheckBox_DarkMode; + checkBoxFollowTail.Text = Resources.SettingsDialog_UI_CheckBox_FollowTail; + checkBoxColumnFinder.Text = Resources.SettingsDialog_UI_CheckBox_ColumnFinder; + checkBoxSyncFilter.Text = Resources.SettingsDialog_UI_CheckBox_SyncFilter; + checkBoxFilterTail.Text = Resources.SettingsDialog_UI_CheckBox_FilterTail; + groupBoxFont.Text = Resources.SettingsDialog_UI_GroupBox_Font; + buttonChangeFont.Text = Resources.SettingsDialog_UI_Button_ChangeFont; + labelFont.Text = Resources.SettingsDialog_UI_Label_Font; + tabPageViewSettings.Text = Resources.SettingsDialog_UI_TabPage_ViewSettings; + tabPageTimeStampFeatures.Text = Resources.SettingsDialog_UI_TabPage_TimestampFeatures; + groupBoxTimeSpreadDisplay.Text = Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay; + groupBoxDisplayMode.Text = Resources.SettingsDialog_UI_GroupBox_DisplayMode; + radioButtonLineView.Text = Resources.SettingsDialog_UI_RadioButton_LineView; + radioButtonTimeView.Text = Resources.SettingsDialog_UI_RadioButton_TimeView; + checkBoxReverseAlpha.Text = Resources.SettingsDialog_UI_CheckBox_ReverseAlpha; + buttonTimespreadColor.Text = Resources.SettingsDialog_UI_Button_TimespreadColor; + checkBoxTimeSpread.Text = Resources.SettingsDialog_UI_CheckBox_TimeSpread; + groupBoxTimeStampNavigationControl.Text = Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl; + checkBoxTimestamp.Text = Resources.SettingsDialog_UI_CheckBox_Timestamp; + groupBoxMouseDragDefaults.Text = Resources.SettingsDialog_UI_GroupBox_MouseDragDefault; + radioButtonVerticalMouseDragInverted.Text = Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted; + radioButtonHorizMouseDrag.Text = Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag; + radioButtonVerticalMouseDrag.Text = Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag; + tabPageExternalTools.Text = Resources.SettingsDialog_UI_TabPage_ExternalTools; + labelToolsDescription.Text = Resources.SettingsDialog_UI_Label_ToolsDescription; + buttonToolDelete.Text = Resources.SettingsDialog_UI_Button_ToolDelete; + buttonToolAdd.Text = Resources.SettingsDialog_UI_Button_ToolAdd; + buttonToolDown.Text = Resources.SettingsDialog_UI_Button_ToolDown; + buttonToolUp.Text = Resources.SettingsDialog_UI_Button_ToolUp; + groupBoxToolSettings.Text = Resources.SettingsDialog_UI_GroupBox_ToolSettings; + labelWorkingDir.Text = Resources.SettingsDialog_UI_Label_WorkingDir; + buttonWorkingDir.Text = Resources.SettingsDialog_UI_Button_WorkingDir; + buttonIcon.Text = Resources.SettingsDialog_UI_Button_Icon; + labelToolName.Text = Resources.SettingsDialog_UI_Label_ToolName; + labelToolColumnizerForOutput.Text = Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput; + checkBoxSysout.Text = Resources.SettingsDialog_UI_CheckBox_Sysout; + buttonArguments.Text = Resources.SettingsDialog_UI_Button_Arguments; + labelTool.Text = Resources.SettingsDialog_UI_Label_Tool; + buttonTool.Text = Resources.SettingsDialog_UI_Button_Tool; + labelArguments.Text = Resources.SettingsDialog_UI_Label_Arguments; + tabPageColumnizers.Text = Resources.SettingsDialog_UI_TabPage_Columnizers; + checkBoxAutoPick.Text = Resources.SettingsDialog_UI_CheckBox_AutoPick; + checkBoxMaskPrio.Text = Resources.SettingsDialog_UI_CheckBox_MaskPrio; + buttonDelete.Text = Resources.SettingsDialog_UI_Button_Delete; + dataGridViewTextBoxColumnFileMask.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask; + dataGridViewComboBoxColumnColumnizer.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer; + tabPageHighlightMask.Text = Resources.SettingsDialog_UI_TabPage_Highlight; + dataGridViewTextBoxColumnFileName.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileName; + dataGridViewComboBoxColumnHighlightGroup.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup; + tabPageMultiFile.Text = Resources.SettingsDialog_UI_TabPage_MultiFile; + groupBoxDefaultFileNamePattern.Text = Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern; + labelMaxDays.Text = Resources.SettingsDialog_UI_Label_MaxDays; + labelPattern.Text = Resources.SettingsDialog_UI_Label_Pattern; + labelHintMultiFile.Text = Resources.SettingsDialog_UI_Label_HintMultiFile; + labelNoteMultiFile.Text = Resources.SettingsDialog_UI_Label_NoteMultifile; + groupBoxWhenOpeningMultiFile.Text = Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles; + radioButtonAskWhatToDo.Text = Resources.SettingsDialog_UI_RadioButton_AskWhatToDo; + radioButtonTreatAllFilesAsOneMultifile.Text = Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile; + radioButtonLoadEveryFileIntoSeperatedTab.Text = Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab; + tabPagePlugins.Text = Resources.SettingsDialog_UI_TabPage_Plugins; + groupBoxPlugins.Text = Resources.SettingsDialog_UI_GroupBox_Plugins; + groupBoxSettings.Text = Resources.SettingsDialog_UI_GroupBox_Settings; + buttonConfigPlugin.Text = Resources.SettingsDialog_UI_Button_ConfigurePlugin; + tabPageSessions.Text = Resources.SettingsDialog_UI_TabPage_Sessions; + checkBoxPortableMode.Text = Resources.SettingsDialog_UI_CheckBox_PortableMode; + checkBoxSaveFilter.Text = Resources.SettingsDialog_UI_CheckBox_SaveFilter; + groupBoxPersistantFileLocation.Text = Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation; + labelSessionSaveOwnDir.Text = Resources.SettingsDialog_UI_Label_SessionSaveOwnDir; + buttonSessionSaveDir.Text = Resources.SettingsDialog_UI_Button_SessionSaveDir; + radioButtonSessionSaveOwn.Text = Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn; + radioButtonsessionSaveDocuments.Text = Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments; + radioButtonSessionSameDir.Text = Resources.SettingsDialog_UI_RadioButton_SessionSameDir; + radioButtonSessionApplicationStartupDir.Text = Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir; + checkBoxSaveSessions.Text = Resources.SettingsDialog_UI_CheckBox_SaveSessions; + tabPageMemory.Text = Resources.SettingsDialog_UI_TabPage_Memory; + groupBoxCPUAndStuff.Text = Resources.SettingsDialog_UI_GroupBox_CPUAndStuff; + checkBoxLegacyReader.Text = Resources.SettingsDialog_UI_CheckBox_LegacyReader; + checkBoxMultiThread.Text = Resources.SettingsDialog_UI_CheckBox_MultiThread; + labelFilePollingInterval.Text = Resources.SettingsDialog_UI_Label_FilePollingInterval; + groupBoxLineBufferUsage.Text = Resources.SettingsDialog_UI_GroupBox_LineBufferUsage; + labelInfo.Text = Resources.SettingsDialog_UI_Label_Info; + labelNumberOfBlocks.Text = Resources.SettingsDialog_UI_Label_NumberOfBlocks; + labelLinesPerBlock.Text = Resources.SettingsDialog_UI_Label_LinesPerBlock; + buttonCancel.Text = Resources.LogExpert_Common_UI_Button_Cancel; + buttonOk.Text = Resources.LogExpert_Common_UI_Button_OK; + buttonExport.Text = Resources.LogExpert_Common_UI_Button_Export; + buttonImport.Text = Resources.LogExpert_Common_UI_Button_Import; + Text = Resources.SettingsDialog_Form_Text; + + // ToolTips + toolTip.SetToolTip(comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_Encoding); + toolTip.SetToolTip(checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_PortableMode); + toolTip.SetToolTip(radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir); + toolTip.SetToolTip(checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_LegacyReader); + } + private void FillDialog () { Preferences ??= new Preferences(); @@ -210,10 +324,12 @@ private void SaveMultifileData () private void OnBtnToolClickInternal (TextBox textBox) { - OpenFileDialog dlg = new(); - dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + OpenFileDialog dlg = new() + { + InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + }; - if (string.IsNullOrEmpty(textBox.Text) == false) + if (!string.IsNullOrEmpty(textBox.Text)) { FileInfo info = new(textBox.Text); if (info.Directory != null && info.Directory.Exists) @@ -247,7 +363,7 @@ private void OnBtnWorkingDirClick (TextBox textBox) FolderBrowserDialog dlg = new() { RootFolder = Environment.SpecialFolder.MyComputer, - Description = @"Select a working directory" + Description = Resources.SettingsDialog_UI_FolderBrowser_WorkingDir }; if (!string.IsNullOrEmpty(textBox.Text)) @@ -277,9 +393,9 @@ private void FillColumnizerForToolsList (ComboBox comboBox, string columnizerNam { var selIndex = 0; comboBox.Items.Clear(); - IList columnizers = PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers; + var columnizers = PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers; - foreach (ILogLineColumnizer columnizer in columnizers) + foreach (var columnizer in columnizers) { var index = comboBox.Items.Add(columnizer.GetName()); if (columnizer.GetName().Equals(columnizerName, StringComparison.Ordinal)) @@ -301,35 +417,35 @@ private void FillColumnizerList () var comboColumn = (DataGridViewComboBoxColumn)dataGridViewColumnizer.Columns[1]; comboColumn.Items.Clear(); - var textColumn = (DataGridViewTextBoxColumn)dataGridViewColumnizer.Columns[0]; + //var textColumn = (DataGridViewTextBoxColumn)dataGridViewColumnizer.Columns[0]; - IList columnizers = PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers; + var columnizers = PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers; - foreach (ILogLineColumnizer columnizer in columnizers) + foreach (var columnizer in columnizers) { - comboColumn.Items.Add(columnizer.GetName()); + _ = comboColumn.Items.Add(columnizer.GetName()); } //comboColumn.DisplayMember = "Name"; //comboColumn.ValueMember = "Columnizer"; - foreach (ColumnizerMaskEntry maskEntry in Preferences.ColumnizerMaskList) + foreach (var maskEntry in Preferences.ColumnizerMaskList) { DataGridViewRow row = new(); - row.Cells.Add(new DataGridViewTextBoxCell()); + _ = row.Cells.Add(new DataGridViewTextBoxCell()); DataGridViewComboBoxCell cell = new(); - foreach (ILogLineColumnizer logColumnizer in columnizers) + foreach (var logColumnizer in columnizers) { - cell.Items.Add(logColumnizer.GetName()); + _ = cell.Items.Add(logColumnizer.GetName()); } - row.Cells.Add(cell); + _ = row.Cells.Add(cell); row.Cells[0].Value = maskEntry.Mask; - ILogLineColumnizer columnizer = ColumnizerPicker.DecideColumnizerByName(maskEntry.ColumnizerName, + var columnizer = ColumnizerPicker.DecideColumnizerByName(maskEntry.ColumnizerName, PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers); row.Cells[1].Value = columnizer.GetName(); - dataGridViewColumnizer.Rows.Add(row); + _ = dataGridViewColumnizer.Rows.Add(row); } var count = dataGridViewColumnizer.RowCount; @@ -349,33 +465,33 @@ private void FillHighlightMaskList () comboColumn.Items.Clear(); //TODO Remove if not necessary - var textColumn = (DataGridViewTextBoxColumn)dataGridViewHighlightMask.Columns[0]; + //var textColumn = (DataGridViewTextBoxColumn)dataGridViewHighlightMask.Columns[0]; - foreach (HighlightGroup group in (IList)_logTabWin.HighlightGroupList) + foreach (var group in (IList)_logTabWin.HighlightGroupList) { - comboColumn.Items.Add(group.GroupName); + _ = comboColumn.Items.Add(group.GroupName); } - foreach (HighlightMaskEntry maskEntry in Preferences.HighlightMaskList) + foreach (var maskEntry in Preferences.HighlightMaskList) { DataGridViewRow row = new(); - row.Cells.Add(new DataGridViewTextBoxCell()); + _ = row.Cells.Add(new DataGridViewTextBoxCell()); DataGridViewComboBoxCell cell = new(); - foreach (HighlightGroup group in (IList)_logTabWin.HighlightGroupList) + foreach (var group in (IList)_logTabWin.HighlightGroupList) { - cell.Items.Add(group.GroupName); + _ = cell.Items.Add(group.GroupName); } - row.Cells.Add(cell); + _ = row.Cells.Add(cell); row.Cells[0].Value = maskEntry.Mask; - HighlightGroup currentGroup = _logTabWin.FindHighlightGroup(maskEntry.HighlightGroupName); + var currentGroup = _logTabWin.FindHighlightGroup(maskEntry.HighlightGroupName); var highlightGroupList = _logTabWin.HighlightGroupList; currentGroup ??= highlightGroupList.Count > 0 ? highlightGroupList[0] : new HighlightGroup(); row.Cells[1].Value = currentGroup.GroupName; - dataGridViewHighlightMask.Rows.Add(row); + _ = dataGridViewHighlightMask.Rows.Add(row); } var count = dataGridViewHighlightMask.RowCount; @@ -396,9 +512,11 @@ private void SaveColumnizerList () { if (!row.IsNewRow) { - ColumnizerMaskEntry entry = new(); - entry.Mask = (string)row.Cells[0].Value; - entry.ColumnizerName = (string)row.Cells[1].Value; + ColumnizerMaskEntry entry = new() + { + Mask = (string)row.Cells[0].Value, + ColumnizerName = (string)row.Cells[1].Value + }; Preferences.ColumnizerMaskList.Add(entry); } } @@ -412,9 +530,11 @@ private void SaveHighlightMaskList () { if (!row.IsNewRow) { - HighlightMaskEntry entry = new(); - entry.Mask = (string)row.Cells[0].Value; - entry.HighlightGroupName = (string)row.Cells[1].Value; + HighlightMaskEntry entry = new() + { + Mask = (string)row.Cells[0].Value, + HighlightGroupName = (string)row.Cells[1].Value + }; Preferences.HighlightMaskList.Add(entry); } } @@ -424,27 +544,27 @@ private void FillPluginList () { listBoxPlugin.Items.Clear(); - foreach (IContextMenuEntry entry in PluginRegistry.PluginRegistry.Instance.RegisteredContextMenuPlugins) + foreach (var entry in PluginRegistry.PluginRegistry.Instance.RegisteredContextMenuPlugins) { - listBoxPlugin.Items.Add(entry); + _ = listBoxPlugin.Items.Add(entry); if (entry is ILogExpertPluginConfigurator configurator) { configurator.StartConfig(); } } - foreach (IKeywordAction entry in PluginRegistry.PluginRegistry.Instance.RegisteredKeywordActions) + foreach (var entry in PluginRegistry.PluginRegistry.Instance.RegisteredKeywordActions) { - listBoxPlugin.Items.Add(entry); + _ = listBoxPlugin.Items.Add(entry); if (entry is ILogExpertPluginConfigurator configurator) { configurator.StartConfig(); } } - foreach (IFileSystemPlugin entry in PluginRegistry.PluginRegistry.Instance.RegisteredFileSystemPlugins) + foreach (var entry in PluginRegistry.PluginRegistry.Instance.RegisteredFileSystemPlugins) { - listBoxPlugin.Items.Add(entry); + _ = listBoxPlugin.Items.Add(entry); if (entry is ILogExpertPluginConfigurator configurator) { configurator.StartConfig(); @@ -458,7 +578,7 @@ private void SavePluginSettings () { _selectedPlugin?.HideConfigForm(); - foreach (IContextMenuEntry entry in PluginRegistry.PluginRegistry.Instance.RegisteredContextMenuPlugins) + foreach (var entry in PluginRegistry.PluginRegistry.Instance.RegisteredContextMenuPlugins) { if (entry is ILogExpertPluginConfigurator configurator) { @@ -466,7 +586,7 @@ private void SavePluginSettings () } } - foreach (IKeywordAction entry in PluginRegistry.PluginRegistry.Instance.RegisteredKeywordActions) + foreach (var entry in PluginRegistry.PluginRegistry.Instance.RegisteredKeywordActions) { if (entry is ILogExpertPluginConfigurator configurator) { @@ -479,9 +599,9 @@ private void FillToolListbox () { listBoxTools.Items.Clear(); - foreach (ToolEntry tool in Preferences.ToolEntries) + foreach (var tool in Preferences.ToolEntries) { - listBoxTools.Items.Add(tool.Clone(), tool.IsFavourite); + _ = listBoxTools.Items.Add(tool.Clone(), tool.IsFavourite); } if (listBoxTools.Items.Count > 0) @@ -558,12 +678,12 @@ private void DisplayCurrentIcon () { if (_selectedTool != null) { - Icon icon = NativeMethods.LoadIconFromExe(_selectedTool.IconFile, _selectedTool.IconIndex); + var icon = NativeMethods.LoadIconFromExe(_selectedTool.IconFile, _selectedTool.IconIndex); if (icon != null) { Image image = icon.ToBitmap(); buttonIcon.Image = image; - NativeMethods.DestroyIcon(icon.Handle); + _ = NativeMethods.DestroyIcon(icon.Handle); icon.Dispose(); } else @@ -577,14 +697,14 @@ private void FillEncodingList () { comboBoxEncoding.Items.Clear(); - comboBoxEncoding.Items.Add(Encoding.ASCII); - comboBoxEncoding.Items.Add(Encoding.Default); - comboBoxEncoding.Items.Add(Encoding.GetEncoding("iso-8859-1")); - comboBoxEncoding.Items.Add(Encoding.UTF8); - comboBoxEncoding.Items.Add(Encoding.Unicode); - comboBoxEncoding.Items.Add(CodePagesEncodingProvider.Instance.GetEncoding(1252)); + _ = comboBoxEncoding.Items.Add(Encoding.ASCII); + _ = comboBoxEncoding.Items.Add(Encoding.Default); + _ = comboBoxEncoding.Items.Add(Encoding.GetEncoding("iso-8859-1")); + _ = comboBoxEncoding.Items.Add(Encoding.UTF8); + _ = comboBoxEncoding.Items.Add(Encoding.Unicode); + _ = comboBoxEncoding.Items.Add(CodePagesEncodingProvider.Instance.GetEncoding(1252)); - comboBoxEncoding.ValueMember = "HeaderName"; + comboBoxEncoding.ValueMember = Resources.SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName; } #endregion @@ -715,7 +835,7 @@ private void OnBtnDeleteClick (object sender, EventArgs e) if (dataGridViewColumnizer.CurrentRow != null && !dataGridViewColumnizer.CurrentRow.IsNewRow) { var index = dataGridViewColumnizer.CurrentRow.Index; - dataGridViewColumnizer.EndEdit(); + _ = dataGridViewColumnizer.EndEdit(); dataGridViewColumnizer.Rows.RemoveAt(index); } } @@ -803,7 +923,7 @@ private void OnBtnSessionSaveDirClick (object sender, EventArgs e) } dlg.ShowNewFolderButton = true; - dlg.Description = @"Choose folder for LogExpert's session files"; + dlg.Description = Resources.SettingsDialog_UI_FolderBrowser_SessionSaveDir; if (dlg.ShowDialog() == DialogResult.OK) { @@ -819,9 +939,9 @@ private void OnPortableModeCheckedChanged (object sender, EventArgs e) { case CheckState.Checked when !File.Exists(ConfigManager.PortableModeDir + Path.DirectorySeparatorChar + ConfigManager.PortableModeSettingsFileName): { - if (Directory.Exists(ConfigManager.PortableModeDir) == false) + if (!Directory.Exists(ConfigManager.PortableModeDir)) { - Directory.CreateDirectory(ConfigManager.PortableModeDir); + _ = Directory.CreateDirectory(ConfigManager.PortableModeDir); } using (File.Create(ConfigManager.PortableModeDir + Path.DirectorySeparatorChar + ConfigManager.PortableModeSettingsFileName)) @@ -840,7 +960,7 @@ private void OnPortableModeCheckedChanged (object sender, EventArgs e) { case CheckState.Unchecked: { - checkBoxPortableMode.Text = @"Activate Portable Mode"; + checkBoxPortableMode.Text = Resources.SettingsDialog_UI_ActivatePortableMode; Preferences.PortableMode = false; break; } @@ -848,14 +968,14 @@ private void OnPortableModeCheckedChanged (object sender, EventArgs e) case CheckState.Checked: { Preferences.PortableMode = true; - checkBoxPortableMode.Text = @"Deactivate Portable Mode"; + checkBoxPortableMode.Text = Resources.SettingsDialog_UI_DeActivatePortableMode; break; } } } catch (Exception exception) { - MessageBox.Show($@"Could not create / delete marker for Portable Mode: {exception}", @"Error", MessageBoxButtons.OK); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_CouldNotCreatePortableMode, exception), Resources.Title_LogExpert_Error, MessageBoxButtons.OK); } } @@ -918,7 +1038,7 @@ private void OnBtnToolDownClick (object sender, EventArgs e) [SupportedOSPlatform("windows")] private void OnBtnToolAddClick (object sender, EventArgs e) { - listBoxTools.Items.Add(new ToolEntry()); + _ = listBoxTools.Items.Add(new ToolEntry()); listBoxTools.SelectedIndex = listBoxTools.Items.Count - 1; } @@ -981,7 +1101,7 @@ private void OnBtnWorkingDirClick (object sender, EventArgs e) private void OnMultiFilePatternTextChanged (object sender, EventArgs e) { var pattern = textBoxMultifilePattern.Text; - upDownMultifileDays.Enabled = pattern.Contains("$D", System.StringComparison.Ordinal); + upDownMultifileDays.Enabled = pattern.Contains("$D", StringComparison.Ordinal); } [SupportedOSPlatform("windows")] @@ -989,13 +1109,13 @@ private void OnBtnExportClick (object sender, EventArgs e) { SaveFileDialog dlg = new() { - Title = @"Export Settings to file", + Title = @Resources.SettingsDialog_UI_Title_ExportSettings, DefaultExt = "json", AddExtension = true, - Filter = @"Settings (*.json)|*.json|All files (*.*)|*.*" + Filter = string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_Filter_ExportSettings, "(*.json)|*.json", "(*.*)|*.*") }; - DialogResult result = dlg.ShowDialog(); + var result = dlg.ShowDialog(); if (result == DialogResult.OK) { @@ -1027,16 +1147,16 @@ private void OnBtnImportClick (object sender, EventArgs e) } catch (Exception ex) { - MessageBox.Show(this, $@"Settings could not be imported: {ex}", @"LogExpert"); + _ = MessageBox.Show(this, string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_Error_SettingsCouldNotBeImported, ex), Resources.Title_LogExpert_Error); return; } ConfigManager.Import(fileInfo, dlg.ImportFlags); Preferences = ConfigManager.Settings.Preferences; FillDialog(); - MessageBox.Show(this, @"Settings imported", @"LogExpert"); + _ = MessageBox.Show(this, Resources.SettingsDialog_UI_SettingsImported, Resources.Title_LogExpert); } } #endregion -} +} \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.resx b/src/LogExpert.UI/Dialogs/SettingsDialog.resx similarity index 96% rename from src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.resx rename to src/LogExpert.UI/Dialogs/SettingsDialog.resx index 7f3f0ea5..bacc9be3 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/SettingsDialog.resx +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.resx @@ -153,9 +153,6 @@ 17, 17 - - Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file. - 17, 17 diff --git a/src/LogExpert.UI/LogExpert.UI.csproj b/src/LogExpert.UI/LogExpert.UI.csproj index 0959af4b..4d401ccd 100644 --- a/src/LogExpert.UI/LogExpert.UI.csproj +++ b/src/LogExpert.UI/LogExpert.UI.csproj @@ -19,9 +19,7 @@ - - Form - + diff --git a/src/LogExpert.sln b/src/LogExpert.sln index 21ba9ceb..3ad6b5cb 100644 --- a/src/LogExpert.sln +++ b/src/LogExpert.sln @@ -28,6 +28,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props ..\GitVersion.yml = ..\GitVersion.yml + ..\README.md = ..\README.md Solution Items\usedComponents.json = Solution Items\usedComponents.json EndProjectSection EndProject From 07a8efb01062299ecd239d6133b12017a7337d91 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 13:16:29 +0200 Subject: [PATCH 11/38] bug --- src/LogExpert.Resources/Resources.Designer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 587a05bd..914ae359 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -434,7 +434,7 @@ public static string HighlightDialog_UI_NewGroup_BaseName { } /// - /// Looks up a localized string similar to Settings could not be imported: {exSettings could not be imported: {0}. + /// Looks up a localized string similar to Settings could not be imported: {0}. /// public static string HighlightDialog_UI_SettingsCouldNotBeImported { get { @@ -2424,9 +2424,9 @@ public static string Program_Logger_Error_Pipe_TimeoutException { /// /// Looks up a localized string similar to Unknown IPC Message Type: {0}; with payload: {1}. /// - public static string Program_Logger_Error_Pipe_UnkownIPCMessage { + public static string Program_Logger_Error_Pipe_UnknownIPCMessage { get { - return ResourceManager.GetString("Program_Logger_Error_Pipe_UnkownIPCMessage", resourceCulture); + return ResourceManager.GetString("Program_Logger_Error_Pipe_UnknownIPCMessage", resourceCulture); } } From b8f76c45bdf9701cd872e29e70fe41fb40704f22 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 13:17:07 +0200 Subject: [PATCH 12/38] missing n --- src/LogExpert/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index beb5c1c7..7ca50119 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -227,7 +227,7 @@ private static void SendMessageToProxy (IpcMessage message, LogExpertProxy proxy proxy.NewWindowOrLockedWindow([.. payLoad.Files]); break; default: - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_Pipe_UnkownIPCMessage, message.Type, payLoad)); + _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_Pipe_UnknownIPCMessage, message.Type, payLoad)); break; } } From 2c3b362d3dd7f7e5b19e8c6820332bbfa56227de Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 14:42:11 +0200 Subject: [PATCH 13/38] german --- src/LogExpert.Resources/Resources.Designer.cs | 4 +- src/LogExpert.Resources/Resources.de.resx | 342 +++++++++++++++++- src/LogExpert.Resources/Resources.resx | 4 +- 3 files changed, 343 insertions(+), 7 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 914ae359..7d52e013 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -2965,7 +2965,7 @@ public static string SettingsDialog_UI_Error_SettingsCouldNotBeImported { } /// - /// Looks up a localized string similar to @"Settings {0}|All files {1}. + /// Looks up a localized string similar to Settings {0}|All files {1}. /// public static string SettingsDialog_UI_Filter_ExportSettings { get { @@ -3406,7 +3406,7 @@ public static string SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationSta } /// - /// Looks up a localized string similar to Treat all files as one 'MultiFile. + /// Looks up a localized string similar to Treat all files as one MultiFile. /// public static string SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile { get { diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 4bd554cc..22507463 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -235,9 +235,6 @@ Falsche Payload: null - - Unbekannte IPC Nachricht Type: {0}; mit payload: {1} - Die Verbindung zur ersten Instanz kann nicht geöffnet werden: {0} @@ -931,4 +928,343 @@ Das ist eine Test Fehlermeldung, geworfen durch den GUI Thread + + Unbekannte IPC Nachricht Type: {0}; mit payload: {1} + + + Maximale Anzahl an Filtereinträge die angezeigt werden + + + Maximale Zeilenlänge (neustart benötigt) + + + ! Ändern der Maximalen Zeilenlänge kann Probleme bei der Performance auslösen und sollte daher nicht durchgeführt werden ! + + + Maximale Anzahl an Filtereinträgen + + + Default Encoding + + + Entfernen + + + Farbe... + + + Ändern... + + + Farbe... + + + Zeilen/Block + + + Anzahl an Blöcken + + + Schriftart + + + Datei Polling Interval (ms): + + + Änderungen treten nach dem nächsten Laden der Datei in Kraft + + + Pattern: + + + Maximale Tage: + + + Argumente: + + + Programm: + + + Columnizer für den Output: + + + Name: + + + Arbeitsverzeichnis: + + + ... + + + ... + + + ... + + + Ok + + + Abbrechen + + + Importieren... + + + Standard Dateinamen Pattern + + + Misc + + + Standards + + + Schriftart + + + Anzeige Modus + + + Tool Einstellungen + + + Speichern und wiederherstellen der Filter und Filtertabs + + + Automatisches Speichern der Persistierten Dateien (.lxp) + + + Applikationsstartupverzeichnis + + + Dateinamenmaske (Regex) + + + Dateinamenmaske (Regex) + + + Columnizer + + + Highlightgruppe + + + Einstellungen + + + Kopfname + + + Arbeitsverzeichnis auswählen + + + Einstellungen {0}|Alle Dateien {1} + + + Gleiches Verzeichnis wie die Logdatei + + + Einstellungen konnte nicht importiert werden: {0} + + + Meine Dokumente/LogExpert + + + Eigenes Verzeichnis + + + Plugins + + + Neues hinzufügen + + + Runter + + + Rauf + + + ... + + + Behandle alle Dateien als Multidateien + + + Nachfragen wie sie zu behandeln sind + + + Vertikal + + + Horizontal + + + Vertikal invertiert + + + Zeitanzeige + + + Zeilenanzeige + + + Speicher/CPU + + + Lade jede Datei in einen separaten Tab + + + Peristierte Einstellungen + + + Multidatei + + + Highlight + + + Columnizers + + + Externe Tools + + + Zeitstempel Einstellungen + + + Anzeige Einstellungen + + + Multithreadfilter + + + Benutze den Legacydateiverarbeitung (langsam) + + + Exportiere die Einstellungen in eine Datei + + + Portierbarer Modus konnte nicht erstellt werden: {0} + + + Deaktiveren des portierbaren Modus + + + Aktiveren des portierbaren Modus + + + Wähle ein Verzeichnis für die LogExpert Sessiondateien + + + Langsamer dafür mehr kompatible mit unbekannten Zeilenfeeds und Encodings + + + Bei Aktivierung des Modus, wird die gespeicherte Datei aus dem Verzeichnis der Executable geladen + + + Encoding welches benutzt wird, wenn kein BOM Header oder keine persistierten Daten vorhanden sind. + + + Der Pfad der Executable und wo das Verzeichnis aus dem Programm gestartet wird. + + + Maske hat Priorität bevor Historie + + + Standard Mausdrag verhalten + + + Zeitstempelnavigationsdialog + + + Zeitstreuanzeige + + + Konfigurieren... + + + Löschen + + + Icon... + + + Exportieren... + + + Wenn multiple Dateien geöffnet werden... + + + Plugins + + + Einstellungen + + + Automatisch für neue Dateien auswählen + + + Pipe sysout zu Tab + + + Anzeigen des Zeitstempel Dialogs, sofern der Columnizer dieses unterstützt + + + Anzeigen Zeitstreudialog + + + Alpha rückwärts + + + das Ende filtern aktivieren + + + Synchronisierung der Filter aktivieren + + + Anzeigen der Spaltensuche + + + Dem Ende folgen aktivieren + + + Dark Mode (neustart benötigt) + + + Fragen vor dem schließen des Tabs + + + Nur 1 Instanz erlauben + + + Wiederöffnen der letzten benutzten Dateien + + + Anzeige des "Ende-Folgen"-Status auf dem Tab + + + Letzte Spaltenbreite setzen + + + Anzeigen der Fehlermeldung? + + + Zeilenbufferbenutzung + + + CPU und ähnliches + + + Verzeichnis der Persitierteneinstellungsdatei + + + Portierbaren Modus aktivieren + + + Einstellungen importiert + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 45acbd8d..4366aac5 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1208,7 +1208,7 @@ Ask what to do - Treat all files as one 'MultiFile + Treat all files as one MultiFile Load every file into a separate tab @@ -1274,7 +1274,7 @@ Export Settings to file - @"Settings {0}|All files {1} + Settings {0}|All files {1} Settings could not be imported: {0} From f62fd99138743b471d42de4602af08b37f4ac26b Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Wed, 9 Jul 2025 14:57:39 +0200 Subject: [PATCH 14/38] Update src/LogExpert/Config/ConfigManager.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert/Config/ConfigManager.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index 23ae77bd..b5dffb24 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -332,24 +332,34 @@ private void Save (FileInfo fileInfo, Settings settings, SettingsFlags flags) SaveHighlightgroupsAsJSON(fileInfo, settings.Preferences.HighlightGroupList); break; case SettingsFlags.None: + // No action required for SettingsFlags.None break; case SettingsFlags.WindowPosition: + // No action required for SettingsFlags.WindowPosition break; case SettingsFlags.FileHistory: + // No action required for SettingsFlags.FileHistory break; case SettingsFlags.FilterList: + // No action required for SettingsFlags.FilterList break; case SettingsFlags.RegexHistory: + // No action required for SettingsFlags.RegexHistory break; case SettingsFlags.ToolSettings: + // No action required for SettingsFlags.ToolSettings break; case SettingsFlags.GuiOrColors: + // No action required for SettingsFlags.GuiOrColors break; case SettingsFlags.FilterHistory: + // No action required for SettingsFlags.FilterHistory break; case SettingsFlags.All: + // No action required for SettingsFlags.All break; case SettingsFlags.Settings: + // No action required for SettingsFlags.Settings break; default: break; From 3b59bfa972bb6381430acbc9feb56b19199f662c Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 14:59:51 +0200 Subject: [PATCH 15/38] added comment --- src/LogExpert/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 7ca50119..34c39213 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -132,7 +132,7 @@ or ArgumentException _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.Title_LogExpert); } - //TODO: Remove this from here? Why is it called from the Main project and not from the main window? + //Dont create a new separated instance of LogExpert if the settings allows only one instance if (settings.Preferences.AllowOnlyOneInstance && settings.Preferences.ShowErrorMessageAllowOnlyOneInstances) { AllowOnlyOneInstanceErrorDialog a = new(); From 8ad20fb2f8067e6cdb83f6871432bb6796140560 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 16:12:15 +0200 Subject: [PATCH 16/38] settings dialog finished --- src/LogExpert.Resources/Resources.Designer.cs | 22 ++-- src/LogExpert.Resources/Resources.de.resx | 28 ++++- src/LogExpert.Resources/Resources.resx | 22 ++-- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 100 +++++++++++------- 4 files changed, 113 insertions(+), 59 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 7d52e013..8b494a41 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -398,7 +398,8 @@ public static string HighlightDialog_UI_DefaultGroupName { } /// - /// Looks up a localized string similar to Error during add of entry.\r\n{0}. + /// Looks up a localized string similar to Error during add of entry. + ///{0}. /// public static string HighlightDialog_UI_ErrorDuringAddOfHighLightEntry { get { @@ -818,7 +819,8 @@ public static string LogTabWindow_UI_LogWindow_Title_ToolTip_PastedOn { } /// - /// Looks up a localized string similar to \nColumn restrict. + /// Looks up a localized string similar to + ///Column restrict. /// public static string LogTabWindow_UI_LogWindow_Tooltip_ColumnRestrict { get { @@ -827,7 +829,7 @@ public static string LogTabWindow_UI_LogWindow_Tooltip_ColumnRestrict { } /// - /// Looks up a localized string similar to Filter: \"{0}\"{1}{3}. + /// Looks up a localized string similar to Filter: {0} {1}{2}. /// public static string LogTabWindow_UI_LogWindow_ToolTip_Filter { get { @@ -1673,7 +1675,9 @@ public static string LogWindow_UI_ErrorWhileImportingBookmarkList { } /// - /// Looks up a localized string similar to Exception while filtering. Please report to developer: \n\n{0}\n\n{1}. + /// Looks up a localized string similar to Exception while filtering. Please report to developer: + ///{0} + ///{1}. /// public static string LogWindow_UI_Filter_ExceptionWhileFiltering { get { @@ -1790,7 +1794,8 @@ public static string LogWindow_UI_ListBox_ToolTip_Filter { } /// - /// Looks up a localized string similar to Cannot load file\n{0}. + /// Looks up a localized string similar to Cannot load file + ///{0}. /// public static string LogWindow_UI_LoadFile_CannotLoadFile { get { @@ -3163,7 +3168,7 @@ public static string SettingsDialog_UI_Label_Font { } /// - /// Looks up a localized string similar to Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa.";. + /// Looks up a localized string similar to Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa.. /// public static string SettingsDialog_UI_Label_HintMultiFile { get { @@ -3253,7 +3258,7 @@ public static string SettingsDialog_UI_Label_Pattern { } /// - /// Looks up a localized string similar to sessionSaveOwnDirLabel. + /// Looks up a localized string similar to Place Holder Text, this will be replaced programmatically. /// public static string SettingsDialog_UI_Label_SessionSaveOwnDir { get { @@ -3289,7 +3294,8 @@ public static string SettingsDialog_UI_Label_ToolName { } /// - /// Looks up a localized string similar to You can configure as many tools as you want. \r\nChecked tools will appear in the icon bar. All other tools are available in the tools menu.. + /// Looks up a localized string similar to You can configure as many tools as you want. + ///Checked tools will appear in the icon bar. All other tools are available in the tools menu.. /// public static string SettingsDialog_UI_Label_ToolsDescription { get { diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 22507463..ef901222 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -296,7 +296,8 @@ Fehler während des Hinzufügens eines Highlighteintrages: {0} - Fehler während des Hinzufügens eines Highlighteintrages.\r\n{0} + Fehler während des Hinzufügens eines Highlighteintrages. +{0} Die Regex ist "null" oder besteht nur aus Leerzeichen @@ -617,7 +618,8 @@ Unbekannter Fehler beim Speichern der Persistenten Daten: {0} - Kann die Datei nicht laden\n{0} + Kann die Datei nicht laden +{0} Doppelklick um den gespeicherten Filter zu laden @@ -635,7 +637,9 @@ CSV Datei (*.csv)|*.csv|Lesezeichen Datei (*.bmk)|*.bmk - Ausnahmefehler während der Filterung. Bitte an den Entwickler weiterleiten: \n\n{0}\n\n{1} + Ausnahmefehler während der Filterung. Bitte an den Entwickler weiterleiten: +{0} +{1} Fehler während des Imports der Lesezeichenliste: {0} @@ -866,10 +870,11 @@ (Invertiere Match) - \nSpalten restriktion + +Spalten restriktion - Filter: \"{0}\"{1}{3} + Filter: {0} {1}{2} Zwischenablage @@ -1267,4 +1272,17 @@ Einstellungen importiert + + Sie können so viele Tools konfigurieren wie Sie möchten. +Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools werden im Toolsmenu angezeigt. + + + Place Holder Text, this will be replaced programmatically + + + Hinweis: Mit der Taste Shift kann während die Dateien mittels Drag&Drop auf das LogExpert Fenster gezogen werden, das Verhalten von Einzel- zu Multidatei gewechselt werden und vice versa. + + + Notiz: Sie können immer alle Dateien als Multifile automatisch laden wenn die Dateien die Multidateien Namensregeln folgen (<dateiname>, <dateiname>.1, <dateiname>.2, ...). Wählen Sie hierfür 'Multidatei' vom Dateimenü aus nachdem die erste Datei geladen wurde. + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 4366aac5..fff4bc7a 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -302,7 +302,8 @@ Error during add of highlight entry: {0} - Error during add of entry.\r\n{0} + Error during add of entry. +{0} Regex value is null or whitespace @@ -560,7 +561,8 @@ Loading logfile: {0} - Cannot load file\n{0} + Cannot load file +{0} TestStatistics() called with start line {0} @@ -602,7 +604,9 @@ Error while selecting line: {0} - Exception while filtering. Please report to developer: \n\n{0}\n\n{1} + Exception while filtering. Please report to developer: +{0} +{1} Single threaded filter duration: {0} ms. @@ -872,10 +876,11 @@ (Invert match) - \nColumn restrict + +Column restrict - Filter: \"{0}\"{1}{3} + Filter: {0} {1}{2} Clipboard @@ -953,7 +958,8 @@ Font - You can configure as many tools as you want. \r\nChecked tools will appear in the icon bar. All other tools are available in the tools menu. + You can configure as many tools as you want. +Checked tools will appear in the icon bar. All other tools are available in the tools menu. Working dir: @@ -977,13 +983,13 @@ Pattern: - Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa."; + Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa. Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file. - sessionSaveOwnDirLabel + Place Holder Text, this will be replaced programmatically File polling interval (ms): diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index 3752e612..19955585 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -1,5 +1,6 @@ using System.Globalization; using System.Runtime.Versioning; +using System.Security; using System.Text; using LogExpert.Core.Classes; @@ -22,6 +23,7 @@ internal partial class SettingsDialog : Form private readonly Image _emptyImage = new Bitmap(16, 16); private readonly LogTabWindow _logTabWin; + private const string DEFAULT_FONT_NAME = "Courier New"; private ILogExpertPluginConfigurator _selectedPlugin; private ToolEntry _selectedTool; @@ -178,7 +180,7 @@ private void FillDialog () if (Preferences.FontName == null) { - Preferences.FontName = "Courier New"; + Preferences.FontName = DEFAULT_FONT_NAME; } if (Math.Abs(Preferences.FontSize) < 0.1) @@ -232,13 +234,13 @@ private void FillDialog () case SessionSaveLocation.OwnDir: { radioButtonSessionSaveOwn.Checked = true; + break; } - break; case SessionSaveLocation.SameDir: { radioButtonSessionSameDir.Checked = true; + break; } - break; case SessionSaveLocation.DocumentsDir: { radioButtonsessionSaveDocuments.Checked = true; @@ -249,6 +251,12 @@ private void FillDialog () radioButtonSessionApplicationStartupDir.Checked = true; break; } + case SessionSaveLocation.LoadedSessionFile: + // intentionally left blank + break; + default: + // intentionally left blank + break; } //overwrite preferences save location in portable mode to always be application startup directory @@ -297,7 +305,7 @@ private void FillPortableMode () private void DisplayFontName () { - labelFont.Text = Preferences.FontName + @" " + (int)Preferences.FontSize; + labelFont.Text = $"{Preferences.FontName} {(int)Preferences.FontSize}"; labelFont.Font = new Font(new FontFamily(Preferences.FontName), Preferences.FontSize); } @@ -322,7 +330,7 @@ private void SaveMultifileData () Preferences.MultiFileOptions.MaxDayTry = (int)upDownMultifileDays.Value; } - private void OnBtnToolClickInternal (TextBox textBox) + private static void OnBtnToolClickInternal (TextBox textBox) { OpenFileDialog dlg = new() { @@ -358,7 +366,7 @@ private void OnBtnArgsClickInternal (TextBox textBox) } } - private void OnBtnWorkingDirClick (TextBox textBox) + private static void OnBtnWorkingDirClick (TextBox textBox) { FolderBrowserDialog dlg = new() { @@ -389,7 +397,7 @@ private void FillColumnizerForToolsList () } } - private void FillColumnizerForToolsList (ComboBox comboBox, string columnizerName) + private static void FillColumnizerForToolsList (ComboBox comboBox, string columnizerName) { var selIndex = 0; comboBox.Items.Clear(); @@ -629,6 +637,9 @@ private void FillMultifileSettings () radioButtonAskWhatToDo.Checked = true; break; } + default: + //intentionally left blank + break; } textBoxMultifilePattern.Text = Preferences.MultiFileOptions.FormatPattern; //TODO: Impport settings file throws an exception. Fix or I caused it? @@ -742,18 +753,11 @@ private void OnBtnOkClick (object sender, EventArgs e) Preferences.FilterTail = checkBoxFilterTail.Checked; Preferences.FollowTail = checkBoxFollowTail.Checked; - if (radioButtonVerticalMouseDrag.Checked) - { - Preferences.TimestampControlDragOrientation = DragOrientationsEnum.Vertical; - } - else if (radioButtonVerticalMouseDragInverted.Checked) - { - Preferences.TimestampControlDragOrientation = DragOrientationsEnum.InvertedVertical; - } - else - { - Preferences.TimestampControlDragOrientation = DragOrientationsEnum.Horizontal; - } + Preferences.TimestampControlDragOrientation = radioButtonVerticalMouseDrag.Checked + ? DragOrientationsEnum.Vertical + : radioButtonVerticalMouseDragInverted.Checked + ? DragOrientationsEnum.InvertedVertical + : DragOrientationsEnum.Horizontal; SaveColumnizerList(); @@ -772,22 +776,13 @@ private void OnBtnOkClick (object sender, EventArgs e) Preferences.SaveSessions = checkBoxSaveSessions.Checked; Preferences.SessionSaveDirectory = labelSessionSaveOwnDir.Text; - if (radioButtonsessionSaveDocuments.Checked) - { - Preferences.SaveLocation = SessionSaveLocation.DocumentsDir; - } - else if (radioButtonSessionSaveOwn.Checked) - { - Preferences.SaveLocation = SessionSaveLocation.OwnDir; - } - else if (radioButtonSessionApplicationStartupDir.Checked) - { - Preferences.SaveLocation = SessionSaveLocation.ApplicationStartupDir; - } - else - { - Preferences.SaveLocation = SessionSaveLocation.SameDir; - } + Preferences.SaveLocation = radioButtonsessionSaveDocuments.Checked + ? SessionSaveLocation.DocumentsDir + : radioButtonSessionSaveOwn.Checked + ? SessionSaveLocation.OwnDir + : radioButtonSessionApplicationStartupDir.Checked + ? SessionSaveLocation.ApplicationStartupDir + : SessionSaveLocation.SameDir; Preferences.SaveFilters = checkBoxSaveFilter.Checked; Preferences.BufferCount = (int)upDownBlockCount.Value; @@ -954,6 +949,19 @@ private void OnPortableModeCheckedChanged (object sender, EventArgs e) File.Delete(ConfigManager.PortableModeDir + Path.DirectorySeparatorChar + ConfigManager.PortableModeSettingsFileName); break; } + + case CheckState.Unchecked: + //intentionally left blank + break; + case CheckState.Checked: + //intentionally left blank + break; + case CheckState.Indeterminate: + //intentionally left blank + break; + default: + //intentionally left blank + break; } switch (checkBoxPortableMode.CheckState) @@ -964,16 +972,27 @@ private void OnPortableModeCheckedChanged (object sender, EventArgs e) Preferences.PortableMode = false; break; } - case CheckState.Checked: { Preferences.PortableMode = true; checkBoxPortableMode.Text = Resources.SettingsDialog_UI_DeActivatePortableMode; break; } + case CheckState.Indeterminate: + //intentionally left blank + break; + default: + //intentionally left blank + break; } } - catch (Exception exception) + catch (Exception exception) when (exception is UnauthorizedAccessException + or IOException + or ArgumentException + or ArgumentNullException + or PathTooLongException + or DirectoryNotFoundException + or NotSupportedException) { _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_CouldNotCreatePortableMode, exception), Resources.Title_LogExpert_Error, MessageBoxButtons.OK); } @@ -1145,7 +1164,12 @@ private void OnBtnImportClick (object sender, EventArgs e) { fileInfo = new FileInfo(dlg.FileName); } - catch (Exception ex) + catch (Exception ex) when (ex is ArgumentException + or ArgumentNullException + or PathTooLongException + or SecurityException + or NotSupportedException + or UnauthorizedAccessException) { _ = MessageBox.Show(this, string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_Error_SettingsCouldNotBeImported, ex), Resources.Title_LogExpert_Error); return; From acf05e44965f5ef84de809e5fe78a626afc3f807 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 17:18:50 +0200 Subject: [PATCH 17/38] prepare for language change --- src/LogExpert.Resources/Resources.Designer.cs | 18 + src/LogExpert.Resources/Resources.de.resx | 6 + src/LogExpert.Resources/Resources.resx | 6 + .../Dialogs/SettingsDialog.Designer.cs | 1105 +++++++++-------- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 2 + src/LogExpert.UI/Dialogs/SettingsDialog.resx | 33 - 6 files changed, 597 insertions(+), 573 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 8b494a41..5579c34c 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -2906,6 +2906,15 @@ public static string SettingsDialog_UI_ComboBox_ToolTip_Encoding { } } + /// + /// Looks up a localized string similar to Userinterface language. + /// + public static string SettingsDialog_UI_ComboBox_ToolTip_Language { + get { + return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_Language", resourceCulture); + } + } + /// /// Looks up a localized string similar to Could not create / delete marker for Portable Mode: {0}. /// @@ -3185,6 +3194,15 @@ public static string SettingsDialog_UI_Label_Info { } } + /// + /// Looks up a localized string similar to Language:. + /// + public static string SettingsDialog_UI_Label_Language { + get { + return ResourceManager.GetString("SettingsDialog_UI_Label_Language", resourceCulture); + } + } + /// /// Looks up a localized string similar to Lines/block. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index ef901222..752d4553 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -1285,4 +1285,10 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Notiz: Sie können immer alle Dateien als Multifile automatisch laden wenn die Dateien die Multidateien Namensregeln folgen (<dateiname>, <dateiname>.1, <dateiname>.2, ...). Wählen Sie hierfür 'Multidatei' vom Dateimenü aus nachdem die erste Datei geladen wurde. + + Sprache: + + + Sprache des Userinterfaces + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index fff4bc7a..33201532 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1288,4 +1288,10 @@ Checked tools will appear in the icon bar. All other tools are available in the Settings imported + + Language: + + + Userinterface language + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs index d51606e8..6309fb99 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs @@ -26,134 +26,135 @@ protected override void Dispose(bool disposing) /// Required method for Designer support - do not modify /// the contents of this method with the code editor. ///
- private void InitializeComponent() + private void InitializeComponent () { components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsDialog)); - tabControlSettings = new System.Windows.Forms.TabControl(); - tabPageViewSettings = new System.Windows.Forms.TabPage(); - labelWarningMaximumLineLength = new System.Windows.Forms.Label(); - upDownMaximumLineLength = new System.Windows.Forms.NumericUpDown(); - labelMaximumLineLength = new System.Windows.Forms.Label(); - upDownMaximumFilterEntriesDisplayed = new System.Windows.Forms.NumericUpDown(); - labelMaximumFilterEntriesDisplayed = new System.Windows.Forms.Label(); - upDownMaximumFilterEntries = new System.Windows.Forms.NumericUpDown(); - labelMaximumFilterEntries = new System.Windows.Forms.Label(); - labelDefaultEncoding = new System.Windows.Forms.Label(); - comboBoxEncoding = new System.Windows.Forms.ComboBox(); - groupBoxMisc = new System.Windows.Forms.GroupBox(); - checkBoxShowErrorMessageOnlyOneInstance = new System.Windows.Forms.CheckBox(); - cpDownColumnWidth = new System.Windows.Forms.NumericUpDown(); - checkBoxColumnSize = new System.Windows.Forms.CheckBox(); - buttonTailColor = new System.Windows.Forms.Button(); - checkBoxTailState = new System.Windows.Forms.CheckBox(); - checkBoxOpenLastFiles = new System.Windows.Forms.CheckBox(); - checkBoxSingleInstance = new System.Windows.Forms.CheckBox(); - checkBoxAskCloseTabs = new System.Windows.Forms.CheckBox(); - groupBoxDefaults = new System.Windows.Forms.GroupBox(); - checkBoxDarkMode = new System.Windows.Forms.CheckBox(); - checkBoxFollowTail = new System.Windows.Forms.CheckBox(); - checkBoxColumnFinder = new System.Windows.Forms.CheckBox(); - checkBoxSyncFilter = new System.Windows.Forms.CheckBox(); - checkBoxFilterTail = new System.Windows.Forms.CheckBox(); - groupBoxFont = new System.Windows.Forms.GroupBox(); - buttonChangeFont = new System.Windows.Forms.Button(); - labelFont = new System.Windows.Forms.Label(); - tabPageTimeStampFeatures = new System.Windows.Forms.TabPage(); - groupBoxTimeSpreadDisplay = new System.Windows.Forms.GroupBox(); - groupBoxDisplayMode = new System.Windows.Forms.GroupBox(); - radioButtonLineView = new System.Windows.Forms.RadioButton(); - radioButtonTimeView = new System.Windows.Forms.RadioButton(); - checkBoxReverseAlpha = new System.Windows.Forms.CheckBox(); - buttonTimespreadColor = new System.Windows.Forms.Button(); - checkBoxTimeSpread = new System.Windows.Forms.CheckBox(); - groupBoxTimeStampNavigationControl = new System.Windows.Forms.GroupBox(); - checkBoxTimestamp = new System.Windows.Forms.CheckBox(); - groupBoxMouseDragDefaults = new System.Windows.Forms.GroupBox(); - radioButtonVerticalMouseDragInverted = new System.Windows.Forms.RadioButton(); - radioButtonHorizMouseDrag = new System.Windows.Forms.RadioButton(); - radioButtonVerticalMouseDrag = new System.Windows.Forms.RadioButton(); - tabPageExternalTools = new System.Windows.Forms.TabPage(); - labelToolsDescription = new System.Windows.Forms.Label(); - buttonToolDelete = new System.Windows.Forms.Button(); - buttonToolAdd = new System.Windows.Forms.Button(); - buttonToolDown = new System.Windows.Forms.Button(); - buttonToolUp = new System.Windows.Forms.Button(); - listBoxTools = new System.Windows.Forms.CheckedListBox(); - groupBoxToolSettings = new System.Windows.Forms.GroupBox(); - labelWorkingDir = new System.Windows.Forms.Label(); - buttonWorkingDir = new System.Windows.Forms.Button(); - textBoxWorkingDir = new System.Windows.Forms.TextBox(); - buttonIcon = new System.Windows.Forms.Button(); - labelToolName = new System.Windows.Forms.Label(); - labelToolColumnizerForOutput = new System.Windows.Forms.Label(); - comboBoxColumnizer = new System.Windows.Forms.ComboBox(); - textBoxToolName = new System.Windows.Forms.TextBox(); - checkBoxSysout = new System.Windows.Forms.CheckBox(); - buttonArguments = new System.Windows.Forms.Button(); - labelTool = new System.Windows.Forms.Label(); - buttonTool = new System.Windows.Forms.Button(); - textBoxTool = new System.Windows.Forms.TextBox(); - labelArguments = new System.Windows.Forms.Label(); - textBoxArguments = new System.Windows.Forms.TextBox(); - tabPageColumnizers = new System.Windows.Forms.TabPage(); - checkBoxAutoPick = new System.Windows.Forms.CheckBox(); - checkBoxMaskPrio = new System.Windows.Forms.CheckBox(); - buttonDelete = new System.Windows.Forms.Button(); - dataGridViewColumnizer = new System.Windows.Forms.DataGridView(); - dataGridViewTextBoxColumnFileMask = new System.Windows.Forms.DataGridViewTextBoxColumn(); - dataGridViewComboBoxColumnColumnizer = new System.Windows.Forms.DataGridViewComboBoxColumn(); - tabPageHighlightMask = new System.Windows.Forms.TabPage(); - dataGridViewHighlightMask = new System.Windows.Forms.DataGridView(); - dataGridViewTextBoxColumnFileName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - dataGridViewComboBoxColumnHighlightGroup = new System.Windows.Forms.DataGridViewComboBoxColumn(); - tabPageMultiFile = new System.Windows.Forms.TabPage(); - groupBoxDefaultFileNamePattern = new System.Windows.Forms.GroupBox(); - labelMaxDays = new System.Windows.Forms.Label(); - labelPattern = new System.Windows.Forms.Label(); - upDownMultifileDays = new System.Windows.Forms.NumericUpDown(); - textBoxMultifilePattern = new System.Windows.Forms.TextBox(); - labelHintMultiFile = new System.Windows.Forms.Label(); - labelNoteMultiFile = new System.Windows.Forms.Label(); - groupBoxWhenOpeningMultiFile = new System.Windows.Forms.GroupBox(); - radioButtonAskWhatToDo = new System.Windows.Forms.RadioButton(); - radioButtonTreatAllFilesAsOneMultifile = new System.Windows.Forms.RadioButton(); - radioButtonLoadEveryFileIntoSeperatedTab = new System.Windows.Forms.RadioButton(); - tabPagePlugins = new System.Windows.Forms.TabPage(); - groupBoxPlugins = new System.Windows.Forms.GroupBox(); - listBoxPlugin = new System.Windows.Forms.ListBox(); - groupBoxSettings = new System.Windows.Forms.GroupBox(); - panelPlugin = new System.Windows.Forms.Panel(); - buttonConfigPlugin = new System.Windows.Forms.Button(); - tabPageSessions = new System.Windows.Forms.TabPage(); - checkBoxPortableMode = new System.Windows.Forms.CheckBox(); - checkBoxSaveFilter = new System.Windows.Forms.CheckBox(); - groupBoxPersistantFileLocation = new System.Windows.Forms.GroupBox(); - labelSessionSaveOwnDir = new System.Windows.Forms.Label(); - buttonSessionSaveDir = new System.Windows.Forms.Button(); - radioButtonSessionSaveOwn = new System.Windows.Forms.RadioButton(); - radioButtonsessionSaveDocuments = new System.Windows.Forms.RadioButton(); - radioButtonSessionSameDir = new System.Windows.Forms.RadioButton(); - radioButtonSessionApplicationStartupDir = new System.Windows.Forms.RadioButton(); - checkBoxSaveSessions = new System.Windows.Forms.CheckBox(); - tabPageMemory = new System.Windows.Forms.TabPage(); - groupBoxCPUAndStuff = new System.Windows.Forms.GroupBox(); - checkBoxLegacyReader = new System.Windows.Forms.CheckBox(); - checkBoxMultiThread = new System.Windows.Forms.CheckBox(); - labelFilePollingInterval = new System.Windows.Forms.Label(); - upDownPollingInterval = new System.Windows.Forms.NumericUpDown(); - groupBoxLineBufferUsage = new System.Windows.Forms.GroupBox(); - labelInfo = new System.Windows.Forms.Label(); - labelNumberOfBlocks = new System.Windows.Forms.Label(); - upDownLinesPerBlock = new System.Windows.Forms.NumericUpDown(); - upDownBlockCount = new System.Windows.Forms.NumericUpDown(); - labelLinesPerBlock = new System.Windows.Forms.Label(); - buttonCancel = new System.Windows.Forms.Button(); - buttonOk = new System.Windows.Forms.Button(); - helpProvider = new System.Windows.Forms.HelpProvider(); - toolTip = new System.Windows.Forms.ToolTip(components); - buttonExport = new System.Windows.Forms.Button(); - buttonImport = new System.Windows.Forms.Button(); + tabControlSettings = new TabControl(); + tabPageViewSettings = new TabPage(); + labelWarningMaximumLineLength = new Label(); + upDownMaximumLineLength = new NumericUpDown(); + labelMaximumLineLength = new Label(); + upDownMaximumFilterEntriesDisplayed = new NumericUpDown(); + labelMaximumFilterEntriesDisplayed = new Label(); + upDownMaximumFilterEntries = new NumericUpDown(); + labelMaximumFilterEntries = new Label(); + labelDefaultEncoding = new Label(); + comboBoxEncoding = new ComboBox(); + groupBoxMisc = new GroupBox(); + checkBoxShowErrorMessageOnlyOneInstance = new CheckBox(); + cpDownColumnWidth = new NumericUpDown(); + checkBoxColumnSize = new CheckBox(); + buttonTailColor = new Button(); + checkBoxTailState = new CheckBox(); + checkBoxOpenLastFiles = new CheckBox(); + checkBoxSingleInstance = new CheckBox(); + checkBoxAskCloseTabs = new CheckBox(); + groupBoxDefaults = new GroupBox(); + labelLanguage = new Label(); + comboBoxLanguage = new ComboBox(); + checkBoxDarkMode = new CheckBox(); + checkBoxFollowTail = new CheckBox(); + checkBoxColumnFinder = new CheckBox(); + checkBoxSyncFilter = new CheckBox(); + checkBoxFilterTail = new CheckBox(); + groupBoxFont = new GroupBox(); + buttonChangeFont = new Button(); + labelFont = new Label(); + tabPageTimeStampFeatures = new TabPage(); + groupBoxTimeSpreadDisplay = new GroupBox(); + groupBoxDisplayMode = new GroupBox(); + radioButtonLineView = new RadioButton(); + radioButtonTimeView = new RadioButton(); + checkBoxReverseAlpha = new CheckBox(); + buttonTimespreadColor = new Button(); + checkBoxTimeSpread = new CheckBox(); + groupBoxTimeStampNavigationControl = new GroupBox(); + checkBoxTimestamp = new CheckBox(); + groupBoxMouseDragDefaults = new GroupBox(); + radioButtonVerticalMouseDragInverted = new RadioButton(); + radioButtonHorizMouseDrag = new RadioButton(); + radioButtonVerticalMouseDrag = new RadioButton(); + tabPageExternalTools = new TabPage(); + labelToolsDescription = new Label(); + buttonToolDelete = new Button(); + buttonToolAdd = new Button(); + buttonToolDown = new Button(); + buttonToolUp = new Button(); + listBoxTools = new CheckedListBox(); + groupBoxToolSettings = new GroupBox(); + labelWorkingDir = new Label(); + buttonWorkingDir = new Button(); + textBoxWorkingDir = new TextBox(); + buttonIcon = new Button(); + labelToolName = new Label(); + labelToolColumnizerForOutput = new Label(); + comboBoxColumnizer = new ComboBox(); + textBoxToolName = new TextBox(); + checkBoxSysout = new CheckBox(); + buttonArguments = new Button(); + labelTool = new Label(); + buttonTool = new Button(); + textBoxTool = new TextBox(); + labelArguments = new Label(); + textBoxArguments = new TextBox(); + tabPageColumnizers = new TabPage(); + checkBoxAutoPick = new CheckBox(); + checkBoxMaskPrio = new CheckBox(); + buttonDelete = new Button(); + dataGridViewColumnizer = new DataGridView(); + dataGridViewTextBoxColumnFileMask = new DataGridViewTextBoxColumn(); + dataGridViewComboBoxColumnColumnizer = new DataGridViewComboBoxColumn(); + tabPageHighlightMask = new TabPage(); + dataGridViewHighlightMask = new DataGridView(); + dataGridViewTextBoxColumnFileName = new DataGridViewTextBoxColumn(); + dataGridViewComboBoxColumnHighlightGroup = new DataGridViewComboBoxColumn(); + tabPageMultiFile = new TabPage(); + groupBoxDefaultFileNamePattern = new GroupBox(); + labelMaxDays = new Label(); + labelPattern = new Label(); + upDownMultifileDays = new NumericUpDown(); + textBoxMultifilePattern = new TextBox(); + labelHintMultiFile = new Label(); + labelNoteMultiFile = new Label(); + groupBoxWhenOpeningMultiFile = new GroupBox(); + radioButtonAskWhatToDo = new RadioButton(); + radioButtonTreatAllFilesAsOneMultifile = new RadioButton(); + radioButtonLoadEveryFileIntoSeperatedTab = new RadioButton(); + tabPagePlugins = new TabPage(); + groupBoxPlugins = new GroupBox(); + listBoxPlugin = new ListBox(); + groupBoxSettings = new GroupBox(); + panelPlugin = new Panel(); + buttonConfigPlugin = new Button(); + tabPageSessions = new TabPage(); + checkBoxPortableMode = new CheckBox(); + checkBoxSaveFilter = new CheckBox(); + groupBoxPersistantFileLocation = new GroupBox(); + labelSessionSaveOwnDir = new Label(); + buttonSessionSaveDir = new Button(); + radioButtonSessionSaveOwn = new RadioButton(); + radioButtonsessionSaveDocuments = new RadioButton(); + radioButtonSessionSameDir = new RadioButton(); + radioButtonSessionApplicationStartupDir = new RadioButton(); + checkBoxSaveSessions = new CheckBox(); + tabPageMemory = new TabPage(); + groupBoxCPUAndStuff = new GroupBox(); + checkBoxLegacyReader = new CheckBox(); + checkBoxMultiThread = new CheckBox(); + labelFilePollingInterval = new Label(); + upDownPollingInterval = new NumericUpDown(); + groupBoxLineBufferUsage = new GroupBox(); + labelInfo = new Label(); + labelNumberOfBlocks = new Label(); + upDownLinesPerBlock = new NumericUpDown(); + upDownBlockCount = new NumericUpDown(); + labelLinesPerBlock = new Label(); + buttonCancel = new Button(); + buttonOk = new Button(); + helpProvider = new HelpProvider(); + toolTip = new ToolTip(components); + buttonExport = new Button(); + buttonImport = new Button(); tabControlSettings.SuspendLayout(); tabPageViewSettings.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)upDownMaximumLineLength).BeginInit(); @@ -203,11 +204,11 @@ private void InitializeComponent() tabControlSettings.Controls.Add(tabPagePlugins); tabControlSettings.Controls.Add(tabPageSessions); tabControlSettings.Controls.Add(tabPageMemory); - tabControlSettings.Location = new System.Drawing.Point(2, 3); - tabControlSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabControlSettings.Location = new Point(2, 3); + tabControlSettings.Margin = new Padding(4, 5, 4, 5); tabControlSettings.Name = "tabControlSettings"; tabControlSettings.SelectedIndex = 0; - tabControlSettings.Size = new System.Drawing.Size(950, 468); + tabControlSettings.Size = new Size(950, 468); tabControlSettings.TabIndex = 0; // // tabPageViewSettings @@ -224,104 +225,104 @@ private void InitializeComponent() tabPageViewSettings.Controls.Add(groupBoxMisc); tabPageViewSettings.Controls.Add(groupBoxDefaults); tabPageViewSettings.Controls.Add(groupBoxFont); - tabPageViewSettings.Location = new System.Drawing.Point(4, 24); - tabPageViewSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageViewSettings.Location = new Point(4, 24); + tabPageViewSettings.Margin = new Padding(4, 5, 4, 5); tabPageViewSettings.Name = "tabPageViewSettings"; - tabPageViewSettings.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageViewSettings.Size = new System.Drawing.Size(942, 440); + tabPageViewSettings.Padding = new Padding(4, 5, 4, 5); + tabPageViewSettings.Size = new Size(942, 440); tabPageViewSettings.TabIndex = 0; tabPageViewSettings.Text = "View settings"; tabPageViewSettings.UseVisualStyleBackColor = true; // - // labelWarningMaximumLineLenght + // labelWarningMaximumLineLength // labelWarningMaximumLineLength.AutoSize = true; - labelWarningMaximumLineLength.Location = new System.Drawing.Point(446, 118); - labelWarningMaximumLineLength.Name = "labelWarningMaximumLineLenght"; - labelWarningMaximumLineLength.Size = new System.Drawing.Size(482, 15); + labelWarningMaximumLineLength.Location = new Point(446, 118); + labelWarningMaximumLineLength.Name = "labelWarningMaximumLineLength"; + labelWarningMaximumLineLength.Size = new Size(483, 15); labelWarningMaximumLineLength.TabIndex = 16; labelWarningMaximumLineLength.Text = "! Changing the Maximum Line Length can impact performance and is not recommended !"; // // upDownMaximumLineLength // - upDownMaximumLineLength.Location = new System.Drawing.Point(762, 138); - upDownMaximumLineLength.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownMaximumLineLength.Location = new Point(762, 138); + upDownMaximumLineLength.Margin = new Padding(4, 5, 4, 5); upDownMaximumLineLength.Maximum = new decimal(new int[] { 1000000, 0, 0, 0 }); upDownMaximumLineLength.Minimum = new decimal(new int[] { 20000, 0, 0, 0 }); upDownMaximumLineLength.Name = "upDownMaximumLineLength"; - upDownMaximumLineLength.Size = new System.Drawing.Size(106, 23); + upDownMaximumLineLength.Size = new Size(106, 23); upDownMaximumLineLength.TabIndex = 15; upDownMaximumLineLength.Value = new decimal(new int[] { 20000, 0, 0, 0 }); // // labelMaximumLineLength // labelMaximumLineLength.AutoSize = true; - labelMaximumLineLength.Location = new System.Drawing.Point(467, 140); - labelMaximumLineLength.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelMaximumLineLength.Location = new Point(467, 140); + labelMaximumLineLength.Margin = new Padding(4, 0, 4, 0); labelMaximumLineLength.Name = "labelMaximumLineLength"; - labelMaximumLineLength.Size = new System.Drawing.Size(217, 15); + labelMaximumLineLength.Size = new Size(218, 15); labelMaximumLineLength.TabIndex = 14; labelMaximumLineLength.Text = "Maximum Line Length (restart required)"; // // upDownMaximumFilterEntriesDisplayed // - upDownMaximumFilterEntriesDisplayed.Location = new System.Drawing.Point(762, 86); - upDownMaximumFilterEntriesDisplayed.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownMaximumFilterEntriesDisplayed.Location = new Point(762, 86); + upDownMaximumFilterEntriesDisplayed.Margin = new Padding(4, 5, 4, 5); upDownMaximumFilterEntriesDisplayed.Maximum = new decimal(new int[] { 30, 0, 0, 0 }); upDownMaximumFilterEntriesDisplayed.Minimum = new decimal(new int[] { 10, 0, 0, 0 }); upDownMaximumFilterEntriesDisplayed.Name = "upDownMaximumFilterEntriesDisplayed"; - upDownMaximumFilterEntriesDisplayed.Size = new System.Drawing.Size(106, 23); + upDownMaximumFilterEntriesDisplayed.Size = new Size(106, 23); upDownMaximumFilterEntriesDisplayed.TabIndex = 13; upDownMaximumFilterEntriesDisplayed.Value = new decimal(new int[] { 20, 0, 0, 0 }); // // labelMaximumFilterEntriesDisplayed // labelMaximumFilterEntriesDisplayed.AutoSize = true; - labelMaximumFilterEntriesDisplayed.Location = new System.Drawing.Point(467, 88); - labelMaximumFilterEntriesDisplayed.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelMaximumFilterEntriesDisplayed.Location = new Point(467, 88); + labelMaximumFilterEntriesDisplayed.Margin = new Padding(4, 0, 4, 0); labelMaximumFilterEntriesDisplayed.Name = "labelMaximumFilterEntriesDisplayed"; - labelMaximumFilterEntriesDisplayed.Size = new System.Drawing.Size(179, 15); + labelMaximumFilterEntriesDisplayed.Size = new Size(180, 15); labelMaximumFilterEntriesDisplayed.TabIndex = 12; labelMaximumFilterEntriesDisplayed.Text = "Maximum filter entries displayed"; // // upDownMaximumFilterEntries // - upDownMaximumFilterEntries.Location = new System.Drawing.Point(762, 59); - upDownMaximumFilterEntries.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownMaximumFilterEntries.Location = new Point(762, 59); + upDownMaximumFilterEntries.Margin = new Padding(4, 5, 4, 5); upDownMaximumFilterEntries.Minimum = new decimal(new int[] { 10, 0, 0, 0 }); upDownMaximumFilterEntries.Name = "upDownMaximumFilterEntries"; - upDownMaximumFilterEntries.Size = new System.Drawing.Size(106, 23); + upDownMaximumFilterEntries.Size = new Size(106, 23); upDownMaximumFilterEntries.TabIndex = 11; upDownMaximumFilterEntries.Value = new decimal(new int[] { 30, 0, 0, 0 }); // // labelMaximumFilterEntries // labelMaximumFilterEntries.AutoSize = true; - labelMaximumFilterEntries.Location = new System.Drawing.Point(467, 61); - labelMaximumFilterEntries.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelMaximumFilterEntries.Location = new Point(467, 61); + labelMaximumFilterEntries.Margin = new Padding(4, 0, 4, 0); labelMaximumFilterEntries.Name = "labelMaximumFilterEntries"; - labelMaximumFilterEntries.Size = new System.Drawing.Size(126, 15); + labelMaximumFilterEntries.Size = new Size(127, 15); labelMaximumFilterEntries.TabIndex = 10; labelMaximumFilterEntries.Text = "Maximum filter entries"; // // labelDefaultEncoding // labelDefaultEncoding.AutoSize = true; - labelDefaultEncoding.Location = new System.Drawing.Point(467, 34); - labelDefaultEncoding.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelDefaultEncoding.Location = new Point(467, 34); + labelDefaultEncoding.Margin = new Padding(4, 0, 4, 0); labelDefaultEncoding.Name = "labelDefaultEncoding"; - labelDefaultEncoding.Size = new System.Drawing.Size(98, 15); + labelDefaultEncoding.Size = new Size(98, 15); labelDefaultEncoding.TabIndex = 9; labelDefaultEncoding.Text = "Default encoding"; // // comboBoxEncoding // - comboBoxEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + comboBoxEncoding.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxEncoding.FormattingEnabled = true; - comboBoxEncoding.Location = new System.Drawing.Point(691, 26); - comboBoxEncoding.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + comboBoxEncoding.Location = new Point(691, 26); + comboBoxEncoding.Margin = new Padding(4, 5, 4, 5); comboBoxEncoding.Name = "comboBoxEncoding"; - comboBoxEncoding.Size = new System.Drawing.Size(177, 23); + comboBoxEncoding.Size = new Size(177, 23); comboBoxEncoding.TabIndex = 8; toolTip.SetToolTip(comboBoxEncoding, "Encoding to be used when no BOM header and no persistence data is available."); // @@ -335,11 +336,11 @@ private void InitializeComponent() groupBoxMisc.Controls.Add(checkBoxOpenLastFiles); groupBoxMisc.Controls.Add(checkBoxSingleInstance); groupBoxMisc.Controls.Add(checkBoxAskCloseTabs); - groupBoxMisc.Location = new System.Drawing.Point(458, 171); - groupBoxMisc.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxMisc.Location = new Point(458, 171); + groupBoxMisc.Margin = new Padding(4, 5, 4, 5); groupBoxMisc.Name = "groupBoxMisc"; - groupBoxMisc.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxMisc.Size = new System.Drawing.Size(410, 226); + groupBoxMisc.Padding = new Padding(4, 5, 4, 5); + groupBoxMisc.Size = new Size(410, 226); groupBoxMisc.TabIndex = 7; groupBoxMisc.TabStop = false; groupBoxMisc.Text = "Misc"; @@ -347,32 +348,32 @@ private void InitializeComponent() // checkBoxShowErrorMessageOnlyOneInstance // checkBoxShowErrorMessageOnlyOneInstance.AutoSize = true; - checkBoxShowErrorMessageOnlyOneInstance.Location = new System.Drawing.Point(210, 66); - checkBoxShowErrorMessageOnlyOneInstance.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxShowErrorMessageOnlyOneInstance.Location = new Point(210, 66); + checkBoxShowErrorMessageOnlyOneInstance.Margin = new Padding(4, 5, 4, 5); checkBoxShowErrorMessageOnlyOneInstance.Name = "checkBoxShowErrorMessageOnlyOneInstance"; - checkBoxShowErrorMessageOnlyOneInstance.Size = new System.Drawing.Size(137, 19); + checkBoxShowErrorMessageOnlyOneInstance.Size = new Size(137, 19); checkBoxShowErrorMessageOnlyOneInstance.TabIndex = 7; checkBoxShowErrorMessageOnlyOneInstance.Text = "Show Error Message?"; checkBoxShowErrorMessageOnlyOneInstance.UseVisualStyleBackColor = true; // // cpDownColumnWidth // - cpDownColumnWidth.Location = new System.Drawing.Point(304, 175); - cpDownColumnWidth.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + cpDownColumnWidth.Location = new Point(304, 175); + cpDownColumnWidth.Margin = new Padding(4, 5, 4, 5); cpDownColumnWidth.Maximum = new decimal(new int[] { 9000, 0, 0, 0 }); cpDownColumnWidth.Minimum = new decimal(new int[] { 300, 0, 0, 0 }); cpDownColumnWidth.Name = "cpDownColumnWidth"; - cpDownColumnWidth.Size = new System.Drawing.Size(84, 23); + cpDownColumnWidth.Size = new Size(84, 23); cpDownColumnWidth.TabIndex = 6; cpDownColumnWidth.Value = new decimal(new int[] { 2000, 0, 0, 0 }); // // checkBoxColumnSize // checkBoxColumnSize.AutoSize = true; - checkBoxColumnSize.Location = new System.Drawing.Point(9, 177); - checkBoxColumnSize.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxColumnSize.Location = new Point(9, 177); + checkBoxColumnSize.Margin = new Padding(4, 5, 4, 5); checkBoxColumnSize.Name = "checkBoxColumnSize"; - checkBoxColumnSize.Size = new System.Drawing.Size(140, 19); + checkBoxColumnSize.Size = new Size(140, 19); checkBoxColumnSize.TabIndex = 5; checkBoxColumnSize.Text = "Set last column width"; checkBoxColumnSize.UseVisualStyleBackColor = true; @@ -380,10 +381,10 @@ private void InitializeComponent() // // buttonTailColor // - buttonTailColor.Location = new System.Drawing.Point(304, 135); - buttonTailColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonTailColor.Location = new Point(304, 135); + buttonTailColor.Margin = new Padding(4, 5, 4, 5); buttonTailColor.Name = "buttonTailColor"; - buttonTailColor.Size = new System.Drawing.Size(84, 32); + buttonTailColor.Size = new Size(84, 32); buttonTailColor.TabIndex = 4; buttonTailColor.Text = "Color..."; buttonTailColor.UseVisualStyleBackColor = true; @@ -392,10 +393,10 @@ private void InitializeComponent() // checkBoxTailState // checkBoxTailState.AutoSize = true; - checkBoxTailState.Location = new System.Drawing.Point(9, 140); - checkBoxTailState.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxTailState.Location = new Point(9, 140); + checkBoxTailState.Margin = new Padding(4, 5, 4, 5); checkBoxTailState.Name = "checkBoxTailState"; - checkBoxTailState.Size = new System.Drawing.Size(144, 19); + checkBoxTailState.Size = new Size(144, 19); checkBoxTailState.TabIndex = 3; checkBoxTailState.Text = "Show tail state on tabs"; checkBoxTailState.UseVisualStyleBackColor = true; @@ -403,10 +404,10 @@ private void InitializeComponent() // checkBoxOpenLastFiles // checkBoxOpenLastFiles.AutoSize = true; - checkBoxOpenLastFiles.Location = new System.Drawing.Point(9, 103); - checkBoxOpenLastFiles.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxOpenLastFiles.Location = new Point(9, 103); + checkBoxOpenLastFiles.Margin = new Padding(4, 5, 4, 5); checkBoxOpenLastFiles.Name = "checkBoxOpenLastFiles"; - checkBoxOpenLastFiles.Size = new System.Drawing.Size(144, 19); + checkBoxOpenLastFiles.Size = new Size(144, 19); checkBoxOpenLastFiles.TabIndex = 2; checkBoxOpenLastFiles.Text = "Re-open last used files"; checkBoxOpenLastFiles.UseVisualStyleBackColor = true; @@ -414,10 +415,10 @@ private void InitializeComponent() // checkBoxSingleInstance // checkBoxSingleInstance.AutoSize = true; - checkBoxSingleInstance.Location = new System.Drawing.Point(9, 66); - checkBoxSingleInstance.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxSingleInstance.Location = new Point(9, 66); + checkBoxSingleInstance.Margin = new Padding(4, 5, 4, 5); checkBoxSingleInstance.Name = "checkBoxSingleInstance"; - checkBoxSingleInstance.Size = new System.Drawing.Size(138, 19); + checkBoxSingleInstance.Size = new Size(138, 19); checkBoxSingleInstance.TabIndex = 1; checkBoxSingleInstance.Text = "Allow only 1 Instance"; checkBoxSingleInstance.UseVisualStyleBackColor = true; @@ -425,37 +426,60 @@ private void InitializeComponent() // checkBoxAskCloseTabs // checkBoxAskCloseTabs.AutoSize = true; - checkBoxAskCloseTabs.Location = new System.Drawing.Point(9, 29); - checkBoxAskCloseTabs.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxAskCloseTabs.Location = new Point(9, 29); + checkBoxAskCloseTabs.Margin = new Padding(4, 5, 4, 5); checkBoxAskCloseTabs.Name = "checkBoxAskCloseTabs"; - checkBoxAskCloseTabs.Size = new System.Drawing.Size(148, 19); + checkBoxAskCloseTabs.Size = new Size(148, 19); checkBoxAskCloseTabs.TabIndex = 0; checkBoxAskCloseTabs.Text = "Ask before closing tabs"; checkBoxAskCloseTabs.UseVisualStyleBackColor = true; // // groupBoxDefaults // + groupBoxDefaults.Controls.Add(labelLanguage); + groupBoxDefaults.Controls.Add(comboBoxLanguage); groupBoxDefaults.Controls.Add(checkBoxDarkMode); groupBoxDefaults.Controls.Add(checkBoxFollowTail); groupBoxDefaults.Controls.Add(checkBoxColumnFinder); groupBoxDefaults.Controls.Add(checkBoxSyncFilter); groupBoxDefaults.Controls.Add(checkBoxFilterTail); - groupBoxDefaults.Location = new System.Drawing.Point(10, 171); - groupBoxDefaults.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxDefaults.Location = new Point(10, 171); + groupBoxDefaults.Margin = new Padding(4, 5, 4, 5); groupBoxDefaults.Name = "groupBoxDefaults"; - groupBoxDefaults.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxDefaults.Size = new System.Drawing.Size(411, 226); + groupBoxDefaults.Padding = new Padding(4, 5, 4, 5); + groupBoxDefaults.Size = new Size(411, 226); groupBoxDefaults.TabIndex = 6; groupBoxDefaults.TabStop = false; groupBoxDefaults.Text = "Defaults"; // + // labelLanguage + // + labelLanguage.AutoSize = true; + labelLanguage.Location = new Point(9, 175); + labelLanguage.Margin = new Padding(4, 0, 4, 0); + labelLanguage.Name = "labelLanguage"; + labelLanguage.Size = new Size(98, 15); + labelLanguage.TabIndex = 17; + labelLanguage.Text = "Default encoding"; + // + // comboBoxLanguage + // + comboBoxLanguage.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxLanguage.FormattingEnabled = true; + comboBoxLanguage.Location = new Point(115, 172); + comboBoxLanguage.Margin = new Padding(4, 5, 4, 5); + comboBoxLanguage.Name = "comboBoxLanguage"; + comboBoxLanguage.Size = new Size(177, 23); + comboBoxLanguage.TabIndex = 9; + toolTip.SetToolTip(comboBoxLanguage, "Userinterface language"); + // // checkBoxDarkMode // checkBoxDarkMode.AutoSize = true; - checkBoxDarkMode.Location = new System.Drawing.Point(7, 141); - checkBoxDarkMode.Margin = new System.Windows.Forms.Padding(4); + checkBoxDarkMode.Location = new Point(9, 144); + checkBoxDarkMode.Margin = new Padding(4); checkBoxDarkMode.Name = "checkBoxDarkMode"; - checkBoxDarkMode.Size = new System.Drawing.Size(175, 19); + checkBoxDarkMode.Size = new Size(175, 19); checkBoxDarkMode.TabIndex = 6; checkBoxDarkMode.Text = "Dark Mode (restart required)"; checkBoxDarkMode.UseVisualStyleBackColor = true; @@ -463,10 +487,10 @@ private void InitializeComponent() // checkBoxFollowTail // checkBoxFollowTail.AutoSize = true; - checkBoxFollowTail.Location = new System.Drawing.Point(9, 29); - checkBoxFollowTail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxFollowTail.Location = new Point(9, 29); + checkBoxFollowTail.Margin = new Padding(4, 5, 4, 5); checkBoxFollowTail.Name = "checkBoxFollowTail"; - checkBoxFollowTail.Size = new System.Drawing.Size(125, 19); + checkBoxFollowTail.Size = new Size(125, 19); checkBoxFollowTail.TabIndex = 3; checkBoxFollowTail.Text = "Follow tail enabled"; checkBoxFollowTail.UseVisualStyleBackColor = true; @@ -474,10 +498,10 @@ private void InitializeComponent() // checkBoxColumnFinder // checkBoxColumnFinder.AutoSize = true; - checkBoxColumnFinder.Location = new System.Drawing.Point(9, 140); - checkBoxColumnFinder.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxColumnFinder.Location = new Point(9, 116); + checkBoxColumnFinder.Margin = new Padding(4, 5, 4, 5); checkBoxColumnFinder.Name = "checkBoxColumnFinder"; - checkBoxColumnFinder.Size = new System.Drawing.Size(133, 19); + checkBoxColumnFinder.Size = new Size(133, 19); checkBoxColumnFinder.TabIndex = 5; checkBoxColumnFinder.Text = "Show column finder"; checkBoxColumnFinder.UseVisualStyleBackColor = true; @@ -485,10 +509,10 @@ private void InitializeComponent() // checkBoxSyncFilter // checkBoxSyncFilter.AutoSize = true; - checkBoxSyncFilter.Location = new System.Drawing.Point(9, 103); - checkBoxSyncFilter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxSyncFilter.Location = new Point(9, 87); + checkBoxSyncFilter.Margin = new Padding(4, 5, 4, 5); checkBoxSyncFilter.Name = "checkBoxSyncFilter"; - checkBoxSyncFilter.Size = new System.Drawing.Size(141, 19); + checkBoxSyncFilter.Size = new Size(141, 19); checkBoxSyncFilter.TabIndex = 5; checkBoxSyncFilter.Text = "Sync filter list enabled"; checkBoxSyncFilter.UseVisualStyleBackColor = true; @@ -496,10 +520,10 @@ private void InitializeComponent() // checkBoxFilterTail // checkBoxFilterTail.AutoSize = true; - checkBoxFilterTail.Location = new System.Drawing.Point(9, 66); - checkBoxFilterTail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxFilterTail.Location = new Point(9, 58); + checkBoxFilterTail.Margin = new Padding(4, 5, 4, 5); checkBoxFilterTail.Name = "checkBoxFilterTail"; - checkBoxFilterTail.Size = new System.Drawing.Size(116, 19); + checkBoxFilterTail.Size = new Size(116, 19); checkBoxFilterTail.TabIndex = 4; checkBoxFilterTail.Text = "Filter tail enabled"; checkBoxFilterTail.UseVisualStyleBackColor = true; @@ -508,21 +532,21 @@ private void InitializeComponent() // groupBoxFont.Controls.Add(buttonChangeFont); groupBoxFont.Controls.Add(labelFont); - groupBoxFont.Location = new System.Drawing.Point(10, 9); - groupBoxFont.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxFont.Location = new Point(10, 9); + groupBoxFont.Margin = new Padding(4, 5, 4, 5); groupBoxFont.Name = "groupBoxFont"; - groupBoxFont.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxFont.Size = new System.Drawing.Size(408, 128); + groupBoxFont.Padding = new Padding(4, 5, 4, 5); + groupBoxFont.Size = new Size(408, 128); groupBoxFont.TabIndex = 1; groupBoxFont.TabStop = false; groupBoxFont.Text = "Font"; // // buttonChangeFont // - buttonChangeFont.Location = new System.Drawing.Point(9, 77); - buttonChangeFont.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonChangeFont.Location = new Point(9, 77); + buttonChangeFont.Margin = new Padding(4, 5, 4, 5); buttonChangeFont.Name = "buttonChangeFont"; - buttonChangeFont.Size = new System.Drawing.Size(112, 35); + buttonChangeFont.Size = new Size(112, 35); buttonChangeFont.TabIndex = 1; buttonChangeFont.Text = "Change..."; buttonChangeFont.UseVisualStyleBackColor = true; @@ -530,23 +554,23 @@ private void InitializeComponent() // // labelFont // - labelFont.Location = new System.Drawing.Point(9, 25); - labelFont.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelFont.Location = new Point(9, 25); + labelFont.Margin = new Padding(4, 0, 4, 0); labelFont.Name = "labelFont"; - labelFont.Size = new System.Drawing.Size(312, 48); + labelFont.Size = new Size(312, 48); labelFont.TabIndex = 0; labelFont.Text = "Font"; - labelFont.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + labelFont.TextAlign = ContentAlignment.MiddleLeft; // // tabPageTimeStampFeatures // tabPageTimeStampFeatures.Controls.Add(groupBoxTimeSpreadDisplay); tabPageTimeStampFeatures.Controls.Add(groupBoxTimeStampNavigationControl); - tabPageTimeStampFeatures.Location = new System.Drawing.Point(4, 24); - tabPageTimeStampFeatures.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageTimeStampFeatures.Location = new Point(4, 24); + tabPageTimeStampFeatures.Margin = new Padding(4, 5, 4, 5); tabPageTimeStampFeatures.Name = "tabPageTimeStampFeatures"; - tabPageTimeStampFeatures.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageTimeStampFeatures.Size = new System.Drawing.Size(942, 440); + tabPageTimeStampFeatures.Padding = new Padding(4, 5, 4, 5); + tabPageTimeStampFeatures.Size = new Size(942, 440); tabPageTimeStampFeatures.TabIndex = 1; tabPageTimeStampFeatures.Text = "Timestamp features"; tabPageTimeStampFeatures.UseVisualStyleBackColor = true; @@ -557,11 +581,11 @@ private void InitializeComponent() groupBoxTimeSpreadDisplay.Controls.Add(checkBoxReverseAlpha); groupBoxTimeSpreadDisplay.Controls.Add(buttonTimespreadColor); groupBoxTimeSpreadDisplay.Controls.Add(checkBoxTimeSpread); - groupBoxTimeSpreadDisplay.Location = new System.Drawing.Point(490, 25); - groupBoxTimeSpreadDisplay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxTimeSpreadDisplay.Location = new Point(490, 25); + groupBoxTimeSpreadDisplay.Margin = new Padding(4, 5, 4, 5); groupBoxTimeSpreadDisplay.Name = "groupBoxTimeSpreadDisplay"; - groupBoxTimeSpreadDisplay.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxTimeSpreadDisplay.Size = new System.Drawing.Size(300, 246); + groupBoxTimeSpreadDisplay.Padding = new Padding(4, 5, 4, 5); + groupBoxTimeSpreadDisplay.Size = new Size(300, 246); groupBoxTimeSpreadDisplay.TabIndex = 8; groupBoxTimeSpreadDisplay.TabStop = false; groupBoxTimeSpreadDisplay.Text = "Time spread display"; @@ -570,11 +594,11 @@ private void InitializeComponent() // groupBoxDisplayMode.Controls.Add(radioButtonLineView); groupBoxDisplayMode.Controls.Add(radioButtonTimeView); - groupBoxDisplayMode.Location = new System.Drawing.Point(22, 109); - groupBoxDisplayMode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxDisplayMode.Location = new Point(22, 109); + groupBoxDisplayMode.Margin = new Padding(4, 5, 4, 5); groupBoxDisplayMode.Name = "groupBoxDisplayMode"; - groupBoxDisplayMode.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxDisplayMode.Size = new System.Drawing.Size(188, 118); + groupBoxDisplayMode.Padding = new Padding(4, 5, 4, 5); + groupBoxDisplayMode.Size = new Size(188, 118); groupBoxDisplayMode.TabIndex = 11; groupBoxDisplayMode.TabStop = false; groupBoxDisplayMode.Text = "Display mode"; @@ -582,10 +606,10 @@ private void InitializeComponent() // radioButtonLineView // radioButtonLineView.AutoSize = true; - radioButtonLineView.Location = new System.Drawing.Point(9, 65); - radioButtonLineView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonLineView.Location = new Point(9, 65); + radioButtonLineView.Margin = new Padding(4, 5, 4, 5); radioButtonLineView.Name = "radioButtonLineView"; - radioButtonLineView.Size = new System.Drawing.Size(74, 19); + radioButtonLineView.Size = new Size(74, 19); radioButtonLineView.TabIndex = 9; radioButtonLineView.TabStop = true; radioButtonLineView.Text = "Line view"; @@ -594,10 +618,10 @@ private void InitializeComponent() // radioButtonTimeView // radioButtonTimeView.AutoSize = true; - radioButtonTimeView.Location = new System.Drawing.Point(9, 29); - radioButtonTimeView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonTimeView.Location = new Point(9, 29); + radioButtonTimeView.Margin = new Padding(4, 5, 4, 5); radioButtonTimeView.Name = "radioButtonTimeView"; - radioButtonTimeView.Size = new System.Drawing.Size(79, 19); + radioButtonTimeView.Size = new Size(78, 19); radioButtonTimeView.TabIndex = 10; radioButtonTimeView.TabStop = true; radioButtonTimeView.Text = "Time view"; @@ -606,20 +630,20 @@ private void InitializeComponent() // checkBoxReverseAlpha // checkBoxReverseAlpha.AutoSize = true; - checkBoxReverseAlpha.Location = new System.Drawing.Point(22, 74); - checkBoxReverseAlpha.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxReverseAlpha.Location = new Point(22, 74); + checkBoxReverseAlpha.Margin = new Padding(4, 5, 4, 5); checkBoxReverseAlpha.Name = "checkBoxReverseAlpha"; - checkBoxReverseAlpha.Size = new System.Drawing.Size(98, 19); + checkBoxReverseAlpha.Size = new Size(98, 19); checkBoxReverseAlpha.TabIndex = 8; checkBoxReverseAlpha.Text = "Reverse alpha"; checkBoxReverseAlpha.UseVisualStyleBackColor = true; // // buttonTimespreadColor // - buttonTimespreadColor.Location = new System.Drawing.Point(207, 32); - buttonTimespreadColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonTimespreadColor.Location = new Point(207, 32); + buttonTimespreadColor.Margin = new Padding(4, 5, 4, 5); buttonTimespreadColor.Name = "buttonTimespreadColor"; - buttonTimespreadColor.Size = new System.Drawing.Size(84, 32); + buttonTimespreadColor.Size = new Size(84, 32); buttonTimespreadColor.TabIndex = 7; buttonTimespreadColor.Text = "Color..."; buttonTimespreadColor.UseVisualStyleBackColor = true; @@ -628,10 +652,10 @@ private void InitializeComponent() // checkBoxTimeSpread // checkBoxTimeSpread.AutoSize = true; - checkBoxTimeSpread.Location = new System.Drawing.Point(22, 37); - checkBoxTimeSpread.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxTimeSpread.Location = new Point(22, 37); + checkBoxTimeSpread.Margin = new Padding(4, 5, 4, 5); checkBoxTimeSpread.Name = "checkBoxTimeSpread"; - checkBoxTimeSpread.Size = new System.Drawing.Size(120, 19); + checkBoxTimeSpread.Size = new Size(120, 19); checkBoxTimeSpread.TabIndex = 6; checkBoxTimeSpread.Text = "Show time spread"; checkBoxTimeSpread.UseVisualStyleBackColor = true; @@ -640,11 +664,11 @@ private void InitializeComponent() // groupBoxTimeStampNavigationControl.Controls.Add(checkBoxTimestamp); groupBoxTimeStampNavigationControl.Controls.Add(groupBoxMouseDragDefaults); - groupBoxTimeStampNavigationControl.Location = new System.Drawing.Point(10, 25); - groupBoxTimeStampNavigationControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxTimeStampNavigationControl.Location = new Point(10, 25); + groupBoxTimeStampNavigationControl.Margin = new Padding(4, 5, 4, 5); groupBoxTimeStampNavigationControl.Name = "groupBoxTimeStampNavigationControl"; - groupBoxTimeStampNavigationControl.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxTimeStampNavigationControl.Size = new System.Drawing.Size(450, 246); + groupBoxTimeStampNavigationControl.Padding = new Padding(4, 5, 4, 5); + groupBoxTimeStampNavigationControl.Size = new Size(450, 246); groupBoxTimeStampNavigationControl.TabIndex = 7; groupBoxTimeStampNavigationControl.TabStop = false; groupBoxTimeStampNavigationControl.Text = "Timestamp navigation control"; @@ -652,10 +676,10 @@ private void InitializeComponent() // checkBoxTimestamp // checkBoxTimestamp.AutoSize = true; - checkBoxTimestamp.Location = new System.Drawing.Point(27, 37); - checkBoxTimestamp.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxTimestamp.Location = new Point(27, 37); + checkBoxTimestamp.Margin = new Padding(4, 5, 4, 5); checkBoxTimestamp.Name = "checkBoxTimestamp"; - checkBoxTimestamp.Size = new System.Drawing.Size(304, 19); + checkBoxTimestamp.Size = new Size(304, 19); checkBoxTimestamp.TabIndex = 3; checkBoxTimestamp.Text = "Show timestamp control, if supported by columnizer"; checkBoxTimestamp.UseVisualStyleBackColor = true; @@ -665,11 +689,11 @@ private void InitializeComponent() groupBoxMouseDragDefaults.Controls.Add(radioButtonVerticalMouseDragInverted); groupBoxMouseDragDefaults.Controls.Add(radioButtonHorizMouseDrag); groupBoxMouseDragDefaults.Controls.Add(radioButtonVerticalMouseDrag); - groupBoxMouseDragDefaults.Location = new System.Drawing.Point(27, 80); - groupBoxMouseDragDefaults.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxMouseDragDefaults.Location = new Point(27, 80); + groupBoxMouseDragDefaults.Margin = new Padding(4, 5, 4, 5); groupBoxMouseDragDefaults.Name = "groupBoxMouseDragDefaults"; - groupBoxMouseDragDefaults.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxMouseDragDefaults.Size = new System.Drawing.Size(186, 148); + groupBoxMouseDragDefaults.Padding = new Padding(4, 5, 4, 5); + groupBoxMouseDragDefaults.Size = new Size(186, 148); groupBoxMouseDragDefaults.TabIndex = 5; groupBoxMouseDragDefaults.TabStop = false; groupBoxMouseDragDefaults.Text = "Mouse Drag Default"; @@ -677,10 +701,10 @@ private void InitializeComponent() // radioButtonVerticalMouseDragInverted // radioButtonVerticalMouseDragInverted.AutoSize = true; - radioButtonVerticalMouseDragInverted.Location = new System.Drawing.Point(9, 102); - radioButtonVerticalMouseDragInverted.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonVerticalMouseDragInverted.Location = new Point(9, 102); + radioButtonVerticalMouseDragInverted.Margin = new Padding(4, 5, 4, 5); radioButtonVerticalMouseDragInverted.Name = "radioButtonVerticalMouseDragInverted"; - radioButtonVerticalMouseDragInverted.Size = new System.Drawing.Size(109, 19); + radioButtonVerticalMouseDragInverted.Size = new Size(109, 19); radioButtonVerticalMouseDragInverted.TabIndex = 6; radioButtonVerticalMouseDragInverted.TabStop = true; radioButtonVerticalMouseDragInverted.Text = "Vertical Inverted"; @@ -689,10 +713,10 @@ private void InitializeComponent() // radioButtonHorizMouseDrag // radioButtonHorizMouseDrag.AutoSize = true; - radioButtonHorizMouseDrag.Location = new System.Drawing.Point(9, 29); - radioButtonHorizMouseDrag.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonHorizMouseDrag.Location = new Point(9, 29); + radioButtonHorizMouseDrag.Margin = new Padding(4, 5, 4, 5); radioButtonHorizMouseDrag.Name = "radioButtonHorizMouseDrag"; - radioButtonHorizMouseDrag.Size = new System.Drawing.Size(80, 19); + radioButtonHorizMouseDrag.Size = new Size(80, 19); radioButtonHorizMouseDrag.TabIndex = 5; radioButtonHorizMouseDrag.TabStop = true; radioButtonHorizMouseDrag.Text = "Horizontal"; @@ -701,10 +725,10 @@ private void InitializeComponent() // radioButtonVerticalMouseDrag // radioButtonVerticalMouseDrag.AutoSize = true; - radioButtonVerticalMouseDrag.Location = new System.Drawing.Point(9, 65); - radioButtonVerticalMouseDrag.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonVerticalMouseDrag.Location = new Point(9, 65); + radioButtonVerticalMouseDrag.Margin = new Padding(4, 5, 4, 5); radioButtonVerticalMouseDrag.Name = "radioButtonVerticalMouseDrag"; - radioButtonVerticalMouseDrag.Size = new System.Drawing.Size(63, 19); + radioButtonVerticalMouseDrag.Size = new Size(63, 19); radioButtonVerticalMouseDrag.TabIndex = 4; radioButtonVerticalMouseDrag.TabStop = true; radioButtonVerticalMouseDrag.Text = "Vertical"; @@ -719,30 +743,30 @@ private void InitializeComponent() tabPageExternalTools.Controls.Add(buttonToolUp); tabPageExternalTools.Controls.Add(listBoxTools); tabPageExternalTools.Controls.Add(groupBoxToolSettings); - tabPageExternalTools.Location = new System.Drawing.Point(4, 24); - tabPageExternalTools.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageExternalTools.Location = new Point(4, 24); + tabPageExternalTools.Margin = new Padding(4, 5, 4, 5); tabPageExternalTools.Name = "tabPageExternalTools"; - tabPageExternalTools.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageExternalTools.Size = new System.Drawing.Size(942, 440); + tabPageExternalTools.Padding = new Padding(4, 5, 4, 5); + tabPageExternalTools.Size = new Size(942, 440); tabPageExternalTools.TabIndex = 2; tabPageExternalTools.Text = "External Tools"; tabPageExternalTools.UseVisualStyleBackColor = true; // // labelToolsDescription // - labelToolsDescription.Location = new System.Drawing.Point(546, 102); - labelToolsDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelToolsDescription.Location = new Point(546, 102); + labelToolsDescription.Margin = new Padding(4, 0, 4, 0); labelToolsDescription.Name = "labelToolsDescription"; - labelToolsDescription.Size = new System.Drawing.Size(376, 80); + labelToolsDescription.Size = new Size(376, 80); labelToolsDescription.TabIndex = 6; labelToolsDescription.Text = "You can configure as many tools as you want. \r\nChecked tools will appear in the icon bar. All other tools are available in the tools menu."; // // buttonToolDelete // - buttonToolDelete.Location = new System.Drawing.Point(550, 14); - buttonToolDelete.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonToolDelete.Location = new Point(550, 14); + buttonToolDelete.Margin = new Padding(4, 5, 4, 5); buttonToolDelete.Name = "buttonToolDelete"; - buttonToolDelete.Size = new System.Drawing.Size(112, 35); + buttonToolDelete.Size = new Size(112, 35); buttonToolDelete.TabIndex = 2; buttonToolDelete.Text = "Remove"; buttonToolDelete.UseVisualStyleBackColor = true; @@ -750,10 +774,10 @@ private void InitializeComponent() // // buttonToolAdd // - buttonToolAdd.Location = new System.Drawing.Point(429, 14); - buttonToolAdd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonToolAdd.Location = new Point(429, 14); + buttonToolAdd.Margin = new Padding(4, 5, 4, 5); buttonToolAdd.Name = "buttonToolAdd"; - buttonToolAdd.Size = new System.Drawing.Size(112, 35); + buttonToolAdd.Size = new Size(112, 35); buttonToolAdd.TabIndex = 1; buttonToolAdd.Text = "Add new"; buttonToolAdd.UseVisualStyleBackColor = true; @@ -761,10 +785,10 @@ private void InitializeComponent() // // buttonToolDown // - buttonToolDown.Location = new System.Drawing.Point(429, 146); - buttonToolDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonToolDown.Location = new Point(429, 146); + buttonToolDown.Margin = new Padding(4, 5, 4, 5); buttonToolDown.Name = "buttonToolDown"; - buttonToolDown.Size = new System.Drawing.Size(64, 35); + buttonToolDown.Size = new Size(64, 35); buttonToolDown.TabIndex = 4; buttonToolDown.Text = "Down"; buttonToolDown.UseVisualStyleBackColor = true; @@ -772,10 +796,10 @@ private void InitializeComponent() // // buttonToolUp // - buttonToolUp.Location = new System.Drawing.Point(429, 102); - buttonToolUp.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonToolUp.Location = new Point(429, 102); + buttonToolUp.Margin = new Padding(4, 5, 4, 5); buttonToolUp.Name = "buttonToolUp"; - buttonToolUp.Size = new System.Drawing.Size(64, 35); + buttonToolUp.Size = new Size(64, 35); buttonToolUp.TabIndex = 3; buttonToolUp.Text = "Up"; buttonToolUp.UseVisualStyleBackColor = true; @@ -784,10 +808,10 @@ private void InitializeComponent() // listBoxTools // listBoxTools.FormattingEnabled = true; - listBoxTools.Location = new System.Drawing.Point(10, 14); - listBoxTools.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + listBoxTools.Location = new Point(10, 14); + listBoxTools.Margin = new Padding(4, 5, 4, 5); listBoxTools.Name = "listBoxTools"; - listBoxTools.Size = new System.Drawing.Size(406, 148); + listBoxTools.Size = new Size(406, 148); listBoxTools.TabIndex = 0; listBoxTools.SelectedIndexChanged += OnListBoxToolSelectedIndexChanged; // @@ -808,11 +832,11 @@ private void InitializeComponent() groupBoxToolSettings.Controls.Add(textBoxTool); groupBoxToolSettings.Controls.Add(labelArguments); groupBoxToolSettings.Controls.Add(textBoxArguments); - groupBoxToolSettings.Location = new System.Drawing.Point(10, 191); - groupBoxToolSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxToolSettings.Location = new Point(10, 191); + groupBoxToolSettings.Margin = new Padding(4, 5, 4, 5); groupBoxToolSettings.Name = "groupBoxToolSettings"; - groupBoxToolSettings.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxToolSettings.Size = new System.Drawing.Size(912, 228); + groupBoxToolSettings.Padding = new Padding(4, 5, 4, 5); + groupBoxToolSettings.Size = new Size(912, 228); groupBoxToolSettings.TabIndex = 0; groupBoxToolSettings.TabStop = false; groupBoxToolSettings.Text = "Tool settings"; @@ -820,19 +844,19 @@ private void InitializeComponent() // labelWorkingDir // labelWorkingDir.AutoSize = true; - labelWorkingDir.Location = new System.Drawing.Point(474, 86); - labelWorkingDir.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelWorkingDir.Location = new Point(474, 86); + labelWorkingDir.Margin = new Padding(4, 0, 4, 0); labelWorkingDir.Name = "labelWorkingDir"; - labelWorkingDir.Size = new System.Drawing.Size(72, 15); + labelWorkingDir.Size = new Size(72, 15); labelWorkingDir.TabIndex = 11; labelWorkingDir.Text = "Working dir:"; // // buttonWorkingDir // - buttonWorkingDir.Location = new System.Drawing.Point(856, 80); - buttonWorkingDir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonWorkingDir.Location = new Point(856, 80); + buttonWorkingDir.Margin = new Padding(4, 5, 4, 5); buttonWorkingDir.Name = "buttonWorkingDir"; - buttonWorkingDir.Size = new System.Drawing.Size(45, 31); + buttonWorkingDir.Size = new Size(45, 31); buttonWorkingDir.TabIndex = 10; buttonWorkingDir.Text = "..."; buttonWorkingDir.UseVisualStyleBackColor = true; @@ -840,69 +864,69 @@ private void InitializeComponent() // // textBoxWorkingDir // - textBoxWorkingDir.Location = new System.Drawing.Point(576, 82); - textBoxWorkingDir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + textBoxWorkingDir.Location = new Point(576, 82); + textBoxWorkingDir.Margin = new Padding(4, 5, 4, 5); textBoxWorkingDir.Name = "textBoxWorkingDir"; - textBoxWorkingDir.Size = new System.Drawing.Size(270, 23); + textBoxWorkingDir.Size = new Size(270, 23); textBoxWorkingDir.TabIndex = 9; // // buttonIcon // - buttonIcon.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - buttonIcon.Location = new System.Drawing.Point(418, 26); - buttonIcon.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonIcon.ImageAlign = ContentAlignment.MiddleLeft; + buttonIcon.Location = new Point(418, 26); + buttonIcon.Margin = new Padding(4, 5, 4, 5); buttonIcon.Name = "buttonIcon"; - buttonIcon.Size = new System.Drawing.Size(112, 35); + buttonIcon.Size = new Size(112, 35); buttonIcon.TabIndex = 1; buttonIcon.Text = " Icon..."; - buttonIcon.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + buttonIcon.TextImageRelation = TextImageRelation.ImageBeforeText; buttonIcon.UseVisualStyleBackColor = true; buttonIcon.Click += OnBtnIconClick; // // labelToolName // labelToolName.AutoSize = true; - labelToolName.Location = new System.Drawing.Point(9, 34); - labelToolName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelToolName.Location = new Point(9, 34); + labelToolName.Margin = new Padding(4, 0, 4, 0); labelToolName.Name = "labelToolName"; - labelToolName.Size = new System.Drawing.Size(42, 15); + labelToolName.Size = new Size(42, 15); labelToolName.TabIndex = 8; labelToolName.Text = "Name:"; // // labelToolColumnizerForOutput // labelToolColumnizerForOutput.AutoSize = true; - labelToolColumnizerForOutput.Location = new System.Drawing.Point(404, 185); - labelToolColumnizerForOutput.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelToolColumnizerForOutput.Location = new Point(404, 185); + labelToolColumnizerForOutput.Margin = new Padding(4, 0, 4, 0); labelToolColumnizerForOutput.Name = "labelToolColumnizerForOutput"; - labelToolColumnizerForOutput.Size = new System.Drawing.Size(128, 15); + labelToolColumnizerForOutput.Size = new Size(128, 15); labelToolColumnizerForOutput.TabIndex = 6; labelToolColumnizerForOutput.Text = "Columnizer for output:"; // // comboBoxColumnizer // comboBoxColumnizer.FormattingEnabled = true; - comboBoxColumnizer.Location = new System.Drawing.Point(576, 180); - comboBoxColumnizer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + comboBoxColumnizer.Location = new Point(576, 180); + comboBoxColumnizer.Margin = new Padding(4, 5, 4, 5); comboBoxColumnizer.Name = "comboBoxColumnizer"; - comboBoxColumnizer.Size = new System.Drawing.Size(270, 23); + comboBoxColumnizer.Size = new Size(270, 23); comboBoxColumnizer.TabIndex = 7; // // textBoxToolName // - textBoxToolName.Location = new System.Drawing.Point(108, 29); - textBoxToolName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + textBoxToolName.Location = new Point(108, 29); + textBoxToolName.Margin = new Padding(4, 5, 4, 5); textBoxToolName.Name = "textBoxToolName"; - textBoxToolName.Size = new System.Drawing.Size(298, 23); + textBoxToolName.Size = new Size(298, 23); textBoxToolName.TabIndex = 0; // // checkBoxSysout // checkBoxSysout.AutoSize = true; - checkBoxSysout.Location = new System.Drawing.Point(108, 183); - checkBoxSysout.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxSysout.Location = new Point(108, 183); + checkBoxSysout.Margin = new Padding(4, 5, 4, 5); checkBoxSysout.Name = "checkBoxSysout"; - checkBoxSysout.Size = new System.Drawing.Size(120, 19); + checkBoxSysout.Size = new Size(120, 19); checkBoxSysout.TabIndex = 6; checkBoxSysout.Text = "Pipe sysout to tab"; checkBoxSysout.UseVisualStyleBackColor = true; @@ -910,10 +934,10 @@ private void InitializeComponent() // // buttonArguments // - buttonArguments.Location = new System.Drawing.Point(856, 128); - buttonArguments.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonArguments.Location = new Point(856, 128); + buttonArguments.Margin = new Padding(4, 5, 4, 5); buttonArguments.Name = "buttonArguments"; - buttonArguments.Size = new System.Drawing.Size(46, 32); + buttonArguments.Size = new Size(46, 32); buttonArguments.TabIndex = 5; buttonArguments.Text = "..."; buttonArguments.UseVisualStyleBackColor = true; @@ -922,19 +946,19 @@ private void InitializeComponent() // labelTool // labelTool.AutoSize = true; - labelTool.Location = new System.Drawing.Point(9, 86); - labelTool.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelTool.Location = new Point(9, 86); + labelTool.Margin = new Padding(4, 0, 4, 0); labelTool.Name = "labelTool"; - labelTool.Size = new System.Drawing.Size(56, 15); + labelTool.Size = new Size(56, 15); labelTool.TabIndex = 4; labelTool.Text = "Program:"; // // buttonTool // - buttonTool.Location = new System.Drawing.Point(418, 78); - buttonTool.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonTool.Location = new Point(418, 78); + buttonTool.Margin = new Padding(4, 5, 4, 5); buttonTool.Name = "buttonTool"; - buttonTool.Size = new System.Drawing.Size(45, 31); + buttonTool.Size = new Size(45, 31); buttonTool.TabIndex = 3; buttonTool.Text = "..."; buttonTool.UseVisualStyleBackColor = true; @@ -942,28 +966,28 @@ private void InitializeComponent() // // textBoxTool // - textBoxTool.Location = new System.Drawing.Point(108, 80); - textBoxTool.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + textBoxTool.Location = new Point(108, 80); + textBoxTool.Margin = new Padding(4, 5, 4, 5); textBoxTool.Name = "textBoxTool"; - textBoxTool.Size = new System.Drawing.Size(298, 23); + textBoxTool.Size = new Size(298, 23); textBoxTool.TabIndex = 2; // // labelArguments // labelArguments.AutoSize = true; - labelArguments.Location = new System.Drawing.Point(9, 134); - labelArguments.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelArguments.Location = new Point(9, 134); + labelArguments.Margin = new Padding(4, 0, 4, 0); labelArguments.Name = "labelArguments"; - labelArguments.Size = new System.Drawing.Size(69, 15); + labelArguments.Size = new Size(69, 15); labelArguments.TabIndex = 1; labelArguments.Text = "Arguments:"; // // textBoxArguments // - textBoxArguments.Location = new System.Drawing.Point(108, 129); - textBoxArguments.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + textBoxArguments.Location = new Point(108, 129); + textBoxArguments.Margin = new Padding(4, 5, 4, 5); textBoxArguments.Name = "textBoxArguments"; - textBoxArguments.Size = new System.Drawing.Size(738, 23); + textBoxArguments.Size = new Size(738, 23); textBoxArguments.TabIndex = 4; // // tabPageColumnizers @@ -972,11 +996,11 @@ private void InitializeComponent() tabPageColumnizers.Controls.Add(checkBoxMaskPrio); tabPageColumnizers.Controls.Add(buttonDelete); tabPageColumnizers.Controls.Add(dataGridViewColumnizer); - tabPageColumnizers.Location = new System.Drawing.Point(4, 24); - tabPageColumnizers.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageColumnizers.Location = new Point(4, 24); + tabPageColumnizers.Margin = new Padding(4, 5, 4, 5); tabPageColumnizers.Name = "tabPageColumnizers"; - tabPageColumnizers.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageColumnizers.Size = new System.Drawing.Size(942, 440); + tabPageColumnizers.Padding = new Padding(4, 5, 4, 5); + tabPageColumnizers.Size = new Size(942, 440); tabPageColumnizers.TabIndex = 3; tabPageColumnizers.Text = "Columnizers"; tabPageColumnizers.UseVisualStyleBackColor = true; @@ -985,11 +1009,11 @@ private void InitializeComponent() // checkBoxAutoPick.AutoSize = true; checkBoxAutoPick.Checked = true; - checkBoxAutoPick.CheckState = System.Windows.Forms.CheckState.Checked; - checkBoxAutoPick.Location = new System.Drawing.Point(530, 386); - checkBoxAutoPick.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxAutoPick.CheckState = CheckState.Checked; + checkBoxAutoPick.Location = new Point(530, 386); + checkBoxAutoPick.Margin = new Padding(4, 5, 4, 5); checkBoxAutoPick.Name = "checkBoxAutoPick"; - checkBoxAutoPick.Size = new System.Drawing.Size(192, 19); + checkBoxAutoPick.Size = new Size(192, 19); checkBoxAutoPick.TabIndex = 5; checkBoxAutoPick.Text = "Automatically pick for new files"; checkBoxAutoPick.UseVisualStyleBackColor = true; @@ -997,20 +1021,20 @@ private void InitializeComponent() // checkBoxMaskPrio // checkBoxMaskPrio.AutoSize = true; - checkBoxMaskPrio.Location = new System.Drawing.Point(213, 388); - checkBoxMaskPrio.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxMaskPrio.Location = new Point(213, 388); + checkBoxMaskPrio.Margin = new Padding(4, 5, 4, 5); checkBoxMaskPrio.Name = "checkBoxMaskPrio"; - checkBoxMaskPrio.Size = new System.Drawing.Size(192, 19); + checkBoxMaskPrio.Size = new Size(192, 19); checkBoxMaskPrio.TabIndex = 4; checkBoxMaskPrio.Text = "Mask has priority before history"; checkBoxMaskPrio.UseVisualStyleBackColor = true; // // buttonDelete // - buttonDelete.Location = new System.Drawing.Point(12, 380); - buttonDelete.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonDelete.Location = new Point(12, 380); + buttonDelete.Margin = new Padding(4, 5, 4, 5); buttonDelete.Name = "buttonDelete"; - buttonDelete.Size = new System.Drawing.Size(112, 35); + buttonDelete.Size = new Size(112, 35); buttonDelete.TabIndex = 3; buttonDelete.Text = "Delete"; buttonDelete.UseVisualStyleBackColor = true; @@ -1019,68 +1043,68 @@ private void InitializeComponent() // dataGridViewColumnizer // dataGridViewColumnizer.AllowUserToResizeRows = false; - dataGridViewColumnizer.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - dataGridViewColumnizer.BackgroundColor = System.Drawing.SystemColors.ControlLight; - dataGridViewColumnizer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewColumnizer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumnFileMask, dataGridViewComboBoxColumnColumnizer }); - dataGridViewColumnizer.Dock = System.Windows.Forms.DockStyle.Top; - dataGridViewColumnizer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter; - dataGridViewColumnizer.Location = new System.Drawing.Point(4, 5); - dataGridViewColumnizer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + dataGridViewColumnizer.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridViewColumnizer.BackgroundColor = SystemColors.ControlLight; + dataGridViewColumnizer.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewColumnizer.Columns.AddRange(new DataGridViewColumn[] { dataGridViewTextBoxColumnFileMask, dataGridViewComboBoxColumnColumnizer }); + dataGridViewColumnizer.Dock = DockStyle.Top; + dataGridViewColumnizer.EditMode = DataGridViewEditMode.EditOnEnter; + dataGridViewColumnizer.Location = new Point(4, 5); + dataGridViewColumnizer.Margin = new Padding(4, 5, 4, 5); dataGridViewColumnizer.Name = "dataGridViewColumnizer"; dataGridViewColumnizer.RowHeadersWidth = 62; - dataGridViewColumnizer.Size = new System.Drawing.Size(934, 365); + dataGridViewColumnizer.Size = new Size(934, 365); dataGridViewColumnizer.TabIndex = 2; dataGridViewColumnizer.RowsAdded += OnDataGridViewColumnizerRowsAdded; // - // columnFileMask + // dataGridViewTextBoxColumnFileMask // dataGridViewTextBoxColumnFileMask.HeaderText = "File name mask (RegEx)"; dataGridViewTextBoxColumnFileMask.MinimumWidth = 40; - dataGridViewTextBoxColumnFileMask.Name = "columnFileMask"; + dataGridViewTextBoxColumnFileMask.Name = "dataGridViewTextBoxColumnFileMask"; // - // columnColumnizer + // dataGridViewComboBoxColumnColumnizer // dataGridViewComboBoxColumnColumnizer.HeaderText = "Columnizer"; dataGridViewComboBoxColumnColumnizer.MinimumWidth = 230; - dataGridViewComboBoxColumnColumnizer.Name = "columnColumnizer"; + dataGridViewComboBoxColumnColumnizer.Name = "dataGridViewComboBoxColumnColumnizer"; // // tabPageHighlightMask // tabPageHighlightMask.Controls.Add(dataGridViewHighlightMask); - tabPageHighlightMask.Location = new System.Drawing.Point(4, 24); - tabPageHighlightMask.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageHighlightMask.Location = new Point(4, 24); + tabPageHighlightMask.Margin = new Padding(4, 5, 4, 5); tabPageHighlightMask.Name = "tabPageHighlightMask"; - tabPageHighlightMask.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageHighlightMask.Size = new System.Drawing.Size(942, 440); + tabPageHighlightMask.Padding = new Padding(4, 5, 4, 5); + tabPageHighlightMask.Size = new Size(942, 440); tabPageHighlightMask.TabIndex = 8; tabPageHighlightMask.Text = "Highlight"; tabPageHighlightMask.UseVisualStyleBackColor = true; // // dataGridViewHighlightMask // - dataGridViewHighlightMask.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - dataGridViewHighlightMask.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewHighlightMask.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumnFileName, dataGridViewComboBoxColumnHighlightGroup }); - dataGridViewHighlightMask.Dock = System.Windows.Forms.DockStyle.Fill; - dataGridViewHighlightMask.Location = new System.Drawing.Point(4, 5); - dataGridViewHighlightMask.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + dataGridViewHighlightMask.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + dataGridViewHighlightMask.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridViewHighlightMask.Columns.AddRange(new DataGridViewColumn[] { dataGridViewTextBoxColumnFileName, dataGridViewComboBoxColumnHighlightGroup }); + dataGridViewHighlightMask.Dock = DockStyle.Fill; + dataGridViewHighlightMask.Location = new Point(4, 5); + dataGridViewHighlightMask.Margin = new Padding(4, 5, 4, 5); dataGridViewHighlightMask.Name = "dataGridViewHighlightMask"; dataGridViewHighlightMask.RowHeadersWidth = 62; - dataGridViewHighlightMask.Size = new System.Drawing.Size(934, 430); + dataGridViewHighlightMask.Size = new Size(934, 430); dataGridViewHighlightMask.TabIndex = 0; // - // columnFileName + // dataGridViewTextBoxColumnFileName // dataGridViewTextBoxColumnFileName.HeaderText = "File name mask (RegEx)"; dataGridViewTextBoxColumnFileName.MinimumWidth = 40; - dataGridViewTextBoxColumnFileName.Name = "columnFileName"; + dataGridViewTextBoxColumnFileName.Name = "dataGridViewTextBoxColumnFileName"; // - // columnHighlightGroup + // dataGridViewComboBoxColumnHighlightGroup // dataGridViewComboBoxColumnHighlightGroup.HeaderText = "Highlight group"; dataGridViewComboBoxColumnHighlightGroup.MinimumWidth = 50; - dataGridViewComboBoxColumnHighlightGroup.Name = "columnHighlightGroup"; + dataGridViewComboBoxColumnHighlightGroup.Name = "dataGridViewComboBoxColumnHighlightGroup"; // // tabPageMultiFile // @@ -1088,11 +1112,11 @@ private void InitializeComponent() tabPageMultiFile.Controls.Add(labelHintMultiFile); tabPageMultiFile.Controls.Add(labelNoteMultiFile); tabPageMultiFile.Controls.Add(groupBoxWhenOpeningMultiFile); - tabPageMultiFile.Location = new System.Drawing.Point(4, 24); - tabPageMultiFile.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageMultiFile.Location = new Point(4, 24); + tabPageMultiFile.Margin = new Padding(4, 5, 4, 5); tabPageMultiFile.Name = "tabPageMultiFile"; - tabPageMultiFile.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageMultiFile.Size = new System.Drawing.Size(942, 440); + tabPageMultiFile.Padding = new Padding(4, 5, 4, 5); + tabPageMultiFile.Size = new Size(942, 440); tabPageMultiFile.TabIndex = 4; tabPageMultiFile.Text = "MultiFile"; tabPageMultiFile.UseVisualStyleBackColor = true; @@ -1103,11 +1127,11 @@ private void InitializeComponent() groupBoxDefaultFileNamePattern.Controls.Add(labelPattern); groupBoxDefaultFileNamePattern.Controls.Add(upDownMultifileDays); groupBoxDefaultFileNamePattern.Controls.Add(textBoxMultifilePattern); - groupBoxDefaultFileNamePattern.Location = new System.Drawing.Point(364, 28); - groupBoxDefaultFileNamePattern.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxDefaultFileNamePattern.Location = new Point(364, 28); + groupBoxDefaultFileNamePattern.Margin = new Padding(4, 5, 4, 5); groupBoxDefaultFileNamePattern.Name = "groupBoxDefaultFileNamePattern"; - groupBoxDefaultFileNamePattern.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxDefaultFileNamePattern.Size = new System.Drawing.Size(436, 154); + groupBoxDefaultFileNamePattern.Padding = new Padding(4, 5, 4, 5); + groupBoxDefaultFileNamePattern.Size = new Size(436, 154); groupBoxDefaultFileNamePattern.TabIndex = 3; groupBoxDefaultFileNamePattern.TabStop = false; groupBoxDefaultFileNamePattern.Text = "Default filename pattern"; @@ -1115,58 +1139,58 @@ private void InitializeComponent() // labelMaxDays // labelMaxDays.AutoSize = true; - labelMaxDays.Location = new System.Drawing.Point(10, 75); - labelMaxDays.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelMaxDays.Location = new Point(10, 75); + labelMaxDays.Margin = new Padding(4, 0, 4, 0); labelMaxDays.Name = "labelMaxDays"; - labelMaxDays.Size = new System.Drawing.Size(59, 15); + labelMaxDays.Size = new Size(60, 15); labelMaxDays.TabIndex = 3; labelMaxDays.Text = "Max days:"; // // labelPattern // labelPattern.AutoSize = true; - labelPattern.Location = new System.Drawing.Point(10, 37); - labelPattern.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelPattern.Location = new Point(10, 37); + labelPattern.Margin = new Padding(4, 0, 4, 0); labelPattern.Name = "labelPattern"; - labelPattern.Size = new System.Drawing.Size(48, 15); + labelPattern.Size = new Size(48, 15); labelPattern.TabIndex = 2; labelPattern.Text = "Pattern:"; // // upDownMultifileDays // - upDownMultifileDays.Location = new System.Drawing.Point(102, 72); - upDownMultifileDays.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownMultifileDays.Location = new Point(102, 72); + upDownMultifileDays.Margin = new Padding(4, 5, 4, 5); upDownMultifileDays.Maximum = new decimal(new int[] { 40, 0, 0, 0 }); upDownMultifileDays.Name = "upDownMultifileDays"; helpProvider.SetShowHelp(upDownMultifileDays, false); - upDownMultifileDays.Size = new System.Drawing.Size(92, 23); + upDownMultifileDays.Size = new Size(92, 23); upDownMultifileDays.TabIndex = 1; upDownMultifileDays.Value = new decimal(new int[] { 1, 0, 0, 0 }); // // textBoxMultifilePattern // - textBoxMultifilePattern.Location = new System.Drawing.Point(102, 32); - textBoxMultifilePattern.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + textBoxMultifilePattern.Location = new Point(102, 32); + textBoxMultifilePattern.Margin = new Padding(4, 5, 4, 5); textBoxMultifilePattern.Name = "textBoxMultifilePattern"; - textBoxMultifilePattern.Size = new System.Drawing.Size(278, 23); + textBoxMultifilePattern.Size = new Size(278, 23); textBoxMultifilePattern.TabIndex = 0; textBoxMultifilePattern.TextChanged += OnMultiFilePatternTextChanged; // // labelHintMultiFile // - labelHintMultiFile.Location = new System.Drawing.Point(6, 203); - labelHintMultiFile.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelHintMultiFile.Location = new Point(6, 203); + labelHintMultiFile.Margin = new Padding(4, 0, 4, 0); labelHintMultiFile.Name = "labelHintMultiFile"; - labelHintMultiFile.Size = new System.Drawing.Size(304, 111); + labelHintMultiFile.Size = new Size(304, 111); labelHintMultiFile.TabIndex = 2; labelHintMultiFile.Text = "Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa."; // // labelNoteMultiFile // - labelNoteMultiFile.Location = new System.Drawing.Point(6, 314); - labelNoteMultiFile.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelNoteMultiFile.Location = new Point(6, 314); + labelNoteMultiFile.Margin = new Padding(4, 0, 4, 0); labelNoteMultiFile.Name = "labelNoteMultiFile"; - labelNoteMultiFile.Size = new System.Drawing.Size(705, 82); + labelNoteMultiFile.Size = new Size(705, 82); labelNoteMultiFile.TabIndex = 1; labelNoteMultiFile.Text = "Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (, .1, .2, ...). Simply choose 'MultiFile' from the File menu after loading the first file."; // @@ -1175,11 +1199,11 @@ private void InitializeComponent() groupBoxWhenOpeningMultiFile.Controls.Add(radioButtonAskWhatToDo); groupBoxWhenOpeningMultiFile.Controls.Add(radioButtonTreatAllFilesAsOneMultifile); groupBoxWhenOpeningMultiFile.Controls.Add(radioButtonLoadEveryFileIntoSeperatedTab); - groupBoxWhenOpeningMultiFile.Location = new System.Drawing.Point(10, 28); - groupBoxWhenOpeningMultiFile.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxWhenOpeningMultiFile.Location = new Point(10, 28); + groupBoxWhenOpeningMultiFile.Margin = new Padding(4, 5, 4, 5); groupBoxWhenOpeningMultiFile.Name = "groupBoxWhenOpeningMultiFile"; - groupBoxWhenOpeningMultiFile.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxWhenOpeningMultiFile.Size = new System.Drawing.Size(300, 154); + groupBoxWhenOpeningMultiFile.Padding = new Padding(4, 5, 4, 5); + groupBoxWhenOpeningMultiFile.Size = new Size(300, 154); groupBoxWhenOpeningMultiFile.TabIndex = 0; groupBoxWhenOpeningMultiFile.TabStop = false; groupBoxWhenOpeningMultiFile.Text = "When opening multiple files..."; @@ -1187,10 +1211,10 @@ private void InitializeComponent() // radioButtonAskWhatToDo // radioButtonAskWhatToDo.AutoSize = true; - radioButtonAskWhatToDo.Location = new System.Drawing.Point(10, 105); - radioButtonAskWhatToDo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonAskWhatToDo.Location = new Point(10, 105); + radioButtonAskWhatToDo.Margin = new Padding(4, 5, 4, 5); radioButtonAskWhatToDo.Name = "radioButtonAskWhatToDo"; - radioButtonAskWhatToDo.Size = new System.Drawing.Size(104, 19); + radioButtonAskWhatToDo.Size = new Size(104, 19); radioButtonAskWhatToDo.TabIndex = 2; radioButtonAskWhatToDo.TabStop = true; radioButtonAskWhatToDo.Text = "Ask what to do"; @@ -1199,10 +1223,10 @@ private void InitializeComponent() // radioButtonTreatAllFilesAsOneMultifile // radioButtonTreatAllFilesAsOneMultifile.AutoSize = true; - radioButtonTreatAllFilesAsOneMultifile.Location = new System.Drawing.Point(10, 68); - radioButtonTreatAllFilesAsOneMultifile.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonTreatAllFilesAsOneMultifile.Location = new Point(10, 68); + radioButtonTreatAllFilesAsOneMultifile.Margin = new Padding(4, 5, 4, 5); radioButtonTreatAllFilesAsOneMultifile.Name = "radioButtonTreatAllFilesAsOneMultifile"; - radioButtonTreatAllFilesAsOneMultifile.Size = new System.Drawing.Size(182, 19); + radioButtonTreatAllFilesAsOneMultifile.Size = new Size(181, 19); radioButtonTreatAllFilesAsOneMultifile.TabIndex = 1; radioButtonTreatAllFilesAsOneMultifile.TabStop = true; radioButtonTreatAllFilesAsOneMultifile.Text = "Treat all files as one 'MultiFile'"; @@ -1211,10 +1235,10 @@ private void InitializeComponent() // radioButtonLoadEveryFileIntoSeperatedTab // radioButtonLoadEveryFileIntoSeperatedTab.AutoSize = true; - radioButtonLoadEveryFileIntoSeperatedTab.Location = new System.Drawing.Point(10, 31); - radioButtonLoadEveryFileIntoSeperatedTab.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonLoadEveryFileIntoSeperatedTab.Location = new Point(10, 31); + radioButtonLoadEveryFileIntoSeperatedTab.Margin = new Padding(4, 5, 4, 5); radioButtonLoadEveryFileIntoSeperatedTab.Name = "radioButtonLoadEveryFileIntoSeperatedTab"; - radioButtonLoadEveryFileIntoSeperatedTab.Size = new System.Drawing.Size(201, 19); + radioButtonLoadEveryFileIntoSeperatedTab.Size = new Size(201, 19); radioButtonLoadEveryFileIntoSeperatedTab.TabIndex = 0; radioButtonLoadEveryFileIntoSeperatedTab.TabStop = true; radioButtonLoadEveryFileIntoSeperatedTab.Text = "Load every file into a separate tab"; @@ -1224,72 +1248,72 @@ private void InitializeComponent() // tabPagePlugins.Controls.Add(groupBoxPlugins); tabPagePlugins.Controls.Add(groupBoxSettings); - tabPagePlugins.Location = new System.Drawing.Point(4, 24); - tabPagePlugins.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPagePlugins.Location = new Point(4, 24); + tabPagePlugins.Margin = new Padding(4, 5, 4, 5); tabPagePlugins.Name = "tabPagePlugins"; - tabPagePlugins.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPagePlugins.Size = new System.Drawing.Size(942, 440); + tabPagePlugins.Padding = new Padding(4, 5, 4, 5); + tabPagePlugins.Size = new Size(942, 440); tabPagePlugins.TabIndex = 5; tabPagePlugins.Text = "Plugins"; tabPagePlugins.UseVisualStyleBackColor = true; // // groupBoxPlugins // - groupBoxPlugins.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + groupBoxPlugins.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; groupBoxPlugins.Controls.Add(listBoxPlugin); - groupBoxPlugins.Location = new System.Drawing.Point(10, 23); - groupBoxPlugins.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxPlugins.Location = new Point(10, 23); + groupBoxPlugins.Margin = new Padding(4, 5, 4, 5); groupBoxPlugins.Name = "groupBoxPlugins"; - groupBoxPlugins.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxPlugins.Size = new System.Drawing.Size(342, 400); + groupBoxPlugins.Padding = new Padding(4, 5, 4, 5); + groupBoxPlugins.Size = new Size(342, 400); groupBoxPlugins.TabIndex = 3; groupBoxPlugins.TabStop = false; groupBoxPlugins.Text = "Plugins"; // // listBoxPlugin // - listBoxPlugin.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + listBoxPlugin.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; listBoxPlugin.DisplayMember = "Text"; listBoxPlugin.FormattingEnabled = true; listBoxPlugin.ItemHeight = 15; - listBoxPlugin.Location = new System.Drawing.Point(9, 29); - listBoxPlugin.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + listBoxPlugin.Location = new Point(9, 29); + listBoxPlugin.Margin = new Padding(4, 5, 4, 5); listBoxPlugin.Name = "listBoxPlugin"; - listBoxPlugin.Size = new System.Drawing.Size(322, 349); + listBoxPlugin.Size = new Size(322, 349); listBoxPlugin.TabIndex = 0; listBoxPlugin.ValueMember = "Text"; listBoxPlugin.SelectedIndexChanged += OnListBoxPluginSelectedIndexChanged; // // groupBoxSettings // - groupBoxSettings.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + groupBoxSettings.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; groupBoxSettings.Controls.Add(panelPlugin); - groupBoxSettings.Location = new System.Drawing.Point(362, 23); - groupBoxSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxSettings.Location = new Point(362, 23); + groupBoxSettings.Margin = new Padding(4, 5, 4, 5); groupBoxSettings.Name = "groupBoxSettings"; - groupBoxSettings.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxSettings.Size = new System.Drawing.Size(567, 400); + groupBoxSettings.Padding = new Padding(4, 5, 4, 5); + groupBoxSettings.Size = new Size(567, 400); groupBoxSettings.TabIndex = 2; groupBoxSettings.TabStop = false; groupBoxSettings.Text = "Settings"; // // panelPlugin // - panelPlugin.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + panelPlugin.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; panelPlugin.AutoScroll = true; panelPlugin.Controls.Add(buttonConfigPlugin); - panelPlugin.Location = new System.Drawing.Point(9, 29); - panelPlugin.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + panelPlugin.Location = new Point(9, 29); + panelPlugin.Margin = new Padding(4, 5, 4, 5); panelPlugin.Name = "panelPlugin"; - panelPlugin.Size = new System.Drawing.Size(549, 362); + panelPlugin.Size = new Size(549, 362); panelPlugin.TabIndex = 1; // // buttonConfigPlugin // - buttonConfigPlugin.Location = new System.Drawing.Point(164, 163); - buttonConfigPlugin.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonConfigPlugin.Location = new Point(164, 163); + buttonConfigPlugin.Margin = new Padding(4, 5, 4, 5); buttonConfigPlugin.Name = "buttonConfigPlugin"; - buttonConfigPlugin.Size = new System.Drawing.Size(170, 35); + buttonConfigPlugin.Size = new Size(170, 35); buttonConfigPlugin.TabIndex = 0; buttonConfigPlugin.Text = "Configure..."; buttonConfigPlugin.UseVisualStyleBackColor = true; @@ -1301,11 +1325,11 @@ private void InitializeComponent() tabPageSessions.Controls.Add(checkBoxSaveFilter); tabPageSessions.Controls.Add(groupBoxPersistantFileLocation); tabPageSessions.Controls.Add(checkBoxSaveSessions); - tabPageSessions.Location = new System.Drawing.Point(4, 24); - tabPageSessions.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageSessions.Location = new Point(4, 24); + tabPageSessions.Margin = new Padding(4, 5, 4, 5); tabPageSessions.Name = "tabPageSessions"; - tabPageSessions.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageSessions.Size = new System.Drawing.Size(942, 440); + tabPageSessions.Padding = new Padding(4, 5, 4, 5); + tabPageSessions.Size = new Size(942, 440); tabPageSessions.TabIndex = 6; tabPageSessions.Text = "Persistence"; tabPageSessions.UseVisualStyleBackColor = true; @@ -1313,10 +1337,10 @@ private void InitializeComponent() // checkBoxPortableMode // checkBoxPortableMode.AutoSize = true; - checkBoxPortableMode.Location = new System.Drawing.Point(35, 110); - checkBoxPortableMode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxPortableMode.Location = new Point(35, 110); + checkBoxPortableMode.Margin = new Padding(4, 5, 4, 5); checkBoxPortableMode.Name = "checkBoxPortableMode"; - checkBoxPortableMode.Size = new System.Drawing.Size(150, 19); + checkBoxPortableMode.Size = new Size(150, 19); checkBoxPortableMode.TabIndex = 3; checkBoxPortableMode.Text = "Activate Portable Mode"; toolTip.SetToolTip(checkBoxPortableMode, "If this mode is activated, the save file will be loaded from the Executable Location"); @@ -1326,10 +1350,10 @@ private void InitializeComponent() // checkBoxSaveFilter // checkBoxSaveFilter.AutoSize = true; - checkBoxSaveFilter.Location = new System.Drawing.Point(35, 75); - checkBoxSaveFilter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxSaveFilter.Location = new Point(35, 75); + checkBoxSaveFilter.Margin = new Padding(4, 5, 4, 5); checkBoxSaveFilter.Name = "checkBoxSaveFilter"; - checkBoxSaveFilter.Size = new System.Drawing.Size(217, 19); + checkBoxSaveFilter.Size = new Size(217, 19); checkBoxSaveFilter.TabIndex = 2; checkBoxSaveFilter.Text = " Save and restore filter and filter tabs"; checkBoxSaveFilter.UseVisualStyleBackColor = true; @@ -1342,30 +1366,30 @@ private void InitializeComponent() groupBoxPersistantFileLocation.Controls.Add(radioButtonsessionSaveDocuments); groupBoxPersistantFileLocation.Controls.Add(radioButtonSessionSameDir); groupBoxPersistantFileLocation.Controls.Add(radioButtonSessionApplicationStartupDir); - groupBoxPersistantFileLocation.Location = new System.Drawing.Point(34, 145); - groupBoxPersistantFileLocation.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxPersistantFileLocation.Location = new Point(34, 145); + groupBoxPersistantFileLocation.Margin = new Padding(4, 5, 4, 5); groupBoxPersistantFileLocation.Name = "groupBoxPersistantFileLocation"; - groupBoxPersistantFileLocation.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxPersistantFileLocation.Size = new System.Drawing.Size(411, 190); + groupBoxPersistantFileLocation.Padding = new Padding(4, 5, 4, 5); + groupBoxPersistantFileLocation.Size = new Size(411, 190); groupBoxPersistantFileLocation.TabIndex = 1; groupBoxPersistantFileLocation.TabStop = false; groupBoxPersistantFileLocation.Text = "Persistence file location"; // // labelSessionSaveOwnDir // - labelSessionSaveOwnDir.Location = new System.Drawing.Point(27, 160); - labelSessionSaveOwnDir.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelSessionSaveOwnDir.Location = new Point(27, 160); + labelSessionSaveOwnDir.Margin = new Padding(4, 0, 4, 0); labelSessionSaveOwnDir.Name = "labelSessionSaveOwnDir"; - labelSessionSaveOwnDir.Size = new System.Drawing.Size(252, 31); + labelSessionSaveOwnDir.Size = new Size(252, 31); labelSessionSaveOwnDir.TabIndex = 4; labelSessionSaveOwnDir.Text = "sessionSaveOwnDirLabel"; // // buttonSessionSaveDir // - buttonSessionSaveDir.Location = new System.Drawing.Point(358, 135); - buttonSessionSaveDir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonSessionSaveDir.Location = new Point(358, 135); + buttonSessionSaveDir.Margin = new Padding(4, 5, 4, 5); buttonSessionSaveDir.Name = "buttonSessionSaveDir"; - buttonSessionSaveDir.Size = new System.Drawing.Size(45, 19); + buttonSessionSaveDir.Size = new Size(45, 19); buttonSessionSaveDir.TabIndex = 3; buttonSessionSaveDir.Text = "..."; buttonSessionSaveDir.UseVisualStyleBackColor = true; @@ -1374,10 +1398,10 @@ private void InitializeComponent() // radioButtonSessionSaveOwn // radioButtonSessionSaveOwn.AutoSize = true; - radioButtonSessionSaveOwn.Location = new System.Drawing.Point(10, 135); - radioButtonSessionSaveOwn.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonSessionSaveOwn.Location = new Point(10, 135); + radioButtonSessionSaveOwn.Margin = new Padding(4, 5, 4, 5); radioButtonSessionSaveOwn.Name = "radioButtonSessionSaveOwn"; - radioButtonSessionSaveOwn.Size = new System.Drawing.Size(100, 19); + radioButtonSessionSaveOwn.Size = new Size(100, 19); radioButtonSessionSaveOwn.TabIndex = 2; radioButtonSessionSaveOwn.TabStop = true; radioButtonSessionSaveOwn.Text = "Own directory"; @@ -1386,10 +1410,10 @@ private void InitializeComponent() // radioButtonsessionSaveDocuments // radioButtonsessionSaveDocuments.AutoSize = true; - radioButtonsessionSaveDocuments.Location = new System.Drawing.Point(10, 65); - radioButtonsessionSaveDocuments.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonsessionSaveDocuments.Location = new Point(10, 65); + radioButtonsessionSaveDocuments.Margin = new Padding(4, 5, 4, 5); radioButtonsessionSaveDocuments.Name = "radioButtonsessionSaveDocuments"; - radioButtonsessionSaveDocuments.Size = new System.Drawing.Size(160, 19); + radioButtonsessionSaveDocuments.Size = new Size(161, 19); radioButtonsessionSaveDocuments.TabIndex = 1; radioButtonsessionSaveDocuments.TabStop = true; radioButtonsessionSaveDocuments.Text = "MyDocuments/LogExpert"; @@ -1398,10 +1422,10 @@ private void InitializeComponent() // radioButtonSessionSameDir // radioButtonSessionSameDir.AutoSize = true; - radioButtonSessionSameDir.Location = new System.Drawing.Point(10, 30); - radioButtonSessionSameDir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonSessionSameDir.Location = new Point(10, 30); + radioButtonSessionSameDir.Margin = new Padding(4, 5, 4, 5); radioButtonSessionSameDir.Name = "radioButtonSessionSameDir"; - radioButtonSessionSameDir.Size = new System.Drawing.Size(157, 19); + radioButtonSessionSameDir.Size = new Size(157, 19); radioButtonSessionSameDir.TabIndex = 0; radioButtonSessionSameDir.TabStop = true; radioButtonSessionSameDir.Text = "Same directory as log file"; @@ -1410,10 +1434,10 @@ private void InitializeComponent() // radioButtonSessionApplicationStartupDir // radioButtonSessionApplicationStartupDir.AutoSize = true; - radioButtonSessionApplicationStartupDir.Location = new System.Drawing.Point(10, 100); - radioButtonSessionApplicationStartupDir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + radioButtonSessionApplicationStartupDir.Location = new Point(10, 100); + radioButtonSessionApplicationStartupDir.Margin = new Padding(4, 5, 4, 5); radioButtonSessionApplicationStartupDir.Name = "radioButtonSessionApplicationStartupDir"; - radioButtonSessionApplicationStartupDir.Size = new System.Drawing.Size(176, 19); + radioButtonSessionApplicationStartupDir.Size = new Size(176, 19); radioButtonSessionApplicationStartupDir.TabIndex = 5; radioButtonSessionApplicationStartupDir.TabStop = true; radioButtonSessionApplicationStartupDir.Text = "Application startup directory"; @@ -1423,10 +1447,10 @@ private void InitializeComponent() // checkBoxSaveSessions // checkBoxSaveSessions.AutoSize = true; - checkBoxSaveSessions.Location = new System.Drawing.Point(35, 40); - checkBoxSaveSessions.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxSaveSessions.Location = new Point(35, 40); + checkBoxSaveSessions.Margin = new Padding(4, 5, 4, 5); checkBoxSaveSessions.Name = "checkBoxSaveSessions"; - checkBoxSaveSessions.Size = new System.Drawing.Size(241, 19); + checkBoxSaveSessions.Size = new Size(242, 19); checkBoxSaveSessions.TabIndex = 0; checkBoxSaveSessions.Text = "Automatically save persistence files (.lxp)"; checkBoxSaveSessions.UseVisualStyleBackColor = true; @@ -1435,11 +1459,11 @@ private void InitializeComponent() // tabPageMemory.Controls.Add(groupBoxCPUAndStuff); tabPageMemory.Controls.Add(groupBoxLineBufferUsage); - tabPageMemory.Location = new System.Drawing.Point(4, 24); - tabPageMemory.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tabPageMemory.Location = new Point(4, 24); + tabPageMemory.Margin = new Padding(4, 5, 4, 5); tabPageMemory.Name = "tabPageMemory"; - tabPageMemory.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - tabPageMemory.Size = new System.Drawing.Size(942, 440); + tabPageMemory.Padding = new Padding(4, 5, 4, 5); + tabPageMemory.Size = new Size(942, 440); tabPageMemory.TabIndex = 7; tabPageMemory.Text = "Memory/CPU"; tabPageMemory.UseVisualStyleBackColor = true; @@ -1450,11 +1474,11 @@ private void InitializeComponent() groupBoxCPUAndStuff.Controls.Add(checkBoxMultiThread); groupBoxCPUAndStuff.Controls.Add(labelFilePollingInterval); groupBoxCPUAndStuff.Controls.Add(upDownPollingInterval); - groupBoxCPUAndStuff.Location = new System.Drawing.Point(408, 29); - groupBoxCPUAndStuff.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxCPUAndStuff.Location = new Point(408, 29); + groupBoxCPUAndStuff.Margin = new Padding(4, 5, 4, 5); groupBoxCPUAndStuff.Name = "groupBoxCPUAndStuff"; - groupBoxCPUAndStuff.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxCPUAndStuff.Size = new System.Drawing.Size(300, 197); + groupBoxCPUAndStuff.Padding = new Padding(4, 5, 4, 5); + groupBoxCPUAndStuff.Size = new Size(300, 197); groupBoxCPUAndStuff.TabIndex = 8; groupBoxCPUAndStuff.TabStop = false; groupBoxCPUAndStuff.Text = "CPU and stuff"; @@ -1462,10 +1486,10 @@ private void InitializeComponent() // checkBoxLegacyReader // checkBoxLegacyReader.AutoSize = true; - checkBoxLegacyReader.Location = new System.Drawing.Point(14, 138); - checkBoxLegacyReader.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxLegacyReader.Location = new Point(14, 138); + checkBoxLegacyReader.Margin = new Padding(4, 5, 4, 5); checkBoxLegacyReader.Name = "checkBoxLegacyReader"; - checkBoxLegacyReader.Size = new System.Drawing.Size(182, 19); + checkBoxLegacyReader.Size = new Size(182, 19); checkBoxLegacyReader.TabIndex = 9; checkBoxLegacyReader.Text = "Use legacy file reader (slower)"; toolTip.SetToolTip(checkBoxLegacyReader, "Slower but more compatible with strange linefeeds and encodings"); @@ -1474,10 +1498,10 @@ private void InitializeComponent() // checkBoxMultiThread // checkBoxMultiThread.AutoSize = true; - checkBoxMultiThread.Location = new System.Drawing.Point(14, 103); - checkBoxMultiThread.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + checkBoxMultiThread.Location = new Point(14, 103); + checkBoxMultiThread.Margin = new Padding(4, 5, 4, 5); checkBoxMultiThread.Name = "checkBoxMultiThread"; - checkBoxMultiThread.Size = new System.Drawing.Size(131, 19); + checkBoxMultiThread.Size = new Size(131, 19); checkBoxMultiThread.TabIndex = 5; checkBoxMultiThread.Text = "Multi threaded filter"; checkBoxMultiThread.UseVisualStyleBackColor = true; @@ -1485,21 +1509,21 @@ private void InitializeComponent() // labelFilePollingInterval // labelFilePollingInterval.AutoSize = true; - labelFilePollingInterval.Location = new System.Drawing.Point(9, 52); - labelFilePollingInterval.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelFilePollingInterval.Location = new Point(9, 52); + labelFilePollingInterval.Margin = new Padding(4, 0, 4, 0); labelFilePollingInterval.Name = "labelFilePollingInterval"; - labelFilePollingInterval.Size = new System.Drawing.Size(137, 15); + labelFilePollingInterval.Size = new Size(137, 15); labelFilePollingInterval.TabIndex = 7; labelFilePollingInterval.Text = "File polling interval (ms):"; // // upDownPollingInterval // - upDownPollingInterval.Location = new System.Drawing.Point(190, 49); - upDownPollingInterval.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownPollingInterval.Location = new Point(190, 49); + upDownPollingInterval.Margin = new Padding(4, 5, 4, 5); upDownPollingInterval.Maximum = new decimal(new int[] { 5000, 0, 0, 0 }); upDownPollingInterval.Minimum = new decimal(new int[] { 20, 0, 0, 0 }); upDownPollingInterval.Name = "upDownPollingInterval"; - upDownPollingInterval.Size = new System.Drawing.Size(86, 23); + upDownPollingInterval.Size = new Size(86, 23); upDownPollingInterval.TabIndex = 6; upDownPollingInterval.Value = new decimal(new int[] { 20, 0, 0, 0 }); // @@ -1510,11 +1534,11 @@ private void InitializeComponent() groupBoxLineBufferUsage.Controls.Add(upDownLinesPerBlock); groupBoxLineBufferUsage.Controls.Add(upDownBlockCount); groupBoxLineBufferUsage.Controls.Add(labelLinesPerBlock); - groupBoxLineBufferUsage.Location = new System.Drawing.Point(10, 29); - groupBoxLineBufferUsage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + groupBoxLineBufferUsage.Location = new Point(10, 29); + groupBoxLineBufferUsage.Margin = new Padding(4, 5, 4, 5); groupBoxLineBufferUsage.Name = "groupBoxLineBufferUsage"; - groupBoxLineBufferUsage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - groupBoxLineBufferUsage.Size = new System.Drawing.Size(326, 197); + groupBoxLineBufferUsage.Padding = new Padding(4, 5, 4, 5); + groupBoxLineBufferUsage.Size = new Size(326, 197); groupBoxLineBufferUsage.TabIndex = 4; groupBoxLineBufferUsage.TabStop = false; groupBoxLineBufferUsage.Text = "Line buffer usage"; @@ -1522,63 +1546,63 @@ private void InitializeComponent() // labelInfo // labelInfo.AutoSize = true; - labelInfo.Location = new System.Drawing.Point(9, 145); - labelInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelInfo.Location = new Point(9, 145); + labelInfo.Margin = new Padding(4, 0, 4, 0); labelInfo.Name = "labelInfo"; - labelInfo.Size = new System.Drawing.Size(219, 15); + labelInfo.Size = new Size(220, 15); labelInfo.TabIndex = 4; labelInfo.Text = "Changes will take effect on next file load"; // // labelNumberOfBlocks // labelNumberOfBlocks.AutoSize = true; - labelNumberOfBlocks.Location = new System.Drawing.Point(9, 52); - labelNumberOfBlocks.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelNumberOfBlocks.Location = new Point(9, 52); + labelNumberOfBlocks.Margin = new Padding(4, 0, 4, 0); labelNumberOfBlocks.Name = "labelNumberOfBlocks"; - labelNumberOfBlocks.Size = new System.Drawing.Size(102, 15); + labelNumberOfBlocks.Size = new Size(102, 15); labelNumberOfBlocks.TabIndex = 1; labelNumberOfBlocks.Text = "Number of blocks"; // // upDownLinesPerBlock // - upDownLinesPerBlock.Location = new System.Drawing.Point(210, 102); - upDownLinesPerBlock.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownLinesPerBlock.Location = new Point(210, 102); + upDownLinesPerBlock.Margin = new Padding(4, 5, 4, 5); upDownLinesPerBlock.Maximum = new decimal(new int[] { 5000000, 0, 0, 0 }); upDownLinesPerBlock.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); upDownLinesPerBlock.Name = "upDownLinesPerBlock"; - upDownLinesPerBlock.Size = new System.Drawing.Size(94, 23); + upDownLinesPerBlock.Size = new Size(94, 23); upDownLinesPerBlock.TabIndex = 3; upDownLinesPerBlock.Value = new decimal(new int[] { 50000, 0, 0, 0 }); upDownLinesPerBlock.ValueChanged += OnNumericUpDown1ValueChanged; // // upDownBlockCount // - upDownBlockCount.Location = new System.Drawing.Point(210, 49); - upDownBlockCount.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + upDownBlockCount.Location = new Point(210, 49); + upDownBlockCount.Margin = new Padding(4, 5, 4, 5); upDownBlockCount.Maximum = new decimal(new int[] { 5000, 0, 0, 0 }); upDownBlockCount.Minimum = new decimal(new int[] { 10, 0, 0, 0 }); upDownBlockCount.Name = "upDownBlockCount"; - upDownBlockCount.Size = new System.Drawing.Size(94, 23); + upDownBlockCount.Size = new Size(94, 23); upDownBlockCount.TabIndex = 0; upDownBlockCount.Value = new decimal(new int[] { 100, 0, 0, 0 }); // // labelLinesPerBlock // labelLinesPerBlock.AutoSize = true; - labelLinesPerBlock.Location = new System.Drawing.Point(9, 105); - labelLinesPerBlock.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelLinesPerBlock.Location = new Point(9, 105); + labelLinesPerBlock.Margin = new Padding(4, 0, 4, 0); labelLinesPerBlock.Name = "labelLinesPerBlock"; - labelLinesPerBlock.Size = new System.Drawing.Size(68, 15); + labelLinesPerBlock.Size = new Size(68, 15); labelLinesPerBlock.TabIndex = 2; labelLinesPerBlock.Text = "Lines/block"; // // buttonCancel // - buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - buttonCancel.Location = new System.Drawing.Point(818, 509); - buttonCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonCancel.DialogResult = DialogResult.Cancel; + buttonCancel.Location = new Point(818, 509); + buttonCancel.Margin = new Padding(4, 5, 4, 5); buttonCancel.Name = "buttonCancel"; - buttonCancel.Size = new System.Drawing.Size(112, 35); + buttonCancel.Size = new Size(112, 35); buttonCancel.TabIndex = 1; buttonCancel.Text = "Cancel"; buttonCancel.UseVisualStyleBackColor = true; @@ -1586,11 +1610,11 @@ private void InitializeComponent() // // buttonOk // - buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; - buttonOk.Location = new System.Drawing.Point(696, 509); - buttonOk.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonOk.DialogResult = DialogResult.OK; + buttonOk.Location = new Point(696, 509); + buttonOk.Margin = new Padding(4, 5, 4, 5); buttonOk.Name = "buttonOk"; - buttonOk.Size = new System.Drawing.Size(112, 35); + buttonOk.Size = new Size(112, 35); buttonOk.TabIndex = 0; buttonOk.Text = "OK"; buttonOk.UseVisualStyleBackColor = true; @@ -1602,10 +1626,10 @@ private void InitializeComponent() // // buttonExport // - buttonExport.Location = new System.Drawing.Point(20, 509); - buttonExport.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonExport.Location = new Point(20, 509); + buttonExport.Margin = new Padding(4, 5, 4, 5); buttonExport.Name = "buttonExport"; - buttonExport.Size = new System.Drawing.Size(112, 35); + buttonExport.Size = new Size(112, 35); buttonExport.TabIndex = 2; buttonExport.Text = "Export..."; buttonExport.UseVisualStyleBackColor = true; @@ -1613,10 +1637,10 @@ private void InitializeComponent() // // buttonImport // - buttonImport.Location = new System.Drawing.Point(142, 509); - buttonImport.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonImport.Location = new Point(142, 509); + buttonImport.Margin = new Padding(4, 5, 4, 5); buttonImport.Name = "buttonImport"; - buttonImport.Size = new System.Drawing.Size(112, 35); + buttonImport.Size = new Size(112, 35); buttonImport.TabIndex = 3; buttonImport.Text = "Import..."; buttonImport.UseVisualStyleBackColor = true; @@ -1626,22 +1650,21 @@ private void InitializeComponent() // AcceptButton = buttonOk; CancelButton = buttonCancel; - ClientSize = new System.Drawing.Size(956, 563); + ClientSize = new Size(956, 563); Controls.Add(buttonImport); Controls.Add(buttonExport); Controls.Add(buttonOk); Controls.Add(buttonCancel); Controls.Add(tabControlSettings); - FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + FormBorderStyle = FormBorderStyle.FixedDialog; helpProvider.SetHelpKeyword(this, "Settings.htm"); - helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic); - Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); - Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + helpProvider.SetHelpNavigator(this, HelpNavigator.Topic); + Margin = new Padding(4, 5, 4, 5); MaximizeBox = false; MinimizeBox = false; Name = "SettingsDialog"; helpProvider.SetShowHelp(this, true); - StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + StartPosition = FormStartPosition.CenterParent; Text = "Settings"; Load += OnSettingsDialogLoad; tabControlSettings.ResumeLayout(false); @@ -1824,4 +1847,6 @@ private void InitializeComponent() private System.Windows.Forms.NumericUpDown upDownMaximumLineLength; private System.Windows.Forms.Label labelMaximumLineLength; private System.Windows.Forms.Label labelWarningMaximumLineLength; + private Label labelLanguage; + private ComboBox comboBoxLanguage; } diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index 19955585..0cc115ee 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -166,8 +166,10 @@ private void LoadResources () buttonExport.Text = Resources.LogExpert_Common_UI_Button_Export; buttonImport.Text = Resources.LogExpert_Common_UI_Button_Import; Text = Resources.SettingsDialog_Form_Text; + labelLanguage.Text = Resources.SettingsDialog_UI_Label_Language; // ToolTips + toolTip.SetToolTip(comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_Language); toolTip.SetToolTip(comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_Encoding); toolTip.SetToolTip(checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_PortableMode); toolTip.SetToolTip(radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir); diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.resx b/src/LogExpert.UI/Dialogs/SettingsDialog.resx index bacc9be3..dee8bb50 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.resx +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.resx @@ -120,39 +120,6 @@ 144, 17 - - 144, 17 - - - 144, 17 - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - 17, 17 - 17, 17 From 9f79247d0b6d3bea79aaed2eb04a77a0c9fe2e52 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 18:38:52 +0200 Subject: [PATCH 18/38] default language --- src/LogExpert.Core/Config/Preferences.cs | 2 ++ src/LogExpert.Resources/Resources.Designer.cs | 2 +- src/LogExpert.Resources/Resources.de.resx | 2 +- src/LogExpert.Resources/Resources.resx | 2 +- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 14 ++++++++++++-- src/LogExpert.UI/Dialogs/SettingsDialog.resx | 11 ----------- src/LogExpert/Config/ConfigManager.cs | 2 ++ src/LogExpert/Program.cs | 11 +++++++++++ 8 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/LogExpert.Core/Config/Preferences.cs b/src/LogExpert.Core/Config/Preferences.cs index 779e6fb8..1c809b81 100644 --- a/src/LogExpert.Core/Config/Preferences.cs +++ b/src/LogExpert.Core/Config/Preferences.cs @@ -93,6 +93,8 @@ public class Preferences public string DefaultEncoding { get; set; } + public string DefaultLanguage { get; set; } + public bool FilterSync { get; set; } = true; public bool FilterTail { get; set; } = true; diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 5579c34c..8e1edd59 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -3195,7 +3195,7 @@ public static string SettingsDialog_UI_Label_Info { } /// - /// Looks up a localized string similar to Language:. + /// Looks up a localized string similar to Language (requires restart):. /// public static string SettingsDialog_UI_Label_Language { get { diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 752d4553..b05204b7 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -1286,7 +1286,7 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Notiz: Sie können immer alle Dateien als Multifile automatisch laden wenn die Dateien die Multidateien Namensregeln folgen (<dateiname>, <dateiname>.1, <dateiname>.2, ...). Wählen Sie hierfür 'Multidatei' vom Dateimenü aus nachdem die erste Datei geladen wurde.
- Sprache: + Sprache (benötigt neustart): Sprache des Userinterfaces diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 33201532..e24d6023 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1289,7 +1289,7 @@ Checked tools will appear in the icon bar. All other tools are available in the Settings imported - Language: + Language (requires restart): Userinterface language diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index 0cc115ee..7860e1f3 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -288,10 +288,11 @@ private void FillDialog () FillToolListbox(); FillMultifileSettings(); FillEncodingList(); - - var temp = Encoding.GetEncoding(Preferences.DefaultEncoding); + FillLanguageList(); comboBoxEncoding.SelectedItem = Encoding.GetEncoding(Preferences.DefaultEncoding); + comboBoxLanguage.SelectedItem = CultureInfo.GetCultureInfo(Preferences.DefaultLanguage).Name; + checkBoxMaskPrio.Checked = Preferences.MaskPrio; checkBoxAutoPick.Checked = Preferences.AutoPick; checkBoxAskCloseTabs.Checked = Preferences.AskForClose; @@ -720,6 +721,14 @@ private void FillEncodingList () comboBoxEncoding.ValueMember = Resources.SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName; } + private void FillLanguageList () + { + comboBoxLanguage.Items.Clear(); + + _ = comboBoxLanguage.Items.Add(CultureInfo.GetCultureInfo("en-US").Name); // Add English as default + _ = comboBoxLanguage.Items.Add(CultureInfo.GetCultureInfo("de-DE").Name); + } + #endregion #region Events handler @@ -792,6 +801,7 @@ private void OnBtnOkClick (object sender, EventArgs e) Preferences.PollingInterval = (int)upDownPollingInterval.Value; Preferences.MultiThreadFilter = checkBoxMultiThread.Checked; Preferences.DefaultEncoding = comboBoxEncoding.SelectedItem != null ? (comboBoxEncoding.SelectedItem as Encoding).HeaderName : Encoding.Default.HeaderName; + Preferences.DefaultLanguage = comboBoxLanguage.SelectedItem != null ? (comboBoxLanguage.SelectedItem as string) : CultureInfo.GetCultureInfo("en-US").Name; Preferences.ShowColumnFinder = checkBoxColumnFinder.Checked; Preferences.UseLegacyReader = checkBoxLegacyReader.Checked; diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.resx b/src/LogExpert.UI/Dialogs/SettingsDialog.resx index dee8bb50..dda79304 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.resx +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.resx @@ -123,15 +123,4 @@ 17, 17 - - - - AAABAAEAEBAQAAAABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAABAA - AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP// - AAD///8AAAAAAAAAAAAP////////8A/////////wD/AAAAAAD/AP////////8A/wAAAAAA/wD/////// - //AP8ADwAAAP8A////D////wD/AA8AAP//AP///w////8A//APAAAP/wD/////////AP////////8AAA - AAAAAAAAAAAAAAAAAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAIABAAD//wAA - - \ No newline at end of file diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index b5dffb24..b343ba30 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -272,6 +272,8 @@ or ArgumentNullException settings.Preferences.DefaultEncoding ??= Encoding.Default.HeaderName; + settings.Preferences.DefaultLanguage ??= CultureInfo.GetCultureInfo("en-US").Name; + if (settings.Preferences.MaximumFilterEntriesDisplayed == 0) { settings.Preferences.MaximumFilterEntriesDisplayed = 20; diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 34c39213..09ff3160 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -73,6 +73,8 @@ private static void Main (string[] args) } } + SetCulture(); + _ = PluginRegistry.PluginRegistry.Instance.Create(ConfigManager.Instance.ConfigDir, ConfigManager.Instance.Settings.Preferences.PollingInterval); var pId = Process.GetCurrentProcess().SessionId; @@ -169,6 +171,15 @@ or ArgumentNullException } } + [SupportedOSPlatform("windows")] + private static void SetCulture () + { + var defaultCulture = CultureInfo.GetCultureInfo(ConfigManager.Instance.Settings.Preferences.DefaultLanguage ?? "en-US"); + + CultureInfo.CurrentUICulture = defaultCulture; + CultureInfo.CurrentCulture = defaultCulture; + } + private static string SerializeCommandIntoNonFormattedJSON (string[] fileNames, bool allowOnlyOneInstance) { var message = new IpcMessage() From c68cdc05b8511918ac0402796508322732444da2 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 18:40:36 +0200 Subject: [PATCH 19/38] move --- src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs index 6309fb99..2f853806 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.Designer.cs @@ -458,15 +458,15 @@ private void InitializeComponent () labelLanguage.Location = new Point(9, 175); labelLanguage.Margin = new Padding(4, 0, 4, 0); labelLanguage.Name = "labelLanguage"; - labelLanguage.Size = new Size(98, 15); + labelLanguage.Size = new Size(187, 15); labelLanguage.TabIndex = 17; - labelLanguage.Text = "Default encoding"; + labelLanguage.Text = "Default encoding (requires restart)"; // // comboBoxLanguage // comboBoxLanguage.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxLanguage.FormattingEnabled = true; - comboBoxLanguage.Location = new Point(115, 172); + comboBoxLanguage.Location = new Point(204, 172); comboBoxLanguage.Margin = new Padding(4, 5, 4, 5); comboBoxLanguage.Name = "comboBoxLanguage"; comboBoxLanguage.Size = new Size(177, 23); From 5f8baff7ba5082e7089367cb3cd32e521e3a9004 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 9 Jul 2025 20:06:01 +0200 Subject: [PATCH 20/38] fix exception --- src/LogExpert/Config/ConfigManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index b343ba30..c1d0f1ed 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -116,9 +116,17 @@ public void Import (FileInfo fileInfo, ExportImportFlags importFlags) Save(SettingsFlags.All); } + /// + /// Imports the highlight settings from a file. + /// Throws ArgumentNullException if fileInfo is null, this should not happen. + /// + /// + /// + /// [SupportedOSPlatform("windows")] public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags importFlags) { + ArgumentNullException.ThrowIfNull(fileInfo, nameof(fileInfo)); Instance._settings.Preferences.HighlightGroupList = Import(Instance._settings.Preferences.HighlightGroupList, fileInfo, importFlags); Save(SettingsFlags.All); } From 09729207d765510d6937fac99ff8e13f4a82eaba Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 10 Jul 2025 09:37:29 +0200 Subject: [PATCH 21/38] eminus resources and about box --- src/ColumnizerLib/IContextMenuEntry.cs | 15 +-- src/LogExpert.Resources/Resources.Designer.cs | 117 ++++++++++++++++++ src/LogExpert.Resources/Resources.de.resx | 39 ++++++ src/LogExpert.Resources/Resources.resx | 39 ++++++ src/LogExpert.UI/Dialogs/AboutBox.cs | 12 +- src/LogExpert.UI/Dialogs/Eminus/Eminus.cs | 99 ++++++++------- .../Eminus/EminusConfigDlg.Designer.cs | 74 +++++------ .../Dialogs/Eminus/EminusConfigDlg.cs | 13 +- 8 files changed, 310 insertions(+), 98 deletions(-) diff --git a/src/ColumnizerLib/IContextMenuEntry.cs b/src/ColumnizerLib/IContextMenuEntry.cs index bc59df1e..0239998a 100644 --- a/src/ColumnizerLib/IContextMenuEntry.cs +++ b/src/ColumnizerLib/IContextMenuEntry.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; - - namespace LogExpert; /// @@ -21,7 +18,7 @@ public interface IContextMenuEntry /// Your implementation can control whether LogExpert will show a menu entry by returning /// an appropriate value.

///
- /// A list containing all selected line numbers. + /// A list containing all selected line numbers. /// The currently selected Columnizer. You can use it to split log lines, /// if necessary. /// The callback interface implemented by LogExpert. You can use the functions @@ -35,23 +32,23 @@ public interface IContextMenuEntry ///
  • null: No menu entry is displayed.
  • /// /// - string GetMenuText(IList lines, ILogLineColumnizer columnizer, ILogExpertCallback callback); + string GetMenuText (IList loglines, ILogLineColumnizer columnizer, ILogExpertCallback callback); - string GetMenuText(int linesCount, ILogLineColumnizer columnizer, ILogLine line); + string GetMenuText (int linesCount, ILogLineColumnizer columnizer, ILogLine logline); /// /// This function is called from LogExpert if the menu entry is choosen by the user.

    /// Note that this function is called from the GUI thread. So try to avoid time consuming operations. ///
    - /// A list containing all selected line numbers. + /// A list containing all selected line numbers. /// The currently selected Columnizer. You can use it to split log lines, /// if necessary. /// The callback interface implemented by LogExpert. You can use the functions /// for retrieving log lines or pass it along to functions of the Columnizer if needed. - void MenuSelected(IList lines, ILogLineColumnizer columnizer, ILogExpertCallback callback); + void MenuSelected (IList loglines, ILogLineColumnizer columnizer, ILogExpertCallback callback); - void MenuSelected(int linesCount, ILogLineColumnizer columnizer, ILogLine line); + void MenuSelected (int linesCount, ILogLineColumnizer columnizer, ILogLine logline); #endregion } \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 8e1edd59..699aa111 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -60,6 +60,42 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to Copyright. + /// + public static string AboutBox_UI_Label_Copyright { + get { + return ResourceManager.GetString("AboutBox_UI_Label_Copyright", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Product Name. + /// + public static string AboutBox_UI_Label_ProductName { + get { + return ResourceManager.GetString("AboutBox_UI_Label_ProductName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version. + /// + public static string AboutBox_UI_Label_Version { + get { + return ResourceManager.GetString("AboutBox_UI_Label_Version", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AboutBox. + /// + public static string AboutBox_UI_Text { + get { + return ResourceManager.GetString("AboutBox_UI_Text", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -302,6 +338,78 @@ public static System.Drawing.Bitmap Delete { } } + /// + /// Looks up a localized string similar to Cannot parse Java stack trace line. + /// + public static string Eminus_UI_CannotParseJavaStackTraceLine { + get { + return ResourceManager.GetString("Eminus_UI_CannotParseJavaStackTraceLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Load class in Eclipse. + /// + public static string Eminus_UI_GetMenuText_DISABLEDLoadClassInEclipse { + get { + return ResourceManager.GetString("Eminus_UI_GetMenuText_DISABLEDLoadClassInEclipse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load class in Eclipse. + /// + public static string Eminus_UI_GetMenuText_LoadClassInEclipse { + get { + return ResourceManager.GetString("Eminus_UI_GetMenuText_LoadClassInEclipse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter the host and the port where the Eclipse plugin is listening to. If a password is configured, enter the password too.. + /// + public static string EminusConfigDlg_UI_Label_Description { + get { + return ResourceManager.GetString("EminusConfigDlg_UI_Label_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Host. + /// + public static string EminusConfigDlg_UI_Label_Host { + get { + return ResourceManager.GetString("EminusConfigDlg_UI_Label_Host", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string EminusConfigDlg_UI_Label_Password { + get { + return ResourceManager.GetString("EminusConfigDlg_UI_Label_Password", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Port. + /// + public static string EminusConfigDlg_UI_Label_Port { + get { + return ResourceManager.GetString("EminusConfigDlg_UI_Label_Port", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Eclipse Remote Navigation. + /// + public static string EminusConfigDlg_UI_Text { + get { + return ResourceManager.GetString("EminusConfigDlg_UI_Text", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -3574,6 +3682,15 @@ public static string Title_LogExpert { } } + /// + /// Looks up a localized string similar to Deserialize. + /// + public static string Title_LogExpert_Deserialize { + get { + return ResourceManager.GetString("Title_LogExpert_Deserialize", resourceCulture); + } + } + /// /// Looks up a localized string similar to LogExpert Error. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index b05204b7..56393e6f 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -1291,4 +1291,43 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Sprache des Userinterfaces + + Java Stacktrace Zeile kann nicht geparsed werden + + + Klasse in Eclipse laden + + + {0}Klasse in Eclipse laden + + + Deserialisieren + + + Eclipse Remote Navigation + + + Host + + + Port + + + Passwort + + + Eingabe des Hosts und Ports auf den das Eclipseplugin hört. Sollte ein Password konfiguriert sein, dies bitte auch eingeben. + + + Copyright + + + Version + + + Produktname + + + Information + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index e24d6023..50e6f1d0 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1294,4 +1294,43 @@ Checked tools will appear in the icon bar. All other tools are available in the Userinterface language + + Cannot parse Java stack trace line + + + Load class in Eclipse + + + {0}Load class in Eclipse + + + Deserialize + + + Eclipse Remote Navigation + + + Host + + + Port + + + Password + + + Enter the host and the port where the Eclipse plugin is listening to. If a password is configured, enter the password too. + + + Copyright + + + Version + + + Product Name + + + AboutBox + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/AboutBox.cs b/src/LogExpert.UI/Dialogs/AboutBox.cs index 37afa730..30051023 100644 --- a/src/LogExpert.UI/Dialogs/AboutBox.cs +++ b/src/LogExpert.UI/Dialogs/AboutBox.cs @@ -27,17 +27,13 @@ public AboutBox () usedComponentsDataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; _assembly = Assembly.GetExecutingAssembly(); - Text = $@"About {AssemblyTitle}"; - labelProductName.Text = AssemblyProduct; - labelVersion.Text = AssemblyVersion; - labelCopyright.Text = AssemblyCopyright; var link = "https://github.com/LogExperts/LogExpert"; _ = linkLabelURL.Links.Add(new LinkLabel.Link(0, link.Length, link)); LoadUsedComponents(); } + //TODO Jsons should be serialized on a central place and not in every UI component //Name, Version, License, Download, Source - private void LoadUsedComponents () { var json = File.ReadAllText($"{Application.StartupPath}files\\json\\usedComponents.json"); @@ -51,6 +47,11 @@ private void LoadUsedComponents () private void LoadResources () { logoPictureBox.Image = Resources.LogLover; + labelProductName.Text = AssemblyProduct; + labelVersion.Text = AssemblyVersion; + labelCopyright.Text = AssemblyCopyright; + okButton.Text = Resources.LogExpert_Common_UI_Button_OK; + Text = $"{Resources.AboutBox_UI_Text} {AssemblyTitle}"; } #endregion @@ -70,6 +71,7 @@ public string AssemblyTitle return titleAttribute.Title; } } + return Path.GetFileNameWithoutExtension(_assembly.Location); } } diff --git a/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs b/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs index da5350c8..1032342e 100644 --- a/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs +++ b/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Net.Sockets; using System.Runtime.Serialization; using System.Runtime.Versioning; @@ -7,7 +8,7 @@ using Newtonsoft.Json; -//TODO: This whole Eminus folder is not in use. Can be deleted? What is it? +//See Logexpert Help Eminus Plugin for more information //[assembly: SupportedOSPlatform("windows")] namespace LogExpert.UI.Dialogs.Eminus; @@ -19,6 +20,10 @@ internal class Eminus : IContextMenuEntry, ILogExpertPluginConfigurator private const string DOT = "."; private const string DOUBLE_DOT = ":"; private const string DISABLED = "_"; + private const string AT = "at "; + private const string CREATED_IN = "created in "; + private const string NESTED = "Nested:"; + private const string EXCEPTION_OF_TYPE = "Exception of type"; private EminusConfig _config = new(); private EminusConfigDlg dlg; @@ -39,18 +44,18 @@ private XmlDocument BuildParam (ILogLine line) { var fullLogLine = line.FullLine; // no Java stacktrace but some special logging of our applications at work: - if (fullLogLine.Contains("Exception of type", StringComparison.CurrentCulture) || - fullLogLine.Contains("Nested:", StringComparison.CurrentCulture)) + if (fullLogLine.Contains(EXCEPTION_OF_TYPE, StringComparison.CurrentCulture) || + fullLogLine.Contains(NESTED, StringComparison.CurrentCulture)) { - var pos = fullLogLine.IndexOf("created in "); + var pos = fullLogLine.IndexOf(CREATED_IN, StringComparison.OrdinalIgnoreCase); if (pos == -1) { return null; } - pos += "created in ".Length; - var endPos = fullLogLine.IndexOf(DOT, pos); + pos += CREATED_IN.Length; + var endPos = fullLogLine.IndexOf(DOT, pos, StringComparison.OrdinalIgnoreCase); if (endPos == -1) { @@ -58,7 +63,7 @@ private XmlDocument BuildParam (ILogLine line) } var className = fullLogLine[pos..endPos]; - pos = fullLogLine.IndexOf(DOUBLE_DOT, pos); + pos = fullLogLine.IndexOf(DOUBLE_DOT, pos, StringComparison.OrdinalIgnoreCase); if (pos == -1) { @@ -66,16 +71,16 @@ private XmlDocument BuildParam (ILogLine line) } var lineNum = fullLogLine[(pos + 1)..]; - XmlDocument doc = BuildXmlDocument(className, lineNum); + var doc = BuildXmlDocument(className, lineNum); return doc; } - if (fullLogLine.Contains("at ", StringComparison.CurrentCulture)) + if (fullLogLine.Contains(AT, StringComparison.OrdinalIgnoreCase)) { var str = fullLogLine.Trim(); string className = null; string lineNum = null; - var pos = str.IndexOf("at ") + 3; + var pos = str.IndexOf(AT, StringComparison.OrdinalIgnoreCase) + 3; str = str[pos..]; // remove 'at ' var idx = str.IndexOfAny(['(', '$', '<']); @@ -87,15 +92,16 @@ private XmlDocument BuildParam (ILogLine line) } else { - pos = str.LastIndexOf(DOT, idx); + pos = str.LastIndexOf(DOT, idx, StringComparison.OrdinalIgnoreCase); if (pos == -1) { return null; } + className = str[..pos]; } - idx = str.LastIndexOf(DOUBLE_DOT); + idx = str.LastIndexOf(DOUBLE_DOT, StringComparison.OrdinalIgnoreCase); if (idx == -1) { @@ -121,9 +127,10 @@ private XmlDocument BuildParam (ILogLine line) */ - XmlDocument doc = BuildXmlDocument(className, lineNum); + var doc = BuildXmlDocument(className, lineNum); return doc; } + return null; } @@ -131,21 +138,21 @@ private XmlDocument BuildParam (ILogLine line) private XmlDocument BuildXmlDocument (string className, string lineNum) { XmlDocument xmlDoc = new(); - xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", "yes"); - XmlElement rootElement = xmlDoc.CreateElement("eminus"); - xmlDoc.AppendChild(rootElement); + _ = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", "yes"); + var rootElement = xmlDoc.CreateElement("eminus"); + _ = xmlDoc.AppendChild(rootElement); rootElement.SetAttribute("authKey", _config.Password); - XmlElement loadElement = xmlDoc.CreateElement("loadclass"); + var loadElement = xmlDoc.CreateElement("loadclass"); loadElement.SetAttribute("mode", "dialog"); - rootElement.AppendChild(loadElement); + _ = rootElement.AppendChild(loadElement); - XmlElement elemClassName = xmlDoc.CreateElement("classname"); - XmlElement elemLineNum = xmlDoc.CreateElement("linenumber"); + var elemClassName = xmlDoc.CreateElement("classname"); + var elemLineNum = xmlDoc.CreateElement("linenumber"); elemClassName.InnerText = className; elemLineNum.InnerText = lineNum; - loadElement.AppendChild(elemClassName); - loadElement.AppendChild(elemLineNum); + _ = loadElement.AppendChild(elemClassName); + _ = loadElement.AppendChild(elemLineNum); return xmlDoc; } @@ -153,56 +160,56 @@ private XmlDocument BuildXmlDocument (string className, string lineNum) #region IContextMenuEntry Member - public string GetMenuText (IList logLines, ILogLineColumnizer columnizer, ILogExpertCallback callback) + public string GetMenuText (IList loglines, ILogLineColumnizer columnizer, ILogExpertCallback callback) { //not used return string.Empty; } [SupportedOSPlatform("windows")] - public string GetMenuText (int logLinesCount, ILogLineColumnizer columnizer, ILogLine logline) + public string GetMenuText (int linesCount, ILogLineColumnizer columnizer, ILogLine logline) { - return logLinesCount == 1 && BuildParam(logline) != null - ? "Load class in Eclipse" - : $"{DISABLED}Load class in Eclipse"; + return linesCount == 1 && BuildParam(logline) != null + ? Resources.Eminus_UI_GetMenuText_LoadClassInEclipse + : string.Format(CultureInfo.InvariantCulture, Resources.Eminus_UI_GetMenuText_DISABLEDLoadClassInEclipse, DISABLED); } - public void MenuSelected (IList logLines, ILogLineColumnizer columnizer, ILogExpertCallback callback) + public void MenuSelected (IList loglines, ILogLineColumnizer columnizer, ILogExpertCallback callback) { //Not used } [SupportedOSPlatform("windows")] - public void MenuSelected (int logLinesCount, ILogLineColumnizer columnizer, ILogLine logline) + public void MenuSelected (int linesCount, ILogLineColumnizer columnizer, ILogLine logline) { - if (logLinesCount != 1) + if (linesCount != 1) { return; } - XmlDocument doc = BuildParam(logline); + var doc = BuildParam(logline); if (doc == null) { - MessageBox.Show("Cannot parse Java stack trace line", "LogExpert"); + _ = MessageBox.Show(Resources.Eminus_UI_CannotParseJavaStackTraceLine, Resources.Title_LogExpert); } else { try { - TcpClient client = new(_config.Host, _config.Port); - NetworkStream stream = client.GetStream(); - StreamWriter writer = new(stream); + using TcpClient client = new(_config.Host, _config.Port); + using var stream = client.GetStream(); + using StreamWriter writer = new(stream); doc.Save(writer); - writer.Flush(); - stream.Flush(); - writer.Close(); - stream.Close(500); - client.Close(); } - catch (Exception e) + catch (Exception e) when (e is SocketException + or ArgumentNullException + or ArgumentOutOfRangeException + or InvalidOperationException + or ObjectDisposedException + or XmlException) { - MessageBox.Show(e.Message, "LogExpert"); + _ = MessageBox.Show(e.Message, Resources.Title_LogExpert); } } } @@ -230,7 +237,7 @@ public void LoadConfig (string configDir) } catch (SerializationException e) { - MessageBox.Show(e.Message, "Deserialize"); + _ = MessageBox.Show(e.Message, Resources.Title_LogExpert_Deserialize); _config = new EminusConfig(); } } @@ -256,11 +263,11 @@ public bool HasEmbeddedForm () } [SupportedOSPlatform("windows")] - public void ShowConfigForm (object panel) + public void ShowConfigForm (object parentPanel) { dlg = new EminusConfigDlg(tmpConfig) { - Parent = (Panel)panel + Parent = (Panel)parentPanel }; dlg.Show(); } @@ -279,7 +286,7 @@ public void ShowConfigDialog (object owner) Owner = (Form)owner }; - dlg.ShowDialog(); + _ = dlg.ShowDialog(); dlg.ApplyChanges(); } diff --git a/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.Designer.cs b/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.Designer.cs index 267dc40d..f37c02b4 100644 --- a/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.Designer.cs +++ b/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert +namespace LogExpert { partial class EminusConfigDlg { @@ -31,10 +31,10 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EminusConfigDlg)); this.hostTextBox = new System.Windows.Forms.TextBox(); this.passwordTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); + this.labelHost = new System.Windows.Forms.Label(); + this.labelPort = new System.Windows.Forms.Label(); + this.labelPassword = new System.Windows.Forms.Label(); + this.labelDescription = new System.Windows.Forms.Label(); this.portTextBox = new System.Windows.Forms.MaskedTextBox(); this.SuspendLayout(); // @@ -55,45 +55,45 @@ private void InitializeComponent() // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(17, 72); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(29, 13); - this.label1.TabIndex = 5; - this.label1.Text = "Host"; + this.labelHost.AutoSize = true; + this.labelHost.Location = new System.Drawing.Point(17, 72); + this.labelHost.Name = "host"; + this.labelHost.Size = new System.Drawing.Size(29, 13); + this.labelHost.TabIndex = 5; + this.labelHost.Text = "Host"; // // label2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(17, 99); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(26, 13); - this.label2.TabIndex = 6; - this.label2.Text = "Port"; + this.labelPort.AutoSize = true; + this.labelPort.Location = new System.Drawing.Point(17, 99); + this.labelPort.Name = "port"; + this.labelPort.Size = new System.Drawing.Size(26, 13); + this.labelPort.TabIndex = 6; + this.labelPort.Text = "Port"; // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(17, 126); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(53, 13); - this.label3.TabIndex = 7; - this.label3.Text = "Password"; + this.labelPassword.AutoSize = true; + this.labelPassword.Location = new System.Drawing.Point(17, 126); + this.labelPassword.Name = "password"; + this.labelPassword.Size = new System.Drawing.Size(53, 13); + this.labelPassword.TabIndex = 7; + this.labelPassword.Text = "Password"; // // label4 // - this.label4.Location = new System.Drawing.Point(13, 13); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(276, 41); - this.label4.TabIndex = 8; - this.label4.Text = "Enter the host and the port where the Eclipse plugin is listening to. If a passwo" + + this.labelDescription.Location = new System.Drawing.Point(13, 13); + this.labelDescription.Name = "description"; + this.labelDescription.Size = new System.Drawing.Size(276, 41); + this.labelDescription.TabIndex = 8; + this.labelDescription.Text = "Enter the host and the port where the Eclipse plugin is listening to. If a passwo" + "rd is configured, enter the password too."; // // portTextBox // this.portTextBox.Location = new System.Drawing.Point(76, 96); this.portTextBox.Mask = "99999"; - this.portTextBox.Name = "portTextBox"; + this.portTextBox.Name = "port"; this.portTextBox.Size = new System.Drawing.Size(100, 20); this.portTextBox.TabIndex = 1; // @@ -102,10 +102,10 @@ private void InitializeComponent() this.ClientSize = new System.Drawing.Size(295, 187); this.ControlBox = false; this.Controls.Add(this.portTextBox); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); + this.Controls.Add(this.labelDescription); + this.Controls.Add(this.labelPassword); + this.Controls.Add(this.labelPort); + this.Controls.Add(this.labelHost); this.Controls.Add(this.passwordTextBox); this.Controls.Add(this.hostTextBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; @@ -126,10 +126,10 @@ private void InitializeComponent() private System.Windows.Forms.TextBox hostTextBox; private System.Windows.Forms.TextBox passwordTextBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label labelHost; + private System.Windows.Forms.Label labelPort; + private System.Windows.Forms.Label labelPassword; + private System.Windows.Forms.Label labelDescription; private System.Windows.Forms.MaskedTextBox portTextBox; } } \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.cs b/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.cs index 841a340a..e40ca2d4 100644 --- a/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.cs +++ b/src/LogExpert.UI/Dialogs/Eminus/EminusConfigDlg.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Runtime.Versioning; using LogExpert.UI.Dialogs.Eminus; @@ -21,6 +22,7 @@ public EminusConfigDlg (EminusConfig config) AutoScaleMode = AutoScaleMode.Dpi; InitializeComponent(); + LoadResources(); TopLevel = false; Config = config; @@ -32,6 +34,15 @@ public EminusConfigDlg (EminusConfig config) ResumeLayout(); } + private void LoadResources () + { + Text = Resources.EminusConfigDlg_UI_Text; + labelHost.Text = Resources.EminusConfigDlg_UI_Label_Host; + labelPort.Text = Resources.EminusConfigDlg_UI_Label_Port; + labelPassword.Text = Resources.EminusConfigDlg_UI_Label_Password; + labelDescription.Text = Resources.EminusConfigDlg_UI_Label_Description; + } + #endregion #region Properties @@ -47,7 +58,7 @@ public void ApplyChanges () Config.Host = hostTextBox.Text; try { - Config.Port = short.Parse(portTextBox.Text); + Config.Port = short.Parse(portTextBox.Text, NumberStyles.None, CultureInfo.InvariantCulture); } catch (FormatException) { From 98e96afe7f99c094be076b84b1fe673c2a41dc1b Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Thu, 10 Jul 2025 14:46:27 +0200 Subject: [PATCH 22/38] Update src/LogExpert.Resources/Resources.resx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.Resources/Resources.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 50e6f1d0..8fbd6c2a 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -199,7 +199,7 @@ Config file not found - + Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}) From f6eb5d5b6b04b258d35c54e6cbe8930f8da6a6bb Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 10 Jul 2025 15:13:50 +0200 Subject: [PATCH 23/38] better resource management --- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 418 +++++++++++++++------ 1 file changed, 312 insertions(+), 106 deletions(-) diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index 7860e1f3..ca9cc32f 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -64,116 +64,160 @@ public SettingsDialog (Preferences prefs, LogTabWindow logTabWin, int tabToOpen, private void LoadResources () { - labelWarningMaximumLineLength.Text = Resources.SettingsDialog_UI_Label_WarningMaximumLineLength; - labelMaximumLineLength.Text = Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired; - labelMaximumFilterEntriesDisplayed.Text = Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed; - labelMaximumFilterEntries.Text = Resources.SettingsDialog_UI_Label_MaximumFilterEntries; - labelDefaultEncoding.Text = Resources.SettingsDialog_UI_Label_DefaultEncoding; - groupBoxMisc.Text = Resources.SettingsDialog_UI_GroupBox_Misc; - checkBoxShowErrorMessageOnlyOneInstance.Text = Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance; - checkBoxColumnSize.Text = Resources.SettingsDialog_UI_CheckBox_ColumnSize; - buttonTailColor.Text = Resources.SettingsDialog_UI_Button_Color; - checkBoxTailState.Text = Resources.SettingsDialog_UI_CheckBox_TailState; - checkBoxOpenLastFiles.Text = Resources.SettingsDialog_UI_CheckBox_OpenLastFiles; - checkBoxSingleInstance.Text = Resources.SettingsDialog_UI_CheckBox_SingleInstance; - checkBoxAskCloseTabs.Text = Resources.SettingsDialog_UI_CheckBox_AskCloseTabs; - groupBoxDefaults.Text = Resources.SettingsDialog_UI_GroupBox_Defaults; - checkBoxDarkMode.Text = Resources.SettingsDialog_UI_CheckBox_DarkMode; - checkBoxFollowTail.Text = Resources.SettingsDialog_UI_CheckBox_FollowTail; - checkBoxColumnFinder.Text = Resources.SettingsDialog_UI_CheckBox_ColumnFinder; - checkBoxSyncFilter.Text = Resources.SettingsDialog_UI_CheckBox_SyncFilter; - checkBoxFilterTail.Text = Resources.SettingsDialog_UI_CheckBox_FilterTail; - groupBoxFont.Text = Resources.SettingsDialog_UI_GroupBox_Font; - buttonChangeFont.Text = Resources.SettingsDialog_UI_Button_ChangeFont; - labelFont.Text = Resources.SettingsDialog_UI_Label_Font; - tabPageViewSettings.Text = Resources.SettingsDialog_UI_TabPage_ViewSettings; - tabPageTimeStampFeatures.Text = Resources.SettingsDialog_UI_TabPage_TimestampFeatures; - groupBoxTimeSpreadDisplay.Text = Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay; - groupBoxDisplayMode.Text = Resources.SettingsDialog_UI_GroupBox_DisplayMode; - radioButtonLineView.Text = Resources.SettingsDialog_UI_RadioButton_LineView; - radioButtonTimeView.Text = Resources.SettingsDialog_UI_RadioButton_TimeView; - checkBoxReverseAlpha.Text = Resources.SettingsDialog_UI_CheckBox_ReverseAlpha; - buttonTimespreadColor.Text = Resources.SettingsDialog_UI_Button_TimespreadColor; - checkBoxTimeSpread.Text = Resources.SettingsDialog_UI_CheckBox_TimeSpread; - groupBoxTimeStampNavigationControl.Text = Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl; - checkBoxTimestamp.Text = Resources.SettingsDialog_UI_CheckBox_Timestamp; - groupBoxMouseDragDefaults.Text = Resources.SettingsDialog_UI_GroupBox_MouseDragDefault; - radioButtonVerticalMouseDragInverted.Text = Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted; - radioButtonHorizMouseDrag.Text = Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag; - radioButtonVerticalMouseDrag.Text = Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag; - tabPageExternalTools.Text = Resources.SettingsDialog_UI_TabPage_ExternalTools; - labelToolsDescription.Text = Resources.SettingsDialog_UI_Label_ToolsDescription; - buttonToolDelete.Text = Resources.SettingsDialog_UI_Button_ToolDelete; - buttonToolAdd.Text = Resources.SettingsDialog_UI_Button_ToolAdd; - buttonToolDown.Text = Resources.SettingsDialog_UI_Button_ToolDown; - buttonToolUp.Text = Resources.SettingsDialog_UI_Button_ToolUp; - groupBoxToolSettings.Text = Resources.SettingsDialog_UI_GroupBox_ToolSettings; - labelWorkingDir.Text = Resources.SettingsDialog_UI_Label_WorkingDir; - buttonWorkingDir.Text = Resources.SettingsDialog_UI_Button_WorkingDir; - buttonIcon.Text = Resources.SettingsDialog_UI_Button_Icon; - labelToolName.Text = Resources.SettingsDialog_UI_Label_ToolName; - labelToolColumnizerForOutput.Text = Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput; - checkBoxSysout.Text = Resources.SettingsDialog_UI_CheckBox_Sysout; - buttonArguments.Text = Resources.SettingsDialog_UI_Button_Arguments; - labelTool.Text = Resources.SettingsDialog_UI_Label_Tool; - buttonTool.Text = Resources.SettingsDialog_UI_Button_Tool; - labelArguments.Text = Resources.SettingsDialog_UI_Label_Arguments; - tabPageColumnizers.Text = Resources.SettingsDialog_UI_TabPage_Columnizers; - checkBoxAutoPick.Text = Resources.SettingsDialog_UI_CheckBox_AutoPick; - checkBoxMaskPrio.Text = Resources.SettingsDialog_UI_CheckBox_MaskPrio; - buttonDelete.Text = Resources.SettingsDialog_UI_Button_Delete; + ApplyTextResources(); + ApplyToolTips(); + ApplyFormTitle(); + + var textMap = new Dictionary + { + // General + { labelWarningMaximumLineLength, Resources.SettingsDialog_UI_Label_WarningMaximumLineLength }, + { labelMaximumLineLength, Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired }, + { labelMaximumFilterEntriesDisplayed, Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed }, + { labelMaximumFilterEntries, Resources.SettingsDialog_UI_Label_MaximumFilterEntries }, + { labelDefaultEncoding, Resources.SettingsDialog_UI_Label_DefaultEncoding }, + { groupBoxMisc, Resources.SettingsDialog_UI_GroupBox_Misc }, + { checkBoxShowErrorMessageOnlyOneInstance, Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance }, + { checkBoxColumnSize, Resources.SettingsDialog_UI_CheckBox_ColumnSize }, + { buttonTailColor, Resources.SettingsDialog_UI_Button_Color }, + { checkBoxTailState, Resources.SettingsDialog_UI_CheckBox_TailState }, + { checkBoxOpenLastFiles, Resources.SettingsDialog_UI_CheckBox_OpenLastFiles }, + { checkBoxSingleInstance, Resources.SettingsDialog_UI_CheckBox_SingleInstance }, + { checkBoxAskCloseTabs, Resources.SettingsDialog_UI_CheckBox_AskCloseTabs }, + { groupBoxDefaults, Resources.SettingsDialog_UI_GroupBox_Defaults }, + { checkBoxDarkMode, Resources.SettingsDialog_UI_CheckBox_DarkMode }, + { checkBoxFollowTail, Resources.SettingsDialog_UI_CheckBox_FollowTail }, + { checkBoxColumnFinder, Resources.SettingsDialog_UI_CheckBox_ColumnFinder }, + { checkBoxSyncFilter, Resources.SettingsDialog_UI_CheckBox_SyncFilter }, + { checkBoxFilterTail, Resources.SettingsDialog_UI_CheckBox_FilterTail }, + { groupBoxFont, Resources.SettingsDialog_UI_GroupBox_Font }, + { buttonChangeFont, Resources.SettingsDialog_UI_Button_ChangeFont }, + { labelFont, Resources.SettingsDialog_UI_Label_Font }, + + // Tab Pages + { tabPageViewSettings, Resources.SettingsDialog_UI_TabPage_ViewSettings }, + { tabPageTimeStampFeatures, Resources.SettingsDialog_UI_TabPage_TimestampFeatures }, + { tabPageExternalTools, Resources.SettingsDialog_UI_TabPage_ExternalTools }, + { tabPageColumnizers, Resources.SettingsDialog_UI_TabPage_Columnizers }, + { tabPageHighlightMask, Resources.SettingsDialog_UI_TabPage_Highlight }, + { tabPageMultiFile, Resources.SettingsDialog_UI_TabPage_MultiFile }, + { tabPagePlugins, Resources.SettingsDialog_UI_TabPage_Plugins }, + { tabPageSessions, Resources.SettingsDialog_UI_TabPage_Sessions }, + { tabPageMemory, Resources.SettingsDialog_UI_TabPage_Memory }, + + // Timestamp/Time View + { groupBoxTimeSpreadDisplay, Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay }, + { groupBoxDisplayMode, Resources.SettingsDialog_UI_GroupBox_DisplayMode }, + { radioButtonLineView, Resources.SettingsDialog_UI_RadioButton_LineView }, + { radioButtonTimeView, Resources.SettingsDialog_UI_RadioButton_TimeView }, + { checkBoxReverseAlpha, Resources.SettingsDialog_UI_CheckBox_ReverseAlpha }, + { buttonTimespreadColor, Resources.SettingsDialog_UI_Button_TimespreadColor }, + { checkBoxTimeSpread, Resources.SettingsDialog_UI_CheckBox_TimeSpread }, + { groupBoxTimeStampNavigationControl, Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl }, + { checkBoxTimestamp, Resources.SettingsDialog_UI_CheckBox_Timestamp }, + + // Mouse Drag + { groupBoxMouseDragDefaults, Resources.SettingsDialog_UI_GroupBox_MouseDragDefault }, + { radioButtonVerticalMouseDragInverted, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted }, + { radioButtonHorizMouseDrag, Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag }, + { radioButtonVerticalMouseDrag, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag }, + + // Tools Section + { labelToolsDescription, Resources.SettingsDialog_UI_Label_ToolsDescription }, + { buttonToolDelete, Resources.SettingsDialog_UI_Button_ToolDelete }, + { buttonToolAdd, Resources.SettingsDialog_UI_Button_ToolAdd }, + { buttonToolDown, Resources.SettingsDialog_UI_Button_ToolDown }, + { buttonToolUp, Resources.SettingsDialog_UI_Button_ToolUp }, + { groupBoxToolSettings, Resources.SettingsDialog_UI_GroupBox_ToolSettings }, + { labelWorkingDir, Resources.SettingsDialog_UI_Label_WorkingDir }, + { buttonWorkingDir, Resources.SettingsDialog_UI_Button_WorkingDir }, + { buttonIcon, Resources.SettingsDialog_UI_Button_Icon }, + { labelToolName, Resources.SettingsDialog_UI_Label_ToolName }, + { labelToolColumnizerForOutput, Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput }, + { checkBoxSysout, Resources.SettingsDialog_UI_CheckBox_Sysout }, + { buttonArguments, Resources.SettingsDialog_UI_Button_Arguments }, + { labelTool, Resources.SettingsDialog_UI_Label_Tool }, + { buttonTool, Resources.SettingsDialog_UI_Button_Tool }, + { labelArguments, Resources.SettingsDialog_UI_Label_Arguments }, + + // Columnizer/Highlight + { checkBoxAutoPick, Resources.SettingsDialog_UI_CheckBox_AutoPick }, + { checkBoxMaskPrio, Resources.SettingsDialog_UI_CheckBox_MaskPrio }, + { buttonDelete, Resources.SettingsDialog_UI_Button_Delete }, + + // MultiFile + { groupBoxDefaultFileNamePattern, Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern }, + { labelMaxDays, Resources.SettingsDialog_UI_Label_MaxDays }, + { labelPattern, Resources.SettingsDialog_UI_Label_Pattern }, + { labelHintMultiFile, Resources.SettingsDialog_UI_Label_HintMultiFile }, + { labelNoteMultiFile, Resources.SettingsDialog_UI_Label_NoteMultifile }, + { groupBoxWhenOpeningMultiFile, Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles }, + { radioButtonAskWhatToDo, Resources.SettingsDialog_UI_RadioButton_AskWhatToDo }, + { radioButtonTreatAllFilesAsOneMultifile, Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile }, + { radioButtonLoadEveryFileIntoSeperatedTab, Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab }, + + // Plugin / Session / Memory + { groupBoxPlugins, Resources.SettingsDialog_UI_GroupBox_Plugins }, + { groupBoxSettings, Resources.SettingsDialog_UI_GroupBox_Settings }, + { buttonConfigPlugin, Resources.SettingsDialog_UI_Button_ConfigurePlugin }, + { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_PortableMode }, + { checkBoxSaveFilter, Resources.SettingsDialog_UI_CheckBox_SaveFilter }, + { groupBoxPersistantFileLocation, Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation }, + { labelSessionSaveOwnDir, Resources.SettingsDialog_UI_Label_SessionSaveOwnDir }, + { buttonSessionSaveDir, Resources.SettingsDialog_UI_Button_SessionSaveDir }, + { radioButtonSessionSaveOwn, Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn }, + { radioButtonsessionSaveDocuments, Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments }, + { radioButtonSessionSameDir, Resources.SettingsDialog_UI_RadioButton_SessionSameDir }, + { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir }, + { checkBoxSaveSessions, Resources.SettingsDialog_UI_CheckBox_SaveSessions }, + { groupBoxCPUAndStuff, Resources.SettingsDialog_UI_GroupBox_CPUAndStuff }, + { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_LegacyReader }, + { checkBoxMultiThread, Resources.SettingsDialog_UI_CheckBox_MultiThread }, + { labelFilePollingInterval, Resources.SettingsDialog_UI_Label_FilePollingInterval }, + { groupBoxLineBufferUsage, Resources.SettingsDialog_UI_GroupBox_LineBufferUsage }, + { labelInfo, Resources.SettingsDialog_UI_Label_Info }, + { labelNumberOfBlocks, Resources.SettingsDialog_UI_Label_NumberOfBlocks }, + { labelLinesPerBlock, Resources.SettingsDialog_UI_Label_LinesPerBlock }, + + // Dialog buttons + { buttonCancel, Resources.LogExpert_Common_UI_Button_Cancel }, + { buttonOk, Resources.LogExpert_Common_UI_Button_OK }, + { buttonExport, Resources.LogExpert_Common_UI_Button_Export }, + { buttonImport, Resources.LogExpert_Common_UI_Button_Import }, + }; + + + + // Form title + Text = Resources.SettingsDialog_Form_Text; + + + } + + private void ApplyFormTitle () + { + Text = Resources.SettingsDialog_Form_Text; + } + + private void ApplyToolTips () + { + foreach (var entry in GetToolTipMap()) + { + toolTip.SetToolTip(entry.Key, entry.Value); + } + } + + private void ApplyTextResources () + { + foreach (var entry in GetTextResourceMap()) + { + entry.Key.Text = entry.Value; + } + dataGridViewTextBoxColumnFileMask.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask; dataGridViewComboBoxColumnColumnizer.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer; - tabPageHighlightMask.Text = Resources.SettingsDialog_UI_TabPage_Highlight; dataGridViewTextBoxColumnFileName.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileName; dataGridViewComboBoxColumnHighlightGroup.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup; - tabPageMultiFile.Text = Resources.SettingsDialog_UI_TabPage_MultiFile; - groupBoxDefaultFileNamePattern.Text = Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern; - labelMaxDays.Text = Resources.SettingsDialog_UI_Label_MaxDays; - labelPattern.Text = Resources.SettingsDialog_UI_Label_Pattern; - labelHintMultiFile.Text = Resources.SettingsDialog_UI_Label_HintMultiFile; - labelNoteMultiFile.Text = Resources.SettingsDialog_UI_Label_NoteMultifile; - groupBoxWhenOpeningMultiFile.Text = Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles; - radioButtonAskWhatToDo.Text = Resources.SettingsDialog_UI_RadioButton_AskWhatToDo; - radioButtonTreatAllFilesAsOneMultifile.Text = Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile; - radioButtonLoadEveryFileIntoSeperatedTab.Text = Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab; - tabPagePlugins.Text = Resources.SettingsDialog_UI_TabPage_Plugins; - groupBoxPlugins.Text = Resources.SettingsDialog_UI_GroupBox_Plugins; - groupBoxSettings.Text = Resources.SettingsDialog_UI_GroupBox_Settings; - buttonConfigPlugin.Text = Resources.SettingsDialog_UI_Button_ConfigurePlugin; - tabPageSessions.Text = Resources.SettingsDialog_UI_TabPage_Sessions; - checkBoxPortableMode.Text = Resources.SettingsDialog_UI_CheckBox_PortableMode; - checkBoxSaveFilter.Text = Resources.SettingsDialog_UI_CheckBox_SaveFilter; - groupBoxPersistantFileLocation.Text = Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation; - labelSessionSaveOwnDir.Text = Resources.SettingsDialog_UI_Label_SessionSaveOwnDir; - buttonSessionSaveDir.Text = Resources.SettingsDialog_UI_Button_SessionSaveDir; - radioButtonSessionSaveOwn.Text = Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn; - radioButtonsessionSaveDocuments.Text = Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments; - radioButtonSessionSameDir.Text = Resources.SettingsDialog_UI_RadioButton_SessionSameDir; - radioButtonSessionApplicationStartupDir.Text = Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir; - checkBoxSaveSessions.Text = Resources.SettingsDialog_UI_CheckBox_SaveSessions; - tabPageMemory.Text = Resources.SettingsDialog_UI_TabPage_Memory; - groupBoxCPUAndStuff.Text = Resources.SettingsDialog_UI_GroupBox_CPUAndStuff; - checkBoxLegacyReader.Text = Resources.SettingsDialog_UI_CheckBox_LegacyReader; - checkBoxMultiThread.Text = Resources.SettingsDialog_UI_CheckBox_MultiThread; - labelFilePollingInterval.Text = Resources.SettingsDialog_UI_Label_FilePollingInterval; - groupBoxLineBufferUsage.Text = Resources.SettingsDialog_UI_GroupBox_LineBufferUsage; - labelInfo.Text = Resources.SettingsDialog_UI_Label_Info; - labelNumberOfBlocks.Text = Resources.SettingsDialog_UI_Label_NumberOfBlocks; - labelLinesPerBlock.Text = Resources.SettingsDialog_UI_Label_LinesPerBlock; - buttonCancel.Text = Resources.LogExpert_Common_UI_Button_Cancel; - buttonOk.Text = Resources.LogExpert_Common_UI_Button_OK; - buttonExport.Text = Resources.LogExpert_Common_UI_Button_Export; - buttonImport.Text = Resources.LogExpert_Common_UI_Button_Import; - Text = Resources.SettingsDialog_Form_Text; - labelLanguage.Text = Resources.SettingsDialog_UI_Label_Language; - - // ToolTips - toolTip.SetToolTip(comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_Language); - toolTip.SetToolTip(comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_Encoding); - toolTip.SetToolTip(checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_PortableMode); - toolTip.SetToolTip(radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir); - toolTip.SetToolTip(checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_LegacyReader); } private void FillDialog () @@ -707,6 +751,12 @@ private void DisplayCurrentIcon () } } + /// + /// Populates the encoding list in the combo box with a predefined set of character encodings. + /// + /// This method clears any existing items in the combo box and adds a selection of common + /// encodings, including ASCII, Default (UTF-8), ISO-8859-1, UTF-8, Unicode, and Windows-1252. The value member of the combo + /// box is set to a specific header name defined in the resources. private void FillEncodingList () { comboBoxEncoding.Items.Clear(); @@ -721,6 +771,11 @@ private void FillEncodingList () comboBoxEncoding.ValueMember = Resources.SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName; } + /// + /// Populates the language selection list with available language options. + /// + /// Clears any existing items in the language selection list and adds predefined language + /// options. Currently, it includes English (United States) and German (Germany). private void FillLanguageList () { comboBoxLanguage.Items.Clear(); @@ -1195,4 +1250,155 @@ or NotSupportedException } #endregion + + #region Resourse Map + + /// + /// Creates a mapping between UI controls and their corresponding text resources. + /// + /// This method is used to associate UI controls with their respective text resources, + /// facilitating localization and dynamic text updates within the application. + /// A where the key is a and the value is a representing the text resource associated with the control. + private Dictionary GetTextResourceMap () + { + return new Dictionary + { + // General + { labelWarningMaximumLineLength, Resources.SettingsDialog_UI_Label_WarningMaximumLineLength }, + { labelMaximumLineLength, Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired }, + { labelMaximumFilterEntriesDisplayed, Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed }, + { labelMaximumFilterEntries, Resources.SettingsDialog_UI_Label_MaximumFilterEntries }, + { labelDefaultEncoding, Resources.SettingsDialog_UI_Label_DefaultEncoding }, + { groupBoxMisc, Resources.SettingsDialog_UI_GroupBox_Misc }, + { checkBoxShowErrorMessageOnlyOneInstance, Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance }, + { checkBoxColumnSize, Resources.SettingsDialog_UI_CheckBox_ColumnSize }, + { buttonTailColor, Resources.SettingsDialog_UI_Button_Color }, + { checkBoxTailState, Resources.SettingsDialog_UI_CheckBox_TailState }, + { checkBoxOpenLastFiles, Resources.SettingsDialog_UI_CheckBox_OpenLastFiles }, + { checkBoxSingleInstance, Resources.SettingsDialog_UI_CheckBox_SingleInstance }, + { checkBoxAskCloseTabs, Resources.SettingsDialog_UI_CheckBox_AskCloseTabs }, + { groupBoxDefaults, Resources.SettingsDialog_UI_GroupBox_Defaults }, + { checkBoxDarkMode, Resources.SettingsDialog_UI_CheckBox_DarkMode }, + { checkBoxFollowTail, Resources.SettingsDialog_UI_CheckBox_FollowTail }, + { checkBoxColumnFinder, Resources.SettingsDialog_UI_CheckBox_ColumnFinder }, + { checkBoxSyncFilter, Resources.SettingsDialog_UI_CheckBox_SyncFilter }, + { checkBoxFilterTail, Resources.SettingsDialog_UI_CheckBox_FilterTail }, + { groupBoxFont, Resources.SettingsDialog_UI_GroupBox_Font }, + { buttonChangeFont, Resources.SettingsDialog_UI_Button_ChangeFont }, + { labelFont, Resources.SettingsDialog_UI_Label_Font }, + + // Tab Pages + { tabPageViewSettings, Resources.SettingsDialog_UI_TabPage_ViewSettings }, + { tabPageTimeStampFeatures, Resources.SettingsDialog_UI_TabPage_TimestampFeatures }, + { tabPageExternalTools, Resources.SettingsDialog_UI_TabPage_ExternalTools }, + { tabPageColumnizers, Resources.SettingsDialog_UI_TabPage_Columnizers }, + { tabPageHighlightMask, Resources.SettingsDialog_UI_TabPage_Highlight }, + { tabPageMultiFile, Resources.SettingsDialog_UI_TabPage_MultiFile }, + { tabPagePlugins, Resources.SettingsDialog_UI_TabPage_Plugins }, + { tabPageSessions, Resources.SettingsDialog_UI_TabPage_Sessions }, + { tabPageMemory, Resources.SettingsDialog_UI_TabPage_Memory }, + + // Timestamp/Time View + { groupBoxTimeSpreadDisplay, Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay }, + { groupBoxDisplayMode, Resources.SettingsDialog_UI_GroupBox_DisplayMode }, + { radioButtonLineView, Resources.SettingsDialog_UI_RadioButton_LineView }, + { radioButtonTimeView, Resources.SettingsDialog_UI_RadioButton_TimeView }, + { checkBoxReverseAlpha, Resources.SettingsDialog_UI_CheckBox_ReverseAlpha }, + { buttonTimespreadColor, Resources.SettingsDialog_UI_Button_TimespreadColor }, + { checkBoxTimeSpread, Resources.SettingsDialog_UI_CheckBox_TimeSpread }, + { groupBoxTimeStampNavigationControl, Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl }, + { checkBoxTimestamp, Resources.SettingsDialog_UI_CheckBox_Timestamp }, + + // Mouse Drag + { groupBoxMouseDragDefaults, Resources.SettingsDialog_UI_GroupBox_MouseDragDefault }, + { radioButtonVerticalMouseDragInverted, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted }, + { radioButtonHorizMouseDrag, Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag }, + { radioButtonVerticalMouseDrag, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag }, + + // Tools Section + { labelToolsDescription, Resources.SettingsDialog_UI_Label_ToolsDescription }, + { buttonToolDelete, Resources.SettingsDialog_UI_Button_ToolDelete }, + { buttonToolAdd, Resources.SettingsDialog_UI_Button_ToolAdd }, + { buttonToolDown, Resources.SettingsDialog_UI_Button_ToolDown }, + { buttonToolUp, Resources.SettingsDialog_UI_Button_ToolUp }, + { groupBoxToolSettings, Resources.SettingsDialog_UI_GroupBox_ToolSettings }, + { labelWorkingDir, Resources.SettingsDialog_UI_Label_WorkingDir }, + { buttonWorkingDir, Resources.SettingsDialog_UI_Button_WorkingDir }, + { buttonIcon, Resources.SettingsDialog_UI_Button_Icon }, + { labelToolName, Resources.SettingsDialog_UI_Label_ToolName }, + { labelToolColumnizerForOutput, Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput }, + { checkBoxSysout, Resources.SettingsDialog_UI_CheckBox_Sysout }, + { buttonArguments, Resources.SettingsDialog_UI_Button_Arguments }, + { labelTool, Resources.SettingsDialog_UI_Label_Tool }, + { buttonTool, Resources.SettingsDialog_UI_Button_Tool }, + { labelArguments, Resources.SettingsDialog_UI_Label_Arguments }, + + // Columnizer/Highlight + { checkBoxAutoPick, Resources.SettingsDialog_UI_CheckBox_AutoPick }, + { checkBoxMaskPrio, Resources.SettingsDialog_UI_CheckBox_MaskPrio }, + { buttonDelete, Resources.SettingsDialog_UI_Button_Delete }, + + // MultiFile + { groupBoxDefaultFileNamePattern, Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern }, + { labelMaxDays, Resources.SettingsDialog_UI_Label_MaxDays }, + { labelPattern, Resources.SettingsDialog_UI_Label_Pattern }, + { labelHintMultiFile, Resources.SettingsDialog_UI_Label_HintMultiFile }, + { labelNoteMultiFile, Resources.SettingsDialog_UI_Label_NoteMultifile }, + { groupBoxWhenOpeningMultiFile, Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles }, + { radioButtonAskWhatToDo, Resources.SettingsDialog_UI_RadioButton_AskWhatToDo }, + { radioButtonTreatAllFilesAsOneMultifile, Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile }, + { radioButtonLoadEveryFileIntoSeperatedTab, Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab }, + + // Plugin / Session / Memory + { groupBoxPlugins, Resources.SettingsDialog_UI_GroupBox_Plugins }, + { groupBoxSettings, Resources.SettingsDialog_UI_GroupBox_Settings }, + { buttonConfigPlugin, Resources.SettingsDialog_UI_Button_ConfigurePlugin }, + { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_PortableMode }, + { checkBoxSaveFilter, Resources.SettingsDialog_UI_CheckBox_SaveFilter }, + { groupBoxPersistantFileLocation, Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation }, + { labelSessionSaveOwnDir, Resources.SettingsDialog_UI_Label_SessionSaveOwnDir }, + { buttonSessionSaveDir, Resources.SettingsDialog_UI_Button_SessionSaveDir }, + { radioButtonSessionSaveOwn, Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn }, + { radioButtonsessionSaveDocuments, Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments }, + { radioButtonSessionSameDir, Resources.SettingsDialog_UI_RadioButton_SessionSameDir }, + { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir }, + { checkBoxSaveSessions, Resources.SettingsDialog_UI_CheckBox_SaveSessions }, + { groupBoxCPUAndStuff, Resources.SettingsDialog_UI_GroupBox_CPUAndStuff }, + { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_LegacyReader }, + { checkBoxMultiThread, Resources.SettingsDialog_UI_CheckBox_MultiThread }, + { labelFilePollingInterval, Resources.SettingsDialog_UI_Label_FilePollingInterval }, + { groupBoxLineBufferUsage, Resources.SettingsDialog_UI_GroupBox_LineBufferUsage }, + { labelInfo, Resources.SettingsDialog_UI_Label_Info }, + { labelNumberOfBlocks, Resources.SettingsDialog_UI_Label_NumberOfBlocks }, + { labelLinesPerBlock, Resources.SettingsDialog_UI_Label_LinesPerBlock }, + + // Dialog buttons + { buttonCancel, Resources.LogExpert_Common_UI_Button_Cancel }, + { buttonOk, Resources.LogExpert_Common_UI_Button_OK }, + { buttonExport, Resources.LogExpert_Common_UI_Button_Export }, + { buttonImport, Resources.LogExpert_Common_UI_Button_Import }, + }; + } + + /// + /// Creates a mapping of UI controls to their corresponding tooltip text. + /// + /// This method initializes a dictionary with predefined tooltips for specific UI controls. + /// Additional tooltips can be added to the dictionary as needed. + /// A where the keys are objects and the values are + /// strings representing the tooltip text for each control. + private Dictionary GetToolTipMap () + { + return new Dictionary + { + { comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_Language }, + { comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_Encoding }, + { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_PortableMode }, + { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir }, + { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_LegacyReader } + }; + } + + #endregion } \ No newline at end of file From c477f536c9190e230ccd02f0bfdc87757fec23cc Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 10 Jul 2025 17:08:11 +0200 Subject: [PATCH 24/38] resource loading through reflection --- src/LogExpert.Resources/Resources.Designer.cs | 426 +++++++++--------- src/LogExpert.Resources/Resources.de.resx | 208 ++++----- src/LogExpert.Resources/Resources.resx | 202 ++++----- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 278 +----------- src/LogExpert.UI/Extensions/FormExtensions.cs | 28 ++ src/LogExpert.UI/Extensions/ResourceHelper.cs | 46 ++ src/LogExpert.UI/Extensions/Utils.cs | 1 - src/LogExpert/Program.cs | 2 +- 8 files changed, 512 insertions(+), 679 deletions(-) create mode 100644 src/LogExpert.UI/Extensions/FormExtensions.cs create mode 100644 src/LogExpert.UI/Extensions/ResourceHelper.cs diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 699aa111..82c3258b 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -2591,9 +2591,9 @@ public static string Program_UI_Error_ConfigFileNotFound { /// /// Looks up a localized string similar to Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n ({0}). /// - public static string Program_UI_Error_InsufficiantRights { + public static string Program_UI_Error_InsufficientRights { get { - return ResourceManager.GetString("Program_UI_Error_InsufficiantRights", resourceCulture); + return ResourceManager.GetString("Program_UI_Error_InsufficientRights", resourceCulture); } } @@ -2657,342 +2657,342 @@ public static string SettingsDialog_UI_ActivatePortableMode { /// /// Looks up a localized string similar to .... /// - public static string SettingsDialog_UI_Button_Arguments { + public static string SettingsDialog_UI_Button_buttonArguments { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_Arguments", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonArguments", resourceCulture); } } /// /// Looks up a localized string similar to Change.... /// - public static string SettingsDialog_UI_Button_ChangeFont { + public static string SettingsDialog_UI_Button_buttonChangeFont { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ChangeFont", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonChangeFont", resourceCulture); } } /// - /// Looks up a localized string similar to Color.... + /// Looks up a localized string similar to Configure.... /// - public static string SettingsDialog_UI_Button_Color { + public static string SettingsDialog_UI_Button_buttonConfigPlugin { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_Color", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonConfigPlugin", resourceCulture); } } /// - /// Looks up a localized string similar to Configure.... + /// Looks up a localized string similar to Delete. /// - public static string SettingsDialog_UI_Button_ConfigurePlugin { + public static string SettingsDialog_UI_Button_buttonDelete { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ConfigurePlugin", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonDelete", resourceCulture); } } /// - /// Looks up a localized string similar to Delete. + /// Looks up a localized string similar to Icon.... /// - public static string SettingsDialog_UI_Button_Delete { + public static string SettingsDialog_UI_Button_buttonIcon { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_Delete", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonIcon", resourceCulture); } } /// - /// Looks up a localized string similar to Icon.... + /// Looks up a localized string similar to .... /// - public static string SettingsDialog_UI_Button_Icon { + public static string SettingsDialog_UI_Button_buttonSessionSaveDir { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_Icon", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonSessionSaveDir", resourceCulture); } } /// - /// Looks up a localized string similar to .... + /// Looks up a localized string similar to Color.... /// - public static string SettingsDialog_UI_Button_SessionSaveDir { + public static string SettingsDialog_UI_Button_buttonTailColor { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_SessionSaveDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonTailColor", resourceCulture); } } /// /// Looks up a localized string similar to Color.... /// - public static string SettingsDialog_UI_Button_TimespreadColor { + public static string SettingsDialog_UI_Button_buttonTimespreadColor { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_TimespreadColor", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonTimespreadColor", resourceCulture); } } /// /// Looks up a localized string similar to .... /// - public static string SettingsDialog_UI_Button_Tool { + public static string SettingsDialog_UI_Button_buttonTool { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_Tool", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonTool", resourceCulture); } } /// /// Looks up a localized string similar to Add new. /// - public static string SettingsDialog_UI_Button_ToolAdd { + public static string SettingsDialog_UI_Button_buttonToolAdd { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ToolAdd", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonToolAdd", resourceCulture); } } /// /// Looks up a localized string similar to Remove. /// - public static string SettingsDialog_UI_Button_ToolDelete { + public static string SettingsDialog_UI_Button_buttonToolDelete { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ToolDelete", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonToolDelete", resourceCulture); } } /// /// Looks up a localized string similar to Down. /// - public static string SettingsDialog_UI_Button_ToolDown { + public static string SettingsDialog_UI_Button_buttonToolDown { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ToolDown", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonToolDown", resourceCulture); } } /// /// Looks up a localized string similar to Up. /// - public static string SettingsDialog_UI_Button_ToolUp { + public static string SettingsDialog_UI_Button_buttonToolUp { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_ToolUp", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonToolUp", resourceCulture); } } /// /// Looks up a localized string similar to .... /// - public static string SettingsDialog_UI_Button_WorkingDir { + public static string SettingsDialog_UI_Button_buttonWorkingDir { get { - return ResourceManager.GetString("SettingsDialog_UI_Button_WorkingDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Button_buttonWorkingDir", resourceCulture); } } /// /// Looks up a localized string similar to Ask before closing tabs. /// - public static string SettingsDialog_UI_CheckBox_AskCloseTabs { + public static string SettingsDialog_UI_CheckBox_checkBoxAskCloseTabs { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_AskCloseTabs", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxAskCloseTabs", resourceCulture); } } /// /// Looks up a localized string similar to Automatically pick for new files. /// - public static string SettingsDialog_UI_CheckBox_AutoPick { + public static string SettingsDialog_UI_CheckBox_checkBoxAutoPick { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_AutoPick", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxAutoPick", resourceCulture); } } /// /// Looks up a localized string similar to Show column finder. /// - public static string SettingsDialog_UI_CheckBox_ColumnFinder { + public static string SettingsDialog_UI_CheckBox_checkBoxColumnFinder { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ColumnFinder", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxColumnFinder", resourceCulture); } } /// /// Looks up a localized string similar to Set last column width. /// - public static string SettingsDialog_UI_CheckBox_ColumnSize { + public static string SettingsDialog_UI_CheckBox_checkBoxColumnSize { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ColumnSize", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxColumnSize", resourceCulture); } } /// /// Looks up a localized string similar to Dark Mode (restart required). /// - public static string SettingsDialog_UI_CheckBox_DarkMode { + public static string SettingsDialog_UI_CheckBox_checkBoxDarkMode { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_DarkMode", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxDarkMode", resourceCulture); } } /// /// Looks up a localized string similar to Filter tail enabled. /// - public static string SettingsDialog_UI_CheckBox_FilterTail { + public static string SettingsDialog_UI_CheckBox_checkBoxFilterTail { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_FilterTail", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxFilterTail", resourceCulture); } } /// /// Looks up a localized string similar to Follow tail enabled. /// - public static string SettingsDialog_UI_CheckBox_FollowTail { + public static string SettingsDialog_UI_CheckBox_checkBoxFollowTail { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_FollowTail", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxFollowTail", resourceCulture); } } /// /// Looks up a localized string similar to Use legacy file reader (slower). /// - public static string SettingsDialog_UI_CheckBox_LegacyReader { + public static string SettingsDialog_UI_CheckBox_checkBoxLegacyReader { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_LegacyReader", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxLegacyReader", resourceCulture); } } /// /// Looks up a localized string similar to Mask has priority before history. /// - public static string SettingsDialog_UI_CheckBox_MaskPrio { + public static string SettingsDialog_UI_CheckBox_checkBoxMaskPrio { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_MaskPrio", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxMaskPrio", resourceCulture); } } /// /// Looks up a localized string similar to Multi threaded filter. /// - public static string SettingsDialog_UI_CheckBox_MultiThread { + public static string SettingsDialog_UI_CheckBox_checkBoxMultiThread { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_MultiThread", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxMultiThread", resourceCulture); } } /// /// Looks up a localized string similar to Re-open last used files. /// - public static string SettingsDialog_UI_CheckBox_OpenLastFiles { + public static string SettingsDialog_UI_CheckBox_checkBoxOpenLastFiles { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_OpenLastFiles", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxOpenLastFiles", resourceCulture); } } /// /// Looks up a localized string similar to Activate Portable Mode. /// - public static string SettingsDialog_UI_CheckBox_PortableMode { + public static string SettingsDialog_UI_CheckBox_checkBoxPortableMode { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_PortableMode", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxPortableMode", resourceCulture); } } /// /// Looks up a localized string similar to Reverse alpha. /// - public static string SettingsDialog_UI_CheckBox_ReverseAlpha { + public static string SettingsDialog_UI_CheckBox_checkBoxReverseAlpha { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ReverseAlpha", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxReverseAlpha", resourceCulture); } } /// /// Looks up a localized string similar to Save and restore filter and filter tabs. /// - public static string SettingsDialog_UI_CheckBox_SaveFilter { + public static string SettingsDialog_UI_CheckBox_checkBoxSaveFilter { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SaveFilter", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxSaveFilter", resourceCulture); } } /// /// Looks up a localized string similar to Automatically save persistence files (.lxp). /// - public static string SettingsDialog_UI_CheckBox_SaveSessions { + public static string SettingsDialog_UI_CheckBox_checkBoxSaveSessions { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SaveSessions", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxSaveSessions", resourceCulture); } } /// /// Looks up a localized string similar to Show Error Message?. /// - public static string SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance { + public static string SettingsDialog_UI_CheckBox_checkBoxShowErrorMessageOnlyOneInstance { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxShowErrorMessageOnlyOneInstance", resourceCulture); } } /// /// Looks up a localized string similar to Allow only 1 Instance. /// - public static string SettingsDialog_UI_CheckBox_SingleInstance { + public static string SettingsDialog_UI_CheckBox_checkBoxSingleInstance { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SingleInstance", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxSingleInstance", resourceCulture); } } /// /// Looks up a localized string similar to Sync filter list enabled. /// - public static string SettingsDialog_UI_CheckBox_SyncFilter { + public static string SettingsDialog_UI_CheckBox_checkBoxSyncFilter { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_SyncFilter", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxSyncFilter", resourceCulture); } } /// /// Looks up a localized string similar to Pipe sysout to tab. /// - public static string SettingsDialog_UI_CheckBox_Sysout { + public static string SettingsDialog_UI_CheckBox_checkBoxSysout { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_Sysout", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxSysout", resourceCulture); } } /// /// Looks up a localized string similar to Show tail state on tabs. /// - public static string SettingsDialog_UI_CheckBox_TailState { + public static string SettingsDialog_UI_CheckBox_checkBoxTailState { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_TailState", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxTailState", resourceCulture); } } /// /// Looks up a localized string similar to Show time spread. /// - public static string SettingsDialog_UI_CheckBox_TimeSpread { + public static string SettingsDialog_UI_CheckBox_checkBoxTimeSpread { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_TimeSpread", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxTimeSpread", resourceCulture); } } /// /// Looks up a localized string similar to Show timestamp control, if supported by columnizer. /// - public static string SettingsDialog_UI_CheckBox_Timestamp { + public static string SettingsDialog_UI_CheckBox_checkBoxTimestamp { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_Timestamp", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_checkBoxTimestamp", resourceCulture); } } /// /// Looks up a localized string similar to Slower but more compatible with strange linefeeds and encodings. /// - public static string SettingsDialog_UI_CheckBox_ToolTip_LegacyReader { + public static string SettingsDialog_UI_CheckBox_ToolTip_toolTipLegacyReader { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_LegacyReader", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_toolTipLegacyReader", resourceCulture); } } /// /// Looks up a localized string similar to If this mode is activated, the save file will be loaded from the Executable Location. /// - public static string SettingsDialog_UI_CheckBox_ToolTip_PortableMode { + public static string SettingsDialog_UI_CheckBox_ToolTip_toolTipPortableMode { get { - return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_PortableMode", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_CheckBox_ToolTip_toolTipPortableMode", resourceCulture); } } @@ -3008,18 +3008,18 @@ public static string SettingsDialog_UI_ComboBox_Encoding_ValueMember_HeaderName /// /// Looks up a localized string similar to Encoding to be used when no BOM header and no persistence data is available.. /// - public static string SettingsDialog_UI_ComboBox_ToolTip_Encoding { + public static string SettingsDialog_UI_ComboBox_ToolTip_toolTipEncoding { get { - return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_Encoding", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_toolTipEncoding", resourceCulture); } } /// /// Looks up a localized string similar to Userinterface language. /// - public static string SettingsDialog_UI_ComboBox_ToolTip_Language { + public static string SettingsDialog_UI_ComboBox_ToolTip_toolTipLanguage { get { - return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_Language", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_ComboBox_ToolTip_toolTipLanguage", resourceCulture); } } @@ -3098,324 +3098,324 @@ public static string SettingsDialog_UI_Filter_ExportSettings { /// /// Looks up a localized string similar to Choose folder for LogExpert's session files. /// - public static string SettingsDialog_UI_FolderBrowser_SessionSaveDir { + public static string SettingsDialog_UI_FolderBrowser_folderBrowserSessionSaveDir { get { - return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_SessionSaveDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_folderBrowserSessionSaveDir", resourceCulture); } } /// /// Looks up a localized string similar to Select a working directory. /// - public static string SettingsDialog_UI_FolderBrowser_WorkingDir { + public static string SettingsDialog_UI_FolderBrowser_folderBrowserWorkingDir { get { - return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_WorkingDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_FolderBrowser_folderBrowserWorkingDir", resourceCulture); } } /// /// Looks up a localized string similar to CPU and stuff. /// - public static string SettingsDialog_UI_GroupBox_CPUAndStuff { + public static string SettingsDialog_UI_GroupBox_groupBoxCPUAndStuff { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_CPUAndStuff", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxCPUAndStuff", resourceCulture); } } /// /// Looks up a localized string similar to Default filename pattern. /// - public static string SettingsDialog_UI_GroupBox_DefaultFilenamePattern { + public static string SettingsDialog_UI_GroupBox_groupBoxDefaultFileNamePattern { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_DefaultFilenamePattern", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxDefaultFileNamePattern", resourceCulture); } } /// /// Looks up a localized string similar to Defaults. /// - public static string SettingsDialog_UI_GroupBox_Defaults { + public static string SettingsDialog_UI_GroupBox_groupBoxDefaults { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Defaults", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxDefaults", resourceCulture); } } /// /// Looks up a localized string similar to Display mode. /// - public static string SettingsDialog_UI_GroupBox_DisplayMode { + public static string SettingsDialog_UI_GroupBox_groupBoxDisplayMode { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_DisplayMode", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxDisplayMode", resourceCulture); } } /// /// Looks up a localized string similar to Font. /// - public static string SettingsDialog_UI_GroupBox_Font { + public static string SettingsDialog_UI_GroupBox_groupBoxFont { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Font", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxFont", resourceCulture); } } /// /// Looks up a localized string similar to Line buffer usage. /// - public static string SettingsDialog_UI_GroupBox_LineBufferUsage { + public static string SettingsDialog_UI_GroupBox_groupBoxLineBufferUsage { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_LineBufferUsage", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxLineBufferUsage", resourceCulture); } } /// /// Looks up a localized string similar to Misc. /// - public static string SettingsDialog_UI_GroupBox_Misc { + public static string SettingsDialog_UI_GroupBox_groupBoxMisc { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Misc", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxMisc", resourceCulture); } } /// /// Looks up a localized string similar to Mouse Drag Default. /// - public static string SettingsDialog_UI_GroupBox_MouseDragDefault { + public static string SettingsDialog_UI_GroupBox_groupBoxMouseDragDefaults { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_MouseDragDefault", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxMouseDragDefaults", resourceCulture); } } /// /// Looks up a localized string similar to Persistence file location. /// - public static string SettingsDialog_UI_GroupBox_PersistenceFileLocation { + public static string SettingsDialog_UI_GroupBox_groupBoxPersistantFileLocation { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_PersistenceFileLocation", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxPersistantFileLocation", resourceCulture); } } /// /// Looks up a localized string similar to Plugins. /// - public static string SettingsDialog_UI_GroupBox_Plugins { + public static string SettingsDialog_UI_GroupBox_groupBoxPlugins { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Plugins", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxPlugins", resourceCulture); } } /// /// Looks up a localized string similar to Settings. /// - public static string SettingsDialog_UI_GroupBox_Settings { + public static string SettingsDialog_UI_GroupBox_groupBoxSettings { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_Settings", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxSettings", resourceCulture); } } /// /// Looks up a localized string similar to Time spread display. /// - public static string SettingsDialog_UI_GroupBox_TimeSpreadDisplay { + public static string SettingsDialog_UI_GroupBox_groupBoxTimeSpreadDisplay { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_TimeSpreadDisplay", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxTimeSpreadDisplay", resourceCulture); } } /// /// Looks up a localized string similar to Timestamp navigation control. /// - public static string SettingsDialog_UI_GroupBox_TimestampNavigationControl { + public static string SettingsDialog_UI_GroupBox_groupBoxTimeStampNavigationControl { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_TimestampNavigationControl", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxTimeStampNavigationControl", resourceCulture); } } /// /// Looks up a localized string similar to Tool settings. /// - public static string SettingsDialog_UI_GroupBox_ToolSettings { + public static string SettingsDialog_UI_GroupBox_groupBoxToolSettings { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_ToolSettings", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxToolSettings", resourceCulture); } } /// /// Looks up a localized string similar to When opening multiple files.... /// - public static string SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles { + public static string SettingsDialog_UI_GroupBox_groupBoxWhenOpeningMultiFile { get { - return ResourceManager.GetString("SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_GroupBox_groupBoxWhenOpeningMultiFile", resourceCulture); } } /// /// Looks up a localized string similar to Arguments:. /// - public static string SettingsDialog_UI_Label_Arguments { + public static string SettingsDialog_UI_Label_labelArguments { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Arguments", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelArguments", resourceCulture); } } /// /// Looks up a localized string similar to Default encoding. /// - public static string SettingsDialog_UI_Label_DefaultEncoding { + public static string SettingsDialog_UI_Label_labelDefaultEncoding { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_DefaultEncoding", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelDefaultEncoding", resourceCulture); } } /// /// Looks up a localized string similar to File polling interval (ms):. /// - public static string SettingsDialog_UI_Label_FilePollingInterval { + public static string SettingsDialog_UI_Label_labelFilePollingInterval { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_FilePollingInterval", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelFilePollingInterval", resourceCulture); } } /// /// Looks up a localized string similar to Font. /// - public static string SettingsDialog_UI_Label_Font { + public static string SettingsDialog_UI_Label_labelFont { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Font", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelFont", resourceCulture); } } /// /// Looks up a localized string similar to Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa.. /// - public static string SettingsDialog_UI_Label_HintMultiFile { + public static string SettingsDialog_UI_Label_labelHintMultiFile { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_HintMultiFile", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelHintMultiFile", resourceCulture); } } /// /// Looks up a localized string similar to Changes will take effect on next file load. /// - public static string SettingsDialog_UI_Label_Info { + public static string SettingsDialog_UI_Label_labelInfo { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Info", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelInfo", resourceCulture); } } /// /// Looks up a localized string similar to Language (requires restart):. /// - public static string SettingsDialog_UI_Label_Language { + public static string SettingsDialog_UI_Label_labelLanguage { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Language", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelLanguage", resourceCulture); } } /// /// Looks up a localized string similar to Lines/block. /// - public static string SettingsDialog_UI_Label_LinesPerBlock { + public static string SettingsDialog_UI_Label_labelLinesPerBlock { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_LinesPerBlock", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelLinesPerBlock", resourceCulture); } } /// /// Looks up a localized string similar to Max days:. /// - public static string SettingsDialog_UI_Label_MaxDays { + public static string SettingsDialog_UI_Label_labelMaxDays { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_MaxDays", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelMaxDays", resourceCulture); } } /// /// Looks up a localized string similar to Maximum filter entries. /// - public static string SettingsDialog_UI_Label_MaximumFilterEntries { + public static string SettingsDialog_UI_Label_labelMaximumFilterEntries { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumFilterEntries", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelMaximumFilterEntries", resourceCulture); } } /// /// Looks up a localized string similar to Maximum filter entries displayed. /// - public static string SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed { + public static string SettingsDialog_UI_Label_labelMaximumFilterEntriesDisplayed { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelMaximumFilterEntriesDisplayed", resourceCulture); } } /// /// Looks up a localized string similar to Maximum Line Length (restart required). /// - public static string SettingsDialog_UI_Label_MaximumLineLengthRestartRequired { + public static string SettingsDialog_UI_Label_labelMaximumLineLength { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_MaximumLineLengthRestartRequired", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelMaximumLineLength", resourceCulture); } } /// /// Looks up a localized string similar to Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file.. /// - public static string SettingsDialog_UI_Label_NoteMultifile { + public static string SettingsDialog_UI_Label_labelNoteMultiFile { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_NoteMultifile", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelNoteMultiFile", resourceCulture); } } /// /// Looks up a localized string similar to Number of blocks. /// - public static string SettingsDialog_UI_Label_NumberOfBlocks { + public static string SettingsDialog_UI_Label_labelNumberOfBlocks { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_NumberOfBlocks", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelNumberOfBlocks", resourceCulture); } } /// /// Looks up a localized string similar to Pattern:. /// - public static string SettingsDialog_UI_Label_Pattern { + public static string SettingsDialog_UI_Label_labelPattern { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Pattern", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelPattern", resourceCulture); } } /// /// Looks up a localized string similar to Place Holder Text, this will be replaced programmatically. /// - public static string SettingsDialog_UI_Label_SessionSaveOwnDir { + public static string SettingsDialog_UI_Label_labelSessionSaveOwnDir { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_SessionSaveOwnDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelSessionSaveOwnDir", resourceCulture); } } /// /// Looks up a localized string similar to Program:. /// - public static string SettingsDialog_UI_Label_Tool { + public static string SettingsDialog_UI_Label_labelTool { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_Tool", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelTool", resourceCulture); } } /// /// Looks up a localized string similar to Columnizer for output:. /// - public static string SettingsDialog_UI_Label_ToolColumnizerForOutput { + public static string SettingsDialog_UI_Label_labelToolColumnizerForOutput { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_ToolColumnizerForOutput", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelToolColumnizerForOutput", resourceCulture); } } /// /// Looks up a localized string similar to Name:. /// - public static string SettingsDialog_UI_Label_ToolName { + public static string SettingsDialog_UI_Label_labelToolName { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_ToolName", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelToolName", resourceCulture); } } @@ -3423,144 +3423,144 @@ public static string SettingsDialog_UI_Label_ToolName { /// Looks up a localized string similar to You can configure as many tools as you want. ///Checked tools will appear in the icon bar. All other tools are available in the tools menu.. ///
    - public static string SettingsDialog_UI_Label_ToolsDescription { + public static string SettingsDialog_UI_Label_labelToolsDescription { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_ToolsDescription", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelToolsDescription", resourceCulture); } } /// /// Looks up a localized string similar to ! Changing the Maximum Line Length can impact performance and is not recommended !. /// - public static string SettingsDialog_UI_Label_WarningMaximumLineLength { + public static string SettingsDialog_UI_Label_labelWarningMaximumLineLength { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_WarningMaximumLineLength", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelWarningMaximumLineLength", resourceCulture); } } /// /// Looks up a localized string similar to Working dir:. /// - public static string SettingsDialog_UI_Label_WorkingDir { + public static string SettingsDialog_UI_Label_labelWorkingDir { get { - return ResourceManager.GetString("SettingsDialog_UI_Label_WorkingDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_Label_labelWorkingDir", resourceCulture); } } /// /// Looks up a localized string similar to Ask what to do. /// - public static string SettingsDialog_UI_RadioButton_AskWhatToDo { + public static string SettingsDialog_UI_RadioButton_radioButtonAskWhatToDo { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_AskWhatToDo", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonAskWhatToDo", resourceCulture); } } /// /// Looks up a localized string similar to Horizontal. /// - public static string SettingsDialog_UI_RadioButton_HorizMouseDrag { + public static string SettingsDialog_UI_RadioButton_radioButtonHorizMouseDrag { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_HorizMouseDrag", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonHorizMouseDrag", resourceCulture); } } /// /// Looks up a localized string similar to Line view. /// - public static string SettingsDialog_UI_RadioButton_LineView { + public static string SettingsDialog_UI_RadioButton_radioButtonLineView { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_LineView", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonLineView", resourceCulture); } } /// /// Looks up a localized string similar to Load every file into a separate tab. /// - public static string SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab { + public static string SettingsDialog_UI_RadioButton_radioButtonLoadEveryFileIntoSeperatedTab { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonLoadEveryFileIntoSeperatedTab", resourceCulture); } } /// /// Looks up a localized string similar to Application startup directory. /// - public static string SettingsDialog_UI_RadioButton_SessionApplicationStartupDir { + public static string SettingsDialog_UI_RadioButton_radioButtonSessionApplicationStartupDir { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionApplicationStartupDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonSessionApplicationStartupDir", resourceCulture); } } /// /// Looks up a localized string similar to Same directory as log file. /// - public static string SettingsDialog_UI_RadioButton_SessionSameDir { + public static string SettingsDialog_UI_RadioButton_radioButtonSessionSameDir { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSameDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonSessionSameDir", resourceCulture); } } /// /// Looks up a localized string similar to MyDocuments/LogExpert. /// - public static string SettingsDialog_UI_RadioButton_SessionSaveDocuments { + public static string SettingsDialog_UI_RadioButton_radioButtonsessionSaveDocuments { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSaveDocuments", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonsessionSaveDocuments", resourceCulture); } } /// /// Looks up a localized string similar to Own directory. /// - public static string SettingsDialog_UI_RadioButton_SessionSaveOwn { + public static string SettingsDialog_UI_RadioButton_radioButtonSessionSaveOwn { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_SessionSaveOwn", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonSessionSaveOwn", resourceCulture); } } /// /// Looks up a localized string similar to Time view. /// - public static string SettingsDialog_UI_RadioButton_TimeView { + public static string SettingsDialog_UI_RadioButton_radioButtonTimeView { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_TimeView", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonTimeView", resourceCulture); } } /// - /// Looks up a localized string similar to This path is based on the executable and where it has been started from.. + /// Looks up a localized string similar to Treat all files as one MultiFile. /// - public static string SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir { + public static string SettingsDialog_UI_RadioButton_radioButtonTreatAllFilesAsOneMultifile { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonTreatAllFilesAsOneMultifile", resourceCulture); } } /// - /// Looks up a localized string similar to Treat all files as one MultiFile. + /// Looks up a localized string similar to Vertical. /// - public static string SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile { + public static string SettingsDialog_UI_RadioButton_radioButtonVerticalMouseDrag { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonVerticalMouseDrag", resourceCulture); } } /// - /// Looks up a localized string similar to Vertical. + /// Looks up a localized string similar to Vertical Inverted. /// - public static string SettingsDialog_UI_RadioButton_VerticalMouseDrag { + public static string SettingsDialog_UI_RadioButton_radioButtonVerticalMouseDragInverted { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_VerticalMouseDrag", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_radioButtonVerticalMouseDragInverted", resourceCulture); } } /// - /// Looks up a localized string similar to Vertical Inverted. + /// Looks up a localized string similar to This path is based on the executable and where it has been started from.. /// - public static string SettingsDialog_UI_RadioButton_VerticalMouseDragInverted { + public static string SettingsDialog_UI_RadioButton_ToolTip_toolTipSessionApplicationStartupDir { get { - return ResourceManager.GetString("SettingsDialog_UI_RadioButton_VerticalMouseDragInverted", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_RadioButton_ToolTip_toolTipSessionApplicationStartupDir", resourceCulture); } } @@ -3576,81 +3576,81 @@ public static string SettingsDialog_UI_SettingsImported { /// /// Looks up a localized string similar to Columnizers. /// - public static string SettingsDialog_UI_TabPage_Columnizers { + public static string SettingsDialog_UI_TabPage_tabPageColumnizers { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_Columnizers", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageColumnizers", resourceCulture); } } /// /// Looks up a localized string similar to External Tools. /// - public static string SettingsDialog_UI_TabPage_ExternalTools { + public static string SettingsDialog_UI_TabPage_tabPageExternalTools { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_ExternalTools", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageExternalTools", resourceCulture); } } /// /// Looks up a localized string similar to Highlight. /// - public static string SettingsDialog_UI_TabPage_Highlight { + public static string SettingsDialog_UI_TabPage_tabPageHighlightMask { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_Highlight", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageHighlightMask", resourceCulture); } } /// /// Looks up a localized string similar to Memory/CPU. /// - public static string SettingsDialog_UI_TabPage_Memory { + public static string SettingsDialog_UI_TabPage_tabPageMemory { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_Memory", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageMemory", resourceCulture); } } /// /// Looks up a localized string similar to MultiFile. /// - public static string SettingsDialog_UI_TabPage_MultiFile { + public static string SettingsDialog_UI_TabPage_tabPageMultiFile { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_MultiFile", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageMultiFile", resourceCulture); } } /// /// Looks up a localized string similar to Plugins. /// - public static string SettingsDialog_UI_TabPage_Plugins { + public static string SettingsDialog_UI_TabPage_tabPagePlugins { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_Plugins", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPagePlugins", resourceCulture); } } /// /// Looks up a localized string similar to Persistence. /// - public static string SettingsDialog_UI_TabPage_Sessions { + public static string SettingsDialog_UI_TabPage_tabPageSessions { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_Sessions", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageSessions", resourceCulture); } } /// /// Looks up a localized string similar to Timestamp features. /// - public static string SettingsDialog_UI_TabPage_TimestampFeatures { + public static string SettingsDialog_UI_TabPage_tabPageTimeStampFeatures { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_TimestampFeatures", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageTimeStampFeatures", resourceCulture); } } /// /// Looks up a localized string similar to View settings. /// - public static string SettingsDialog_UI_TabPage_ViewSettings { + public static string SettingsDialog_UI_TabPage_tabPageViewSettings { get { - return ResourceManager.GetString("SettingsDialog_UI_TabPage_ViewSettings", resourceCulture); + return ResourceManager.GetString("SettingsDialog_UI_TabPage_tabPageViewSettings", resourceCulture); } } diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 56393e6f..7ca1c961 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -198,9 +198,6 @@ Konfigurationsdatei konnte nicht gefunden werden - - LogExpert besitzt nicht alle Systemrechte. Vielleicht wurde LogExpert aus einem Netzwerklaufwerk gestartet. Bitte LogExpert von einem lokalen Laufwerk starten!\n ({0}) - images\bmp\Pro_Filter.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -936,76 +933,76 @@ Spalten restriktion Unbekannte IPC Nachricht Type: {0}; mit payload: {1} - + Maximale Anzahl an Filtereinträge die angezeigt werden - + Maximale Zeilenlänge (neustart benötigt) - + ! Ändern der Maximalen Zeilenlänge kann Probleme bei der Performance auslösen und sollte daher nicht durchgeführt werden ! - + Maximale Anzahl an Filtereinträgen - + Default Encoding - + Entfernen - + Farbe... - + Ändern... - + Farbe... - + Zeilen/Block - + Anzahl an Blöcken - + Schriftart - + Datei Polling Interval (ms): - + Änderungen treten nach dem nächsten Laden der Datei in Kraft - + Pattern: - + Maximale Tage: - + Argumente: - + Programm: - + Columnizer für den Output: - + Name: - + Arbeitsverzeichnis: - + ... - + ... - + ... @@ -1017,31 +1014,31 @@ Spalten restriktion Importieren... - + Standard Dateinamen Pattern - + Misc - + Standards - + Schriftart - + Anzeige Modus - + Tool Einstellungen - + Speichern und wiederherstellen der Filter und Filtertabs - + Automatisches Speichern der Persistierten Dateien (.lxp) - + Applikationsstartupverzeichnis @@ -1062,91 +1059,91 @@ Spalten restriktion Kopfname - + Arbeitsverzeichnis auswählen Einstellungen {0}|Alle Dateien {1} - + Gleiches Verzeichnis wie die Logdatei Einstellungen konnte nicht importiert werden: {0} - + Meine Dokumente/LogExpert - + Eigenes Verzeichnis - + Plugins - + Neues hinzufügen - + Runter - + Rauf - + ... - + Behandle alle Dateien als Multidateien - + Nachfragen wie sie zu behandeln sind - + Vertikal - + Horizontal - + Vertikal invertiert - + Zeitanzeige - + Zeilenanzeige - + Speicher/CPU - + Lade jede Datei in einen separaten Tab - + Peristierte Einstellungen - + Multidatei - + Highlight - + Columnizers - + Externe Tools - + Zeitstempel Einstellungen - + Anzeige Einstellungen - + Multithreadfilter - + Benutze den Legacydateiverarbeitung (langsam) @@ -1161,134 +1158,134 @@ Spalten restriktion Aktiveren des portierbaren Modus - + Wähle ein Verzeichnis für die LogExpert Sessiondateien - + Langsamer dafür mehr kompatible mit unbekannten Zeilenfeeds und Encodings - + Bei Aktivierung des Modus, wird die gespeicherte Datei aus dem Verzeichnis der Executable geladen - + Encoding welches benutzt wird, wenn kein BOM Header oder keine persistierten Daten vorhanden sind. - + Der Pfad der Executable und wo das Verzeichnis aus dem Programm gestartet wird. - + Maske hat Priorität bevor Historie - + Standard Mausdrag verhalten - + Zeitstempelnavigationsdialog - + Zeitstreuanzeige - + Konfigurieren... - + Löschen - + Icon... Exportieren... - + Wenn multiple Dateien geöffnet werden... - + Plugins - + Einstellungen - + Automatisch für neue Dateien auswählen - + Pipe sysout zu Tab - + Anzeigen des Zeitstempel Dialogs, sofern der Columnizer dieses unterstützt - + Anzeigen Zeitstreudialog - + Alpha rückwärts - + das Ende filtern aktivieren - + Synchronisierung der Filter aktivieren - + Anzeigen der Spaltensuche - + Dem Ende folgen aktivieren - + Dark Mode (neustart benötigt) - + Fragen vor dem schließen des Tabs - + Nur 1 Instanz erlauben - + Wiederöffnen der letzten benutzten Dateien - + Anzeige des "Ende-Folgen"-Status auf dem Tab - + Letzte Spaltenbreite setzen - + Anzeigen der Fehlermeldung? - + Zeilenbufferbenutzung - + CPU und ähnliches - + Verzeichnis der Persitierteneinstellungsdatei - + Portierbaren Modus aktivieren Einstellungen importiert - + Sie können so viele Tools konfigurieren wie Sie möchten. Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools werden im Toolsmenu angezeigt. - + Place Holder Text, this will be replaced programmatically - + Hinweis: Mit der Taste Shift kann während die Dateien mittels Drag&Drop auf das LogExpert Fenster gezogen werden, das Verhalten von Einzel- zu Multidatei gewechselt werden und vice versa. - + Notiz: Sie können immer alle Dateien als Multifile automatisch laden wenn die Dateien die Multidateien Namensregeln folgen (<dateiname>, <dateiname>.1, <dateiname>.2, ...). Wählen Sie hierfür 'Multidatei' vom Dateimenü aus nachdem die erste Datei geladen wurde. - + Sprache (benötigt neustart): - + Sprache des Userinterfaces @@ -1330,4 +1327,7 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Information + + LogExpert besitzt nicht alle Systemrechte. Vielleicht wurde LogExpert aus einem Netzwerklaufwerk gestartet. Bitte LogExpert von einem lokalen Laufwerk starten!\n ({0}) + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 8fbd6c2a..4e1b354d 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -939,110 +939,110 @@ Column restrict This is a test exception thrown by the GUI thread - + ! Changing the Maximum Line Length can impact performance and is not recommended ! - + Maximum Line Length (restart required) - + Maximum filter entries displayed - + Maximum filter entries - + Default encoding - + Font - + You can configure as many tools as you want. Checked tools will appear in the icon bar. All other tools are available in the tools menu. - + Working dir: - + Name: - + Columnizer for output: - + Program: - + Arguments: - + Max days: - + Pattern: - + Hint: Pressing the Shift key while dropping files onto LogExpert will switch the behaviour from single to multi and vice versa. - + Note: You can always load your logfiles as MultiFile automatically if the files names follow the MultiFile naming rule (<filename>, <filename>.1, <filename>.2, ...). Simply choose 'MultiFile' from the File menu after loading the first file. - + Place Holder Text, this will be replaced programmatically - + File polling interval (ms): - + Changes will take effect on next file load - + Number of blocks - + Lines/block - + Color... - + Change... - + Color... - + Remove - + Add new - + Down - + Up - + ... - + Icon... - + ... - + ... - + Delete - + Configure... - + ... @@ -1057,181 +1057,181 @@ Checked tools will appear in the icon bar. All other tools are available in the Import... - + Misc - + Defaults - + Font - + Time spread display - + Display mode - + Timestamp navigation control - + Mouse Drag Default - + Tool settings - + Default filename pattern - + When opening multiple files... - + Plugins - + Settings - + Persistence file location - + CPU and stuff - + Line buffer usage - + Show Error Message? - + Set last column width - + Show tail state on tabs - + Re-open last used files - + Allow only 1 Instance - + Ask before closing tabs - + Dark Mode (restart required) - + Follow tail enabled - + Show column finder - + Sync filter list enabled - + Filter tail enabled - + Reverse alpha - + Show time spread - + Show timestamp control, if supported by columnizer - + Pipe sysout to tab - + Automatically pick for new files - + Mask has priority before history - + Activate Portable Mode - + Save and restore filter and filter tabs - + Automatically save persistence files (.lxp) - + Use legacy file reader (slower) - + Multi threaded filter - + View settings - + Timestamp features - + External Tools - + Columnizers - + Highlight - + MultiFile - + Plugins - + Persistence - + Memory/CPU - + Line view - + Time view - + Vertical Inverted - + Horizontal - + Vertical - + Ask what to do - + Treat all files as one MultiFile - + Load every file into a separate tab - + Own directory - + MyDocuments/LogExpert - + Same directory as log file - + Application startup directory - + This path is based on the executable and where it has been started from. @@ -1246,25 +1246,25 @@ Checked tools will appear in the icon bar. All other tools are available in the Highlight group - + Encoding to be used when no BOM header and no persistence data is available. - + If this mode is activated, the save file will be loaded from the Executable Location - + Slower but more compatible with strange linefeeds and encodings Settings - + Select a working directory HeaderName - + Choose folder for LogExpert's session files @@ -1288,10 +1288,10 @@ Checked tools will appear in the icon bar. All other tools are available in the Settings imported - + Language (requires restart): - + Userinterface language diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index ca9cc32f..48e09d46 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -9,6 +9,7 @@ using LogExpert.Core.Entities; using LogExpert.Core.Enums; using LogExpert.Core.Interface; +using LogExpert.Extensions; using LogExpert.UI.Controls.LogTabWindow; using LogExpert.UI.Dialogs; using LogExpert.UI.Extensions; @@ -37,6 +38,7 @@ private SettingsDialog (Preferences prefs, LogTabWindow logTabWin) Preferences = prefs; _logTabWin = logTabWin; //TODO: uses only HighlightGroupList. Can we pass IList instead? InitializeComponent(); + LoadResources(); AutoScaleDimensions = new SizeF(96F, 96F); @@ -68,130 +70,8 @@ private void LoadResources () ApplyToolTips(); ApplyFormTitle(); - var textMap = new Dictionary - { - // General - { labelWarningMaximumLineLength, Resources.SettingsDialog_UI_Label_WarningMaximumLineLength }, - { labelMaximumLineLength, Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired }, - { labelMaximumFilterEntriesDisplayed, Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed }, - { labelMaximumFilterEntries, Resources.SettingsDialog_UI_Label_MaximumFilterEntries }, - { labelDefaultEncoding, Resources.SettingsDialog_UI_Label_DefaultEncoding }, - { groupBoxMisc, Resources.SettingsDialog_UI_GroupBox_Misc }, - { checkBoxShowErrorMessageOnlyOneInstance, Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance }, - { checkBoxColumnSize, Resources.SettingsDialog_UI_CheckBox_ColumnSize }, - { buttonTailColor, Resources.SettingsDialog_UI_Button_Color }, - { checkBoxTailState, Resources.SettingsDialog_UI_CheckBox_TailState }, - { checkBoxOpenLastFiles, Resources.SettingsDialog_UI_CheckBox_OpenLastFiles }, - { checkBoxSingleInstance, Resources.SettingsDialog_UI_CheckBox_SingleInstance }, - { checkBoxAskCloseTabs, Resources.SettingsDialog_UI_CheckBox_AskCloseTabs }, - { groupBoxDefaults, Resources.SettingsDialog_UI_GroupBox_Defaults }, - { checkBoxDarkMode, Resources.SettingsDialog_UI_CheckBox_DarkMode }, - { checkBoxFollowTail, Resources.SettingsDialog_UI_CheckBox_FollowTail }, - { checkBoxColumnFinder, Resources.SettingsDialog_UI_CheckBox_ColumnFinder }, - { checkBoxSyncFilter, Resources.SettingsDialog_UI_CheckBox_SyncFilter }, - { checkBoxFilterTail, Resources.SettingsDialog_UI_CheckBox_FilterTail }, - { groupBoxFont, Resources.SettingsDialog_UI_GroupBox_Font }, - { buttonChangeFont, Resources.SettingsDialog_UI_Button_ChangeFont }, - { labelFont, Resources.SettingsDialog_UI_Label_Font }, - - // Tab Pages - { tabPageViewSettings, Resources.SettingsDialog_UI_TabPage_ViewSettings }, - { tabPageTimeStampFeatures, Resources.SettingsDialog_UI_TabPage_TimestampFeatures }, - { tabPageExternalTools, Resources.SettingsDialog_UI_TabPage_ExternalTools }, - { tabPageColumnizers, Resources.SettingsDialog_UI_TabPage_Columnizers }, - { tabPageHighlightMask, Resources.SettingsDialog_UI_TabPage_Highlight }, - { tabPageMultiFile, Resources.SettingsDialog_UI_TabPage_MultiFile }, - { tabPagePlugins, Resources.SettingsDialog_UI_TabPage_Plugins }, - { tabPageSessions, Resources.SettingsDialog_UI_TabPage_Sessions }, - { tabPageMemory, Resources.SettingsDialog_UI_TabPage_Memory }, - - // Timestamp/Time View - { groupBoxTimeSpreadDisplay, Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay }, - { groupBoxDisplayMode, Resources.SettingsDialog_UI_GroupBox_DisplayMode }, - { radioButtonLineView, Resources.SettingsDialog_UI_RadioButton_LineView }, - { radioButtonTimeView, Resources.SettingsDialog_UI_RadioButton_TimeView }, - { checkBoxReverseAlpha, Resources.SettingsDialog_UI_CheckBox_ReverseAlpha }, - { buttonTimespreadColor, Resources.SettingsDialog_UI_Button_TimespreadColor }, - { checkBoxTimeSpread, Resources.SettingsDialog_UI_CheckBox_TimeSpread }, - { groupBoxTimeStampNavigationControl, Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl }, - { checkBoxTimestamp, Resources.SettingsDialog_UI_CheckBox_Timestamp }, - - // Mouse Drag - { groupBoxMouseDragDefaults, Resources.SettingsDialog_UI_GroupBox_MouseDragDefault }, - { radioButtonVerticalMouseDragInverted, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted }, - { radioButtonHorizMouseDrag, Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag }, - { radioButtonVerticalMouseDrag, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag }, - - // Tools Section - { labelToolsDescription, Resources.SettingsDialog_UI_Label_ToolsDescription }, - { buttonToolDelete, Resources.SettingsDialog_UI_Button_ToolDelete }, - { buttonToolAdd, Resources.SettingsDialog_UI_Button_ToolAdd }, - { buttonToolDown, Resources.SettingsDialog_UI_Button_ToolDown }, - { buttonToolUp, Resources.SettingsDialog_UI_Button_ToolUp }, - { groupBoxToolSettings, Resources.SettingsDialog_UI_GroupBox_ToolSettings }, - { labelWorkingDir, Resources.SettingsDialog_UI_Label_WorkingDir }, - { buttonWorkingDir, Resources.SettingsDialog_UI_Button_WorkingDir }, - { buttonIcon, Resources.SettingsDialog_UI_Button_Icon }, - { labelToolName, Resources.SettingsDialog_UI_Label_ToolName }, - { labelToolColumnizerForOutput, Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput }, - { checkBoxSysout, Resources.SettingsDialog_UI_CheckBox_Sysout }, - { buttonArguments, Resources.SettingsDialog_UI_Button_Arguments }, - { labelTool, Resources.SettingsDialog_UI_Label_Tool }, - { buttonTool, Resources.SettingsDialog_UI_Button_Tool }, - { labelArguments, Resources.SettingsDialog_UI_Label_Arguments }, - - // Columnizer/Highlight - { checkBoxAutoPick, Resources.SettingsDialog_UI_CheckBox_AutoPick }, - { checkBoxMaskPrio, Resources.SettingsDialog_UI_CheckBox_MaskPrio }, - { buttonDelete, Resources.SettingsDialog_UI_Button_Delete }, - - // MultiFile - { groupBoxDefaultFileNamePattern, Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern }, - { labelMaxDays, Resources.SettingsDialog_UI_Label_MaxDays }, - { labelPattern, Resources.SettingsDialog_UI_Label_Pattern }, - { labelHintMultiFile, Resources.SettingsDialog_UI_Label_HintMultiFile }, - { labelNoteMultiFile, Resources.SettingsDialog_UI_Label_NoteMultifile }, - { groupBoxWhenOpeningMultiFile, Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles }, - { radioButtonAskWhatToDo, Resources.SettingsDialog_UI_RadioButton_AskWhatToDo }, - { radioButtonTreatAllFilesAsOneMultifile, Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile }, - { radioButtonLoadEveryFileIntoSeperatedTab, Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab }, - - // Plugin / Session / Memory - { groupBoxPlugins, Resources.SettingsDialog_UI_GroupBox_Plugins }, - { groupBoxSettings, Resources.SettingsDialog_UI_GroupBox_Settings }, - { buttonConfigPlugin, Resources.SettingsDialog_UI_Button_ConfigurePlugin }, - { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_PortableMode }, - { checkBoxSaveFilter, Resources.SettingsDialog_UI_CheckBox_SaveFilter }, - { groupBoxPersistantFileLocation, Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation }, - { labelSessionSaveOwnDir, Resources.SettingsDialog_UI_Label_SessionSaveOwnDir }, - { buttonSessionSaveDir, Resources.SettingsDialog_UI_Button_SessionSaveDir }, - { radioButtonSessionSaveOwn, Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn }, - { radioButtonsessionSaveDocuments, Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments }, - { radioButtonSessionSameDir, Resources.SettingsDialog_UI_RadioButton_SessionSameDir }, - { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir }, - { checkBoxSaveSessions, Resources.SettingsDialog_UI_CheckBox_SaveSessions }, - { groupBoxCPUAndStuff, Resources.SettingsDialog_UI_GroupBox_CPUAndStuff }, - { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_LegacyReader }, - { checkBoxMultiThread, Resources.SettingsDialog_UI_CheckBox_MultiThread }, - { labelFilePollingInterval, Resources.SettingsDialog_UI_Label_FilePollingInterval }, - { groupBoxLineBufferUsage, Resources.SettingsDialog_UI_GroupBox_LineBufferUsage }, - { labelInfo, Resources.SettingsDialog_UI_Label_Info }, - { labelNumberOfBlocks, Resources.SettingsDialog_UI_Label_NumberOfBlocks }, - { labelLinesPerBlock, Resources.SettingsDialog_UI_Label_LinesPerBlock }, - - // Dialog buttons - { buttonCancel, Resources.LogExpert_Common_UI_Button_Cancel }, - { buttonOk, Resources.LogExpert_Common_UI_Button_OK }, - { buttonExport, Resources.LogExpert_Common_UI_Button_Export }, - { buttonImport, Resources.LogExpert_Common_UI_Button_Import }, - }; - - - // Form title Text = Resources.SettingsDialog_Form_Text; - - } private void ApplyFormTitle () @@ -209,7 +89,15 @@ private void ApplyToolTips () private void ApplyTextResources () { - foreach (var entry in GetTextResourceMap()) + var map = ResourceHelper.GenerateTextMapFromNaming(this, nameof(SettingsDialog), "UI"); + + // Add exceptions or unrelated entries manually: + map[buttonCancel] = Resources.LogExpert_Common_UI_Button_Cancel; + map[buttonOk] = Resources.LogExpert_Common_UI_Button_OK; + map[buttonExport] = Resources.LogExpert_Common_UI_Button_Export; + map[buttonImport] = Resources.LogExpert_Common_UI_Button_Import; + + foreach (var entry in map) { entry.Key.Text = entry.Value; } @@ -418,7 +306,7 @@ private static void OnBtnWorkingDirClick (TextBox textBox) FolderBrowserDialog dlg = new() { RootFolder = Environment.SpecialFolder.MyComputer, - Description = Resources.SettingsDialog_UI_FolderBrowser_WorkingDir + Description = Resources.SettingsDialog_UI_FolderBrowser_folderBrowserWorkingDir }; if (!string.IsNullOrEmpty(textBox.Text)) @@ -985,7 +873,7 @@ private void OnBtnSessionSaveDirClick (object sender, EventArgs e) } dlg.ShowNewFolderButton = true; - dlg.Description = Resources.SettingsDialog_UI_FolderBrowser_SessionSaveDir; + dlg.Description = Resources.SettingsDialog_UI_FolderBrowser_folderBrowserSessionSaveDir; if (dlg.ShowDialog() == DialogResult.OK) { @@ -1251,135 +1139,7 @@ or NotSupportedException #endregion - #region Resourse Map - - /// - /// Creates a mapping between UI controls and their corresponding text resources. - /// - /// This method is used to associate UI controls with their respective text resources, - /// facilitating localization and dynamic text updates within the application. - /// A where the key is a and the value is a representing the text resource associated with the control. - private Dictionary GetTextResourceMap () - { - return new Dictionary - { - // General - { labelWarningMaximumLineLength, Resources.SettingsDialog_UI_Label_WarningMaximumLineLength }, - { labelMaximumLineLength, Resources.SettingsDialog_UI_Label_MaximumLineLengthRestartRequired }, - { labelMaximumFilterEntriesDisplayed, Resources.SettingsDialog_UI_Label_MaximumFilterEntriesDisplayed }, - { labelMaximumFilterEntries, Resources.SettingsDialog_UI_Label_MaximumFilterEntries }, - { labelDefaultEncoding, Resources.SettingsDialog_UI_Label_DefaultEncoding }, - { groupBoxMisc, Resources.SettingsDialog_UI_GroupBox_Misc }, - { checkBoxShowErrorMessageOnlyOneInstance, Resources.SettingsDialog_UI_CheckBox_ShowErrorMessageOnlyOneInstance }, - { checkBoxColumnSize, Resources.SettingsDialog_UI_CheckBox_ColumnSize }, - { buttonTailColor, Resources.SettingsDialog_UI_Button_Color }, - { checkBoxTailState, Resources.SettingsDialog_UI_CheckBox_TailState }, - { checkBoxOpenLastFiles, Resources.SettingsDialog_UI_CheckBox_OpenLastFiles }, - { checkBoxSingleInstance, Resources.SettingsDialog_UI_CheckBox_SingleInstance }, - { checkBoxAskCloseTabs, Resources.SettingsDialog_UI_CheckBox_AskCloseTabs }, - { groupBoxDefaults, Resources.SettingsDialog_UI_GroupBox_Defaults }, - { checkBoxDarkMode, Resources.SettingsDialog_UI_CheckBox_DarkMode }, - { checkBoxFollowTail, Resources.SettingsDialog_UI_CheckBox_FollowTail }, - { checkBoxColumnFinder, Resources.SettingsDialog_UI_CheckBox_ColumnFinder }, - { checkBoxSyncFilter, Resources.SettingsDialog_UI_CheckBox_SyncFilter }, - { checkBoxFilterTail, Resources.SettingsDialog_UI_CheckBox_FilterTail }, - { groupBoxFont, Resources.SettingsDialog_UI_GroupBox_Font }, - { buttonChangeFont, Resources.SettingsDialog_UI_Button_ChangeFont }, - { labelFont, Resources.SettingsDialog_UI_Label_Font }, - - // Tab Pages - { tabPageViewSettings, Resources.SettingsDialog_UI_TabPage_ViewSettings }, - { tabPageTimeStampFeatures, Resources.SettingsDialog_UI_TabPage_TimestampFeatures }, - { tabPageExternalTools, Resources.SettingsDialog_UI_TabPage_ExternalTools }, - { tabPageColumnizers, Resources.SettingsDialog_UI_TabPage_Columnizers }, - { tabPageHighlightMask, Resources.SettingsDialog_UI_TabPage_Highlight }, - { tabPageMultiFile, Resources.SettingsDialog_UI_TabPage_MultiFile }, - { tabPagePlugins, Resources.SettingsDialog_UI_TabPage_Plugins }, - { tabPageSessions, Resources.SettingsDialog_UI_TabPage_Sessions }, - { tabPageMemory, Resources.SettingsDialog_UI_TabPage_Memory }, - - // Timestamp/Time View - { groupBoxTimeSpreadDisplay, Resources.SettingsDialog_UI_GroupBox_TimeSpreadDisplay }, - { groupBoxDisplayMode, Resources.SettingsDialog_UI_GroupBox_DisplayMode }, - { radioButtonLineView, Resources.SettingsDialog_UI_RadioButton_LineView }, - { radioButtonTimeView, Resources.SettingsDialog_UI_RadioButton_TimeView }, - { checkBoxReverseAlpha, Resources.SettingsDialog_UI_CheckBox_ReverseAlpha }, - { buttonTimespreadColor, Resources.SettingsDialog_UI_Button_TimespreadColor }, - { checkBoxTimeSpread, Resources.SettingsDialog_UI_CheckBox_TimeSpread }, - { groupBoxTimeStampNavigationControl, Resources.SettingsDialog_UI_GroupBox_TimestampNavigationControl }, - { checkBoxTimestamp, Resources.SettingsDialog_UI_CheckBox_Timestamp }, - - // Mouse Drag - { groupBoxMouseDragDefaults, Resources.SettingsDialog_UI_GroupBox_MouseDragDefault }, - { radioButtonVerticalMouseDragInverted, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDragInverted }, - { radioButtonHorizMouseDrag, Resources.SettingsDialog_UI_RadioButton_HorizMouseDrag }, - { radioButtonVerticalMouseDrag, Resources.SettingsDialog_UI_RadioButton_VerticalMouseDrag }, - - // Tools Section - { labelToolsDescription, Resources.SettingsDialog_UI_Label_ToolsDescription }, - { buttonToolDelete, Resources.SettingsDialog_UI_Button_ToolDelete }, - { buttonToolAdd, Resources.SettingsDialog_UI_Button_ToolAdd }, - { buttonToolDown, Resources.SettingsDialog_UI_Button_ToolDown }, - { buttonToolUp, Resources.SettingsDialog_UI_Button_ToolUp }, - { groupBoxToolSettings, Resources.SettingsDialog_UI_GroupBox_ToolSettings }, - { labelWorkingDir, Resources.SettingsDialog_UI_Label_WorkingDir }, - { buttonWorkingDir, Resources.SettingsDialog_UI_Button_WorkingDir }, - { buttonIcon, Resources.SettingsDialog_UI_Button_Icon }, - { labelToolName, Resources.SettingsDialog_UI_Label_ToolName }, - { labelToolColumnizerForOutput, Resources.SettingsDialog_UI_Label_ToolColumnizerForOutput }, - { checkBoxSysout, Resources.SettingsDialog_UI_CheckBox_Sysout }, - { buttonArguments, Resources.SettingsDialog_UI_Button_Arguments }, - { labelTool, Resources.SettingsDialog_UI_Label_Tool }, - { buttonTool, Resources.SettingsDialog_UI_Button_Tool }, - { labelArguments, Resources.SettingsDialog_UI_Label_Arguments }, - - // Columnizer/Highlight - { checkBoxAutoPick, Resources.SettingsDialog_UI_CheckBox_AutoPick }, - { checkBoxMaskPrio, Resources.SettingsDialog_UI_CheckBox_MaskPrio }, - { buttonDelete, Resources.SettingsDialog_UI_Button_Delete }, - - // MultiFile - { groupBoxDefaultFileNamePattern, Resources.SettingsDialog_UI_GroupBox_DefaultFilenamePattern }, - { labelMaxDays, Resources.SettingsDialog_UI_Label_MaxDays }, - { labelPattern, Resources.SettingsDialog_UI_Label_Pattern }, - { labelHintMultiFile, Resources.SettingsDialog_UI_Label_HintMultiFile }, - { labelNoteMultiFile, Resources.SettingsDialog_UI_Label_NoteMultifile }, - { groupBoxWhenOpeningMultiFile, Resources.SettingsDialog_UI_GroupBox_WhenOpeningMultipleFiles }, - { radioButtonAskWhatToDo, Resources.SettingsDialog_UI_RadioButton_AskWhatToDo }, - { radioButtonTreatAllFilesAsOneMultifile, Resources.SettingsDialog_UI_RadioButton_TreatAllFilesAsOneMultiFile }, - { radioButtonLoadEveryFileIntoSeperatedTab, Resources.SettingsDialog_UI_RadioButton_LoadEveryFileIntoSeparateTab }, - - // Plugin / Session / Memory - { groupBoxPlugins, Resources.SettingsDialog_UI_GroupBox_Plugins }, - { groupBoxSettings, Resources.SettingsDialog_UI_GroupBox_Settings }, - { buttonConfigPlugin, Resources.SettingsDialog_UI_Button_ConfigurePlugin }, - { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_PortableMode }, - { checkBoxSaveFilter, Resources.SettingsDialog_UI_CheckBox_SaveFilter }, - { groupBoxPersistantFileLocation, Resources.SettingsDialog_UI_GroupBox_PersistenceFileLocation }, - { labelSessionSaveOwnDir, Resources.SettingsDialog_UI_Label_SessionSaveOwnDir }, - { buttonSessionSaveDir, Resources.SettingsDialog_UI_Button_SessionSaveDir }, - { radioButtonSessionSaveOwn, Resources.SettingsDialog_UI_RadioButton_SessionSaveOwn }, - { radioButtonsessionSaveDocuments, Resources.SettingsDialog_UI_RadioButton_SessionSaveDocuments }, - { radioButtonSessionSameDir, Resources.SettingsDialog_UI_RadioButton_SessionSameDir }, - { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_SessionApplicationStartupDir }, - { checkBoxSaveSessions, Resources.SettingsDialog_UI_CheckBox_SaveSessions }, - { groupBoxCPUAndStuff, Resources.SettingsDialog_UI_GroupBox_CPUAndStuff }, - { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_LegacyReader }, - { checkBoxMultiThread, Resources.SettingsDialog_UI_CheckBox_MultiThread }, - { labelFilePollingInterval, Resources.SettingsDialog_UI_Label_FilePollingInterval }, - { groupBoxLineBufferUsage, Resources.SettingsDialog_UI_GroupBox_LineBufferUsage }, - { labelInfo, Resources.SettingsDialog_UI_Label_Info }, - { labelNumberOfBlocks, Resources.SettingsDialog_UI_Label_NumberOfBlocks }, - { labelLinesPerBlock, Resources.SettingsDialog_UI_Label_LinesPerBlock }, - - // Dialog buttons - { buttonCancel, Resources.LogExpert_Common_UI_Button_Cancel }, - { buttonOk, Resources.LogExpert_Common_UI_Button_OK }, - { buttonExport, Resources.LogExpert_Common_UI_Button_Export }, - { buttonImport, Resources.LogExpert_Common_UI_Button_Import }, - }; - } + #region Resources Map /// /// Creates a mapping of UI controls to their corresponding tooltip text. @@ -1392,11 +1152,11 @@ private Dictionary GetToolTipMap () { return new Dictionary { - { comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_Language }, - { comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_Encoding }, - { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_PortableMode }, - { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_SessionApplicationStartupDir }, - { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_LegacyReader } + { comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_toolTipLanguage }, + { comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_toolTipEncoding }, + { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_toolTipPortableMode }, + { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_toolTipSessionApplicationStartupDir }, + { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_toolTipLegacyReader } }; } diff --git a/src/LogExpert.UI/Extensions/FormExtensions.cs b/src/LogExpert.UI/Extensions/FormExtensions.cs new file mode 100644 index 00000000..3e2c3148 --- /dev/null +++ b/src/LogExpert.UI/Extensions/FormExtensions.cs @@ -0,0 +1,28 @@ +using System.Runtime.Versioning; + +namespace LogExpert.UI.Extensions; +internal static class FormExtensions +{ + /// + /// Enumerates all controls within the specified parent control, including nested child controls. + /// + /// The parent control whose child controls are to be enumerated. Cannot be . + /// An of objects representing all controls within the parent, + /// including nested children. + [SupportedOSPlatform("windows")] + public static IEnumerable ControlsRecursive (this Control parent) + { + ArgumentNullException.ThrowIfNull(parent, nameof(parent)); + + foreach (Control control in parent.Controls) + { + yield return control; + + // recurse into children + foreach (var child in ControlsRecursive(control)) + { + yield return child; + } + } + } +} diff --git a/src/LogExpert.UI/Extensions/ResourceHelper.cs b/src/LogExpert.UI/Extensions/ResourceHelper.cs new file mode 100644 index 00000000..85c30799 --- /dev/null +++ b/src/LogExpert.UI/Extensions/ResourceHelper.cs @@ -0,0 +1,46 @@ +using System.Reflection; +using System.Runtime.Versioning; + +using LogExpert.UI.Extensions; + +namespace LogExpert.Extensions; +internal class ResourceHelper +{ + /// + /// Generates a mapping of controls to their corresponding text values based on resource naming conventions. + /// + /// The method constructs resource keys using the format + /// "{className}_{rescourceMainType}_{ControlType}_{ControlName}" and retrieves the associated text from the + /// resources. Only controls with matching resource entries will be included in the returned dictionary. + /// The form containing the controls to be mapped. + /// The class name used as part of the resource key. + /// The main type of the resource used in the resource key (UI, Logger, etc). + /// A dictionary where each key is a from the form, and each value is the text associated with + /// that control, as defined in the resources. The dictionary will only include controls for which a corresponding + /// resource text is found. + [SupportedOSPlatform("windows")] + public static Dictionary GenerateTextMapFromNaming (Form form, string className, string rescourceMainType) + { + var map = new Dictionary(); + var resourcesType = typeof(Resources); + var resourceProperties = resourcesType.GetProperties(BindingFlags.Public | BindingFlags.Static); + var controls = form.ControlsRecursive(); + + foreach (var control in controls) + { + var type = control.GetType(); + var resourceKey = $"{className}_{rescourceMainType}_{control.GetType().Name}_{control.Name}"; + var prop = resourceProperties.FirstOrDefault(p => p.Name == resourceKey); + if (prop != null) + { + var value = prop.GetValue(null) as string; + if (!string.IsNullOrEmpty(value)) + { + map[control] = value; + } + } + } + + return map; + } +} diff --git a/src/LogExpert.UI/Extensions/Utils.cs b/src/LogExpert.UI/Extensions/Utils.cs index fc6622e3..d9d0c650 100644 --- a/src/LogExpert.UI/Extensions/Utils.cs +++ b/src/LogExpert.UI/Extensions/Utils.cs @@ -2,7 +2,6 @@ namespace LogExpert.UI.Extensions; - internal static class Utils { [SupportedOSPlatform("windows")] diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 09ff3160..2ab573f7 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -166,7 +166,7 @@ or ArgumentNullException } catch (SecurityException se) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_InsufficiantRights, se.Message), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_InsufficientRights, se.Message), Resources.Title_LogExpert_Error); cts.Cancel(); } } From 9e337ff7f84276aee477860776ec98fd84be6183 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 10 Jul 2025 17:10:33 +0200 Subject: [PATCH 25/38] small things --- src/LogExpert.UI/Entities/PaintHelper.cs | 12 ++++++------ src/LogExpert.UI/Extensions/BookmarkExporter.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/LogExpert.UI/Entities/PaintHelper.cs b/src/LogExpert.UI/Entities/PaintHelper.cs index 487bb547..0b30d073 100644 --- a/src/LogExpert.UI/Entities/PaintHelper.cs +++ b/src/LogExpert.UI/Entities/PaintHelper.cs @@ -306,12 +306,12 @@ private static int GetBorderSize (DataGridViewAdvancedCellBorderStyle borderStyl { DataGridViewAdvancedCellBorderStyle.None => 0, DataGridViewAdvancedCellBorderStyle.InsetDouble or DataGridViewAdvancedCellBorderStyle.OutsetDouble => 2, - DataGridViewAdvancedCellBorderStyle.NotSet => 1, // Default border size for NotSet - DataGridViewAdvancedCellBorderStyle.Single => 1, // Default border size for Single - DataGridViewAdvancedCellBorderStyle.Inset => 1, // Default border size for Inset - DataGridViewAdvancedCellBorderStyle.Outset => 1, // Default border size for Outset - DataGridViewAdvancedCellBorderStyle.OutsetPartial => 1, // Default border size for OutsetPartial - _ => 1 + DataGridViewAdvancedCellBorderStyle.NotSet => 0, // Default border size for NotSet + DataGridViewAdvancedCellBorderStyle.Single => 0, // Default border size for Single + DataGridViewAdvancedCellBorderStyle.Inset => 0, // Default border size for Inset + DataGridViewAdvancedCellBorderStyle.Outset => 0, // Default border size for Outset + DataGridViewAdvancedCellBorderStyle.OutsetPartial => 0, // Default border size for OutsetPartial + _ => 0 }; } diff --git a/src/LogExpert.UI/Extensions/BookmarkExporter.cs b/src/LogExpert.UI/Extensions/BookmarkExporter.cs index dc5e7416..bbaafba6 100644 --- a/src/LogExpert.UI/Extensions/BookmarkExporter.cs +++ b/src/LogExpert.UI/Extensions/BookmarkExporter.cs @@ -54,7 +54,7 @@ public static void ImportBookmarkList (string logfileName, string fileName, Sort .Replace("\\\r\n", replacementForNewLine, StringComparison.OrdinalIgnoreCase); // Line is formatted: logfileName ";" bookmark.LineNum ";" bookmark.Text; - var parts = line.Split(';', 3, StringSplitOptions.RemoveEmptyEntries); + var parts = line.Split(';', 3, StringSplitOptions.None); // parts[0] = fileStr // parts[1] = line number From 7fe6502113939fe58b77911361511b5dce03c896 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 10 Jul 2025 17:35:52 +0200 Subject: [PATCH 26/38] DateTimeDragControl resources --- src/LogExpert.Resources/Resources.Designer.cs | 36 +++ src/LogExpert.Resources/Resources.resx | 12 + .../Controls/DateTimeDragControl.Designer.cs | 8 +- .../Controls/DateTimeDragControl.cs | 257 +++++++++++++----- 4 files changed, 240 insertions(+), 73 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 82c3258b..c20fad6c 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -318,6 +318,42 @@ public static string ConfigManager_Logger_Info_SavingSettings { } } + /// + /// Looks up a localized string similar to Timestamp selector. + /// + public static string DateTimeDragControl_UI_ContextMenuStrip_TimestampSelector { + get { + return ResourceManager.GetString("DateTimeDragControl_UI_ContextMenuStrip_TimestampSelector", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Drag horizontal. + /// + public static string DateTimeDragControl_UI_ToolStripItem_toolStripItemHorizontalDrag { + get { + return ResourceManager.GetString("DateTimeDragControl_UI_ToolStripItem_toolStripItemHorizontalDrag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Drag vertical inverted. + /// + public static string DateTimeDragControl_UI_ToolStripItem_toolStripItemInvertedDrag { + get { + return ResourceManager.GetString("DateTimeDragControl_UI_ToolStripItem_toolStripItemInvertedDrag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Drag vertical. + /// + public static string DateTimeDragControl_UI_ToolStripItem_toolStripItemVerticalDrag { + get { + return ResourceManager.GetString("DateTimeDragControl_UI_ToolStripItem_toolStripItemVerticalDrag", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 4e1b354d..52a5bcea 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1333,4 +1333,16 @@ Checked tools will appear in the icon bar. All other tools are available in the AboutBox + + Drag horizontal + + + Drag vertical + + + Drag vertical inverted + + + Timestamp selector + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/DateTimeDragControl.Designer.cs b/src/LogExpert.UI/Controls/DateTimeDragControl.Designer.cs index 8f98bac0..09f71c16 100644 --- a/src/LogExpert.UI/Controls/DateTimeDragControl.Designer.cs +++ b/src/LogExpert.UI/Controls/DateTimeDragControl.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.Dialogs +namespace LogExpert.Dialogs { partial class DateTimeDragControl { @@ -35,9 +35,9 @@ private void InitializeComponent() this.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "DateTimeDragControl"; this.Size = new System.Drawing.Size(142, 57); - this.Load += new System.EventHandler(this.DateTimeDragControl_Load); - this.MouseLeave += new System.EventHandler(this.DateTimeDragControl_MouseLeave); - this.Resize += new System.EventHandler(this.DateTimeDragControl_Resize); + this.Load += new System.EventHandler(this.OnDateTimeDragControlLoad); + this.MouseLeave += new System.EventHandler(this.OnDateTimeDragControlMouseLeave); + this.Resize += new System.EventHandler(this.OnDateTimeDragControlResize); this.ResumeLayout(false); } diff --git a/src/LogExpert.UI/Controls/DateTimeDragControl.cs b/src/LogExpert.UI/Controls/DateTimeDragControl.cs index cd804dff..e0b5edda 100644 --- a/src/LogExpert.UI/Controls/DateTimeDragControl.cs +++ b/src/LogExpert.UI/Controls/DateTimeDragControl.cs @@ -35,8 +35,6 @@ internal partial class DateTimeDragControl : UserControl private readonly ToolStripItem toolStripItemVerticalDrag = new ToolStripMenuItem(); private readonly ToolStripItem toolStripItemVerticalInvertedDrag = new ToolStripMenuItem(); - private int _oldValue; - private string[] _dateParts; private int _startMouseX; @@ -46,9 +44,6 @@ internal partial class DateTimeDragControl : UserControl #region cTor - /// - /// Default Constructor - /// public DateTimeDragControl () { InitializeComponent(); @@ -66,27 +61,28 @@ public DateTimeDragControl () #endregion - #region Delegates - - public delegate void ValueChangedEventHandler (object sender, EventArgs e); - - public delegate void ValueDraggedEventHandler (object sender, EventArgs e); - - #endregion - #region Events - public event ValueChangedEventHandler ValueChanged; - public event ValueDraggedEventHandler ValueDragged; + public event EventHandler ValueChanged; + public event EventHandler ValueDragged; #endregion #region Properties + /// + /// Gets or sets the minimum allowable date and time value. + /// public DateTime MinDateTime { get; set; } = DateTime.MinValue; + /// + /// Gets or sets the maximum allowable date and time value. + /// public DateTime MaxDateTime { get; set; } = DateTime.MaxValue; + /// + /// Gets or sets the orientation for drag operations. + /// public DragOrientationsEnum DragOrientation { get => _dragOrientation; @@ -97,8 +93,14 @@ public DragOrientationsEnum DragOrientation } } + /// + /// Gets or sets the color used to highlight an element when the mouse hovers over it. + /// public Color HoverColor { get; set; } + /// + /// Gets or sets the date and time value, adjusted to exclude milliseconds. + /// public DateTime DateTime { get => _dateTime.Subtract(TimeSpan.FromMilliseconds(_dateTime.Millisecond)); @@ -110,6 +112,7 @@ public DateTime DateTime { _dateTime = MinDateTime; } + if (_dateTime > MaxDateTime) { _dateTime = MaxDateTime; @@ -121,7 +124,12 @@ public DateTime DateTime #region Private Methods - // Returns the index of the rectangle (digitRects) under the mouse cursor + /// + /// Determines the index of the digit rectangle under the mouse cursor. + /// + /// The mouse event arguments containing the location of the cursor. + /// The index of the rectangle in _digitRects that contains the cursor location and corresponds to a date + /// part; otherwise, returns NO_DIGIT_DRAGGED if no such rectangle is found. private int DetermineDraggedDigit (MouseEventArgs e) { for (var i = 0; i < _digitRects.Count; ++i) @@ -135,41 +143,42 @@ private int DetermineDraggedDigit (MouseEventArgs e) return NO_DIGIT_DRAGGED; } - // Return the value corresponding to current dragged digit + /// + /// Retrieves the value of the date or time component currently being dragged. + /// + /// The integer value of the date or time component corresponding to the dragged digit. Returns the year, month, + /// day, hour, minute, or second based on the dragged component. If no valid component is being dragged, returns a + /// sentinel value indicating no digit is dragged. private int GetDraggedValue () { var datePart = _dateParts[_draggedDigit]; - if (datePart.StartsWith('y')) - { - return _dateTime.Year; - } - - if (datePart.StartsWith('M')) - { - return _dateTime.Month; - } - - if (datePart.StartsWith('d')) - { - return _dateTime.Day; - } - - if (datePart.StartsWith('h')) - { - return _dateTime.Hour; - } - - if (datePart.StartsWith('m')) - { - return _dateTime.Minute; - } - - return datePart.StartsWith('s') - ? _dateTime.Second - : NO_DIGIT_DRAGGED; + return datePart.StartsWith('y') + ? _dateTime.Year + : datePart.StartsWith('M') + ? _dateTime.Month + : datePart.StartsWith('d') + ? _dateTime.Day + : datePart.StartsWith('h') + ? _dateTime.Hour + : datePart.StartsWith('m') + ? _dateTime.Minute + : datePart.StartsWith('s') + ? _dateTime.Second + : NO_DIGIT_DRAGGED; } + /// + /// Adjusts the current date and time by a specified delta based on the dragged digit. + /// + /// The adjustment is applied to the date part corresponding to the currently dragged digit, + /// which can be a year, month, day, hour, minute, or second. If the resulting date and time exceed the defined + /// MaxDateTime or fall below MinDateTime, the date and time are clamped to these limits, and the + /// method returns . + /// The amount by which to adjust the date and time. Positive values increase the date/time, while negative values + /// decrease it. + /// if the date and time were successfully adjusted within the allowed range; otherwise, . private bool SetDraggedValue (int delta) { if (_draggedDigit == NO_DIGIT_DRAGGED) @@ -207,7 +216,7 @@ private bool SetDraggedValue (int delta) _dateTime = _dateTime.AddSeconds(delta); } } - catch (Exception) + catch (Exception e) when (e is ArgumentOutOfRangeException) { // invalid value dragged } @@ -227,12 +236,18 @@ private bool SetDraggedValue (int delta) return changed; } + /// + /// Initializes custom rectangles for each part of the date section. + /// + /// This method calculates the width of each date part based on the available client rectangle + /// width and adjusts the rectangles accordingly. It clears any existing rectangles before initializing new + /// ones. + /// The section containing date parts to be formatted and measured. private void InitCustomRects (Section dateSection) { - _dateParts = dateSection + _dateParts = [.. dateSection .GeneralTextDateDurationParts - .Select(DateFormatPartAdjuster.AdjustDateTimeFormatPart) - .ToArray(); + .Select(DateFormatPartAdjuster.AdjustDateTimeFormatPart)]; var oneCharWidth = ClientRectangle.Width / _dateParts.Sum(s => s.Length); var left = ClientRectangle.Left; @@ -245,17 +260,22 @@ private void InitCustomRects (Section dateSection) _digitRects.Add(new Rectangle(left, ClientRectangle.Top, s, ClientRectangle.Height)); left += s; } - } + /// + /// Initializes the digit rectangles based on the current culture's date and time format. + /// + /// This method attempts to parse the current culture's short date and long time pattern to + /// determine the sections for digit rectangles. If parsing fails, it defaults to a standard format of "dd.MM.yyyy + /// HH:mm:ss". private void InitDigitRects () { - CultureInfo culture = CultureInfo.CurrentCulture; + var culture = CultureInfo.CurrentCulture; var datePattern = string.Concat(culture.DateTimeFormat.ShortDatePattern, " ", culture.DateTimeFormat.LongTimePattern); - List
    sections = Parser.ParseSections(datePattern, out _); - Section dateSection = sections.FirstOrDefault(); + var sections = Parser.ParseSections(datePattern, out _); + var dateSection = sections.FirstOrDefault(); if (dateSection == null) { @@ -270,7 +290,12 @@ private void InitDigitRects () #region Events handler - private void DateTimeDragControl_Load (object sender, EventArgs e) + /// + /// Handles the load event for the DateTime drag control. + /// + /// The source of the event. + /// An that contains the event data. + private void OnDateTimeDragControlLoad (object sender, EventArgs e) { InitDigitRects(); @@ -279,11 +304,23 @@ private void DateTimeDragControl_Load (object sender, EventArgs e) #endregion + /// + /// Raises the event. + /// + /// This method is called to notify subscribers that the value has changed. It invokes the event handler, if it is not null. + /// An object that contains the event data. protected void OnValueChanged (EventArgs e) { ValueChanged?.Invoke(this, e); } + /// + /// Raises the event. + /// + /// This method is called to notify subscribers that a value has been dragged. Override this + /// method in a derived class to handle the event without attaching a delegate. + /// An that contains the event data. protected void OnValueDragged (EventArgs e) { ValueDragged?.Invoke(this, e); @@ -291,31 +328,42 @@ protected void OnValueDragged (EventArgs e) #region Contextual Menu + /// + /// Builds and initializes the contextual menu for timestamp selection. + /// + /// This method sets up the contextual menu with options for horizontal, vertical, and inverted + /// vertical drag actions. It assigns click event handlers to each menu item and updates the menu with the current + /// state. private void BuildContextualMenu () { ContextMenuStrip = new ContextMenuStrip { - Name = "Timestamp selector" + Name = Resources.DateTimeDragControl_UI_ContextMenuStrip_TimestampSelector }; - ContextMenuStrip.Items.Add(toolStripItemHorizontalDrag); - ContextMenuStrip.Items.Add(toolStripItemVerticalDrag); - ContextMenuStrip.Items.Add(toolStripItemVerticalInvertedDrag); + _ = ContextMenuStrip.Items.Add(toolStripItemHorizontalDrag); + _ = ContextMenuStrip.Items.Add(toolStripItemVerticalDrag); + _ = ContextMenuStrip.Items.Add(toolStripItemVerticalInvertedDrag); toolStripItemHorizontalDrag.Click += OnToolStripItemHorizontalDragClick; - toolStripItemHorizontalDrag.Text = "Drag horizontal"; + toolStripItemHorizontalDrag.Text = Resources.DateTimeDragControl_UI_ToolStripItem_toolStripItemHorizontalDrag; toolStripItemVerticalDrag.Click += OnToolStripItemVerticalDragClick; - toolStripItemVerticalDrag.Text = "Drag vertical"; + toolStripItemVerticalDrag.Text = Resources.DateTimeDragControl_UI_ToolStripItem_toolStripItemVerticalDrag; toolStripItemVerticalInvertedDrag.Click += OnToolStripItemVerticalInvertedDragClick; - toolStripItemVerticalInvertedDrag.Text = "Drag vertical inverted"; + toolStripItemVerticalInvertedDrag.Text = Resources.DateTimeDragControl_UI_ToolStripItem_toolStripItemInvertedDrag; ContextMenuStrip.Opening += OnContextMenuStripOpening; UpdateContextMenu(); } + /// + /// Updates the state of the context menu items based on the current drag orientation. + /// + /// This method enables or disables specific context menu items to reflect the current drag + /// orientation. The menu items are adjusted so that only the relevant drag options are enabled. private void UpdateContextMenu () { toolStripItemHorizontalDrag.Enabled = DragOrientation != DragOrientationsEnum.Horizontal; @@ -323,6 +371,13 @@ private void UpdateContextMenu () toolStripItemVerticalInvertedDrag.Enabled = DragOrientation != DragOrientationsEnum.InvertedVertical; } + /// + /// Handles the event when the context menu strip is about to open. + /// + /// Cancels the opening of the context menu strip if the control is currently capturing + /// input. + /// The source of the event. + /// A that contains the event data. private void OnContextMenuStripOpening (object sender, CancelEventArgs e) { if (Capture) @@ -331,6 +386,13 @@ private void OnContextMenuStripOpening (object sender, CancelEventArgs e) } } + /// + /// Handles the click event for the horizontal drag ToolStrip item, setting the drag orientation to horizontal. + /// + /// This method disables the horizontal drag ToolStrip item and enables the vertical and vertical + /// inverted drag ToolStrip items. + /// The source of the event, typically the ToolStrip item that was clicked. + /// An that contains the event data. private void OnToolStripItemHorizontalDragClick (object sender, EventArgs e) { DragOrientation = DragOrientationsEnum.Horizontal; @@ -339,6 +401,11 @@ private void OnToolStripItemHorizontalDragClick (object sender, EventArgs e) toolStripItemVerticalInvertedDrag.Enabled = true; } + /// + /// Handles the click event for enabling vertical drag orientation on a ToolStrip item. + /// + /// The source of the event, typically the ToolStrip item that was clicked. + /// An that contains the event data. private void OnToolStripItemVerticalDragClick (object sender, EventArgs e) { DragOrientation = DragOrientationsEnum.Vertical; @@ -347,6 +414,13 @@ private void OnToolStripItemVerticalDragClick (object sender, EventArgs e) toolStripItemVerticalInvertedDrag.Enabled = true; } + /// + /// Handles the click event for the vertical inverted drag ToolStrip item. + /// + /// This method sets the drag orientation to inverted vertical and updates the enabled state of + /// related ToolStrip items. + /// The source of the event, typically the ToolStrip item that was clicked. + /// An that contains the event data. private void OnToolStripItemVerticalInvertedDragClick (object sender, EventArgs e) { DragOrientation = DragOrientationsEnum.InvertedVertical; @@ -359,6 +433,15 @@ private void OnToolStripItemVerticalInvertedDragClick (object sender, EventArgs #region Rendering + /// + /// Handles the painting of the control, rendering the current date and time values with a user-defined format and + /// highlighting any dragged digit. + /// + /// This method overrides the base method to provide custom + /// rendering logic. It highlights a dragged digit, if any, and displays the current date and time using a specified + /// format. The method ensures that the date parts are formatted correctly and handles any exceptions that may arise + /// from invalid date formats. + /// A that contains the event data. protected override void OnPaint (PaintEventArgs e) { base.OnPaint(e); @@ -377,17 +460,18 @@ protected override void OnPaint (PaintEventArgs e) for (var i = 0; i < _dateParts.Length; i++) { var datePart = _dateParts[i]; - Rectangle rect = _digitRects[i]; + var rect = _digitRects[i]; string value; if (Token.IsDatePart(datePart)) { try { - value = _dateTime.ToString("-" + datePart + "-"); + value = _dateTime.ToString("-" + datePart + "-", CultureInfo.InvariantCulture); value = value[1..^1]; } - catch + catch (Exception ex) when (ex is FormatException + or ArgumentOutOfRangeException) { value = datePart; } @@ -401,7 +485,12 @@ protected override void OnPaint (PaintEventArgs e) } } - private void DateTimeDragControl_Resize (object sender, EventArgs e) + /// + /// Handles the resize event of the DateTimeDragControl. + /// + /// The source of the event, typically the control being resized. + /// An that contains the event data. + private void OnDateTimeDragControlResize (object sender, EventArgs e) { InitDigitRects(); } @@ -410,6 +499,14 @@ private void DateTimeDragControl_Resize (object sender, EventArgs e) #region Mouse callbacks + /// + /// Handles the mouse down event for the control, initiating a drag operation if the left mouse button is pressed. + /// + /// If the left mouse button is pressed, the method determines which digit is being dragged and + /// starts the drag operation. If the right mouse button is pressed while a drag operation is in progress, the drag + /// is canceled and any changes are undone. The control is invalidated to trigger a repaint, reflecting the current + /// state. + /// A that contains the event data. protected override void OnMouseDown (MouseEventArgs e) { base.OnMouseDown(e); @@ -425,18 +522,24 @@ protected override void OnMouseDown (MouseEventArgs e) Capture = true; _startMouseY = e.Y; _startMouseX = e.X; - _oldValue = GetDraggedValue(); _addedValue = 0; } else if (e.Button == MouseButtons.Right && Capture) { Capture = false; - SetDraggedValue(0); //undo + _ = SetDraggedValue(0); //undo } Invalidate(); // repaint with the selected item (or none) } + /// + /// Handles the mouse button release event for the control. + /// + /// This method is called when the mouse button is released over the control. It stops capturing + /// the mouse, resets the dragged digit state, and triggers a repaint of the control. It also raises the event. + /// A that contains the event data. protected override void OnMouseUp (MouseEventArgs e) { if (!Capture) @@ -453,6 +556,14 @@ protected override void OnMouseUp (MouseEventArgs e) OnValueChanged(EventArgs.Empty); } + /// + /// Handles the mouse move event to update the dragged value based on the mouse movement. + /// + /// This method calculates the difference in mouse position based on the specified drag + /// orientation and updates the dragged value accordingly. It only processes the event if the mouse capture is + /// active. The method invalidates the control to trigger a repaint and raises the OnValueDragged event if + /// the dragged value is successfully updated. + /// The containing the event data. protected override void OnMouseMove (MouseEventArgs e) { base.OnMouseMove(e); @@ -475,6 +586,7 @@ protected override void OnMouseMove (MouseEventArgs e) diff = _startMouseY + e.Y; break; } + case DragOrientationsEnum.Horizontal: default: { diff = e.X - _startMouseX; @@ -499,7 +611,14 @@ protected override void OnMouseMove (MouseEventArgs e) OnValueDragged(EventArgs.Empty); } - private void DateTimeDragControl_MouseLeave (object sender, EventArgs e) + /// + /// Handles the event for the date-time drag control. + /// + /// Resets the dragged digit state and refreshes the control when the mouse leaves the control + /// area, unless the control is currently capturing the mouse. + /// The source of the event. + /// An that contains the event data. + private void OnDateTimeDragControlMouseLeave (object sender, EventArgs e) { if (Capture) { @@ -511,4 +630,4 @@ private void DateTimeDragControl_MouseLeave (object sender, EventArgs e) } #endregion -} +} \ No newline at end of file From 07c7e37f46e8e1a21635c8a5b5eb8af850f7903a Mon Sep 17 00:00:00 2001 From: Hirogen Date: Fri, 11 Jul 2025 10:39:14 +0200 Subject: [PATCH 27/38] translation and bugfix --- src/LogExpert.UI/Controls/LogWindow/LogWindow.cs | 3 ++- src/LogExpert.UI/Dialogs/AboutBox.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index d5d9b421..e9c8e949 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -4298,7 +4298,8 @@ private async void FilterSearch (string text) FilterComplete(); //fx.BeginInvoke(_filterParams, _filterResultList, _lastFilterLinesList, _filterHitList, FilterComplete, null); - CheckForFilterDirty(); + //This needs to be invoked, because there is a potential CrossThreadException + _ = BeginInvoke(CheckForFilterDirty); } private void MultiThreadedFilter (FilterParams filterParams, List filterResultLines, List lastFilterLinesList, List filterHitList) diff --git a/src/LogExpert.UI/Dialogs/AboutBox.cs b/src/LogExpert.UI/Dialogs/AboutBox.cs index 30051023..4e635a68 100644 --- a/src/LogExpert.UI/Dialogs/AboutBox.cs +++ b/src/LogExpert.UI/Dialogs/AboutBox.cs @@ -23,10 +23,12 @@ public AboutBox () { InitializeComponent(); - LoadResources(); usedComponentsDataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; _assembly = Assembly.GetExecutingAssembly(); + //resources need the assembly to be set + LoadResources(); + var link = "https://github.com/LogExperts/LogExpert"; _ = linkLabelURL.Links.Add(new LinkLabel.Link(0, link.Length, link)); LoadUsedComponents(); From 21e71033908df18d88425082a8dc1c4c1df55f9d Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 16 Jul 2025 08:59:19 +0200 Subject: [PATCH 28/38] more resources --- src/LogExpert.Resources/Resources.Designer.cs | 144 ++++++++ src/LogExpert.Resources/Resources.resx | 48 +++ .../Controls/BufferedDataGridView.cs | 4 +- src/LogExpert.UI/Controls/ColorComboBox.cs | 7 +- src/LogExpert.UI/Controls/KnobControl.cs | 45 +-- .../Controls/LogCellEditingControl.cs | 346 +++++++++++++++++- src/LogExpert.UI/Controls/LogTabControl.cs | 4 +- src/LogExpert.UI/Controls/LogTextColumn.cs | 10 +- .../Controls/LogWindow/ColumnCache.cs | 2 +- .../Controls/LogWindow/RangeFinder.cs | 29 +- .../LogWindow/TimeSpreadCalculator.cs | 31 +- .../Controls/LogWindow/TimeSpreadigControl.cs | 10 +- .../Controls/LogWindow/TimeSyncList.cs | 14 +- 13 files changed, 604 insertions(+), 90 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index c20fad6c..34e360a6 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -226,6 +226,24 @@ public static System.Drawing.Bitmap Bookmarks { } } + /// + /// Looks up a localized string similar to ClipRgn: {0},{1},{2},{3}. + /// + public static string BufferedDataGridView_Logger_Debug_PaintOverlays { + get { + return ResourceManager.GetString("BufferedDataGridView_Logger_Debug_PaintOverlays", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit control was null, to be checked. + /// + public static string BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked { + get { + return ResourceManager.GetString("BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -246,6 +264,15 @@ public static System.Drawing.Bitmap Close { } } + /// + /// Looks up a localized string similar to Custom. + /// + public static string ColorComboBox_UI_ColorComboBox_Text_Custom { + get { + return ResourceManager.GetString("ColorComboBox_UI_ColorComboBox_Text_Custom", resourceCulture); + } + } + /// /// Looks up a localized string similar to Access denied: {0}. /// @@ -2642,6 +2669,51 @@ public static string Program_UI_Error_Pipe_CannotConnectToFirstInstance { } } + /// + /// Looks up a localized string similar to Starting range search for {0} ... {1}. + /// + public static string RangeFinder_Logger_Info_FindRange { + get { + return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range search finished. Found {0} lines. + /// + public static string RangeFinder_Logger_Info_FindRange_Finished { + get { + return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_Finished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range search text not set. Cancelling range search.. + /// + public static string RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch { + get { + return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range start not found. + /// + public static string RangeFinder_Logger_Info_FindRange_RangeStartNotFound { + get { + return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_RangeStartNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search text not set. Cancelling range search.. + /// + public static string RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch { + get { + return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -3709,6 +3781,78 @@ public static System.Drawing.Bitmap Star { } } + /// + /// Looks up a localized string similar to Test time {0:} line diff={1} value={2}. + /// + public static string TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Collecting data for {0} lines with step size {1}. + /// + public static string TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Average diff={0} minDiff={1} maxDiff={2}. + /// + public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End because of line count < 1. + /// + public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test time {0} line diff={1}. + /// + public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time range is {0} ms. + /// + public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs { + get { + return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Calculating time spread view.... + /// + public static string TimeSpreadingControl_UI_GFX_OnTimeSpreadCalcStartCalc_CalculatingTimeSpreadView { + get { + return ResourceManager.GetString("TimeSpreadingControl_UI_GFX_OnTimeSpreadCalcStartCalc_CalculatingTimeSpreadView", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0}\n{0}. + /// + public static string TimeSpreadingControl_UI_ToolTip { + get { + return ResourceManager.GetString("TimeSpreadingControl_UI_ToolTip", resourceCulture); + } + } + /// /// Looks up a localized string similar to LogExpert. /// diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 52a5bcea..87f509b7 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1345,4 +1345,52 @@ Checked tools will appear in the icon bar. All other tools are available in the Timestamp selector + + Starting range search for {0} ... {1} + + + Range search text not set. Cancelling range search. + + + Search text not set. Cancelling range search. + + + Range start not found + + + Range search finished. Found {0} lines + + + End because of line count < 1 + + + Collecting data for {0} lines with step size {1} + + + Time range is {0} ms + + + Test time {0} line diff={1} + + + Average diff={0} minDiff={1} maxDiff={2} + + + Test time {0:} line diff={1} value={2} + + + Calculating time spread view... + + + Line {0}\n{0} + + + Edit control was null, to be checked + + + ClipRgn: {0},{1},{2},{3} + + + Custom + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/BufferedDataGridView.cs b/src/LogExpert.UI/Controls/BufferedDataGridView.cs index 563cacdd..b5ed5258 100644 --- a/src/LogExpert.UI/Controls/BufferedDataGridView.cs +++ b/src/LogExpert.UI/Controls/BufferedDataGridView.cs @@ -260,7 +260,7 @@ private void PaintOverlays (PaintEventArgs e) if (_logger.IsDebugEnabled) { - _logger.Debug(CultureInfo.InvariantCulture, $"ClipRgn: {myBuffer.Graphics.ClipBounds.Left},{myBuffer.Graphics.ClipBounds.Top},{myBuffer.Graphics.ClipBounds.Width},{myBuffer.Graphics.ClipBounds.Height}"); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.BufferedDataGridView_Logger_Debug_PaintOverlays, myBuffer.Graphics.ClipBounds.Left, myBuffer.Graphics.ClipBounds.Top, myBuffer.Graphics.ClipBounds.Width, myBuffer.Graphics.ClipBounds.Height)); } } } @@ -321,7 +321,7 @@ private void OnControlKeyDown (object sender, KeyEventArgs e) } else { - _logger.Warn(CultureInfo.InvariantCulture, "Edit control was null, to be checked"); + _logger.Warn(Resources.BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked); } } } diff --git a/src/LogExpert.UI/Controls/ColorComboBox.cs b/src/LogExpert.UI/Controls/ColorComboBox.cs index 3827b7fe..ecafb2a1 100644 --- a/src/LogExpert.UI/Controls/ColorComboBox.cs +++ b/src/LogExpert.UI/Controls/ColorComboBox.cs @@ -78,13 +78,11 @@ private void OnColorComboBoxDrawItem (object sender, DrawItemEventArgs e) if (e.Index == 0) { - e.Graphics.DrawString("Custom", e.Font, Brushes.Black, - new PointF(42, e.Bounds.Top + 2)); + e.Graphics.DrawString(Resources.ColorComboBox_UI_ColorComboBox_Text_Custom, e.Font, Brushes.Black, new PointF(42, e.Bounds.Top + 2)); } else { - e.Graphics.DrawString(((Color)Items[e.Index]).Name, e.Font, Brushes.Black, - new PointF(42, e.Bounds.Top + 2)); + e.Graphics.DrawString(((Color)Items[e.Index]).Name, e.Font, Brushes.Black, new PointF(42, e.Bounds.Top + 2)); } if (!Enabled) @@ -94,6 +92,7 @@ private void OnColorComboBoxDrawItem (object sender, DrawItemEventArgs e) e.Graphics.FillRectangle(brush, rectangle); brush.Dispose(); } + e.DrawFocusRectangle(); } } diff --git a/src/LogExpert.UI/Controls/KnobControl.cs b/src/LogExpert.UI/Controls/KnobControl.cs index 6aec9072..c816e4ad 100644 --- a/src/LogExpert.UI/Controls/KnobControl.cs +++ b/src/LogExpert.UI/Controls/KnobControl.cs @@ -1,6 +1,3 @@ -using NLog; - -using System.Globalization; using System.Runtime.Versioning; namespace LogExpert.UI.Controls; @@ -10,9 +7,6 @@ internal partial class KnobControl : UserControl { #region Fields - private static readonly ILogger _logger = LogManager.GetCurrentClassLogger(); - - private readonly StringFormat _stringFormat = new(); private bool _isShiftPressed; @@ -25,7 +19,7 @@ internal partial class KnobControl : UserControl #region cTor - public KnobControl() + public KnobControl () { InitializeComponent(); _stringFormat.LineAlignment = StringAlignment.Far; @@ -34,15 +28,9 @@ public KnobControl() #endregion - #region Delegates - - public delegate void ValueChangedEventHandler(object sender, EventArgs e); - - #endregion - #region Events - public event ValueChangedEventHandler ValueChanged; + public event EventHandler ValueChanged; #endregion @@ -71,21 +59,22 @@ public int Value #region Overrides - protected override void OnPaint(PaintEventArgs e) + protected override void OnPaint (PaintEventArgs e) { base.OnPaint(e); - Color foregroundColor = Enabled ? Color.Black : Color.Gray; + var foregroundColor = Enabled ? Color.Black : Color.Gray; Pen blackPen = new(foregroundColor, 1); Pen greyPen = new(Color.Gray, 1); - Rectangle rect = ClientRectangle; + var rect = ClientRectangle; var height = Font.Height + 3; if (height > rect.Height) { height = rect.Height + 3; } + rect.Inflate(-1, -height / 2); rect.Offset(0, -height / 2); e.Graphics.DrawEllipse(greyPen, rect); @@ -93,20 +82,20 @@ protected override void OnPaint(PaintEventArgs e) //rect = this.ClientRectangle; rect.Inflate(-2, -2); - var startAngle = 135.0F + 270F * ((float)_value / (float)Range); + var startAngle = 135.0F + (270F * (_value / (float)Range)); var sweepAngle = 0.1F; e.Graphics.DrawPie(blackPen, rect, startAngle, sweepAngle); Brush brush = new SolidBrush(foregroundColor); RectangleF rectF = new(0, 0, ClientRectangle.Width, ClientRectangle.Height); - e.Graphics.DrawString("" + _value, Font, brush, rectF, _stringFormat); + e.Graphics.DrawString(string.Empty + _value, Font, brush, rectF, _stringFormat); blackPen.Dispose(); greyPen.Dispose(); brush.Dispose(); } - protected override void OnMouseDown(MouseEventArgs e) + protected override void OnMouseDown (MouseEventArgs e) { base.OnMouseDown(e); @@ -116,6 +105,7 @@ protected override void OnMouseDown(MouseEventArgs e) _startMouseY = e.Y; _oldValue = Value; } + if (e.Button == MouseButtons.Right) { Capture = false; @@ -124,7 +114,7 @@ protected override void OnMouseDown(MouseEventArgs e) } } - protected override void OnMouseUp(MouseEventArgs e) + protected override void OnMouseUp (MouseEventArgs e) { base.OnMouseUp(e); Capture = false; @@ -132,12 +122,12 @@ protected override void OnMouseUp(MouseEventArgs e) OnValueChanged(new EventArgs()); } - protected void OnValueChanged(EventArgs e) + protected void OnValueChanged (EventArgs e) { ValueChanged?.Invoke(this, e); } - protected override void OnMouseMove(MouseEventArgs e) + protected override void OnMouseMove (MouseEventArgs e) { base.OnMouseMove(e); if (!Capture) @@ -148,9 +138,7 @@ protected override void OnMouseMove(MouseEventArgs e) var sense = _isShiftPressed ? DragSensitivity * 2 : DragSensitivity; var diff = _startMouseY - e.Y; - _logger.Debug(CultureInfo.InvariantCulture, "KnobDiff: {0}", diff); - var range = MaxValue - MinValue; - _value = _oldValue + diff / sense; + _value = _oldValue + (diff / sense); if (_value < MinValue) { @@ -161,16 +149,17 @@ protected override void OnMouseMove(MouseEventArgs e) { _value = MaxValue; } + Invalidate(); } - protected override void OnKeyDown(KeyEventArgs e) + protected override void OnKeyDown (KeyEventArgs e) { _isShiftPressed = e.Shift; base.OnKeyDown(e); } - protected override void OnKeyUp(KeyEventArgs e) + protected override void OnKeyUp (KeyEventArgs e) { _isShiftPressed = e.Shift; base.OnKeyUp(e); diff --git a/src/LogExpert.UI/Controls/LogCellEditingControl.cs b/src/LogExpert.UI/Controls/LogCellEditingControl.cs index 024bd30c..62226119 100644 --- a/src/LogExpert.UI/Controls/LogCellEditingControl.cs +++ b/src/LogExpert.UI/Controls/LogCellEditingControl.cs @@ -1,4 +1,4 @@ -using System.Runtime.Versioning; +using System.Runtime.Versioning; namespace LogExpert.UI.Controls; @@ -7,7 +7,7 @@ internal class LogCellEditingControl : DataGridViewTextBoxEditingControl { #region Public methods - public override bool EditingControlWantsInputKey(Keys key, bool dataGridViewWantsInputKey) + public override bool EditingControlWantsInputKey (Keys key, bool dataGridViewWantsInputKey) { switch (key & Keys.KeyCode) { @@ -22,6 +22,348 @@ public override bool EditingControlWantsInputKey(Keys key, bool dataGridViewWant { return true; } + + //intentional fall-through for all other keys + case Keys.KeyCode: + break; + case Keys.Modifiers: + break; + case Keys.None: + break; + case Keys.LButton: + break; + case Keys.RButton: + break; + case Keys.Cancel: + break; + case Keys.MButton: + break; + case Keys.XButton1: + break; + case Keys.XButton2: + break; + case Keys.Back: + break; + case Keys.Tab: + break; + case Keys.LineFeed: + break; + case Keys.Clear: + break; + case Keys.Return: + break; + case Keys.ShiftKey: + break; + case Keys.ControlKey: + break; + case Keys.Menu: + break; + case Keys.Pause: + break; + case Keys.Capital: + break; + case Keys.KanaMode: + break; + case Keys.JunjaMode: + break; + case Keys.FinalMode: + break; + case Keys.HanjaMode: + break; + case Keys.Escape: + break; + case Keys.IMEConvert: + break; + case Keys.IMENonconvert: + break; + case Keys.IMEAccept: + break; + case Keys.IMEModeChange: + break; + case Keys.Space: + break; + case Keys.Select: + break; + case Keys.Print: + break; + case Keys.Execute: + break; + case Keys.Snapshot: + break; + case Keys.Insert: + break; + case Keys.Delete: + break; + case Keys.Help: + break; + case Keys.D0: + break; + case Keys.D1: + break; + case Keys.D2: + break; + case Keys.D3: + break; + case Keys.D4: + break; + case Keys.D5: + break; + case Keys.D6: + break; + case Keys.D7: + break; + case Keys.D8: + break; + case Keys.D9: + break; + case Keys.A: + break; + case Keys.B: + break; + case Keys.C: + break; + case Keys.D: + break; + case Keys.E: + break; + case Keys.F: + break; + case Keys.G: + break; + case Keys.H: + break; + case Keys.I: + break; + case Keys.J: + break; + case Keys.K: + break; + case Keys.L: + break; + case Keys.M: + break; + case Keys.N: + break; + case Keys.O: + break; + case Keys.P: + break; + case Keys.Q: + break; + case Keys.R: + break; + case Keys.S: + break; + case Keys.T: + break; + case Keys.U: + break; + case Keys.V: + break; + case Keys.W: + break; + case Keys.X: + break; + case Keys.Y: + break; + case Keys.Z: + break; + case Keys.LWin: + break; + case Keys.RWin: + break; + case Keys.Apps: + break; + case Keys.Sleep: + break; + case Keys.NumPad0: + break; + case Keys.NumPad1: + break; + case Keys.NumPad2: + break; + case Keys.NumPad3: + break; + case Keys.NumPad4: + break; + case Keys.NumPad5: + break; + case Keys.NumPad6: + break; + case Keys.NumPad7: + break; + case Keys.NumPad8: + break; + case Keys.NumPad9: + break; + case Keys.Multiply: + break; + case Keys.Add: + break; + case Keys.Separator: + break; + case Keys.Subtract: + break; + case Keys.Decimal: + break; + case Keys.Divide: + break; + case Keys.F1: + break; + case Keys.F2: + break; + case Keys.F3: + break; + case Keys.F4: + break; + case Keys.F5: + break; + case Keys.F6: + break; + case Keys.F7: + break; + case Keys.F8: + break; + case Keys.F9: + break; + case Keys.F10: + break; + case Keys.F11: + break; + case Keys.F12: + break; + case Keys.F13: + break; + case Keys.F14: + break; + case Keys.F15: + break; + case Keys.F16: + break; + case Keys.F17: + break; + case Keys.F18: + break; + case Keys.F19: + break; + case Keys.F20: + break; + case Keys.F21: + break; + case Keys.F22: + break; + case Keys.F23: + break; + case Keys.F24: + break; + case Keys.NumLock: + break; + case Keys.Scroll: + break; + case Keys.LShiftKey: + break; + case Keys.RShiftKey: + break; + case Keys.LControlKey: + break; + case Keys.RControlKey: + break; + case Keys.LMenu: + break; + case Keys.RMenu: + break; + case Keys.BrowserBack: + break; + case Keys.BrowserForward: + break; + case Keys.BrowserRefresh: + break; + case Keys.BrowserStop: + break; + case Keys.BrowserSearch: + break; + case Keys.BrowserFavorites: + break; + case Keys.BrowserHome: + break; + case Keys.VolumeMute: + break; + case Keys.VolumeDown: + break; + case Keys.VolumeUp: + break; + case Keys.MediaNextTrack: + break; + case Keys.MediaPreviousTrack: + break; + case Keys.MediaStop: + break; + case Keys.MediaPlayPause: + break; + case Keys.LaunchMail: + break; + case Keys.SelectMedia: + break; + case Keys.LaunchApplication1: + break; + case Keys.LaunchApplication2: + break; + case Keys.OemSemicolon: + break; + case Keys.Oemplus: + break; + case Keys.Oemcomma: + break; + case Keys.OemMinus: + break; + case Keys.OemPeriod: + break; + case Keys.OemQuestion: + break; + case Keys.Oemtilde: + break; + case Keys.OemOpenBrackets: + break; + case Keys.OemPipe: + break; + case Keys.OemCloseBrackets: + break; + case Keys.OemQuotes: + break; + case Keys.Oem8: + break; + case Keys.OemBackslash: + break; + case Keys.ProcessKey: + break; + case Keys.Packet: + break; + case Keys.Attn: + break; + case Keys.Crsel: + break; + case Keys.Exsel: + break; + case Keys.EraseEof: + break; + case Keys.Play: + break; + case Keys.Zoom: + break; + case Keys.NoName: + break; + case Keys.Pa1: + break; + case Keys.OemClear: + break; + case Keys.Shift: + break; + case Keys.Control: + break; + case Keys.Alt: + break; + default: + break; } return !dataGridViewWantsInputKey; diff --git a/src/LogExpert.UI/Controls/LogTabControl.cs b/src/LogExpert.UI/Controls/LogTabControl.cs index 611d9fe5..01228da1 100644 --- a/src/LogExpert.UI/Controls/LogTabControl.cs +++ b/src/LogExpert.UI/Controls/LogTabControl.cs @@ -13,7 +13,7 @@ internal class LogTabControl : TabControl #region cTor - public LogTabControl() : base() + public LogTabControl () : base() { //SetStyle(ControlStyles.AllPaintingInWmPaint, true); //SetStyle(ControlStyles.UserPaint, true); @@ -24,7 +24,7 @@ public LogTabControl() : base() #region Overrides - protected override void OnPaint(PaintEventArgs e) + protected override void OnPaint (PaintEventArgs e) { BufferedGraphicsContext currentContext; currentContext = BufferedGraphicsManager.Current; diff --git a/src/LogExpert.UI/Controls/LogTextColumn.cs b/src/LogExpert.UI/Controls/LogTextColumn.cs index c0054b30..235b0900 100644 --- a/src/LogExpert.UI/Controls/LogTextColumn.cs +++ b/src/LogExpert.UI/Controls/LogTextColumn.cs @@ -2,14 +2,8 @@ namespace LogExpert.UI.Controls; -internal class LogTextColumn : DataGridViewColumn +[method: SupportedOSPlatform("windows")] +internal class LogTextColumn () : DataGridViewColumn(new LogGridCell()) { - #region cTor - [SupportedOSPlatform("windows")] - public LogTextColumn () : base(new LogGridCell()) - { - } - - #endregion } diff --git a/src/LogExpert.UI/Controls/LogWindow/ColumnCache.cs b/src/LogExpert.UI/Controls/LogWindow/ColumnCache.cs index ab9f0746..7a61ef42 100644 --- a/src/LogExpert.UI/Controls/LogWindow/ColumnCache.cs +++ b/src/LogExpert.UI/Controls/LogWindow/ColumnCache.cs @@ -21,7 +21,7 @@ internal IColumnizedLogLine GetColumnsForLine (LogfileReader logFileReader, int { _lastColumnizer = columnizer; _lastLineNumber = lineNumber; - ILogLine line = logFileReader.GetLogLineWithWait(lineNumber).Result; + var line = logFileReader.GetLogLineWithWait(lineNumber).Result; if (line != null) { diff --git a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs index 68b4d258..a31a2416 100644 --- a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs +++ b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs @@ -3,7 +3,6 @@ using LogExpert.Core.Callback; using LogExpert.Core.Classes; using LogExpert.Core.Classes.Filter; -using LogExpert.Core.Entities; using NLog; @@ -12,9 +11,16 @@ namespace LogExpert.UI.Controls.LogWindow; /// +/// Provides functionality to find a range of lines in a log based on specified search criteria. /// Delivers the range (from..to) that matches the current range filter settings starting from a given line. /// -internal class RangeFinder(FilterParams filterParams, ColumnizerCallback callback) +/// The class is used to locate a contiguous block of log lines that match +/// specified search criteria. It utilizes a callback mechanism to interact with the log data and determine the start +/// and end of the range. The search is performed by evaluating filter conditions on each line, starting from a +/// specified line number and searching both forwards and backwards as necessary. +/// +/// +internal class RangeFinder (FilterParams filterParams, ColumnizerCallback callback) { #region Fields @@ -25,18 +31,19 @@ internal class RangeFinder(FilterParams filterParams, ColumnizerCallback callbac #region Public methods - public Range FindRange(int startLine) + public Range FindRange (int startLine) { - _logger.Info($"Starting range search for {_filterParams.SearchText} ... {_filterParams.RangeSearchText}"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.RangeFinder_Logger_Info_FindRange, _filterParams.SearchText, _filterParams.RangeSearchText)); if (_filterParams.RangeSearchText == null || _filterParams.RangeSearchText.Trim().Length == 0) { - _logger.Info(CultureInfo.InvariantCulture, "Range search text not set. Cancelling range search."); + _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch); return null; } + if (_filterParams.SearchText == null || _filterParams.SearchText.Trim().Length == 0) { - _logger.Info(CultureInfo.InvariantCulture, "Search text not set. Cancelling range search."); + _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch); return null; } @@ -48,7 +55,7 @@ public Range FindRange(int startLine) var foundStartLine = false; Range range = new(); - FilterParams tmpParam = _filterParams.CloneWithCurrentColumnizer(); + var tmpParam = _filterParams.CloneWithCurrentColumnizer(); tmpParam.SearchText = _filterParams.RangeSearchText; @@ -64,6 +71,7 @@ public Range FindRange(int startLine) foundStartLine = true; break; } + lineNum--; line = callback.GetLogLine(lineNum); @@ -76,7 +84,7 @@ public Range FindRange(int startLine) if (!foundStartLine) { - _logger.Info(CultureInfo.InvariantCulture, "Range start not found"); + _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_RangeStartNotFound); return null; } @@ -89,16 +97,19 @@ public Range FindRange(int startLine) { line = callback.GetLogLine(lineNum); callback.LineNum = lineNum; + if (!Util.TestFilterCondition(_filterParams, line, callback)) { break; } + lineNum++; } + lineNum--; range.EndLine = lineNum; - _logger.Info($"Range search finished. Found {range.EndLine - range.StartLine} lines"); + _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.RangeFinder_Logger_Info_FindRange_Finished, range.EndLine - range.StartLine)); return range; } diff --git a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs index ab326b5d..10710d16 100644 --- a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs +++ b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs @@ -175,14 +175,12 @@ private void WorkerFx () while (!_shouldStop) { // wait for unbusy moments - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator: wait for unbusy moments"); var signaled = _calcEvent.WaitOne(INACTIVITY_TIME, false); - if (signaled == false) + if (!signaled) { - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator: unbusy. starting calc."); if (TimeMode) { - DoCalc_via_Time(); + DoCalcViaTime(); } else { @@ -192,7 +190,6 @@ private void WorkerFx () break; } - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator: signalled. no calc."); _ = _calcEvent.Reset(); } @@ -203,12 +200,10 @@ private void WorkerFx () private void DoCalc () { OnStartCalc(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() begin"); if (_callback.GetLineCount() < 1) { OnCalcDone(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() end because of line count < 1"); return; } @@ -229,7 +224,7 @@ private void DoCalc () ? (int)Math.Round(_lineCount / (double)_displayHeight) : 1; - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() collecting data for {0} lines with step size {1}", lastLineNum, step); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize, lastLineNum, step)); List newDiffList = []; List maxList = []; @@ -246,7 +241,6 @@ private void DoCalc () timePerLineSum += (int)(span.Ticks / TimeSpan.TicksPerMillisecond); newDiffList.Add(new SpreadEntry(i, 0, time)); oldTime = time; - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() time diff {0}", span); } } @@ -261,21 +255,19 @@ private void DoCalc () _timePerLine = (int)Math.Round(timePerLineSum / ((double)(lastLineNum + 1) / step)); _ = CalcValuesViaLines(_timePerLine); OnCalcDone(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() end"); } } } //TODO Refactor this method - private void DoCalc_via_Time () + private void DoCalcViaTime () { OnStartCalc(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc_via_Time() begin"); if (_callback.GetLineCount() < 1) { OnCalcDone(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() end because of line count < 1"); + _logger.Debug(Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount); return; } @@ -292,7 +284,7 @@ private void DoCalc_via_Time () var step = overallSpanMillis > _displayHeight ? (long)Math.Round(overallSpanMillis / (double)_displayHeight) : 1; - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc_via_Time() time range is {0} ms", overallSpanMillis); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs, overallSpanMillis)); lineNum = 0; var searchTimeStamp = _startTimestamp; @@ -311,9 +303,11 @@ private void DoCalc_via_Time () { lineNum = -lineNum; } + var lineDiff = lineNum - oldLineNum; - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc_via_Time() test time {0:HH:mm:ss.fff} line diff={1}", searchTimeStamp, lineDiff); + var timestamp = $"{searchTimeStamp:HH:mm:ss.fff}"; + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff, timestamp, lineDiff)); if (lineDiff >= 0) { @@ -329,6 +323,7 @@ private void DoCalc_via_Time () { _maxDiff = lineDiff; } + maxList.Add(lineDiff); loopCount++; } @@ -346,7 +341,7 @@ private void DoCalc_via_Time () _average = lineDiffSum / (double)loopCount; //double average = maxList[maxList.Count / 2]; - _logger.Debug(CultureInfo.InvariantCulture, "Average diff={0} minDiff={1} maxDiff={2}", _average, minDiff, _maxDiff); + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff, _average, minDiff, _maxDiff)); lock (_diffListLock) { @@ -363,7 +358,6 @@ private void DoCalc_via_Time () DiffList = newDiffList; CalcValuesViaTime(_maxDiff, _average); OnCalcDone(EventArgs.Empty); - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc_via_Time() end"); } } } @@ -410,7 +404,8 @@ private void CalcValuesViaTime (int maxDiff, double average) var value = (int)(diffFromAverage / maxDiff * _contrast); entry.Value = 255 - value; - _logger.Debug(CultureInfo.InvariantCulture, "TimeSpreadCalculator.DoCalc() test time {0:HH:mm:ss.fff} line diff={1} value={2}", entry.Timestamp, lineDiff, value); + var timestamp = $"{entry.Timestamp:HH:mm:ss.fff}"; + _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue, timestamp, lineDiff, value)); } } diff --git a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.cs b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.cs index 41c94c8d..15cb8d7e 100644 --- a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.cs +++ b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.cs @@ -144,8 +144,6 @@ private void OnLineSelected (SelectLineEventArgs e) private void OnTimeSpreadCalcCalcDone (object sender, EventArgs e) { - _logger.Debug(CultureInfo.InvariantCulture, "timeSpreadCalc_CalcDone()"); - lock (_monitor) { Invalidate(); @@ -202,7 +200,7 @@ private void OnTimeSpreadCalcCalcDone (object sender, EventArgs e) } } - BeginInvoke(new MethodInvoker(Refresh)); + _ = BeginInvoke(new MethodInvoker(Refresh)); } private void OnTimeSpreadCalcStartCalc (object sender, EventArgs e) @@ -233,10 +231,10 @@ private void OnTimeSpreadCalcStartCalc (object sender, EventArgs e) RectangleF rectf = new(rect.Left, rect.Top, rect.Width, rect.Height); - gfx.DrawString("Calculating time spread view...", Font, fgBrush, rectf, format); + gfx.DrawString(Resources.TimeSpreadingControl_UI_GFX_OnTimeSpreadCalcStartCalc_CalculatingTimeSpreadView, Font, fgBrush, rectf, format); } - BeginInvoke(new MethodInvoker(Refresh)); + _ = BeginInvoke(new MethodInvoker(Refresh)); } private void OnTimeSpreadingControlSizeChanged (object sender, EventArgs e) @@ -298,7 +296,7 @@ private void OnTimeSpreadingControlMouseMove (object sender, MouseEventArgs e) _lastMouseY = e.Y; var dts = $"{entry.Timestamp:dd.MM.yyyy HH:mm:ss}"; - _toolTip.SetToolTip(this, "Line " + (entry.LineNum + 1) + "\n" + dts); + _toolTip.SetToolTip(this, string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadingControl_UI_ToolTip, entry.LineNum, dts)); } #endregion diff --git a/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs b/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs index fe51937b..8faa997e 100644 --- a/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs +++ b/src/LogExpert.UI/Controls/LogWindow/TimeSyncList.cs @@ -13,15 +13,9 @@ internal class TimeSyncList #endregion - #region Delegates - - public delegate void WindowRemovedEventHandler (object sender, EventArgs e); - - #endregion - #region Events - public event WindowRemovedEventHandler WindowRemoved; + public event EventHandler WindowRemoved; #endregion @@ -53,7 +47,7 @@ public void RemoveWindow (LogWindow logWindow) { lock (logWindowList) { - logWindowList.Remove(logWindow); + _ = logWindowList.Remove(logWindow); } OnWindowRemoved(); @@ -71,11 +65,11 @@ public void NavigateToTimestamp (DateTime timestamp, LogWindow sender) CurrentTimestamp = timestamp; lock (logWindowList) { - foreach (LogWindow logWindow in logWindowList) + foreach (var logWindow in logWindowList) { if (sender != logWindow) { - logWindow.ScrollToTimestamp(timestamp, false, false); + _ = logWindow.ScrollToTimestamp(timestamp, false, false); } } } From d1713dea35f1b9202f45c34e4572178188ac1138 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 16 Jul 2025 10:56:39 +0200 Subject: [PATCH 29/38] resources --- src/LogExpert.Resources/Resources.Designer.cs | 99 ++++++++++++++ src/LogExpert.Resources/Resources.resx | 33 +++++ .../Dialogs/LogTabWindow/LogTabWindow.cs | 124 ++++++++++++++++++ src/LogExpert.UI/Dialogs/SettingsDialog.cs | 1 + 4 files changed, 257 insertions(+) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 34e360a6..b074f43f 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -962,6 +962,42 @@ public static string LogTabWindow_ThrowTestExceptionThread_ThisIsATestExceptionT } } + /// + /// Looks up a localized string similar to L:. + /// + public static string LogTabWindow_UI_Label_labelCurrentLine { + get { + return ResourceManager.GetString("LogTabWindow_UI_Label_labelCurrentLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 0. + /// + public static string LogTabWindow_UI_Label_labelLines { + get { + return ResourceManager.GetString("LogTabWindow_UI_Label_labelLines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 0. + /// + public static string LogTabWindow_UI_Label_labelSize { + get { + return ResourceManager.GetString("LogTabWindow_UI_Label_labelSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ready. + /// + public static string LogTabWindow_UI_Label_labelStatus { + get { + return ResourceManager.GetString("LogTabWindow_UI_Label_labelStatus", resourceCulture); + } + } + /// /// Looks up a localized string similar to ->E. /// @@ -1017,6 +1053,15 @@ public static string LogTabWindow_UI_LogWindow_ToolTip_InvertMatch { } } + /// + /// Looks up a localized string similar to menuStrip1. + /// + public static string LogTabWindow_UI_MenuStrip_mainMenuStrip { + get { + return ResourceManager.GetString("LogTabWindow_UI_MenuStrip_mainMenuStrip", resourceCulture); + } + } + /// /// Looks up a localized string similar to LogExpert session {0}. /// @@ -1026,6 +1071,60 @@ public static string LogTabWindow_UI_Project_Session_Default_Filter { } } + /// + /// Looks up a localized string similar to statusStrip1. + /// + public static string LogTabWindow_UI_StatusStrip_StatusStrip { + get { + return ResourceManager.GetString("LogTabWindow_UI_StatusStrip_StatusStrip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close File. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_closeFileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_closeFileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open URL.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reload. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem", resourceCulture); + } + } + /// /// Looks up a localized string similar to AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2}. /// diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 87f509b7..dfbd9c40 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1393,4 +1393,37 @@ Checked tools will appear in the icon bar. All other tools are available in the Custom + + statusStrip1 + + + 0 + + + 0 + + + L: + + + Ready + + + menuStrip1 + + + File + + + Open... + + + Open URL... + + + Close File + + + Reload + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index 43e78b3f..722d98e8 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -18,6 +18,7 @@ using LogExpert.Core.Interface; using LogExpert.Dialogs; using LogExpert.Entities; +using LogExpert.Extensions; using LogExpert.PluginRegistry.FileSystem; using LogExpert.UI.Dialogs; using LogExpert.UI.Entities; @@ -290,6 +291,129 @@ public LogWindow.LogWindow AddTempFileTab (string fileName, string title) return AddFileTab(fileName, true, title, false, null); } + private void ApplyTextResources () + { + var map = ResourceHelper.GenerateTextMapFromNaming(this, nameof(LogTabWindow), "UI"); + + openURIToolStripMenuItem.ToolTipText = "Opens a file by entering a URL which is supported by a file system plugin"; + newFromClipboardToolStripMenuItem.Text = "New tab from clipboard"; + newFromClipboardToolStripMenuItem.ToolTipText = "Creates a new tab with content from clipboard"; + multiFileToolStripMenuItem.Text = "MultiFile"; + multiFileToolStripMenuItem.ToolTipText = "Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...)"; + multiFileEnabledStripMenuItem.Text = "Enable MultiFile"; + multifileMaskToolStripMenuItem.Text = "File name mask..."; + loadProjectToolStripMenuItem.Text = "Load session..."; + loadProjectToolStripMenuItem.ToolTipText = "Load a saved session (list of log files)"; + saveProjectToolStripMenuItem.Text = "Save session..."; + saveProjectToolStripMenuItem.ToolTipText = "Save a session (all open tabs)"; + lastUsedToolStripMenuItem.Text = "Last used"; + exitToolStripMenuItem.Text = "Exit"; + viewNavigateToolStripMenuItem.Text = "View/Navigate"; + goToLineToolStripMenuItem.Text = "Go to line..."; + searchToolStripMenuItem.Text = "Search..."; + filterToolStripMenuItem.Text = "Filter"; + bookmarksToolStripMenuItem.Text = "Bookmarks"; + toggleBookmarkToolStripMenuItem.Text = "Toggle Bookmark"; + jumpToNextToolStripMenuItem.Text = "Jump to next"; + jumpToPrevToolStripMenuItem.Text = "Jump to prev"; + showBookmarkListToolStripMenuItem.Text = "Bookmark list"; + columnFinderToolStripMenuItem.Text = "Column finder"; + toolStripEncodingMenuItem.Text = "Encoding"; + toolStripEncodingASCIIItem.Tag = ""; + toolStripEncodingASCIIItem.Text = "ASCII"; + toolStripEncodingANSIItem.Tag = ""; + toolStripEncodingANSIItem.Text = "ANSI"; + toolStripEncodingISO88591Item.Text = "ISO-8859-1"; + toolStripEncodingUTF8Item.Text = "UTF8"; + toolStripEncodingUTF16Item.Text = "Unicode"; + timeshiftToolStripMenuItem.Text = "Timeshift"; + timeshiftToolStripMenuItem.ToolTipText = "If supported by the columnizer, you can set an offset to the displayed log time"; + timeshiftMenuTextBox.Text = "+00:00:00.000"; + timeshiftMenuTextBox.ToolTipText = "Time offset (hh:mm:ss.fff)"; + copyMarkedLinesIntoNewTabToolStripMenuItem.Text = "Copy to Tab"; + copyMarkedLinesIntoNewTabToolStripMenuItem.ToolTipText = "Copies all selected lines into a new tab page"; + optionToolStripMenuItem.Text = "Options"; + columnizerToolStripMenuItem.Text = "Columnizer..."; + columnizerToolStripMenuItem.ToolTipText = "Splits various kinds of logfiles into fixed columns"; + hilightingToolStripMenuItem1.Text = "Highlighting and triggers..."; + settingsToolStripMenuItem.Text = "Settings..."; + cellSelectModeToolStripMenuItem.Text = "Cell select mode"; + cellSelectModeToolStripMenuItem.ToolTipText = "Switches between foll row selection and single cell selection mode"; + alwaysOnTopToolStripMenuItem.Text = "Always on top"; + hideLineColumnToolStripMenuItem.Text = "Hide line column"; + lockInstanceToolStripMenuItem.Text = "Lock instance"; + lockInstanceToolStripMenuItem.ToolTipText = "When enabled all new launched LogExpert instances will redirect to this window"; + toolsToolStripMenuItem.Text = "Tools"; + toolsToolStripMenuItem.ToolTipText = "Launch external tools (configure in the settings)"; + configureToolStripMenuItem.Text = "Configure..."; + helpToolStripMenuItem.Text = "Help"; + showHelpToolStripMenuItem.Text = "Show help"; + aboutToolStripMenuItem.Text = "About"; + debugToolStripMenuItem.Text = "Debug"; + dumpLogBufferInfoToolStripMenuItem.Text = "Dump LogBuffer info"; + dumpBufferDiagnosticToolStripMenuItem.Text = "Dump buffer diagnostic"; + runGCToolStripMenuItem.Text = "Run GC"; + gCInfoToolStripMenuItem.Text = "Dump GC info"; + throwExceptionGUIThreadToolStripMenuItem.Text = "Throw exception (GUI Thread)"; + throwExceptionbackgroundThToolStripMenuItem.Text = "Throw exception (Async delegate)"; + throwExceptionBackgroundThreadToolStripMenuItem.Text = "Throw exception (background thread)"; + loglevelToolStripMenuItem.Text = "Loglevel"; + warnToolStripMenuItem.Text = "Warn"; + infoToolStripMenuItem.Text = "Info"; + debugToolStripMenuItem1.Text = "Debug"; + disableWordHighlightModeToolStripMenuItem.Text = "Disable word highlight mode"; + host.Text = "Follow tail"; + host.AccessibleName = "host"; + toolStripButtonOpen.Text = "Open File"; + toolStripButtonOpen.ToolTipText = "Open file"; + toolStripButtonSearch.Text = "Search"; + toolStripButtonSearch.ToolTipText = "Search"; + toolStripButtonFilter.Text = "Filter"; + toolStripButtonFilter.ToolTipText = "Filter window"; + toolStripButtonBookmark.Text = "Toggle Bookmark"; + toolStripButtonBookmark.ToolTipText = "Toggle bookmark"; + toolStripButtonUp.Text = "Previous Bookmark"; + toolStripButtonUp.ToolTipText = "Go to previous bookmark"; + toolStripButtonDown.Text = "Next Bookmark"; + toolStripButtonDown.ToolTipText = "Go to next bookmark"; + toolStripButtonBubbles.Text = "Show bookmark bubbles"; + toolStripButtonTail.Text = "tail"; + groupsComboBoxHighlightGroups.ToolTipText = "Select the current highlight settings for the log file (right-click to open highlight settings)"; + checkBoxFollowTail.Text = "Follow tail"; + closeThisTabToolStripMenuItem.Text = "Close this tab"; + closeOtherTabsToolStripMenuItem.Text = "Close other tabs"; + closeOtherTabsToolStripMenuItem.ToolTipText = "Close all tabs except of this one"; + closeAllTabsToolStripMenuItem.Text = "Close all tabs"; + closeAllTabsToolStripMenuItem.ToolTipText = "Close all tabs"; + tabColorToolStripMenuItem.Text = "Tab color..."; + tabColorToolStripMenuItem.ToolTipText = "Sets the tab color"; + tabRenameToolStripMenuItem.Text = "Tab rename..."; + tabRenameToolStripMenuItem.ToolTipText = "Set the text which is shown on the tab"; + copyPathToClipboardToolStripMenuItem.Text = "Copy path to clipboard"; + copyPathToClipboardToolStripMenuItem.ToolTipText = "The complete file name (incl. path) is copied to clipboard"; + findInExplorerToolStripMenuItem.Text = "Find in Explorer"; + findInExplorerToolStripMenuItem.ToolTipText = "Opens an Explorer window and selects the log file"; + truncateFileToolStripMenuItem.Text = "Truncate File"; + truncateFileToolStripMenuItem.ToolTipText = "Try to truncate the file opened in tab"; + + + // Add exceptions or unrelated entries manually: + map[buttonCancel] = Resources.LogExpert_Common_UI_Button_Cancel; + map[buttonOk] = Resources.LogExpert_Common_UI_Button_OK; + map[buttonExport] = Resources.LogExpert_Common_UI_Button_Export; + map[buttonImport] = Resources.LogExpert_Common_UI_Button_Import; + + foreach (var entry in map) + { + entry.Key.Text = entry.Value; + } + + dataGridViewTextBoxColumnFileMask.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask; + dataGridViewComboBoxColumnColumnizer.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer; + dataGridViewTextBoxColumnFileName.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileName; + dataGridViewComboBoxColumnHighlightGroup.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup; + } + [SupportedOSPlatform("windows")] public LogWindow.LogWindow AddFilterTab (FilterPipe pipe, string title, ILogLineColumnizer preProcessColumnizer) { diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index 48e09d46..beb3c3d1 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -58,6 +58,7 @@ public SettingsDialog (Preferences prefs, LogTabWindow logTabWin, int tabToOpen, #region Properties public Preferences Preferences { get; private set; } + private IConfigManager ConfigManager { get; } #endregion From f13956490fa3c3d06c746b5a03bdf027bbc23df0 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 17 Jul 2025 11:01:11 +0200 Subject: [PATCH 30/38] logtab window resources --- src/LogExpert.Resources/Resources.Designer.cs | 908 +++++++++++++++++- src/LogExpert.Resources/Resources.resx | 294 ++++++ .../Dialogs/LogTabWindow/LogTabWindow.cs | 232 ++--- .../LogTabWindow/LogTabWindow.designer.cs | 181 ++-- 4 files changed, 1368 insertions(+), 247 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index b074f43f..89037363 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -962,6 +962,33 @@ public static string LogTabWindow_ThrowTestExceptionThread_ThisIsATestExceptionT } } + /// + /// Looks up a localized string similar to Follow tail. + /// + public static string LogTabWindow_UI_CheckBox_checkBoxFollowTail { + get { + return ResourceManager.GetString("LogTabWindow_UI_CheckBox_checkBoxFollowTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Follow tail. + /// + public static string LogTabWindow_UI_CheckBox_Host { + get { + return ResourceManager.GetString("LogTabWindow_UI_CheckBox_Host", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to host. + /// + public static string LogTabWindow_UI_CheckBox_ToolTip_checkBoxHost { + get { + return ResourceManager.GetString("LogTabWindow_UI_CheckBox_ToolTip_checkBoxHost", resourceCulture); + } + } + /// /// Looks up a localized string similar to L:. /// @@ -1080,6 +1107,195 @@ public static string LogTabWindow_UI_StatusStrip_StatusStrip { } } + /// + /// Looks up a localized string similar to Enable MultiFile. + /// + public static string LogTabWindow_UI_StripMenuItem_multiFileEnabledStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_StripMenuItem_multiFileEnabledStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Toggle Bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonBookmark { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonBookmark", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show bookmark bubbles. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonBubbles { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonBubbles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Next Bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonDown { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonFilter { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open File. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonOpen { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonSearch { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonSearch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to tail. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonTail { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonTail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Previous Bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_toolStripButtonUp { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_toolStripButtonUp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Toggle bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonBookmark { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonBookmark", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Go to next bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonDown { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter window. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonFilter { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open file. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonOpen { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonSearch { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonSearch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Go to previous bookmark. + /// + public static string LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonUp { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonUp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select the current highlight settings for the log file (right-click to open highlight settings). + /// + public static string LogTabWindow_UI_ToolStripComboBox_ToolTip_highlightGroupsToolStripComboBox { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripComboBox_ToolTip_highlightGroupsToolStripComboBox", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to About. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_aboutToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_aboutToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always on top. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_alwaysOnTopToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_alwaysOnTopToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bookmarks. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_bookmarksToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_bookmarksToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cell select mode. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_cellSelectModeToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_cellSelectModeToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close all tabs. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_closeAllTabsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_closeAllTabsToolStripMenuItem", resourceCulture); + } + } + /// /// Looks up a localized string similar to Close File. /// @@ -1090,38 +1306,706 @@ public static string LogTabWindow_UI_ToolStripMenuItem_closeFileToolStripMenuIte } /// - /// Looks up a localized string similar to File. + /// Looks up a localized string similar to Close other tabs. /// - public static string LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem { + public static string LogTabWindow_UI_ToolStripMenuItem_closeOtherTabsToolStripMenuItem { get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_closeOtherTabsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Open.... + /// Looks up a localized string similar to Close this tab. /// - public static string LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem { + public static string LogTabWindow_UI_ToolStripMenuItem_closeThisTabToolStripMenuItem { get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_closeThisTabToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Open URL.... + /// Looks up a localized string similar to Column finder. /// - public static string LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem { + public static string LogTabWindow_UI_ToolStripMenuItem_columnFinderToolStripMenuItem { get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_columnFinderToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Reload. + /// Looks up a localized string similar to Columnizer.... /// - public static string LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem { + public static string LogTabWindow_UI_ToolStripMenuItem_columnizerToolStripMenuItem { get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_columnizerToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configure.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_configureToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_configureToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy to Tab. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_copyMarkedLinesIntoNewTabToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_copyMarkedLinesIntoNewTabToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy path to clipboard. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_copyPathToClipboardToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_copyPathToClipboardToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Debug. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_debugToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_debugToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Debug. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_debugToolStripMenuItem1 { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_debugToolStripMenuItem1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable word highlight mode. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_disableWordHighlightModeToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_disableWordHighlightModeToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump buffer diagnostic. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_dumpBufferDiagnosticToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_dumpBufferDiagnosticToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump LogBuffer info. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_dumpLogBufferInfoToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_dumpLogBufferInfoToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ANSI. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingANSIToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingANSIToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ASCII. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingASCIIToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingASCIIToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ISO-8859-1. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingISO88591toolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingISO88591toolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Encoding. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unicode. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingUTF16toolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingUTF16toolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UTF8. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_encodingUTF8toolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_encodingUTF8toolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exit. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_exitToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_exitToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_fileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_filterToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_filterToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Find in Explorer. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_findInExplorerToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_findInExplorerToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dump GC info. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_gCInfoToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_gCInfoToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Go to line.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_goToLineToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_goToLineToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Help. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_helpToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_helpToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide line column. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_hideLineColumnToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_hideLineColumnToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Highlighting and triggers.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_hilightingToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_hilightingToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Info. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_infoToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_infoToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Jump to next. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_jumpToNextToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_jumpToNextToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Jump to prev. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_jumpToPrevToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_jumpToPrevToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Last used. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_lastUsedToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_lastUsedToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load session.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_loadProjectToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_loadProjectToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lock instance. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_lockInstanceToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_lockInstanceToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loglevel. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_loglevelToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_loglevelToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File name mask.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_multifileMaskToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_multifileMaskToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MultiFile. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_multiFileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_multiFileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New tab from clipboard. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_newFromClipboardToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_newFromClipboardToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open URL.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Options. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reload. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run GC. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save session.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bookmark list. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show help. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tab color.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tab rename.... + /// + public static string LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Throw exception (background thread). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem" + + "", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Throw exception (Async delegate). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Throw exception (GUI Thread). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeshift. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Toggle Bookmark. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tools. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switches between foll row selection and single cell selection mode. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close all tabs. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close all tabs except of this one. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Splits various kinds of logfiles into fixed columns. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copies all selected lines into a new tab page. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuI" + + "tem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The complete file name (incl. path) is copied to clipboard. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opens an Explorer window and selects the log file. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load a saved session (list of log files). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When enabled all new launched LogExpert instances will redirect to this window. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creates a new tab with content from clipboard. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opens a file by entering a URL which is supported by a file system plugin. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save a session (all open tabs). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sets the tab color. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set the text which is shown on the tab. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If supported by the columnizer, you can set an offset to the displayed log time. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time offset (hh:mm:ss.fff). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Launch external tools (configure in the settings). + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Try to truncate the file opened in tab. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Truncate File. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to View/Navigate. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Warn. + /// + public static string LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to +00:00:00.000. + /// + public static string LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox { + get { + return ResourceManager.GetString("LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox", resourceCulture); } } diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index dfbd9c40..33e5c244 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1426,4 +1426,298 @@ Checked tools will appear in the icon bar. All other tools are available in the Reload + + New tab from clipboard + + + MultiFile + + + Enable MultiFile + + + File name mask... + + + Load session... + + + Save session... + + + Last used + + + Exit + + + View/Navigate + + + Go to line... + + + Search... + + + Filter + + + Bookmarks + + + Toggle Bookmark + + + Jump to next + + + Jump to prev + + + Bookmark list + + + Column finder + + + Timeshift + + + Copy to Tab + + + Options + + + Columnizer... + + + Highlighting and triggers... + + + Settings... + + + Cell select mode + + + Always on top + + + Hide line column + + + Lock instance + + + Tools + + + Configure... + + + Help + + + Show help + + + About + + + Debug + + + Dump LogBuffer info + + + Dump buffer diagnostic + + + Run GC + + + Dump GC info + + + Throw exception (GUI Thread) + + + Throw exception (Async delegate) + + + Throw exception (background thread) + + + Loglevel + + + Warn + + + Info + + + Debug + + + Disable word highlight mode + + + Follow tail + + + Open File + + + Search + + + Filter + + + Toggle Bookmark + + + Previous Bookmark + + + Next Bookmark + + + Show bookmark bubbles + + + tail + + + Follow tail + + + Close this tab + + + Close other tabs + + + Close all tabs + + + Tab color... + + + Tab rename... + + + Copy path to clipboard + + + Find in Explorer + + + Truncate File + + + Encoding + + + ASCII + + + ANSI + + + ISO-8859-1 + + + UTF8 + + + Unicode + + + +00:00:00.000 + + + host + + + Time offset (hh:mm:ss.fff) + + + Opens a file by entering a URL which is supported by a file system plugin + + + Creates a new tab with content from clipboard + + + Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...) + + + Load a saved session (list of log files) + + + Save a session (all open tabs) + + + If supported by the columnizer, you can set an offset to the displayed log time + + + Copies all selected lines into a new tab page + + + Splits various kinds of logfiles into fixed columns + + + Switches between foll row selection and single cell selection mode + + + When enabled all new launched LogExpert instances will redirect to this window + + + Launch external tools (configure in the settings) + + + Search + + + Open file + + + Go to next bookmark + + + Go to previous bookmark + + + Toggle bookmark + + + Filter window + + + Select the current highlight settings for the log file (right-click to open highlight settings) + + + Set the text which is shown on the tab + + + Close all tabs + + + Close all tabs except of this one + + + Sets the tab color + + + Opens an Explorer window and selects the log file + + + The complete file name (incl. path) is copied to clipboard + + + Try to truncate the file opened in tab + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index 722d98e8..1f21c564 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -150,11 +150,11 @@ public LogTabWindow (string[] fileNames, int instanceNumber, bool showInstanceNu var index = buttonToolStrip.Items.IndexOfKey("toolStripButtonTail"); - toolStripEncodingASCIIItem.Text = Encoding.ASCII.HeaderName; - toolStripEncodingANSIItem.Text = Encoding.Default.HeaderName; - toolStripEncodingISO88591Item.Text = Encoding.GetEncoding("iso-8859-1").HeaderName; - toolStripEncodingUTF8Item.Text = Encoding.UTF8.HeaderName; - toolStripEncodingUTF16Item.Text = Encoding.Unicode.HeaderName; + encodingASCIIToolStripMenuItem.Text = Encoding.ASCII.HeaderName; + encodingANSIToolStripMenuItem.Text = Encoding.Default.HeaderName; + encodingISO88591toolStripMenuItem.Text = Encoding.GetEncoding("iso-8859-1").HeaderName; + encodingUTF8toolStripMenuItem.Text = Encoding.UTF8.HeaderName; + encodingUTF16toolStripMenuItem.Text = Encoding.Unicode.HeaderName; if (index != -1) { @@ -295,125 +295,69 @@ private void ApplyTextResources () { var map = ResourceHelper.GenerateTextMapFromNaming(this, nameof(LogTabWindow), "UI"); - openURIToolStripMenuItem.ToolTipText = "Opens a file by entering a URL which is supported by a file system plugin"; - newFromClipboardToolStripMenuItem.Text = "New tab from clipboard"; - newFromClipboardToolStripMenuItem.ToolTipText = "Creates a new tab with content from clipboard"; - multiFileToolStripMenuItem.Text = "MultiFile"; - multiFileToolStripMenuItem.ToolTipText = "Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...)"; - multiFileEnabledStripMenuItem.Text = "Enable MultiFile"; - multifileMaskToolStripMenuItem.Text = "File name mask..."; - loadProjectToolStripMenuItem.Text = "Load session..."; - loadProjectToolStripMenuItem.ToolTipText = "Load a saved session (list of log files)"; - saveProjectToolStripMenuItem.Text = "Save session..."; - saveProjectToolStripMenuItem.ToolTipText = "Save a session (all open tabs)"; - lastUsedToolStripMenuItem.Text = "Last used"; - exitToolStripMenuItem.Text = "Exit"; - viewNavigateToolStripMenuItem.Text = "View/Navigate"; - goToLineToolStripMenuItem.Text = "Go to line..."; - searchToolStripMenuItem.Text = "Search..."; - filterToolStripMenuItem.Text = "Filter"; - bookmarksToolStripMenuItem.Text = "Bookmarks"; - toggleBookmarkToolStripMenuItem.Text = "Toggle Bookmark"; - jumpToNextToolStripMenuItem.Text = "Jump to next"; - jumpToPrevToolStripMenuItem.Text = "Jump to prev"; - showBookmarkListToolStripMenuItem.Text = "Bookmark list"; - columnFinderToolStripMenuItem.Text = "Column finder"; - toolStripEncodingMenuItem.Text = "Encoding"; - toolStripEncodingASCIIItem.Tag = ""; - toolStripEncodingASCIIItem.Text = "ASCII"; - toolStripEncodingANSIItem.Tag = ""; - toolStripEncodingANSIItem.Text = "ANSI"; - toolStripEncodingISO88591Item.Text = "ISO-8859-1"; - toolStripEncodingUTF8Item.Text = "UTF8"; - toolStripEncodingUTF16Item.Text = "Unicode"; - timeshiftToolStripMenuItem.Text = "Timeshift"; - timeshiftToolStripMenuItem.ToolTipText = "If supported by the columnizer, you can set an offset to the displayed log time"; - timeshiftMenuTextBox.Text = "+00:00:00.000"; - timeshiftMenuTextBox.ToolTipText = "Time offset (hh:mm:ss.fff)"; - copyMarkedLinesIntoNewTabToolStripMenuItem.Text = "Copy to Tab"; - copyMarkedLinesIntoNewTabToolStripMenuItem.ToolTipText = "Copies all selected lines into a new tab page"; - optionToolStripMenuItem.Text = "Options"; - columnizerToolStripMenuItem.Text = "Columnizer..."; - columnizerToolStripMenuItem.ToolTipText = "Splits various kinds of logfiles into fixed columns"; - hilightingToolStripMenuItem1.Text = "Highlighting and triggers..."; - settingsToolStripMenuItem.Text = "Settings..."; - cellSelectModeToolStripMenuItem.Text = "Cell select mode"; - cellSelectModeToolStripMenuItem.ToolTipText = "Switches between foll row selection and single cell selection mode"; - alwaysOnTopToolStripMenuItem.Text = "Always on top"; - hideLineColumnToolStripMenuItem.Text = "Hide line column"; - lockInstanceToolStripMenuItem.Text = "Lock instance"; - lockInstanceToolStripMenuItem.ToolTipText = "When enabled all new launched LogExpert instances will redirect to this window"; - toolsToolStripMenuItem.Text = "Tools"; - toolsToolStripMenuItem.ToolTipText = "Launch external tools (configure in the settings)"; - configureToolStripMenuItem.Text = "Configure..."; - helpToolStripMenuItem.Text = "Help"; - showHelpToolStripMenuItem.Text = "Show help"; - aboutToolStripMenuItem.Text = "About"; - debugToolStripMenuItem.Text = "Debug"; - dumpLogBufferInfoToolStripMenuItem.Text = "Dump LogBuffer info"; - dumpBufferDiagnosticToolStripMenuItem.Text = "Dump buffer diagnostic"; - runGCToolStripMenuItem.Text = "Run GC"; - gCInfoToolStripMenuItem.Text = "Dump GC info"; - throwExceptionGUIThreadToolStripMenuItem.Text = "Throw exception (GUI Thread)"; - throwExceptionbackgroundThToolStripMenuItem.Text = "Throw exception (Async delegate)"; - throwExceptionBackgroundThreadToolStripMenuItem.Text = "Throw exception (background thread)"; - loglevelToolStripMenuItem.Text = "Loglevel"; - warnToolStripMenuItem.Text = "Warn"; - infoToolStripMenuItem.Text = "Info"; - debugToolStripMenuItem1.Text = "Debug"; - disableWordHighlightModeToolStripMenuItem.Text = "Disable word highlight mode"; - host.Text = "Follow tail"; - host.AccessibleName = "host"; - toolStripButtonOpen.Text = "Open File"; - toolStripButtonOpen.ToolTipText = "Open file"; - toolStripButtonSearch.Text = "Search"; - toolStripButtonSearch.ToolTipText = "Search"; - toolStripButtonFilter.Text = "Filter"; - toolStripButtonFilter.ToolTipText = "Filter window"; - toolStripButtonBookmark.Text = "Toggle Bookmark"; - toolStripButtonBookmark.ToolTipText = "Toggle bookmark"; - toolStripButtonUp.Text = "Previous Bookmark"; - toolStripButtonUp.ToolTipText = "Go to previous bookmark"; - toolStripButtonDown.Text = "Next Bookmark"; - toolStripButtonDown.ToolTipText = "Go to next bookmark"; - toolStripButtonBubbles.Text = "Show bookmark bubbles"; - toolStripButtonTail.Text = "tail"; - groupsComboBoxHighlightGroups.ToolTipText = "Select the current highlight settings for the log file (right-click to open highlight settings)"; - checkBoxFollowTail.Text = "Follow tail"; - closeThisTabToolStripMenuItem.Text = "Close this tab"; - closeOtherTabsToolStripMenuItem.Text = "Close other tabs"; - closeOtherTabsToolStripMenuItem.ToolTipText = "Close all tabs except of this one"; - closeAllTabsToolStripMenuItem.Text = "Close all tabs"; - closeAllTabsToolStripMenuItem.ToolTipText = "Close all tabs"; - tabColorToolStripMenuItem.Text = "Tab color..."; - tabColorToolStripMenuItem.ToolTipText = "Sets the tab color"; - tabRenameToolStripMenuItem.Text = "Tab rename..."; - tabRenameToolStripMenuItem.ToolTipText = "Set the text which is shown on the tab"; - copyPathToClipboardToolStripMenuItem.Text = "Copy path to clipboard"; - copyPathToClipboardToolStripMenuItem.ToolTipText = "The complete file name (incl. path) is copied to clipboard"; - findInExplorerToolStripMenuItem.Text = "Find in Explorer"; - findInExplorerToolStripMenuItem.ToolTipText = "Opens an Explorer window and selects the log file"; - truncateFileToolStripMenuItem.Text = "Truncate File"; - truncateFileToolStripMenuItem.ToolTipText = "Try to truncate the file opened in tab"; - - - // Add exceptions or unrelated entries manually: - map[buttonCancel] = Resources.LogExpert_Common_UI_Button_Cancel; - map[buttonOk] = Resources.LogExpert_Common_UI_Button_OK; - map[buttonExport] = Resources.LogExpert_Common_UI_Button_Export; - map[buttonImport] = Resources.LogExpert_Common_UI_Button_Import; - foreach (var entry in map) { entry.Key.Text = entry.Value; } - dataGridViewTextBoxColumnFileMask.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileMask; - dataGridViewComboBoxColumnColumnizer.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_Columnizer; - dataGridViewTextBoxColumnFileName.HeaderText = Resources.SettingsDialog_UI_DataGridViewTextBoxColumn_FileName; - dataGridViewComboBoxColumnHighlightGroup.HeaderText = Resources.SettingsDialog_UI_DataGridViewComboBoxColumn_HighlightGroup; + checkBoxHost.AccessibleName = Resources.LogTabWindow_UI_CheckBox_ToolTip_checkBoxHost; + } + + #region Resources Map + + private void ApplyToolTips () + { + //TODO use ToolTip class instead of ToolTipText + timeshiftToolStripTextBox.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox; + openURIToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem; + newFromClipboardToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem; + multiFileToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem; + loadProjectToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem; + saveProjectToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem; + timeshiftToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem; + copyMarkedLinesIntoNewTabToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuItem; + columnizerToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem; + cellSelectModeToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem; + lockInstanceToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem; + toolsToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem; + toolStripButtonSearch.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonSearch; + toolStripButtonOpen.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonOpen; + toolStripButtonDown.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonDown; + toolStripButtonUp.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonUp; + toolStripButtonBookmark.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonBookmark; + toolStripButtonFilter.ToolTipText = Resources.LogTabWindow_UI_ToolStripButton_ToolTip_toolStripButtonFilter; + highlightGroupsToolStripComboBox.ToolTipText = Resources.LogTabWindow_UI_ToolStripComboBox_ToolTip_highlightGroupsToolStripComboBox; + tabRenameToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem; + closeAllTabsToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem; + closeOtherTabsToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem; + tabColorToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem; + findInExplorerToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem; + copyPathToClipboardToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem; + truncateFileToolStripMenuItem.ToolTipText = Resources.LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem; } + /// + /// Creates a mapping of UI controls to their corresponding tooltip text. + /// + /// This method initializes a dictionary with predefined tooltips for specific UI controls. + /// Additional tooltips can be added to the dictionary as needed. + /// A where the keys are objects and the values are + /// strings representing the tooltip text for each control. + //private Dictionary GetToolTipMap () + //{ + + // return new Dictionary + // { + // { comboBoxLanguage, Resources.SettingsDialog_UI_ComboBox_ToolTip_toolTipLanguage }, + // { comboBoxEncoding, Resources.SettingsDialog_UI_ComboBox_ToolTip_toolTipEncoding }, + // { checkBoxPortableMode, Resources.SettingsDialog_UI_CheckBox_ToolTip_toolTipPortableMode }, + // { radioButtonSessionApplicationStartupDir, Resources.SettingsDialog_UI_RadioButton_ToolTip_toolTipSessionApplicationStartupDir }, + // { checkBoxLegacyReader, Resources.SettingsDialog_UI_CheckBox_ToolTip_toolTipLegacyReader } + // }; + //} + + #endregion + [SupportedOSPlatform("windows")] public LogWindow.LogWindow AddFilterTab (FilterPipe pipe, string title, ILogLineColumnizer preProcessColumnizer) { @@ -1074,7 +1018,7 @@ private void ShowHighlightSettingsDialog () Owner = this, TopMost = TopMost, HighlightGroupList = HighlightGroupList, - PreSelectedGroupName = groupsComboBoxHighlightGroups.Text + PreSelectedGroupName = highlightGroupsToolStripComboBox.Text }; var res = dlg.ShowDialog(); @@ -1092,14 +1036,14 @@ private void ShowHighlightSettingsDialog () [SupportedOSPlatform("windows")] private void FillHighlightComboBox () { - var currentGroupName = groupsComboBoxHighlightGroups.Text; - groupsComboBoxHighlightGroups.Items.Clear(); + var currentGroupName = highlightGroupsToolStripComboBox.Text; + highlightGroupsToolStripComboBox.Items.Clear(); foreach (var group in HighlightGroupList) { - _ = groupsComboBoxHighlightGroups.Items.Add(group.GroupName); + _ = highlightGroupsToolStripComboBox.Items.Add(group.GroupName); if (group.GroupName.Equals(currentGroupName, StringComparison.Ordinal)) { - groupsComboBoxHighlightGroups.Text = group.GroupName; + highlightGroupsToolStripComboBox.Text = group.GroupName; } } } @@ -1165,7 +1109,7 @@ private void LoadFiles (string[] names, bool invertLogic) return; } - AddFileTab(names[0], false, null, false, null); + _ = AddFileTab(names[0], false, null, false, null); return; } @@ -1307,8 +1251,8 @@ private void ChangeCurrentLogWindow (LogWindow.LogWindow newLogWindow) mainMenuStrip.Enabled = true; timeshiftToolStripMenuItem.Enabled = false; timeshiftToolStripMenuItem.Checked = false; - timeshiftMenuTextBox.Text = string.Empty; - timeshiftMenuTextBox.Enabled = false; + timeshiftToolStripTextBox.Text = string.Empty; + timeshiftToolStripTextBox.Enabled = false; multiFileToolStripMenuItem.Enabled = false; cellSelectModeToolStripMenuItem.Checked = false; cellSelectModeToolStripMenuItem.Enabled = false; @@ -1352,8 +1296,8 @@ private void GuiStateUpdateWorker (GuiStateEventArgs e) mainMenuStrip.Enabled = e.MenuEnabled; timeshiftToolStripMenuItem.Enabled = e.TimeshiftPossible; timeshiftToolStripMenuItem.Checked = e.TimeshiftEnabled; - timeshiftMenuTextBox.Text = e.TimeshiftText; - timeshiftMenuTextBox.Enabled = e.TimeshiftEnabled; + timeshiftToolStripTextBox.Text = e.TimeshiftText; + timeshiftToolStripTextBox.Enabled = e.TimeshiftEnabled; multiFileToolStripMenuItem.Enabled = e.MultiFileEnabled; // disabled for temp files multiFileToolStripMenuItem.Checked = e.IsMultiFileActive; multiFileEnabledStripMenuItem.Checked = e.IsMultiFileActive; @@ -1376,7 +1320,7 @@ private void GuiStateUpdateWorker (GuiStateEventArgs e) } toolStripButtonBubbles.Checked = e.ShowBookmarkBubbles; - groupsComboBoxHighlightGroups.Text = e.HighlightGroupName; + highlightGroupsToolStripComboBox.Text = e.HighlightGroupName; columnFinderToolStripMenuItem.Checked = e.ColumnFinderVisible; _skipEvents = false; @@ -1634,11 +1578,11 @@ private Icon GetIcon (int diff, LogWindowData data) [SupportedOSPlatform("windows")] private void RefreshEncodingMenuBar (Encoding encoding) { - toolStripEncodingASCIIItem.Checked = false; - toolStripEncodingANSIItem.Checked = false; - toolStripEncodingUTF8Item.Checked = false; - toolStripEncodingUTF16Item.Checked = false; - toolStripEncodingISO88591Item.Checked = false; + encodingASCIIToolStripMenuItem.Checked = false; + encodingANSIToolStripMenuItem.Checked = false; + encodingUTF8toolStripMenuItem.Checked = false; + encodingUTF16toolStripMenuItem.Checked = false; + encodingISO88591toolStripMenuItem.Checked = false; if (encoding == null) { @@ -1647,26 +1591,26 @@ private void RefreshEncodingMenuBar (Encoding encoding) if (encoding is ASCIIEncoding) { - toolStripEncodingASCIIItem.Checked = true; + encodingASCIIToolStripMenuItem.Checked = true; } else if (encoding.Equals(Encoding.Default)) { - toolStripEncodingANSIItem.Checked = true; + encodingANSIToolStripMenuItem.Checked = true; } else if (encoding is UTF8Encoding) { - toolStripEncodingUTF8Item.Checked = true; + encodingUTF8toolStripMenuItem.Checked = true; } else if (encoding is UnicodeEncoding) { - toolStripEncodingUTF16Item.Checked = true; + encodingUTF16toolStripMenuItem.Checked = true; } else if (encoding.Equals(Encoding.GetEncoding("iso-8859-1"))) { - toolStripEncodingISO88591Item.Checked = true; + encodingISO88591toolStripMenuItem.Checked = true; } - toolStripEncodingANSIItem.Text = Encoding.Default.HeaderName; + encodingANSIToolStripMenuItem.Text = Encoding.Default.HeaderName; } [SupportedOSPlatform("windows")] @@ -1954,7 +1898,7 @@ private void LoadProject (string projectFileName, bool restoreLayout) [SupportedOSPlatform("windows")] private void ApplySelectedHighlightGroup () { - var groupName = groupsComboBoxHighlightGroups.Text; + var groupName = highlightGroupsToolStripComboBox.Text; CurrentLogWindow?.SetCurrentHighlightGroup(groupName); } @@ -2372,10 +2316,10 @@ private void OnTimeShiftToolStripMenuItemCheckStateChanged (object sender, Event { if (!_skipEvents && CurrentLogWindow != null) { - CurrentLogWindow.SetTimeshiftValue(timeshiftMenuTextBox.Text); - timeshiftMenuTextBox.Enabled = timeshiftToolStripMenuItem.Checked; + CurrentLogWindow.SetTimeshiftValue(timeshiftToolStripTextBox.Text); + timeshiftToolStripTextBox.Enabled = timeshiftToolStripMenuItem.Checked; CurrentLogWindow.TimeshiftEnabled(timeshiftToolStripMenuItem.Checked, - timeshiftMenuTextBox.Text); + timeshiftToolStripTextBox.Text); } } @@ -2485,7 +2429,7 @@ private void OnTimeShiftMenuTextBoxKeyDown (object sender, KeyEventArgs e) if (e.KeyCode == Keys.Enter) { e.Handled = true; - CurrentLogWindow.SetTimeshiftValue(timeshiftMenuTextBox.Text); + CurrentLogWindow.SetTimeshiftValue(timeshiftToolStripTextBox.Text); } } diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs index 2b322b27..cb2af036 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs @@ -84,20 +84,20 @@ private void InitializeComponent() showBookmarkListToolStripMenuItem = new ToolStripMenuItem(); columnFinderToolStripMenuItem = new ToolStripMenuItem(); ToolStripSeparator5 = new ToolStripSeparator(); - toolStripEncodingMenuItem = new ToolStripMenuItem(); - toolStripEncodingASCIIItem = new ToolStripMenuItem(); - toolStripEncodingANSIItem = new ToolStripMenuItem(); - toolStripEncodingISO88591Item = new ToolStripMenuItem(); - toolStripEncodingUTF8Item = new ToolStripMenuItem(); - toolStripEncodingUTF16Item = new ToolStripMenuItem(); + encodingToolStripMenuItem = new ToolStripMenuItem(); + encodingASCIIToolStripMenuItem = new ToolStripMenuItem(); + encodingANSIToolStripMenuItem = new ToolStripMenuItem(); + encodingISO88591toolStripMenuItem = new ToolStripMenuItem(); + encodingUTF8toolStripMenuItem = new ToolStripMenuItem(); + encodingUTF16toolStripMenuItem = new ToolStripMenuItem(); ToolStripSeparator6 = new ToolStripSeparator(); timeshiftToolStripMenuItem = new ToolStripMenuItem(); - timeshiftMenuTextBox = new ToolStripTextBox(); + timeshiftToolStripTextBox = new ToolStripTextBox(); ToolStripSeparator4 = new ToolStripSeparator(); copyMarkedLinesIntoNewTabToolStripMenuItem = new ToolStripMenuItem(); optionToolStripMenuItem = new ToolStripMenuItem(); columnizerToolStripMenuItem = new ToolStripMenuItem(); - hilightingToolStripMenuItem1 = new ToolStripMenuItem(); + hilightingToolStripMenuItem = new ToolStripMenuItem(); ToolStripSeparator7 = new ToolStripSeparator(); settingsToolStripMenuItem = new ToolStripMenuItem(); ToolStripSeparator9 = new ToolStripSeparator(); @@ -124,9 +124,9 @@ private void InitializeComponent() loglevelToolStripMenuItem = new ToolStripMenuItem(); warnToolStripMenuItem = new ToolStripMenuItem(); infoToolStripMenuItem = new ToolStripMenuItem(); - debugToolStripMenuItem1 = new ToolStripMenuItem(); + debugToolStripMenuItem = new ToolStripMenuItem(); disableWordHighlightModeToolStripMenuItem = new ToolStripMenuItem(); - host = new CheckBox(); + checkBoxHost = new CheckBox(); toolStripContainer = new ToolStripContainer(); dockPanel = new DockPanel(); externalToolsToolStrip = new ToolStrip(); @@ -144,7 +144,7 @@ private void InitializeComponent() lineToolStripSeparatorExtension4 = new ToolStripSeparator(); toolStripButtonTail = new ToolStripButton(); lineToolStripSeparatorExtension5 = new ToolStripSeparator(); - groupsComboBoxHighlightGroups = new ToolStripComboBox(); + highlightGroupsToolStripComboBox = new ToolStripComboBox(); checkBoxFollowTail = new CheckBox(); tabContextMenuStrip = new ContextMenuStrip(components); closeThisTabToolStripMenuItem = new ToolStripMenuItem(); @@ -368,7 +368,7 @@ private void InitializeComponent() // // viewNavigateToolStripMenuItem // - viewNavigateToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { goToLineToolStripMenuItem, searchToolStripMenuItem, filterToolStripMenuItem, bookmarksToolStripMenuItem, columnFinderToolStripMenuItem, ToolStripSeparator5, toolStripEncodingMenuItem, ToolStripSeparator6, timeshiftToolStripMenuItem, timeshiftMenuTextBox, ToolStripSeparator4, copyMarkedLinesIntoNewTabToolStripMenuItem }); + viewNavigateToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { goToLineToolStripMenuItem, searchToolStripMenuItem, filterToolStripMenuItem, bookmarksToolStripMenuItem, columnFinderToolStripMenuItem, ToolStripSeparator5, encodingToolStripMenuItem, ToolStripSeparator6, timeshiftToolStripMenuItem, timeshiftToolStripTextBox, ToolStripSeparator4, copyMarkedLinesIntoNewTabToolStripMenuItem }); viewNavigateToolStripMenuItem.Name = "viewNavigateToolStripMenuItem"; viewNavigateToolStripMenuItem.Size = new System.Drawing.Size(96, 19); viewNavigateToolStripMenuItem.Text = "View/Navigate"; @@ -464,57 +464,56 @@ private void InitializeComponent() // // toolStripEncodingMenuItem // - toolStripEncodingMenuItem.DropDownItems.AddRange(new ToolStripItem[] { toolStripEncodingASCIIItem, toolStripEncodingANSIItem, toolStripEncodingISO88591Item, toolStripEncodingUTF8Item, toolStripEncodingUTF16Item }); - toolStripEncodingMenuItem.Name = "toolStripEncodingMenuItem"; - toolStripEncodingMenuItem.Size = new System.Drawing.Size(189, 30); - toolStripEncodingMenuItem.Text = "Encoding"; + encodingToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { encodingASCIIToolStripMenuItem, encodingANSIToolStripMenuItem, encodingISO88591toolStripMenuItem, encodingUTF8toolStripMenuItem, encodingUTF16toolStripMenuItem }); + encodingToolStripMenuItem.Name = "encodingToolStripMenuItem"; + encodingToolStripMenuItem.Size = new System.Drawing.Size(189, 30); + encodingToolStripMenuItem.Text = "Encoding"; // // toolStripEncodingASCIIItem // - toolStripEncodingASCIIItem.BackColor = System.Drawing.SystemColors.Control; - toolStripEncodingASCIIItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - toolStripEncodingASCIIItem.Name = "toolStripEncodingASCIIItem"; - toolStripEncodingASCIIItem.Size = new System.Drawing.Size(132, 22); - toolStripEncodingASCIIItem.Tag = ""; - toolStripEncodingASCIIItem.Text = "ASCII"; - toolStripEncodingASCIIItem.Click += OnASCIIToolStripMenuItemClick; + encodingASCIIToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + encodingASCIIToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + encodingASCIIToolStripMenuItem.Name = "encodingASCIIToolStripMenuItem"; + encodingASCIIToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + encodingASCIIToolStripMenuItem.Text = "ASCII"; + encodingASCIIToolStripMenuItem.Click += OnASCIIToolStripMenuItemClick; // // toolStripEncodingANSIItem // - toolStripEncodingANSIItem.BackColor = System.Drawing.SystemColors.Control; - toolStripEncodingANSIItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - toolStripEncodingANSIItem.Name = "toolStripEncodingANSIItem"; - toolStripEncodingANSIItem.Size = new System.Drawing.Size(132, 22); - toolStripEncodingANSIItem.Tag = ""; - toolStripEncodingANSIItem.Text = "ANSI"; - toolStripEncodingANSIItem.Click += OnANSIToolStripMenuItemClick; + encodingANSIToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + encodingANSIToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + encodingANSIToolStripMenuItem.Name = "toolStripEncodingANSIItem"; + encodingANSIToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + encodingANSIToolStripMenuItem.Tag = ""; + encodingANSIToolStripMenuItem.Text = "ANSI"; + encodingANSIToolStripMenuItem.Click += OnANSIToolStripMenuItemClick; // // toolStripEncodingISO88591Item // - toolStripEncodingISO88591Item.BackColor = System.Drawing.SystemColors.Control; - toolStripEncodingISO88591Item.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - toolStripEncodingISO88591Item.Name = "toolStripEncodingISO88591Item"; - toolStripEncodingISO88591Item.Size = new System.Drawing.Size(132, 22); - toolStripEncodingISO88591Item.Text = "ISO-8859-1"; - toolStripEncodingISO88591Item.Click += OnISO88591ToolStripMenuItemClick; + encodingISO88591toolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + encodingISO88591toolStripMenuItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + encodingISO88591toolStripMenuItem.Name = "encodingISO88591toolStripMenuItem"; + encodingISO88591toolStripMenuItem.Size = new System.Drawing.Size(132, 22); + encodingISO88591toolStripMenuItem.Text = "ISO-8859-1"; + encodingISO88591toolStripMenuItem.Click += OnISO88591ToolStripMenuItemClick; // // toolStripEncodingUTF8Item // - toolStripEncodingUTF8Item.BackColor = System.Drawing.SystemColors.Control; - toolStripEncodingUTF8Item.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - toolStripEncodingUTF8Item.Name = "toolStripEncodingUTF8Item"; - toolStripEncodingUTF8Item.Size = new System.Drawing.Size(132, 22); - toolStripEncodingUTF8Item.Text = "UTF8"; - toolStripEncodingUTF8Item.Click += OnUTF8ToolStripMenuItemClick; + encodingUTF8toolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + encodingUTF8toolStripMenuItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + encodingUTF8toolStripMenuItem.Name = "encodingUTF8toolStripMenuItem"; + encodingUTF8toolStripMenuItem.Size = new System.Drawing.Size(132, 22); + encodingUTF8toolStripMenuItem.Text = "UTF8"; + encodingUTF8toolStripMenuItem.Click += OnUTF8ToolStripMenuItemClick; // // toolStripEncodingUTF16Item // - toolStripEncodingUTF16Item.BackColor = System.Drawing.SystemColors.Control; - toolStripEncodingUTF16Item.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - toolStripEncodingUTF16Item.Name = "toolStripEncodingUTF16Item"; - toolStripEncodingUTF16Item.Size = new System.Drawing.Size(132, 22); - toolStripEncodingUTF16Item.Text = "Unicode"; - toolStripEncodingUTF16Item.Click += OnUTF16ToolStripMenuItemClick; + encodingUTF16toolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + encodingUTF16toolStripMenuItem.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + encodingUTF16toolStripMenuItem.Name = "encodingUTF16toolStripMenuItem"; + encodingUTF16toolStripMenuItem.Size = new System.Drawing.Size(132, 22); + encodingUTF16toolStripMenuItem.Text = "Unicode"; + encodingUTF16toolStripMenuItem.Click += OnUTF16ToolStripMenuItemClick; // // ToolStripSeparator6 // @@ -532,14 +531,14 @@ private void InitializeComponent() // // timeshiftMenuTextBox // - timeshiftMenuTextBox.BorderStyle = BorderStyle.FixedSingle; - timeshiftMenuTextBox.Enabled = false; - timeshiftMenuTextBox.Font = new System.Drawing.Font("Segoe UI", 9F); - timeshiftMenuTextBox.Name = "timeshiftMenuTextBox"; - timeshiftMenuTextBox.Size = new System.Drawing.Size(100, 23); - timeshiftMenuTextBox.Text = "+00:00:00.000"; - timeshiftMenuTextBox.ToolTipText = "Time offset (hh:mm:ss.fff)"; - timeshiftMenuTextBox.KeyDown += OnTimeShiftMenuTextBoxKeyDown; + timeshiftToolStripTextBox.BorderStyle = BorderStyle.FixedSingle; + timeshiftToolStripTextBox.Enabled = false; + timeshiftToolStripTextBox.Font = new System.Drawing.Font("Segoe UI", 9F); + timeshiftToolStripTextBox.Name = "timeshiftMenuTextBox"; + timeshiftToolStripTextBox.Size = new System.Drawing.Size(100, 23); + timeshiftToolStripTextBox.Text = "+00:00:00.000"; + timeshiftToolStripTextBox.ToolTipText = "Time offset (hh:mm:ss.fff)"; + timeshiftToolStripTextBox.KeyDown += OnTimeShiftMenuTextBoxKeyDown; // // ToolStripSeparator4 // @@ -557,7 +556,7 @@ private void InitializeComponent() // // optionToolStripMenuItem // - optionToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { columnizerToolStripMenuItem, hilightingToolStripMenuItem1, ToolStripSeparator7, settingsToolStripMenuItem, ToolStripSeparator9, cellSelectModeToolStripMenuItem, alwaysOnTopToolStripMenuItem, hideLineColumnToolStripMenuItem, ToolStripSeparator8, lockInstanceToolStripMenuItem }); + optionToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { columnizerToolStripMenuItem, hilightingToolStripMenuItem, ToolStripSeparator7, settingsToolStripMenuItem, ToolStripSeparator9, cellSelectModeToolStripMenuItem, alwaysOnTopToolStripMenuItem, hideLineColumnToolStripMenuItem, ToolStripSeparator8, lockInstanceToolStripMenuItem }); optionToolStripMenuItem.Name = "optionToolStripMenuItem"; optionToolStripMenuItem.Size = new System.Drawing.Size(61, 19); optionToolStripMenuItem.Text = "Options"; @@ -573,10 +572,10 @@ private void InitializeComponent() // // hilightingToolStripMenuItem1 // - hilightingToolStripMenuItem1.Name = "hilightingToolStripMenuItem1"; - hilightingToolStripMenuItem1.Size = new System.Drawing.Size(224, 30); - hilightingToolStripMenuItem1.Text = "Highlighting and triggers..."; - hilightingToolStripMenuItem1.Click += OnHighlightingToolStripMenuItemClick; + hilightingToolStripMenuItem.Name = "hilightingToolStripMenuItem1"; + hilightingToolStripMenuItem.Size = new System.Drawing.Size(224, 30); + hilightingToolStripMenuItem.Text = "Highlighting and triggers..."; + hilightingToolStripMenuItem.Click += OnHighlightingToolStripMenuItemClick; // // ToolStripSeparator7 // @@ -741,7 +740,7 @@ private void InitializeComponent() // // loglevelToolStripMenuItem // - loglevelToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { warnToolStripMenuItem, infoToolStripMenuItem, debugToolStripMenuItem1 }); + loglevelToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { warnToolStripMenuItem, infoToolStripMenuItem, debugToolStripMenuItem }); loglevelToolStripMenuItem.Name = "loglevelToolStripMenuItem"; loglevelToolStripMenuItem.Size = new System.Drawing.Size(274, 22); loglevelToolStripMenuItem.Text = "Loglevel"; @@ -779,15 +778,15 @@ private void InitializeComponent() // // host // - host.AccessibleName = "host"; - host.AutoSize = true; - host.BackColor = System.Drawing.Color.Transparent; - host.Location = new System.Drawing.Point(9, 1); - host.Name = "host"; - host.Size = new System.Drawing.Size(80, 22); - host.TabIndex = 7; - host.Text = "Follow tail"; - host.UseVisualStyleBackColor = false; + checkBoxHost.AccessibleName = "host"; + checkBoxHost.AutoSize = true; + checkBoxHost.BackColor = System.Drawing.Color.Transparent; + checkBoxHost.Location = new System.Drawing.Point(9, 1); + checkBoxHost.Name = "checkboxHost"; + checkBoxHost.Size = new System.Drawing.Size(80, 22); + checkBoxHost.TabIndex = 7; + checkBoxHost.Text = "Follow tail"; + checkBoxHost.UseVisualStyleBackColor = false; // // toolStripContainer // @@ -904,7 +903,7 @@ private void InitializeComponent() buttonToolStrip.AllowMerge = false; buttonToolStrip.Dock = DockStyle.None; buttonToolStrip.ImageScalingSize = new System.Drawing.Size(24, 24); - buttonToolStrip.Items.AddRange(new ToolStripItem[] { toolStripButtonOpen, lineToolStripSeparatorExtension1, toolStripButtonSearch, toolStripButtonFilter, lineToolStripSeparatorExtension2, toolStripButtonBookmark, toolStripButtonUp, toolStripButtonDown, lineToolStripSeparatorExtension3, toolStripButtonBubbles, lineToolStripSeparatorExtension4, toolStripButtonTail, lineToolStripSeparatorExtension5, groupsComboBoxHighlightGroups }); + buttonToolStrip.Items.AddRange(new ToolStripItem[] { toolStripButtonOpen, lineToolStripSeparatorExtension1, toolStripButtonSearch, toolStripButtonFilter, lineToolStripSeparatorExtension2, toolStripButtonBookmark, toolStripButtonUp, toolStripButtonDown, lineToolStripSeparatorExtension3, toolStripButtonBubbles, lineToolStripSeparatorExtension4, toolStripButtonTail, lineToolStripSeparatorExtension5, highlightGroupsToolStripComboBox }); buttonToolStrip.LayoutStyle = ToolStripLayoutStyle.Flow; buttonToolStrip.Location = new System.Drawing.Point(3, 42); buttonToolStrip.Name = "buttonToolStrip"; @@ -1026,15 +1025,15 @@ private void InitializeComponent() // // groupsComboBoxHighlightGroups // - groupsComboBoxHighlightGroups.DropDownStyle = ComboBoxStyle.DropDownList; - groupsComboBoxHighlightGroups.DropDownWidth = 250; - groupsComboBoxHighlightGroups.FlatStyle = FlatStyle.Standard; - groupsComboBoxHighlightGroups.Name = "groupsComboBoxHighlightGroups"; - groupsComboBoxHighlightGroups.Size = new System.Drawing.Size(150, 23); - groupsComboBoxHighlightGroups.ToolTipText = "Select the current highlight settings for the log file (right-click to open highlight settings)"; - groupsComboBoxHighlightGroups.DropDownClosed += OnHighlightGroupsComboBoxDropDownClosed; - groupsComboBoxHighlightGroups.SelectedIndexChanged += OnHighlightGroupsComboBoxSelectedIndexChanged; - groupsComboBoxHighlightGroups.MouseUp += OnHighlightGroupsComboBoxMouseUp; + highlightGroupsToolStripComboBox.DropDownStyle = ComboBoxStyle.DropDownList; + highlightGroupsToolStripComboBox.DropDownWidth = 250; + highlightGroupsToolStripComboBox.FlatStyle = FlatStyle.Standard; + highlightGroupsToolStripComboBox.Name = "highlightGroupsToolStripComboBox"; + highlightGroupsToolStripComboBox.Size = new System.Drawing.Size(150, 23); + highlightGroupsToolStripComboBox.ToolTipText = "Select the current highlight settings for the log file (right-click to open highlight settings)"; + highlightGroupsToolStripComboBox.DropDownClosed += OnHighlightGroupsComboBoxDropDownClosed; + highlightGroupsToolStripComboBox.SelectedIndexChanged += OnHighlightGroupsComboBoxSelectedIndexChanged; + highlightGroupsToolStripComboBox.MouseUp += OnHighlightGroupsComboBoxMouseUp; // // checkBoxFollowTail // @@ -1202,19 +1201,19 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem filterToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem copyMarkedLinesIntoNewTabToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem optionToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem hilightingToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem hilightingToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem cellSelectModeToolStripMenuItem; - private System.Windows.Forms.ToolStripTextBox timeshiftMenuTextBox; + private System.Windows.Forms.ToolStripTextBox timeshiftToolStripTextBox; private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem bookmarksToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toggleBookmarkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem jumpToNextToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem jumpToPrevToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem toolStripEncodingMenuItem; - private System.Windows.Forms.ToolStripMenuItem toolStripEncodingASCIIItem; - private System.Windows.Forms.ToolStripMenuItem toolStripEncodingANSIItem; - private System.Windows.Forms.ToolStripMenuItem toolStripEncodingUTF8Item; - private System.Windows.Forms.ToolStripMenuItem toolStripEncodingUTF16Item; + private System.Windows.Forms.ToolStripMenuItem encodingToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem encodingASCIIToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem encodingANSIToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem encodingUTF8toolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem encodingUTF16toolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem reloadToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem columnizerToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; @@ -1227,7 +1226,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripButton toolStripButtonBookmark; private System.Windows.Forms.ToolStripButton toolStripButtonUp; private System.Windows.Forms.ToolStripButton toolStripButtonDown; - private CheckBox host; + private CheckBox checkBoxHost; private CheckBox checkBoxFollowTail; private ToolStripButton toolStripButtonTail; private ToolStripMenuItem showHelpToolStripMenuItem; @@ -1245,7 +1244,7 @@ private void InitializeComponent() private ToolStripMenuItem findInExplorerToolStripMenuItem; private ToolStripMenuItem truncateFileToolStripMenuItem; private ToolStripMenuItem exportBookmarksToolStripMenuItem; - private ToolStripComboBox groupsComboBoxHighlightGroups; + private ToolStripComboBox highlightGroupsToolStripComboBox; private ToolStripMenuItem debugToolStripMenuItem; private ToolStripMenuItem dumpLogBufferInfoToolStripMenuItem; private ToolStripMenuItem dumpBufferDiagnosticToolStripMenuItem; @@ -1264,7 +1263,7 @@ private void InitializeComponent() private ToolStripMenuItem disableWordHighlightModeToolStripMenuItem; private ToolStripMenuItem multifileMaskToolStripMenuItem; private ToolStripMenuItem multiFileEnabledStripMenuItem; - private ToolStripMenuItem toolStripEncodingISO88591Item; + private ToolStripMenuItem encodingISO88591toolStripMenuItem; private ToolStripMenuItem lockInstanceToolStripMenuItem; private ToolStripMenuItem newFromClipboardToolStripMenuItem; private ToolStripMenuItem openURIToolStripMenuItem; From a0ac4d5180593fc774d8544ed46c64806bef5bbb Mon Sep 17 00:00:00 2001 From: Hirogen Date: Thu, 17 Jul 2025 11:43:48 +0200 Subject: [PATCH 31/38] more german translations --- src/LogExpert.Resources/Resources.Designer.cs | 5 +- src/LogExpert.Resources/Resources.de.resx | 388 ++++++++++++++++++ src/LogExpert.Resources/Resources.resx | 5 +- 3 files changed, 394 insertions(+), 4 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 89037363..8182fb3d 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -4765,7 +4765,7 @@ public static System.Drawing.Bitmap Star { } /// - /// Looks up a localized string similar to Test time {0:} line diff={1} value={2}. + /// Looks up a localized string similar to Test time {0} line diff={1} value={2}. /// public static string TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue { get { @@ -4828,7 +4828,8 @@ public static string TimeSpreadingControl_UI_GFX_OnTimeSpreadCalcStartCalc_Calcu } /// - /// Looks up a localized string similar to Line {0}\n{0}. + /// Looks up a localized string similar to Line {0} + ///{1}. /// public static string TimeSpreadingControl_UI_ToolTip { get { diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 7ca1c961..6608116d 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -1330,4 +1330,392 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools LogExpert besitzt nicht alle Systemrechte. Vielleicht wurde LogExpert aus einem Netzwerklaufwerk gestartet. Bitte LogExpert von einem lokalen Laufwerk starten!\n ({0}) + + Horizontal verschieben + + + Vertical verschieben + + + Vertical invertiert verschieben + + + Zeitstempel selektieren + + + Start Bereichsuche von {0} ... {1} + + + Text für die Bereichssuche nicht gesetzt. Abbrechen der Breichssuche. + + + Suchtext nicht gesetzt. Abbrechen der Bereichssuche. + + + Bereichsstart nicht gefunden + + + Bereichssuche beendet. Gefundene {0} Zeilen + + + Ende aufgrund einer Zeilenanzahl kleiner 1 + + + Info + + + Debug + + + Warn + + + Loglevel + + + Exception werfen (Hintergrundthread) + + + Exception werfen (Async delegate) + + + Exception werfen (GUIthread) + + + Dump GC info + + + GC starten + + + Dump buffer Diagnostik + + + Dump LogBuffer Info + + + Debug + + + Information + + + Hilfe + + + Hilfe anzeigen + + + Tools + + + Konfigurieren... + + + Instanz sperren + + + Zeilenspalte verstecken + + + Immer oben + + + Zellenselektiermodus + + + Einstellungen... + + + Columnizer... + + + Optionen + + + Zu Tab kopieren + + + Daten sammeln für {0} Zeilen mit Schrittgröße {1} + + + Zeitbereich in {0} ms + + + Testzeit {0} Zeile differenz = {1} + + + Durschnittliche diff={0} minDiff={1} maxDiff={2} + + + Testzeit {0} Zeile differenz = {1} wert={2} + + + Berechne Zeitstreuungsanzeige... + + + Zeile{0} +{1} + + + Editierobjekt war NULL, sollte überprüft werden + + + ClipRgn: {0},{1},{2},{3} + + + Custom + + + statusStrip1 + + + 0 + + + 0 + + + L: + + + Bereit + + + menuStrip1 + + + Datei + + + Öffnen... + + + URL öffnen... + + + Datei schließen + + + Neuladen + + + Neuer Tab aus der Zwischenablage + + + Multidatei + + + Aktiviere Multidatei + + + Dateinamenmaske... + + + Session laden... + + + Session speichern... + + + Zuletzt benutzt + + + Exit + + + Anzeige/Navigation + + + Gehe zu Zeile... + + + Suche... + + + Filter + + + Lesezeichen + + + Lesezeichenschalter + + + Springe zum nächsten + + + Springe zum vorherigen + + + Lesezeichenliste + + + Spaltenfinder + + + Zeitverschiebung + + + Highlight und Trigger... + + + Ausschalten des Highlightwortmodus + + + Folge dem Ende + + + Datei öffnen + + + Suche + + + Filter + + + Lesezeichenschalter + + + Vorheriges Lesezeichen + + + Nächstes Lesezeichen + + + Anzeigen der Lesezeichenblasen + + + Ende + + + Folge dem Ende + + + diesen Tab schließen + + + Alle anderen Tabs schließen + + + Alle Tabs schließen + + + Tabfarbe... + + + Tab umbenennen... + + + Kopiere den Pfad in die Zwischenablage + + + Im Explorer finden + + + Datei abschneiden + + + Encoding + + + ASCII + + + ANSI + + + ISO-8859-1 + + + UTF8 + + + Unicode + + + +00:00:00.000 + + + Host + + + Zeitoffset (hh:mm:ss.fff) + + + Öffnet eine Datei mittels URL, welche durch das FileSystemPlugin unterstützt wird + + + Erstellt einen neuen Tab mit dem Inhalt der Zwischenablage + + + Behandelt multiple Dateien als eine große Datei (Beispiel: data.log, data.log.1, data.log.2,....) + + + Laden einer gespeicherte Session (Liste der Dateien die geladen werden) + + + Speichern einer Session (alle offenen Tabs) + + + Wenn durch den Columnizer unterstützt, kann ein Offset konfiguriert werden, welches bei der Zeit angezeigt wird + + + Kopiert alle selektierten Zeilen in einen neuen Tab + + + Splittet diverse Logdateien in fixierte Spalten + + + Wechselt zwischen dem Modus eine ganze Reihe zu selektieren oder einzelne Zellen + + + Wenn aktiviert, werden alle neuen LogExpertinstanzen in diese umgeleitet + + + Starten von externen Tools (konfigurierbar in den Einstellungen) + + + Suche + + + Datei öffnen + + + Gehe zum nächsten Lesezeichen + + + Gehe zum vorherigen Lesezeichen + + + Lesezeichenschalter + + + Filterdialog + + + Selektiert die derzeitigen Higlighteinstellungen für die Logdatei (rechts klick um die Highlight Einstellungen zu öffnen) + + + Setzt den Text der am Tab angezeigt wird + + + Alle Tabs schließen + + + Alle Tabs, bis auf diesen, schließen + + + Setzt die Farbe des Tabs + + + Öffnet ein Explorer Fenster und selektiert die Logdatei + + + Der komplette Dateiname (inklusive Pfad) wird in die Zwischenablage kopiert + + + Versucht die Datei im offenen Tab ab zu schneiden + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 33e5c244..63d839c2 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1376,13 +1376,14 @@ Checked tools will appear in the icon bar. All other tools are available in the Average diff={0} minDiff={1} maxDiff={2} - Test time {0:} line diff={1} value={2} + Test time {0} line diff={1} value={2} Calculating time spread view... - Line {0}\n{0} + Line {0} +{1} Edit control was null, to be checked From 5ccd2e917eca8c6c1e6e01cdfed759db74313fb2 Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Thu, 17 Jul 2025 11:53:35 +0200 Subject: [PATCH 32/38] Update src/LogExpert.UI/Dialogs/HighlightDialog.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.UI/Dialogs/HighlightDialog.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LogExpert.UI/Dialogs/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs index 25b3cd75..21799e44 100644 --- a/src/LogExpert.UI/Dialogs/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/HighlightDialog.cs @@ -503,7 +503,11 @@ or InvalidOperationException or SystemException) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry, ex)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message, Resources.Title_LogExpert_Error)); + _ = MessageBox.Show( + string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message), + Resources.Title_LogExpert_Error, + MessageBoxButtons.OK, + MessageBoxIcon.Error); } } } From 816fe5b44c6ae9cceb2db666453058c0956bc9ee Mon Sep 17 00:00:00 2001 From: Patrick Bruner Date: Thu, 17 Jul 2025 11:54:02 +0200 Subject: [PATCH 33/38] Update src/LogExpert.UI/Dialogs/HighlightDialog.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/LogExpert.UI/Dialogs/HighlightDialog.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LogExpert.UI/Dialogs/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs index 21799e44..5daf9808 100644 --- a/src/LogExpert.UI/Dialogs/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/HighlightDialog.cs @@ -684,7 +684,9 @@ or InvalidOperationException or SystemException) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry, ex)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message, Resources.Title_LogExpert_Error)); + _ = MessageBox.Show( + string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message), + Resources.Title_LogExpert_Error); } } From b489828e9d9e2864a07e0769044430ef0587d3a8 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Mon, 21 Jul 2025 10:13:08 +0200 Subject: [PATCH 34/38] update resources --- .../LogExpert.Resources.csproj | 3 + src/LogExpert.Resources/Resources.Designer.cs | 144 ++++++++++++++---- src/LogExpert.Resources/Resources.de.resx | 36 ++++- src/LogExpert.Resources/Resources.resx | 36 ++++- .../Controls/LogWindow/LogWindow.cs | 20 +-- .../AllowOnlyOneInstanceErrorDialog.cs | 10 +- .../Dialogs/BookmarkCommentDlg.Designer.cs | 64 ++++---- .../Dialogs/BookmarkCommentDlg.cs | 14 +- .../Dialogs/BookmarkWindow.Designer.cs | 44 +++--- src/LogExpert.UI/Dialogs/BookmarkWindow.cs | 27 ++-- src/LogExpert.UI/Dialogs/Eminus/Eminus.cs | 6 +- src/LogExpert.UI/Dialogs/HighlightDialog.cs | 8 +- src/LogExpert.UI/Dialogs/SettingsDialog.cs | 6 +- src/LogExpert/Program.cs | 8 +- 14 files changed, 299 insertions(+), 127 deletions(-) diff --git a/src/LogExpert.Resources/LogExpert.Resources.csproj b/src/LogExpert.Resources/LogExpert.Resources.csproj index 408d6b7d..1337b7d9 100644 --- a/src/LogExpert.Resources/LogExpert.Resources.csproj +++ b/src/LogExpert.Resources/LogExpert.Resources.csproj @@ -2,6 +2,9 @@ net8.0 + True + False + ..\Solution Items\Key.snk diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 8182fb3d..4e418299 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -106,6 +106,24 @@ public static System.Drawing.Bitmap Add { } } + /// + /// Looks up a localized string similar to Show this message only once?. + /// + public static string AllowOnlyOneInstanceErrorDialog_UI_CheckBox_checkBoxIgnoreMessage { + get { + return ResourceManager.GetString("AllowOnlyOneInstanceErrorDialog_UI_CheckBox_checkBoxIgnoreMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only one instance allowed, uncheck "View Settings => Allow only 1 Instances" to start multiple instances!. + /// + public static string AllowOnlyOneInstanceErrorDialog_UI_Label_labelErrorText { + get { + return ResourceManager.GetString("AllowOnlyOneInstanceErrorDialog_UI_Label_labelErrorText", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -216,6 +234,15 @@ public static System.Drawing.Bitmap Bookmark_remove { } } + /// + /// Looks up a localized string similar to Bookmark comment. + /// + public static string BookmarkCommentDlg_UI_Text { + get { + return ResourceManager.GetString("BookmarkCommentDlg_UI_Text", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -226,6 +253,69 @@ public static System.Drawing.Bitmap Bookmarks { } } + /// + /// Looks up a localized string similar to Show comment column. + /// + public static string BookmarkWindow_UI_CheckBox_checkBoxCommentColumn { + get { + return ResourceManager.GetString("BookmarkWindow_UI_CheckBox_checkBoxCommentColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bookmark Comment. + /// + public static string BookmarkWindow_UI_DataGridColumn_HeaderText { + get { + return ResourceManager.GetString("BookmarkWindow_UI_DataGridColumn_HeaderText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bookmark comment:. + /// + public static string BookmarkWindow_UI_Label_labelComment { + get { + return ResourceManager.GetString("BookmarkWindow_UI_Label_labelComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No bookmarks in current file. + /// + public static string BookmarkWindow_UI_NoBookmarksInCurrentFile { + get { + return ResourceManager.GetString("BookmarkWindow_UI_NoBookmarksInCurrentFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Really remove bookmark comments for selected lines?. + /// + public static string BookmarkWindow_UI_ReallyRemoveBookmarkCommentsForSelectedLines { + get { + return ResourceManager.GetString("BookmarkWindow_UI_ReallyRemoveBookmarkCommentsForSelectedLines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bookmarks. + /// + public static string BookmarkWindow_UI_Text { + get { + return ResourceManager.GetString("BookmarkWindow_UI_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove comment(s). + /// + public static string BookmarkWindow_UI_ToolStripMenuItem_removeCommentsToolStripMenuItem { + get { + return ResourceManager.GetString("BookmarkWindow_UI_ToolStripMenuItem_removeCommentsToolStripMenuItem", resourceCulture); + } + } + /// /// Looks up a localized string similar to ClipRgn: {0},{1},{2},{3}. /// @@ -749,6 +839,33 @@ public static string LogExpert_Common_UI_Button_OK { } } + /// + /// Looks up a localized string similar to Deserialize. + /// + public static string LogExpert_Common_UI_Title_Deserialize { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Title_Deserialize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LogExpert Error. + /// + public static string LogExpert_Common_UI_Title_Error { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Title_Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LogExpert. + /// + public static string LogExpert_Common_UI_Title_LogExpert { + get { + return ResourceManager.GetString("LogExpert_Common_UI_Title_LogExpert", resourceCulture); + } + } + /// /// Looks up a localized string similar to Adding window to list. /// @@ -4836,32 +4953,5 @@ public static string TimeSpreadingControl_UI_ToolTip { return ResourceManager.GetString("TimeSpreadingControl_UI_ToolTip", resourceCulture); } } - - /// - /// Looks up a localized string similar to LogExpert. - /// - public static string Title_LogExpert { - get { - return ResourceManager.GetString("Title_LogExpert", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Deserialize. - /// - public static string Title_LogExpert_Deserialize { - get { - return ResourceManager.GetString("Title_LogExpert_Deserialize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to LogExpert Error. - /// - public static string Title_LogExpert_Error { - get { - return ResourceManager.GetString("Title_LogExpert_Error", resourceCulture); - } - } } } diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 6608116d..30e5c793 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -188,7 +188,7 @@ images\png\48\Folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + LogExpert @@ -214,7 +214,7 @@ images\png\48\Star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + LogExpert Fehler @@ -1297,7 +1297,7 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools {0}Klasse in Eclipse laden - + Deserialisieren @@ -1718,4 +1718,34 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Versucht die Datei im offenen Tab ab zu schneiden + + Nur eine Instanz ist erlaubt. Deaktivieren von "Anzeigen Setteings => Nur eine Instanz erlauben" um mutliple Instanzen zu starten! + + + Diese Meldung nur einmal zeigen? + + + Lesezeichenkommentar + + + Entferne Kommentar(e) + + + Anzeigen Kommentar Spalte + + + Lesezeichen + + + Lesezeichenkommentar: + + + Wirklich das Lesezeichenkommentar für die selektierten Spalten entfernen? + + + Keine Lesezeichen für die aktuelle Zeile + + + Lesezeichenkommentar + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 63d839c2..330e02c8 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -188,7 +188,7 @@ images\png\48\Folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + LogExpert LogExpert @@ -218,7 +218,7 @@ images\png\48\Star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + LogExpert Error LogExpert Error Title @@ -1303,7 +1303,7 @@ Checked tools will appear in the icon bar. All other tools are available in the {0}Load class in Eclipse - + Deserialize @@ -1721,4 +1721,34 @@ Checked tools will appear in the icon bar. All other tools are available in the Try to truncate the file opened in tab + + Only one instance allowed, uncheck "View Settings => Allow only 1 Instances" to start multiple instances! + + + Show this message only once? + + + Bookmark comment + + + Remove comment(s) + + + Show comment column + + + Bookmarks + + + Bookmark comment: + + + Really remove bookmark comments for selected lines? + + + No bookmarks in current file + + + Bookmark Comment + \ No newline at end of file diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index e9c8e949..253c178d 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -834,7 +834,7 @@ private void OnLogWindowClosing (object sender, CancelEventArgs e) { if (Preferences.AskForClose) { - if (MessageBox.Show(Resources.LogWindow_UI_SureToClose, Resources.Title_LogExpert, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + if (MessageBox.Show(Resources.LogWindow_UI_SureToClose, Resources.LogExpert_Common_UI_Title_LogExpert, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { e.Cancel = true; return; @@ -3953,7 +3953,7 @@ private void SelectLine (int lineNum, bool triggerSyncCall, bool shouldScroll) if (lineNum == -1) { // Hmm... is that experimental code from early days? - _ = MessageBox.Show(this, Resources.LogWindow_UI_SelectLine_SearchResultNotFound, Resources.Title_LogExpert); + _ = MessageBox.Show(this, Resources.LogWindow_UI_SelectLine_SearchResultNotFound, Resources.LogExpert_Common_UI_Title_LogExpert); return; } @@ -4371,7 +4371,7 @@ private void Filter (FilterParams filterParams, List filterResultLines, Lis } catch (Exception ex) { - _ = MessageBox.Show(null, string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_Filter_ExceptionWhileFiltering, ex, ex.StackTrace), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(null, string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_Filter_ExceptionWhileFiltering, ex, ex.StackTrace), Resources.LogExpert_Common_UI_Title_Error); } long endTime = Environment.TickCount; @@ -4633,7 +4633,7 @@ private void ClearFilterList () { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(ClearFilterList), e)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList, e), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList, e), Resources.LogExpert_Common_UI_Title_Error); } } @@ -6087,7 +6087,7 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) catch (LogFileException lfe) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(LoadFile), lfe)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_LoadFile_CannotLoadFile, lfe.Message), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_LoadFile_CannotLoadFile, lfe.Message), Resources.LogExpert_Common_UI_Title_LogExpert); _ = BeginInvoke(new FunctionWith1BoolParam(Close), true); _isLoadError = true; return; @@ -6188,7 +6188,7 @@ public string SavePersistenceDataAndReturnFileName (bool force) } catch (Exception e) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_SavePersistenceData_ErrorWhileSaving, e), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_SavePersistenceData_ErrorWhileSaving, e), Resources.LogExpert_Common_UI_Title_Error); } return null; @@ -6900,7 +6900,7 @@ public void ToggleBookmark (int lineNum) if (!string.IsNullOrEmpty(bookmark.Text)) { - if (MessageBox.Show(Resources.LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt, Resources.Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.No) + if (MessageBox.Show(Resources.LogWindow_UI_ToggleBookmark_ThereCommentAttachedRemoveIt, Resources.LogExpert_Common_UI_Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.No) { return; } @@ -7076,7 +7076,7 @@ public void DeleteBookmarks (List lineNumList) if ( MessageBox.Show( Resources.LogWindow_UI_ThereAreSomeCommentsInTheBookmarksReallyRemoveBookmarks, - Resources.Title_LogExpert, + Resources.LogExpert_Common_UI_Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.No) { return; @@ -7673,7 +7673,7 @@ public void ExportBookmarkList () } catch (IOException e) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileExportingBookmarkList, e.Message), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileExportingBookmarkList, e.Message), Resources.LogExpert_Common_UI_Title_LogExpert); } } } @@ -7727,7 +7727,7 @@ public void ImportBookmarkList () } catch (IOException e) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileImportingBookmarkList, e.Message), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_ErrorWhileImportingBookmarkList, e.Message), Resources.LogExpert_Common_UI_Title_LogExpert); } } } diff --git a/src/LogExpert.UI/Dialogs/AllowOnlyOneInstanceErrorDialog.cs b/src/LogExpert.UI/Dialogs/AllowOnlyOneInstanceErrorDialog.cs index 3c046848..34c12e5e 100644 --- a/src/LogExpert.UI/Dialogs/AllowOnlyOneInstanceErrorDialog.cs +++ b/src/LogExpert.UI/Dialogs/AllowOnlyOneInstanceErrorDialog.cs @@ -10,15 +10,17 @@ public partial class AllowOnlyOneInstanceErrorDialog : Form public AllowOnlyOneInstanceErrorDialog () { InitializeComponent(); - SetText(); + ApplyResources(); } - private void SetText () + private void ApplyResources () { - labelErrorText.Text = @"Only one instance allowed, uncheck ""View Settings => Allow only 1 Instances"" to start multiple instances!"; + labelErrorText.Text = Resources.AllowOnlyOneInstanceErrorDialog_UI_Label_labelErrorText; + checkBoxIgnoreMessage.Text = Resources.AllowOnlyOneInstanceErrorDialog_UI_CheckBox_checkBoxIgnoreMessage; + buttonOk.Text = Resources.LogExpert_Common_UI_Button_OK; } - private void OnButtonOkClick (object sender, System.EventArgs e) + private void OnButtonOkClick (object sender, EventArgs e) { DoNotShowThisMessageAgain = checkBoxIgnoreMessage.Checked; } diff --git a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.Designer.cs b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.Designer.cs index 06aa2968..ebaf1170 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.Designer.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.Dialogs; +namespace LogExpert.Dialogs; partial class BookmarkCommentDlg { @@ -29,48 +29,48 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BookmarkCommentDlg)); - this.okButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); - this.commentTextBox = new System.Windows.Forms.TextBox(); + this.buttonOk = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.textBoxComment = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // okButton // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.Location = new System.Drawing.Point(150, 86); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 1; - this.okButton.Text = "OK"; - this.okButton.UseVisualStyleBackColor = true; + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOk.Location = new System.Drawing.Point(150, 86); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(75, 23); + this.buttonOk.TabIndex = 1; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; // // cancelButton // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(241, 86); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 2; - this.cancelButton.Text = "&Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(241, 86); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 2; + this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; // // commentTextBox // - this.commentTextBox.Dock = System.Windows.Forms.DockStyle.Top; - this.commentTextBox.Location = new System.Drawing.Point(0, 0); - this.commentTextBox.Multiline = true; - this.commentTextBox.Name = "commentTextBox"; - this.commentTextBox.Size = new System.Drawing.Size(324, 80); - this.commentTextBox.TabIndex = 0; + this.textBoxComment.Dock = System.Windows.Forms.DockStyle.Top; + this.textBoxComment.Location = new System.Drawing.Point(0, 0); + this.textBoxComment.Multiline = true; + this.textBoxComment.Name = "textBoxComment"; + this.textBoxComment.Size = new System.Drawing.Size(324, 80); + this.textBoxComment.TabIndex = 0; // // BookmarkCommentDlg // - this.AcceptButton = this.okButton; - this.CancelButton = this.cancelButton; + this.AcceptButton = this.buttonOk; + this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(324, 115); - this.Controls.Add(this.commentTextBox); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.okButton); + this.Controls.Add(this.textBoxComment); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOk); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "BookmarkCommentDlg"; @@ -83,7 +83,7 @@ private void InitializeComponent() #endregion -private System.Windows.Forms.Button okButton; -private System.Windows.Forms.Button cancelButton; -private System.Windows.Forms.TextBox commentTextBox; +private System.Windows.Forms.Button buttonOk; +private System.Windows.Forms.Button buttonCancel; +private System.Windows.Forms.TextBox textBoxComment; } \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs index 7949c604..ac8752c6 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkCommentDlg.cs @@ -7,12 +7,20 @@ internal partial class BookmarkCommentDlg : Form { #region cTor - public BookmarkCommentDlg() + public BookmarkCommentDlg () { AutoScaleDimensions = new SizeF(96F, 96F); AutoScaleMode = AutoScaleMode.Dpi; InitializeComponent(); + ApplyResources(); + } + + private void ApplyResources () + { + Text = Resources.BookmarkCommentDlg_UI_Text; + buttonCancel.Text = Resources.LogExpert_Common_UI_Button_Cancel; + buttonOk.Text = Resources.LogExpert_Common_UI_Button_OK; } #endregion @@ -21,8 +29,8 @@ public BookmarkCommentDlg() public string Comment { - set => commentTextBox.Text = value; - get => commentTextBox.Text; + set => textBoxComment.Text = value; + get => textBoxComment.Text; } #endregion diff --git a/src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs b/src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs index 9467414c..3cac63d1 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.Dialogs; +namespace LogExpert.Dialogs; partial class BookmarkWindow { /// /// Required designer variable. @@ -31,8 +31,8 @@ private void InitializeComponent() { this.bookmarkTextBox = new System.Windows.Forms.TextBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.bookmarkDataGridView = new LogExpert.Dialogs.BufferedDataGridView(); - this.commentColumnCheckBox = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); + this.checkBoxCommentColumn = new System.Windows.Forms.CheckBox(); + this.labelComment = new System.Windows.Forms.Label(); this.contextMenuStrip1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -88,8 +88,8 @@ private void InitializeComponent() { // // splitContainer1.Panel2 // - this.splitContainer1.Panel2.Controls.Add(this.commentColumnCheckBox); - this.splitContainer1.Panel2.Controls.Add(this.label1); + this.splitContainer1.Panel2.Controls.Add(this.checkBoxCommentColumn); + this.splitContainer1.Panel2.Controls.Add(this.labelComment); this.splitContainer1.Panel2.Controls.Add(this.bookmarkTextBox); this.splitContainer1.Size = new System.Drawing.Size(717, 158); this.splitContainer1.SplitterDistance = 517; @@ -133,24 +133,24 @@ private void InitializeComponent() { // // commentColumnCheckBox // - this.commentColumnCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.commentColumnCheckBox.AutoSize = true; - this.commentColumnCheckBox.Location = new System.Drawing.Point(7, 138); - this.commentColumnCheckBox.Name = "commentColumnCheckBox"; - this.commentColumnCheckBox.Size = new System.Drawing.Size(136, 17); - this.commentColumnCheckBox.TabIndex = 8; - this.commentColumnCheckBox.Text = "Show comment column"; - this.commentColumnCheckBox.UseVisualStyleBackColor = true; - this.commentColumnCheckBox.CheckedChanged += new System.EventHandler(this.OnCommentColumnCheckBoxCheckedChanged); + this.checkBoxCommentColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkBoxCommentColumn.AutoSize = true; + this.checkBoxCommentColumn.Location = new System.Drawing.Point(7, 138); + this.checkBoxCommentColumn.Name = "checkBoxCommentColumn"; + this.checkBoxCommentColumn.Size = new System.Drawing.Size(136, 17); + this.checkBoxCommentColumn.TabIndex = 8; + this.checkBoxCommentColumn.Text = "Show comment column"; + this.checkBoxCommentColumn.UseVisualStyleBackColor = true; + this.checkBoxCommentColumn.CheckedChanged += new System.EventHandler(this.OnCommentColumnCheckBoxCheckedChanged); // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(4, 4); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(104, 13); - this.label1.TabIndex = 7; - this.label1.Text = "Bookmark comment:"; + this.labelComment.AutoSize = true; + this.labelComment.Location = new System.Drawing.Point(4, 4); + this.labelComment.Name = "labelComment"; + this.labelComment.Size = new System.Drawing.Size(104, 13); + this.labelComment.TabIndex = 7; + this.labelComment.Text = "Bookmark comment:"; // // BookmarkWindow // @@ -189,7 +189,7 @@ private void InitializeComponent() { private System.Windows.Forms.ToolStripMenuItem deleteBookmarkssToolStripMenuItem; private System.Windows.Forms.TextBox bookmarkTextBox; private System.Windows.Forms.SplitContainer splitContainer1; -private System.Windows.Forms.Label label1; +private System.Windows.Forms.Label labelComment; private System.Windows.Forms.ToolStripMenuItem removeCommentsToolStripMenuItem; -private System.Windows.Forms.CheckBox commentColumnCheckBox; +private System.Windows.Forms.CheckBox checkBoxCommentColumn; } \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/BookmarkWindow.cs b/src/LogExpert.UI/Dialogs/BookmarkWindow.cs index 6b08cef7..7cfcaaeb 100644 --- a/src/LogExpert.UI/Dialogs/BookmarkWindow.cs +++ b/src/LogExpert.UI/Dialogs/BookmarkWindow.cs @@ -13,7 +13,6 @@ namespace LogExpert.Dialogs; -//TODO can be moved to Logexpert.UI if the PaintHelper has been refactored [SupportedOSPlatform("windows")] internal partial class BookmarkWindow : DockContent, ISharedToolWindow, IBookmarkView { @@ -38,6 +37,16 @@ public BookmarkWindow () bookmarkDataGridView.CellValueNeeded += OnBoomarkDataGridViewCellValueNeeded; bookmarkDataGridView.CellPainting += OnBoomarkDataGridViewCellPainting; + + ApplyResources(); + } + + private void ApplyResources () + { + removeCommentsToolStripMenuItem.Text = Resources.BookmarkWindow_UI_ToolStripMenuItem_removeCommentsToolStripMenuItem; + checkBoxCommentColumn.Text = Resources.BookmarkWindow_UI_CheckBox_checkBoxCommentColumn; + Text = Resources.BookmarkWindow_UI_Text; + labelComment.Text = Resources.BookmarkWindow_UI_Label_labelComment; } #endregion @@ -51,10 +60,10 @@ public bool LineColumnVisible public bool ShowBookmarkCommentColumn { - get => commentColumnCheckBox.Checked; + get => checkBoxCommentColumn.Checked; set { - commentColumnCheckBox.Checked = value; + checkBoxCommentColumn.Checked = value; ShowCommentColumn(value); } } @@ -74,7 +83,7 @@ public void SetColumnizer (ILogLineColumnizer columnizer) DataGridViewTextBoxColumn commentColumn = new() { - HeaderText = "Bookmark Comment", + HeaderText = Resources.BookmarkWindow_UI_DataGridColumn_HeaderText, AutoSizeMode = DataGridViewAutoSizeColumnMode.None, Resizable = DataGridViewTriState.NotSet, DividerWidth = 1, @@ -84,7 +93,7 @@ public void SetColumnizer (ILogLineColumnizer columnizer) }; bookmarkDataGridView.Columns.Insert(1, commentColumn); - ShowCommentColumn(commentColumnCheckBox.Checked); + ShowCommentColumn(checkBoxCommentColumn.Checked); ResizeColumns(); } @@ -212,7 +221,7 @@ protected override void OnPaint (PaintEventArgs e) LineAlignment = StringAlignment.Center }; - e.Graphics.DrawString("No bookmarks in current file", SystemFonts.DialogFont, SystemBrushes.WindowText, ClientRectangle, sf); + e.Graphics.DrawString(Resources.BookmarkWindow_UI_NoBookmarksInCurrentFile, SystemFonts.DialogFont, SystemBrushes.WindowText, ClientRectangle, sf); } else { @@ -402,7 +411,7 @@ private void OnBookmarkGridViewKeyDown (object sender, KeyEventArgs e) { if (bookmarkDataGridView.Focused) { - bookmarkTextBox.Focus(); + _ = bookmarkTextBox.Focus(); e.Handled = true; } } @@ -537,7 +546,7 @@ private void OnBookmarkDataGridViewCellDoubleClick (object sender, DataGridViewC private void OnRemoveCommentsToolStripMenuItemClick (object sender, EventArgs e) { - if (MessageBox.Show("Really remove bookmark comments for selected lines?", "LogExpert", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (MessageBox.Show(Resources.BookmarkWindow_UI_ReallyRemoveBookmarkCommentsForSelectedLines, Resources.LogExpert_Common_UI_Title_LogExpert, MessageBoxButtons.YesNo) == DialogResult.Yes) { foreach (DataGridViewRow row in bookmarkDataGridView.SelectedRows) { @@ -555,7 +564,7 @@ private void OnRemoveCommentsToolStripMenuItemClick (object sender, EventArgs e) private void OnCommentColumnCheckBoxCheckedChanged (object sender, EventArgs e) { - ShowCommentColumn(commentColumnCheckBox.Checked); + ShowCommentColumn(checkBoxCommentColumn.Checked); } private void BookmarkWindow_ClientSizeChanged (object sender, EventArgs e) diff --git a/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs b/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs index 1032342e..40c8f4e2 100644 --- a/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs +++ b/src/LogExpert.UI/Dialogs/Eminus/Eminus.cs @@ -191,7 +191,7 @@ public void MenuSelected (int linesCount, ILogLineColumnizer columnizer, ILogLin if (doc == null) { - _ = MessageBox.Show(Resources.Eminus_UI_CannotParseJavaStackTraceLine, Resources.Title_LogExpert); + _ = MessageBox.Show(Resources.Eminus_UI_CannotParseJavaStackTraceLine, Resources.LogExpert_Common_UI_Title_LogExpert); } else { @@ -209,7 +209,7 @@ or InvalidOperationException or ObjectDisposedException or XmlException) { - _ = MessageBox.Show(e.Message, Resources.Title_LogExpert); + _ = MessageBox.Show(e.Message, Resources.LogExpert_Common_UI_Title_LogExpert); } } } @@ -237,7 +237,7 @@ public void LoadConfig (string configDir) } catch (SerializationException e) { - _ = MessageBox.Show(e.Message, Resources.Title_LogExpert_Deserialize); + _ = MessageBox.Show(e.Message, Resources.LogExpert_Common_UI_Title_Deserialize); _config = new EminusConfig(); } } diff --git a/src/LogExpert.UI/Dialogs/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs index 25b3cd75..9cc5acc3 100644 --- a/src/LogExpert.UI/Dialogs/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/HighlightDialog.cs @@ -230,7 +230,7 @@ or UnauthorizedAccessException or PathTooLongException or NotSupportedException) { - _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsCouldNotBeImported, Resources.Title_LogExpert); + _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsCouldNotBeImported, Resources.LogExpert_Common_UI_Title_LogExpert); _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_FileAccessError, dlg.FileName, ex)); return; } @@ -242,7 +242,7 @@ or PathTooLongException FillGroupComboBox(); - _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsImported, Resources.Title_LogExpert); + _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsImported, Resources.LogExpert_Common_UI_Title_LogExpert); } @@ -503,7 +503,7 @@ or InvalidOperationException or SystemException) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry, ex)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message, Resources.Title_LogExpert_Error)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message, Resources.LogExpert_Common_UI_Title_Error)); } } } @@ -680,7 +680,7 @@ or InvalidOperationException or SystemException) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry, ex)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message, Resources.Title_LogExpert_Error)); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message, Resources.LogExpert_Common_UI_Title_Error)); } } diff --git a/src/LogExpert.UI/Dialogs/SettingsDialog.cs b/src/LogExpert.UI/Dialogs/SettingsDialog.cs index beb3c3d1..bf52e27b 100644 --- a/src/LogExpert.UI/Dialogs/SettingsDialog.cs +++ b/src/LogExpert.UI/Dialogs/SettingsDialog.cs @@ -950,7 +950,7 @@ or PathTooLongException or DirectoryNotFoundException or NotSupportedException) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_CouldNotCreatePortableMode, exception), Resources.Title_LogExpert_Error, MessageBoxButtons.OK); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_CouldNotCreatePortableMode, exception), Resources.LogExpert_Common_UI_Title_Error, MessageBoxButtons.OK); } } @@ -1127,14 +1127,14 @@ or SecurityException or NotSupportedException or UnauthorizedAccessException) { - _ = MessageBox.Show(this, string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_Error_SettingsCouldNotBeImported, ex), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(this, string.Format(CultureInfo.InvariantCulture, Resources.SettingsDialog_UI_Error_SettingsCouldNotBeImported, ex), Resources.LogExpert_Common_UI_Title_Error); return; } ConfigManager.Import(fileInfo, dlg.ImportFlags); Preferences = ConfigManager.Settings.Preferences; FillDialog(); - _ = MessageBox.Show(this, Resources.SettingsDialog_UI_SettingsImported, Resources.Title_LogExpert); + _ = MessageBox.Show(this, Resources.SettingsDialog_UI_SettingsImported, Resources.LogExpert_Common_UI_Title_LogExpert); } } diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index 2ab573f7..c2f8bfec 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -69,7 +69,7 @@ private static void Main (string[] args) } else { - _ = MessageBox.Show(Resources.Program_UI_Error_ConfigFileNotFound, Resources.Title_LogExpert); + _ = MessageBox.Show(Resources.Program_UI_Error_ConfigFileNotFound, Resources.LogExpert_Common_UI_Title_LogExpert); } } @@ -131,7 +131,7 @@ or ArgumentException if (counter == 0) { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_IPCChannel_ClientError, errMsg)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.LogExpert_Common_UI_Title_LogExpert); } //Dont create a new separated instance of LogExpert if the settings allows only one instance @@ -161,12 +161,12 @@ or ArgumentNullException { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_MutexError, ex)); cts.Cancel(); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.Title_LogExpert); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.LogExpert_Common_UI_Title_LogExpert); } } catch (SecurityException se) { - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_InsufficientRights, se.Message), Resources.Title_LogExpert_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_InsufficientRights, se.Message), Resources.LogExpert_Common_UI_Title_Error); cts.Cancel(); } } From 97b0944baf208c358f940d3686e129465c5390a4 Mon Sep 17 00:00:00 2001 From: Hirogen Date: Sun, 7 Sep 2025 14:54:40 +0200 Subject: [PATCH 35/38] readded logger strings, because they dont need to be localised --- src/LogExpert.Resources/Resources.Designer.cs | 1185 ++--------------- src/LogExpert.Resources/Resources.de.resx | 308 +---- src/LogExpert.Resources/Resources.resx | 309 +---- .../Controls/BufferedDataGridView.cs | 11 +- .../Controls/LogWindow/LogWindow.cs | 178 +-- .../Controls/LogWindow/RangeFinder.cs | 12 +- .../LogWindow/TimeSpreadCalculator.cs | 18 +- src/LogExpert.UI/Dialogs/HighlightDialog.cs | 3 - .../Dialogs/LogTabWindow/LogTabWindow.cs | 25 +- src/LogExpert/Classes/LogExpertProxy.cs | 9 +- src/LogExpert/Config/ConfigManager.cs | 28 +- src/LogExpert/Program.cs | 20 +- 12 files changed, 281 insertions(+), 1825 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 4e418299..2c6d5ad4 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -316,24 +316,6 @@ public static string BookmarkWindow_UI_ToolStripMenuItem_removeCommentsToolStrip } } - /// - /// Looks up a localized string similar to ClipRgn: {0},{1},{2},{3}. - /// - public static string BufferedDataGridView_Logger_Debug_PaintOverlays { - get { - return ResourceManager.GetString("BufferedDataGridView_Logger_Debug_PaintOverlays", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit control was null, to be checked. - /// - public static string BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked { - get { - return ResourceManager.GetString("BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -363,78 +345,6 @@ public static string ColorComboBox_UI_ColorComboBox_Text_Custom { } } - /// - /// Looks up a localized string similar to Access denied: {0}. - /// - public static string ConfigManager_Logger_Error_AccessDeniedExMessage { - get { - return ResourceManager.GetString("ConfigManager_Logger_Error_AccessDeniedExMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error while deserializing config data: {0}. - /// - public static string ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData { - get { - return ResourceManager.GetString("ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to File system error: {0}. - /// - public static string ConfigManager_Logger_Error_FileSystemErrorExMessage { - get { - return ResourceManager.GetString("ConfigManager_Logger_Error_FileSystemErrorExMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unexpected error: {0}. - /// - public static string ConfigManager_Logger_Error_UnexpectedErrorExMessage { - get { - return ResourceManager.GetString("ConfigManager_Logger_Error_UnexpectedErrorExMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Loading settings. - /// - public static string ConfigManager_Logger_Info_LoadingSettings { - get { - return ResourceManager.GetString("ConfigManager_Logger_Info_LoadingSettings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load settings portable mode. - /// - public static string ConfigManager_Logger_Info_LoadSettingsPortableMode { - get { - return ResourceManager.GetString("ConfigManager_Logger_Info_LoadSettingsPortableMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load settings standard mode. - /// - public static string ConfigManager_Logger_Info_LoadSettingsStandardMode { - get { - return ResourceManager.GetString("ConfigManager_Logger_Info_LoadSettingsStandardMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Saving settings. - /// - public static string ConfigManager_Logger_Info_SavingSettings { - get { - return ResourceManager.GetString("ConfigManager_Logger_Info_SavingSettings", resourceCulture); - } - } - /// /// Looks up a localized string similar to Timestamp selector. /// @@ -613,33 +523,6 @@ public static System.Drawing.Bitmap Folder_open { } } - /// - /// Looks up a localized string similar to Error during add of highlight entry: {0}. - /// - public static string HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry { - get { - return ResourceManager.GetString("HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error during save of save highlight entry: {0}. - /// - public static string HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry { - get { - return ResourceManager.GetString("HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error while trying to access file: {0}, exception: {1}. - /// - public static string HighlightDialog_Logger_Error_FileAccessError { - get { - return ResourceManager.GetString("HighlightDialog_Logger_Error_FileAccessError", resourceCulture); - } - } - /// /// Looks up a localized string similar to Regex value is null or whitespace. /// @@ -866,69 +749,6 @@ public static string LogExpert_Common_UI_Title_LogExpert { } } - /// - /// Looks up a localized string similar to Adding window to list. - /// - public static string LogExpertProxy_Logger_Info_AddWindow { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_AddWindow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Creating new LogTabWindow. - /// - public static string LogExpertProxy_Logger_Info_CreatingNewWindow { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_CreatingNewWindow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Last LogTabWindow was closed. - /// - public static string LogExpertProxy_Logger_Info_LastTabWindowClosed { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_LastTabWindowClosed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Loading files into existing LogTabWindow. - /// - public static string LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No windows left. New created window will be the new 'first' GUI window. - /// - public static string LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removing window from list. - /// - public static string LogExpertProxy_Logger_Info_RemoveWindow { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Info_RemoveWindow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to first GUI thread window is disposed. Setting a new one.. - /// - public static string LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne { - get { - return ResourceManager.GetString("LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne", resourceCulture); - } - } - /// /// Looks up a localized string similar to Error in {0}: {1}. /// @@ -948,90 +768,6 @@ public static System.Drawing.Bitmap LogLover { } } - /// - /// Looks up a localized string similar to Dropped formats: . - /// - public static string LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RegEx-error while finding columnizer: {0}. - /// - public static string LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dragging something over LogExpert. Formats: . - /// - public static string LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFormats { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFo" + - "rmats", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Starting external tool: {0} {1}. - /// - public static string LogTabWindow_Logger_Info_StartingExternalTool { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Info_StartingExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Starting external tool with sysout redirection: {0} {1}. - /// - public static string LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Layout data contains non-existing LogWindow for {0}. - /// - public static string LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogWindowForFileName { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogW" + - "indowForFileName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encoding {0} is not a valid encoding. - /// - public static string LogTabWindow_Logger_Warn_EncodingIsNotValid { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Warn_EncodingIsNotValid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Received SyncModeChanged event while disposing. Event ignored.. - /// - public static string LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventWhileDisposingEventIgnored { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventW" + - "hileDisposingEventIgnored", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The preferences have changed. - /// - public static string LogTabWindow_Logger_Warn_ThePreferencesHaveChanged { - get { - return ResourceManager.GetString("LogTabWindow_Logger_Warn_ThePreferencesHaveChanged", resourceCulture); - } - } - /// /// Looks up a localized string similar to This is a test exception thrown by the GUI thread. /// @@ -1760,846 +1496,369 @@ public static string LogTabWindow_UI_ToolStripMenuItem_newFromClipboardToolStrip /// public static string LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem { get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open URL.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Options. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reload. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Run GC. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save session.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Search.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Settings.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bookmark list. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show help. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Tab color.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Tab rename.... - /// - public static string LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Throw exception (background thread). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem" + - "", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Throw exception (Async delegate). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Throw exception (GUI Thread). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Timeshift. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Toggle Bookmark. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Tools. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Switches between foll row selection and single cell selection mode. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Close all tabs. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Close all tabs except of this one. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Splits various kinds of logfiles into fixed columns. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Copies all selected lines into a new tab page. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuI" + - "tem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The complete file name (incl. path) is copied to clipboard. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Opens an Explorer window and selects the log file. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load a saved session (list of log files). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to When enabled all new launched LogExpert instances will redirect to this window. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Creates a new tab with content from clipboard. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Opens a file by entering a URL which is supported by a file system plugin. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save a session (all open tabs). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sets the tab color. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Set the text which is shown on the tab. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to If supported by the columnizer, you can set an offset to the displayed log time. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Time offset (hh:mm:ss.fff). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Launch external tools (configure in the settings). - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Try to truncate the file opened in tab. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Truncate File. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to View/Navigate. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warn. - /// - public static string LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to +00:00:00.000. - /// - public static string LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox { - get { - return ResourceManager.GetString("LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2}. - /// - public static string LogWindow_Logger_Debug_AddBookmarkOverlays { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_AddBookmarkOverlays", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to GetTimestampForLine({0}) enter. - /// - public static string LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to GetTimestampForLine() leave with lineNum={0}. - /// - public static string LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Preventing reload because of recursive calls.. - /// - public static string LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reloading invoked.. - /// - public static string LogWindow_Logger_Debug_ReloadingInvoked { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_ReloadingInvoked", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Selection changed trigger. - /// - public static string LogWindow_Logger_Debug_SelectionChangedTrigger { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_SelectionChangedTrigger", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Setting columnizer {0}. - /// - public static string LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Found block: {0}. - /// - public static string LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to TestStatistic(): i={0} searchLine={1}. - /// - public static string LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2}. - /// - public static string LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover { - get { - return ResourceManager.GetString("LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error occured while clearing filter list: {0}. - /// - public static string LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList { - get { - return ResourceManager.GetString("LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error while deleting temp file {0}: {1}. - /// - public static string LogWindow_Logger_Error_CloseLogWindow_ErrorWhileDeletingTempFile { - get { - return ResourceManager.GetString("LogWindow_Logger_Error_CloseLogWindow_ErrorWhileDeletingTempFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error saving persistence: {0}. - /// - public static string LogWindow_Logger_Error_ErrorSavingPersistence { - get { - return ResourceManager.GetString("LogWindow_Logger_Error_ErrorSavingPersistence", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error in selectionChangedTrigger_Signal selcount {0}, Exception: {1}. + /// Looks up a localized string similar to Open URL.... /// - public static string LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount { + public static string LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_openURIToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error in UpdateProgress Callback: {0}. + /// Looks up a localized string similar to Options. /// - public static string LogWindow_Logger_Error_InUpdateProgressCallback { + public static string LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_InUpdateProgressCallback", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_optionToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Line count of event is: {0}, should be greater than last line count: {1}. + /// Looks up a localized string similar to Reload. /// - public static string LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount { + public static string LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_reloadToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error loading bookmarks: {0}. + /// Looks up a localized string similar to Run GC. /// - public static string LogWindow_Logger_Error_LoadingBookmarks { + public static string LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_LoadingBookmarks", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_runGCToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error loading persistence data: {0}. + /// Looks up a localized string similar to Save session.... /// - public static string LogWindow_Logger_Error_LoadingPersistenceData { + public static string LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_LoadingPersistenceData", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_saveProjectToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error LoadingStarted Callback: {0}. + /// Looks up a localized string similar to Search.... /// - public static string LogWindow_Logger_Error_LoadingStartedCallback { + public static string LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_LoadingStartedCallback", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_searchToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error while selecting line: {0}. + /// Looks up a localized string similar to Settings.... /// - public static string LogWindow_Logger_Error_SelectLine_WhileSelectingLine { + public static string LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_SelectLine_WhileSelectingLine", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_settingsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error setting splitter distance: {0}. + /// Looks up a localized string similar to Bookmark list. /// - public static string LogWindow_Logger_Error_SettingSplitterDistance { + public static string LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_SettingSplitterDistance", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showBookmarkListToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Error while resizing columns: {0}. + /// Looks up a localized string similar to Show help. /// - public static string LogWindow_Logger_Error_WhileResizingColumns { + public static string LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Error_WhileResizingColumns", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_showHelpToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Syncing window for {0} to {1}. + /// Looks up a localized string similar to Tab color.... /// - public static string LogWindow_Logger_Info_AddToTimeSync_SyncingWindow { + public static string LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_AddToTimeSync_SyncingWindow", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabColorToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Deleting temp file {0}. + /// Looks up a localized string similar to Tab rename.... /// - public static string LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile { + public static string LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_tabRenameToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Detected MultiFile name list in persistence options. + /// Looks up a localized string similar to Throw exception (background thread). /// - public static string LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions { + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionBackgroundThreadToolStripMenuItem" + + "", resourceCulture); } } /// - /// Looks up a localized string similar to {0} events in queue. + /// Looks up a localized string similar to Throw exception (Async delegate). /// - public static string LogWindow_Logger_Info_EventsInQueue { + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_EventsInQueue", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionbackgroundThToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to File loading complete.. + /// Looks up a localized string similar to Throw exception (GUI Thread). /// - public static string LogWindow_Logger_Info_FileLoadingComplete { + public static string LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_FileLoadingComplete", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_throwExceptionGUIThreadToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Single threaded filter duration: {0} ms.. + /// Looks up a localized string similar to Timeshift. /// - public static string LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration { + public static string LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_timeshiftToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Finished loading.. + /// Looks up a localized string similar to Toggle Bookmark. /// - public static string LogWindow_Logger_Info_FinishedLoading { + public static string LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_FinishedLoading", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toggleBookmarkToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to De-Syncing window for {0}. + /// Looks up a localized string similar to Tools. /// - public static string LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow { + public static string LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_toolsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Got FileSizeChanged event. prevLines:{0}, curr lines: {1}. + /// Looks up a localized string similar to Switches between foll row selection and single cell selection mode. /// - public static string LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1 { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_cellSelectModeToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Handling file not found event.. + /// Looks up a localized string similar to Close all tabs. /// - public static string LogWindow_Logger_Info_HandlingFileNotFoundEvent { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_HandlingFileNotFoundEvent", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeAllTabsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Loading logfile: {0}. + /// Looks up a localized string similar to Close all tabs except of this one. /// - public static string LogWindow_Logger_Info_LoadFile_LoadingLogfile { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_LoadFile_LoadingLogfile", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_closeOtherTabsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Picked new columnizer {0}. + /// Looks up a localized string similar to Splits various kinds of logfiles into fixed columns. /// - public static string LogWindow_Logger_Info_LoadFile_PickedNewColumnizer { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_LoadFile_PickedNewColumnizer", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_columnizerToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to LoadFilesAsMulti: File: {0}. + /// Looks up a localized string similar to Copies all selected lines into a new tab page. /// - public static string LogWindow_Logger_Info_LoadFilesAsMulti_FileName { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_LoadFilesAsMulti_FileName", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyMarkedLinesIntoNewTabToolStripMenuI" + + "tem", resourceCulture); } } /// - /// Looks up a localized string similar to Multi threaded filter duration: {0} ms.. + /// Looks up a localized string similar to The complete file name (incl. path) is copied to clipboard. /// - public static string LogWindow_Logger_Info_MultiThreadedFilter_Duration { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_MultiThreadedFilter_Duration", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_copyPathToClipboardToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to new File created.. + /// Looks up a localized string similar to Opens an Explorer window and selects the log file. /// - public static string LogWindow_Logger_Info_NewFileCreated { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_NewFileCreated", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_findInExplorerToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to No persistence data for {0} found.. + /// Looks up a localized string similar to Load a saved session (list of log files). /// - public static string LogWindow_Logger_Info_NoPersistenceDataForFileNameFound { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_NoPersistenceDataForFileNameFound", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_loadProjectToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Persistence data for {0} is outdated. It was discarded.. + /// Looks up a localized string similar to When enabled all new launched LogExpert instances will redirect to this window. /// - public static string LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_lockInstanceToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Refreshing filter view because of reload.. + /// Looks up a localized string similar to Treat multiple files as one large file (e.g. data.log, data.log.1, data.log.2,...). /// - public static string LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_multiFileToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Reloading file because it has been respawned.. + /// Looks up a localized string similar to Creates a new tab with content from clipboard. /// - public static string LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_newFromClipboardToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to ReloadNewFile(): counter = {0}. + /// Looks up a localized string similar to Opens a file by entering a URL which is supported by a file system plugin. /// - public static string LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_openURIToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to SetColumnizerInternal(): {0}. + /// Looks up a localized string similar to Save a session (all open tabs). /// - public static string LogWindow_Logger_Info_SetColumnizerInternal { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_SetColumnizerInternal", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_saveProjectToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Edit control in logWindow was null. + /// Looks up a localized string similar to Sets the tab color. /// - public static string LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabColorToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to TestStatistics() ended. + /// Looks up a localized string similar to Set the text which is shown on the tab. /// - public static string LogWindow_Logger_Info_TestStatistic_Ended { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_TestStatistic_Ended", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_tabRenameToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to TestStatistics() called with start line {0}. + /// Looks up a localized string similar to If supported by the columnizer, you can set an offset to the displayed log time. /// - public static string LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to SelStart: {0}, SelLen: {1}. + /// Looks up a localized string similar to Time offset (hh:mm:ss.fff). /// - public static string LogWindow_Logger_Info_UpdateEditColumnDisplay { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox { get { - return ResourceManager.GetString("LogWindow_Logger_Info_UpdateEditColumnDisplay", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_timeshiftToolStripTextBox", resourceCulture); } } /// - /// Looks up a localized string similar to UpdateGrid(): new RowCount={0}. + /// Looks up a localized string similar to Launch external tools (configure in the settings). /// - public static string LogWindow_Logger_Info_UpdateGridNewRowCount { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_UpdateGridNewRowCount", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_toolsToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Waiting for loading to be complete.. + /// Looks up a localized string similar to Try to truncate the file opened in tab. /// - public static string LogWindow_Logger_Info_WaitingForLoadingToBeComplete { + public static string LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_WaitingForLoadingToBeComplete", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_ToolTip_truncateFileToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Waiting for signal. + /// Looks up a localized string similar to Truncate File. /// - public static string LogWindow_Logger_Info_WaitingForSignal { + public static string LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_WaitingForSignal", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_truncateFileToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Wakeup signal received.. + /// Looks up a localized string similar to View/Navigate. /// - public static string LogWindow_Logger_Info_WakeupSignalReceived { + public static string LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Info_WakeupSignalReceived", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_viewNavigateToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to FilterRestore(): Columnizer {0} not found. + /// Looks up a localized string similar to Warn. /// - public static string LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound { + public static string LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem { get { - return ResourceManager.GetString("LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripMenuItem_warnToolStripMenuItem", resourceCulture); } } /// - /// Looks up a localized string similar to Unexpected issue truncating file: {0}. + /// Looks up a localized string similar to +00:00:00.000. /// - public static string LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage { + public static string LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox { get { - return ResourceManager.GetString("LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage", resourceCulture); + return ResourceManager.GetString("LogTabWindow_UI_ToolStripTextBox_timeshiftToolStripTextBox", resourceCulture); } } @@ -2927,6 +2186,15 @@ public static string LogWindow_UI_CopyMarkedLinesToTab_Copy { } } + /// + /// Looks up a localized string similar to Error occured while clearing filter list: {0}. + /// + public static string LogWindow_UI_Error_ClearFilterList_WhileClearingFilterList { + get { + return ResourceManager.GetString("LogWindow_UI_Error_ClearFilterList_WhileClearingFilterList", resourceCulture); + } + } + /// /// Looks up a localized string similar to Error while exporting bookmark list: {0}. /// @@ -3652,96 +2920,6 @@ public static System.Drawing.Bitmap Pro_Filter { } } - /// - /// Looks up a localized string similar to IpcClientChannel error, giving up: {0}. - /// - public static string Program_Logger_Error_IPCChannel_ClientError { - get { - return ResourceManager.GetString("Program_Logger_Error_IPCChannel_ClientError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IpcClientChannel error: {0}. - /// - public static string Program_Logger_Error_IPCChannel_ClientError_Default { - get { - return ResourceManager.GetString("Program_Logger_Error_IPCChannel_ClientError_Default", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Mutex error, giving up: {0}. - /// - public static string Program_Logger_Error_MutexError { - get { - return ResourceManager.GetString("Program_Logger_Error_MutexError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid payload command: null. - /// - public static string Program_Logger_Error_Payload_InvalidCommand { - get { - return ResourceManager.GetString("Program_Logger_Error_Payload_InvalidCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Timeout connecting to pipe server. - /// - public static string Program_Logger_Error_Pipe_TimeoutException { - get { - return ResourceManager.GetString("Program_Logger_Error_Pipe_TimeoutException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unknown IPC Message Type: {0}; with payload: {1}. - /// - public static string Program_Logger_Error_Pipe_UnknownIPCMessage { - get { - return ResourceManager.GetString("Program_Logger_Error_Pipe_UnknownIPCMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An I/O error occurred while connecting to the pipe server: {0}. - /// - public static string Program_Logger_Warn_Error_Pipe_IOException { - get { - return ResourceManager.GetString("Program_Logger_Warn_Error_Pipe_IOException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Pipe server error: {0}. - /// - public static string Program_Logger_Warn_Pipe_CommonError { - get { - return ResourceManager.GetString("Program_Logger_Warn_Pipe_CommonError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid Operation while connecting to the pipe server: {0}. - /// - public static string Program_Logger_Warn_Pipe_InvalidOperationException { - get { - return ResourceManager.GetString("Program_Logger_Warn_Pipe_InvalidOperationException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unauthorized access while connecting to the pipe server: {0}. - /// - public static string Program_Logger_Warn_Pipe_UnauthorizedAccessException { - get { - return ResourceManager.GetString("Program_Logger_Warn_Pipe_UnauthorizedAccessException", resourceCulture); - } - } - /// /// Looks up a localized string similar to Config file not found. /// @@ -3769,51 +2947,6 @@ public static string Program_UI_Error_Pipe_CannotConnectToFirstInstance { } } - /// - /// Looks up a localized string similar to Starting range search for {0} ... {1}. - /// - public static string RangeFinder_Logger_Info_FindRange { - get { - return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Range search finished. Found {0} lines. - /// - public static string RangeFinder_Logger_Info_FindRange_Finished { - get { - return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_Finished", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Range search text not set. Cancelling range search.. - /// - public static string RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch { - get { - return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Range start not found. - /// - public static string RangeFinder_Logger_Info_FindRange_RangeStartNotFound { - get { - return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_RangeStartNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Search text not set. Cancelling range search.. - /// - public static string RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch { - get { - return ResourceManager.GetString("RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -4881,60 +4014,6 @@ public static System.Drawing.Bitmap Star { } } - /// - /// Looks up a localized string similar to Test time {0} line diff={1} value={2}. - /// - public static string TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Collecting data for {0} lines with step size {1}. - /// - public static string TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Average diff={0} minDiff={1} maxDiff={2}. - /// - public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to End because of line count < 1. - /// - public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Test time {0} line diff={1}. - /// - public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Time range is {0} ms. - /// - public static string TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs { - get { - return ResourceManager.GetString("TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs", resourceCulture); - } - } - /// /// Looks up a localized string similar to Calculating time spread view.... /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 30e5c793..142837bd 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -217,63 +217,12 @@ LogExpert Fehler - - Beim versuch den Pipe-Server zu erreichen kam es zu einem Timeoutfehler - - - Beim Versuch den Pipe-Server zu erreich kam es zu einem I/O Fehler: {0} - - - Beim Versuch den Pipe-Server zu erreich kam es zu einem Zugriffsfehler: {0} - - - Pipeserver Fehler: {0} - - - Falsche Payload: null - Die Verbindung zur ersten Instanz kann nicht geöffnet werden: {0} - - Problem beim Mutex, Program wird beendet: {0} - - - Fehler des IPC Client Channels, Program wird beendet: {0} - - - Fehler des IPC Client Channels: {0} - - - Eine invalide Operation wurde durchgeführt, während des Verbindungsversuches zum Pipeserver: {0} - - - Laden der Dateien in einen existierendes LogTabWindow - - - Erstes Fenster wurde geschlossen. Ein neues wird erstellt. - - - Kein offenes Fenster übrig. Ein neues Fenster wird erstellt es wird als primäres GUI Fenster benutzt - - - Neues LogTabWindow erstellen - - - Das letzte LogTabWindow wurde geschlossen - - - Fenster wird zur Liste hinzugefügt - - - Fenster wird aus der Liste entfernt - Einstellungen importiert - - Fehler während des Zugriffes auf die Datei: {0}, Fehlermeldung: {1} - Einstellungen konnte nicht importiert werden: {0} @@ -289,9 +238,6 @@ Neue Gruppe - - Fehler während des Hinzufügens eines Highlighteintrages: {0} - Fehler während des Hinzufügens eines Highlighteintrages. {0} @@ -302,36 +248,9 @@ [Default] - - Während des Speichern des Highlighteintrages ist ein Fehler aufgetreten: {0} - Während des Speichern des Highlighteintrages ist ein Fehler aufgetreten: {0} - - Laden der Einstellungen - - - Laden der Einstellungen im Standard Modus - - - Laden der Einstellungen im portablen Modus - - - Filesystem Fehler: {0} - - - Zugriff verweigert: {0} - - - Unerwarteter Fehler: {0} - - - Fehler während der Deserialisierung der Konfigurationsdaten: {0} - - - Speichern der Einstellungen - Zeile @@ -701,168 +620,9 @@ Öffne einen neuen Tab mit dem gefilterten Bereich - - Unerwartetes Problem beim abschneiden der Datei: {0} - - - FilterRestore(): Columnizer {0} nicht gefunden - - - Aufwachsignal erhalten. - - - Warten auf Signal - - - Warten bis das Laden abgeschlossen ist. - - - UpdateGrid(): neue Spaltenanzahl={0} - - - SelStart: {0}, SelLen: {1} - - - TestStatistics() aufgerufen mit Startzeile {0} - - - TestStatistics() beendet - - - Dialog im LogWindow war NULL - - - SetColumnizerInternal(): {0} - - - ReloadNewFile(): Anzahl = {0} - - - Datei neu laden, weil diese neu erstellt wurde. - - - AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2} - - - GetTimestampForLine({0}) Funktionsaufruf - - - GetTimestampForLine() verlasse Funktion mit Zeilennummer ={0} - - - Verhindern des Neuladens aufgrund von Rekursivenaufrufen. - - - Neuladen angeworfen. - - - Selection changed trigger - - - Einstellungen Columnizer {0} - - - Gefundener block: {0} - - - TestStatistic(): i={0} searchLine={1} - - - UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2} - - + Fehler während des Löschens der Filterliste: {0} - - Fehler während des Löschens der temporären Datei {0}: {1} - - - Fehler während des Speicherns der persistierten Daten: {0} - - - Fehler im, selectionChangedTrigger_Signal selcount {0}, Fehlermeldung: {1} - - - Fehler im UpdateProgress Callback: {0} - - - Zeilenanzahl des Events: {0}, sollte größer als die letzte Zeilenanzahl sein: {1} - - - Filteranzeige neuladen weil die Filter neugeladen wurden. - - - Persistierte Daten {0} sind nicht mehr aktuell. Sind verworfen worden. - - - Keine Persistierten Daten gefunden. {0}. - - - neue Datei erstellt. - - - Zeit der Multi-Thread Filterung {0} in ms. - - - LoadFilesAsMulti: Datei: {0} - - - Neuer Columnizer ausgewählt: {0} - - - Laden der Logdatei: {0} - - - Datei nicht gefunden Event wird behandelt. - - - Dateigröße hat sich geändert. prevLines:{0}, curr lines: {1} - - - Desynchronisierung des Fensters {0} - - - Laden erledigt. - - - Zeit der Single-Thread Filterung {0} in ms. - - - Datei laden erledigt. - - - {0} Events in der Warteschlange - - - MultiDateiname in den Persistierten Daten gefunden - - - Löschen der temporären Datei {0} - - - Synchronisierung des Fenster von {0} zu {1} - - - Fehler während der Vergrößerung der Spalten {0} - - - Fehler während die Splitterdistanz verändert wurde {0} - - - Fehler während des selektierens der Zeile: {0} - - - Fehler im LoadingStarted Callback {0} - - - Fehler während des Ladens der persistierten Daten {0} - - - Fehler während des Ladens der Lesezeichen {0} - - - RegEx-Fehler während der Suche eines Columnizers: {0} - (Invertiere Match) @@ -879,9 +639,6 @@ Spalten restriktion Eingfügt am {0} - - Encoding {0} ist nicht valide - Unzureichende Rechte {0}: {1} @@ -894,15 +651,6 @@ Spalten restriktion Linien - - Die Einstellungen haben sich geändert - - - Starten eines externen Tools mit sysout Redirektion: {0} {1} - - - Starten eines externen Tools: {0} {1} - ->E @@ -912,27 +660,12 @@ Spalten restriktion Das ist eine Test Fehlermeldung, geworfen durch einen Hintergrund Thread - - Layoutdaten besitz ein nicht existierendes LogWindow für {0} - - - Über Logexpert etwas ziehen. Formate: - - - Fallengelassene Formate: - - - Ein SyncModeChanged Event erhalten während Disposed wurde. Event wird Ignoriert. - LogExpert Session {0} Das ist eine Test Fehlermeldung, geworfen durch den GUI Thread - - Unbekannte IPC Nachricht Type: {0}; mit payload: {1} - Maximale Anzahl an Filtereinträge die angezeigt werden @@ -1342,24 +1075,6 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Zeitstempel selektieren - - Start Bereichsuche von {0} ... {1} - - - Text für die Bereichssuche nicht gesetzt. Abbrechen der Breichssuche. - - - Suchtext nicht gesetzt. Abbrechen der Bereichssuche. - - - Bereichsstart nicht gefunden - - - Bereichssuche beendet. Gefundene {0} Zeilen - - - Ende aufgrund einer Zeilenanzahl kleiner 1 - Info @@ -1435,21 +1150,6 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Zu Tab kopieren - - Daten sammeln für {0} Zeilen mit Schrittgröße {1} - - - Zeitbereich in {0} ms - - - Testzeit {0} Zeile differenz = {1} - - - Durschnittliche diff={0} minDiff={1} maxDiff={2} - - - Testzeit {0} Zeile differenz = {1} wert={2} - Berechne Zeitstreuungsanzeige... @@ -1457,12 +1157,6 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Zeile{0} {1} - - Editierobjekt war NULL, sollte überprüft werden - - - ClipRgn: {0},{1},{2},{3} - Custom diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index 330e02c8..fb7bb4f7 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -222,67 +222,12 @@ LogExpert Error LogExpert Error Title - - Timeout connecting to pipe server - Timeout Exception thrown from the Named Pipe - - - An I/O error occurred while connecting to the pipe server: {0} - - - Unauthorized access while connecting to the pipe server: {0} - - - Pipe server error: {0} - - - Invalid payload command: null - - - Unknown IPC Message Type: {0}; with payload: {1} - Cannot open connection to first instance ({0}) - - Mutex error, giving up: {0} - - - IpcClientChannel error, giving up: {0} - - - IpcClientChannel error: {0} - - - Invalid Operation while connecting to the pipe server: {0} - - - Loading files into existing LogTabWindow - - - first GUI thread window is disposed. Setting a new one. - - - No windows left. New created window will be the new 'first' GUI window - - - Creating new LogTabWindow - - - Last LogTabWindow was closed - - - Adding window to list - - - Removing window from list - Settings imported - - Error while trying to access file: {0}, exception: {1} - Settings could not be imported: {0} @@ -298,9 +243,6 @@ New group - - Error during add of highlight entry: {0} - Error during add of entry. {0} @@ -311,36 +253,9 @@ [Default] - - Error during save of save highlight entry: {0} - Error during save of entry.\r\n{0} - - Loading settings - - - Load settings standard mode - - - Load settings portable mode - - - File system error: {0} - - - Access denied: {0} - - - Unexpected error: {0} - - - Error while deserializing config data: {0} - - - Saving settings - No processes are locking the path specified @@ -362,63 +277,18 @@ Line - - Setting columnizer {0} - - - Finished loading. - - - Refreshing filter view because of reload. - - - Handling file not found event. - Sure to close? - - new File created. - - - Reloading invoked. - - - Got FileSizeChanged event. prevLines:{0}, curr lines: {1} - - - Selection changed trigger - {0} selected lines - - Error in selectionChangedTrigger_Signal selcount {0}, Exception: {1} - Frozen Freeze left columns until here ({0}) - - No persistence data for {0} found. - - - Detected MultiFile name list in persistence options - - - Error loading persistence data: {0} - - - Error loading bookmarks: {0} - - - Persistence data for {0} is outdated. It was discarded. - - - Error setting splitter distance: {0} - Invalid regular expression @@ -428,57 +298,12 @@ File not found - - Reloading file because it has been respawned. - - - Preventing reload because of recursive calls. - - - ReloadNewFile(): counter = {0} - - - Waiting for loading to be complete. - - - Error in UpdateProgress Callback: {0} - Loading {0} - - Error LoadingStarted Callback: {0} - - - File loading complete. - - - Waiting for signal - - - Wakeup signal received. - - - {0} events in queue - - - Line count of event is: {0}, should be greater than last line count: {1} - - - UpdateGrid(): new RowCount={0} - - - UpdateGrid(): Rollover=true, Rollover offset={0}, currLineNum was {1}, new currLineNum={2} - Error in {0}: {1} - - SetColumnizerInternal(): {0} - - - Error while resizing columns: {0} - Time diff is {0} @@ -512,12 +337,6 @@ Choose a file to save bookmarks into - - GetTimestampForLine({0}) enter - - - GetTimestampForLine() leave with lineNum={0} - {0}->Clip @@ -527,58 +346,19 @@ There's a comment attached to the bookmark. Really remove the bookmark? - - AddBookmarkOverlay() r.Location={0}, width={1}, scroll_offset={2} - Unexpected issue truncating file - - Unexpected issue truncating file: {0} - Truncate failed: file is locked by {0} - - Error while deleting temp file {0}: {1} - - - Deleting temp file {0} - - - Error saving persistence: {0} - Unexpected error while saving persistence: {0} - - LoadFilesAsMulti: File: {0} - - - Picked new columnizer {0} - - - Loading logfile: {0} - Cannot load file {0} - - TestStatistics() called with start line {0} - - - TestStatistic(): i={0} searchLine={1} - - - Found block: {0} - - - TestStatistics() ended - - - FilterRestore(): Columnizer {0} not found - Writing to temp file... Press ESC to cancel. @@ -591,7 +371,7 @@ Show advanced... - + Error occured while clearing filter list: {0} @@ -600,41 +380,20 @@ Search result not found - - Error while selecting line: {0} - Exception while filtering. Please report to developer: {0} {1} - - Single threaded filter duration: {0} ms. - Filter duration: {0} ms. - - Multi threaded filter duration: {0} ms. - Filtering... Press ESC to cancel. {0} - - SelStart: {0}, SelLen: {1} - - - Edit control in logWindow was null - - - De-Syncing window for {0} - - - Syncing window for {0} to {1} - Select column to scroll to @@ -869,9 +628,6 @@ Search string for the filter - - RegEx-error while finding columnizer: {0} - (Invert match) @@ -888,9 +644,6 @@ Column restrict Pasted on {0} - - Encoding {0} is not a valid encoding - Insufficient rights {0}: {1} @@ -903,15 +656,6 @@ Column restrict Line - - The preferences have changed - - - Starting external tool with sysout redirection: {0} {1} - - - Starting external tool: {0} {1} - ->E @@ -921,18 +665,6 @@ Column restrict This is a test exception thrown by a background thread - - Layout data contains non-existing LogWindow for {0} - - - Dragging something over LogExpert. Formats: - - - Dropped formats: - - - Received SyncModeChanged event while disposing. Event ignored. - LogExpert session {0} @@ -1345,39 +1077,6 @@ Checked tools will appear in the icon bar. All other tools are available in the Timestamp selector - - Starting range search for {0} ... {1} - - - Range search text not set. Cancelling range search. - - - Search text not set. Cancelling range search. - - - Range start not found - - - Range search finished. Found {0} lines - - - End because of line count < 1 - - - Collecting data for {0} lines with step size {1} - - - Time range is {0} ms - - - Test time {0} line diff={1} - - - Average diff={0} minDiff={1} maxDiff={2} - - - Test time {0} line diff={1} value={2} - Calculating time spread view... @@ -1385,12 +1084,6 @@ Checked tools will appear in the icon bar. All other tools are available in the Line {0} {1} - - Edit control was null, to be checked - - - ClipRgn: {0},{1},{2},{3} - Custom diff --git a/src/LogExpert.UI/Controls/BufferedDataGridView.cs b/src/LogExpert.UI/Controls/BufferedDataGridView.cs index b5ed5258..d2f557da 100644 --- a/src/LogExpert.UI/Controls/BufferedDataGridView.cs +++ b/src/LogExpert.UI/Controls/BufferedDataGridView.cs @@ -1,5 +1,4 @@ using System.Drawing.Drawing2D; -using System.Globalization; using System.Runtime.Versioning; using LogExpert.Core.Entities; @@ -260,7 +259,7 @@ private void PaintOverlays (PaintEventArgs e) if (_logger.IsDebugEnabled) { - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.BufferedDataGridView_Logger_Debug_PaintOverlays, myBuffer.Graphics.ClipBounds.Left, myBuffer.Graphics.ClipBounds.Top, myBuffer.Graphics.ClipBounds.Width, myBuffer.Graphics.ClipBounds.Height)); + _logger.Debug($"### PaintOverlays: {myBuffer.Graphics.ClipBounds.Left},{myBuffer.Graphics.ClipBounds.Top},{myBuffer.Graphics.ClipBounds.Width},{myBuffer.Graphics.ClipBounds.Height}"); } } } @@ -319,10 +318,10 @@ private void OnControlKeyDown (object sender, KeyEventArgs e) editControl.EditingControlDataGridView.HorizontalScrollingOffset = scrollIndex; e.Handled = true; } - else - { - _logger.Warn(Resources.BufferedDataGridView_Logger_Warn_OnControlKeyDown_EditControlWasNullToBeChecked); - } + //else + //{ + // _logger.Warn($"Edit control was null, to be checked"); + //} } } } diff --git a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs index 253c178d..55046ec5 100644 --- a/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert.UI/Controls/LogWindow/LogWindow.cs @@ -328,7 +328,7 @@ private set lock (_currentColumnizerLock) { _currentColumnizer = value; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_SettingColumnizer_currentColumnizerGetName, _currentColumnizer.GetName())); + _logger.Debug($"Setting columnizer {_currentColumnizer.GetName()}"); } } } @@ -783,7 +783,7 @@ private void OnLogFileReaderLoadingStarted (object sender, LoadFileEventArgs e) private void OnLogFileReaderFinishedLoading (object sender, EventArgs e) { //Thread.CurrentThread.Name = "FinishedLoading event thread"; - _logger.Info(Resources.LogWindow_Logger_Info_FinishedLoading); + //_logger.Info($"Finished loading."); _isLoading = false; _isDeadFile = false; if (!_waitingForClose) @@ -802,7 +802,7 @@ private void OnLogFileReaderFinishedLoading (object sender, EventArgs e) if (filterTailCheckBox.Checked) { - _logger.Info(Resources.LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload); + //_logger.Info("Refreshing filter view because of reload."); _ = Invoke(new MethodInvoker(FilterSearch)); // call on proper thread } @@ -817,7 +817,7 @@ private void OnLogFileReaderFileNotFound (object sender, EventArgs e) { if (!IsDisposed && !Disposing) { - _logger.Info(Resources.LogWindow_Logger_Info_HandlingFileNotFoundEvent); + //_logger.Info($"Handling file not found event."); _isDeadFile = true; _ = BeginInvoke(new MethodInvoker(LogfileDead)); } @@ -860,7 +860,7 @@ private void OnLogFileReaderLoadFile (object sender, LoadFileEventArgs e) { if (e.NewFile) { - _logger.Info(Resources.LogWindow_Logger_Info_NewFileCreated); + //_logger.Info("OnLogFileReaderLoadFile: New File created."); // File was new created (e.g. rollover) _isDeadFile = false; @@ -870,7 +870,7 @@ private void OnLogFileReaderLoadFile (object sender, LoadFileEventArgs e) _ = BeginInvoke(invoker); //Thread loadThread = new Thread(new ThreadStart(ReloadNewFile)); //loadThread.Start(); - _logger.Debug(Resources.LogWindow_Logger_Debug_ReloadingInvoked); + //_logger.Debug("OnLogFileReaderLoadFile: Reloading invoked."); } else if (_isLoading) { @@ -881,7 +881,7 @@ private void OnLogFileReaderLoadFile (object sender, LoadFileEventArgs e) private void OnFileSizeChanged (object sender, LogEventArgs e) { //OnFileSizeChanged(e); // now done in UpdateGrid() - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_GotFileSizeChangedEventPrevLines0CurrLines1, e.PrevLineCount, e.LineCount)); + //_logger.Info($"Got FileSizeChanged event. prevLines:{e.PrevLineCount}, curr lines: {e.LineCount}"); // - now done in the thread that works on the event args list //if (e.IsRollover) @@ -1243,7 +1243,7 @@ private void OnSelectionChangedTriggerSignal (object sender, EventArgs e) var selCount = 0; try { - _logger.Debug(Resources.LogWindow_Logger_Debug_SelectionChangedTrigger); + //_logger.Debug("OnSelectionChangedTriggerSignal: Selection changed trigger"); selCount = dataGridView.SelectedRows.Count; if (selCount > 1) { @@ -1264,7 +1264,7 @@ private void OnSelectionChangedTriggerSignal (object sender, EventArgs e) } catch (Exception ex) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_InSelectionChangedTrigger_SignalSelcount, selCount, ex)); + _logger.Error($"Error in selectionChangedTrigger_Signal selcount {selCount}, Exception: {ex}"); } } @@ -2352,7 +2352,7 @@ private bool LoadPersistenceOptions () if (persistenceData == null) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_NoPersistenceDataForFileNameFound, FileName)); + //_logger.Info($"No persistence data for {FileName} found."); return false; } @@ -2389,7 +2389,7 @@ private bool LoadPersistenceOptions () if (persistenceData.MultiFileNames.Count > 0) { - _logger.Info(Resources.LogWindow_Logger_Info_DetectedMultiFileNameListInPersistenceOptions); + //_logger.Info($"Detected MultiFile name list in persistence options"); _fileNames = new string[persistenceData.MultiFileNames.Count]; persistenceData.MultiFileNames.CopyTo(_fileNames); } @@ -2452,7 +2452,7 @@ private void LoadPersistenceData () { // outdated persistence data (logfile rollover) // MessageBox.Show(this, "Persistence data for " + this.FileName + " is outdated. It was discarded.", "Log Expert"); - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_PersistenceDataForFileNameIsOutdatedItWasDiscarded, FileName)); + //_logger.Info($"Persistence data for {FileName} is outdated. It was discarded.")); _ = LoadPersistenceOptions(); return; } @@ -2511,7 +2511,7 @@ private void RestoreFilters (PersistenceData persistenceData) ReInitFilterParams(_filterParams); } - ApplyFilterParams(); // re-loaded filter settingss + ApplyFilterParams(); // re-loaded filter settings _ = BeginInvoke(new MethodInvoker(FilterSearch)); try @@ -2521,7 +2521,7 @@ private void RestoreFilters (PersistenceData persistenceData) } catch (InvalidOperationException e) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SettingSplitterDistance, e)); + _logger.Error($"Error setting splitter distance: {e}"); } ShowAdvancedFilterPanel(persistenceData.FilterAdvanced); @@ -2549,7 +2549,7 @@ private void RestoreFilterTabs (PersistenceData persistenceData) private void ReInitFilterParams (FilterParams filterParams) { filterParams.SearchText = filterParams.SearchText; // init "lowerSearchText" - filterParams.RangeSearchText = filterParams.RangeSearchText; // init "lowerRangesearchText" + filterParams.RangeSearchText = filterParams.RangeSearchText; // init "lowerRangeSearchText" filterParams.CurrentColumnizer = CurrentColumnizer; if (filterParams.IsRegex) { @@ -2634,7 +2634,7 @@ private void LogfileDead () [SupportedOSPlatform("windows")] private void LogfileRespawned () { - _logger.Info(Resources.LogWindow_Logger_Info_ReloadingFileBecauseItHasBeenRespawned); + //_logger.Info($"Reloading file because it has been respawned."); _isDeadFile = false; dataGridView.Enabled = true; StatusLineText(string.Empty); @@ -2733,7 +2733,7 @@ private void ReloadNewFile () lock (_reloadLock) { _reloadOverloadCounter++; - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_ReloadNewFileCounter_reloadOverloadCounter, _reloadOverloadCounter)); + //_logger.Info($"ReloadNewFile(): counter = {_reloadOverloadCounter}"); if (_reloadOverloadCounter <= 1) { SavePersistenceData(false); @@ -2751,17 +2751,17 @@ private void ReloadNewFile () //if (this.filterTailCheckBox.Checked) //{ - // _logger.logDebug("Waiting for loading to be complete."); + // _logger.Debug($"Waiting for loading to be complete."); // loadingFinishedEvent.WaitOne(); - // _logger.logDebug("Refreshing filter view because of reload."); + // _logger.Debug($"Refreshing filter view because of reload."); // FilterSearch(); //} //LoadFilterPipes(); } - else - { - _logger.Debug(Resources.LogWindow_Logger_Debug_PreventingReloadBecauseOfRecursiveCalls); - } + //else + //{ + // //_logger.Debug($"Preventing reload because of recursive calls."); + //} _reloadOverloadCounter--; } @@ -2770,9 +2770,9 @@ private void ReloadNewFile () [SupportedOSPlatform("windows")] private void ReloadFinishedThreadFx () { - _logger.Info(Resources.LogWindow_Logger_Info_WaitingForLoadingToBeComplete); + //_logger.Info($"Waiting for loading to be complete."); _ = _loadingFinishedEvent.WaitOne(); - _logger.Info(Resources.LogWindow_Logger_Info_RefreshingFilterViewBecauseOfReload); + //_logger.Info("Refreshing filter view because of reload."); _ = Invoke(new MethodInvoker(FilterSearch)); LoadFilterPipes(); } @@ -2820,7 +2820,7 @@ private void LoadingStarted (LoadFileEventArgs loadFileEventArgs) private void LoadingFinished () { - _logger.Info(Resources.LogWindow_Logger_Info_FileLoadingComplete); + //_logger.Info($"File loading complete."); StatusLineText(string.Empty); _logFileReader.FileSizeChanged += OnFileSizeChanged; @@ -2860,16 +2860,16 @@ private void LogEventWorker () Thread.CurrentThread.Name = "LogEventWorker"; while (true) { - _logger.Debug(Resources.LogWindow_Logger_Info_WaitingForSignal); + //_logger.Debug($"Waiting for signal"); _ = _logEventArgsEvent.WaitOne(); - _logger.Debug(Resources.LogWindow_Logger_Info_WakeupSignalReceived); + //_logger.Debug($"Wakeup signal received."); while (true) { LogEventArgs e; - var lastLineCount = 0; + //var lastLineCount = 0; lock (_logEventArgsList) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_EventsInQueue, _logEventArgsList.Count)); + //_logger.Info($"{_logEventArgsList.Count} events in queue"); if (_logEventArgsList.Count == 0) { _ = _logEventArgsEvent.Reset(); @@ -2885,15 +2885,15 @@ private void LogEventWorker () ShiftBookmarks(e.RolloverOffset); ShiftRowHeightList(e.RolloverOffset); ShiftFilterPipes(e.RolloverOffset); - lastLineCount = 0; - } - else - { - if (e.LineCount < lastLineCount) - { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_LineCountOfEventIsShouldBeGreaterThanLastLineCount, e.LineCount, lastLineCount)); - } + //lastLineCount = 0; } + //else + //{ + // if (e.LineCount < lastLineCount) + // { + // _logger.Error($"Line count of event is: {e.LineCount}, should be greater than last line count: {lastLineCount}")); + // } + //} _ = Invoke(UpdateGrid, [e]); CheckFilterAndHighlight(e); @@ -2948,7 +2948,7 @@ private void UpdateGrid (LogEventArgs logEventArgs) dataGridView.RowCount = logEventArgs.LineCount; } - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_UpdateGridNewRowCount, dataGridView.RowCount)); + //_logger.Debug($"UpdateGrid(): new RowCount={dataGridView.RowCount}"); if (logEventArgs.IsRollover) { @@ -2963,7 +2963,7 @@ private void UpdateGrid (LogEventArgs logEventArgs) currentLineNum = 0; } - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_UpdateGridRolloverTrueRollover, logEventArgs.RolloverOffset, dataGridView.CurrentCellAddress.Y, currentLineNum)); + //_logger.Debug($"UpdateGrid(): Rollover=true, Rollover offset={logEventArgs.RolloverOffset}, currLineNum was {dataGridView.CurrentCellAddress.Y}, new currLineNum={currentLineNum}"); firstDisplayedLine -= logEventArgs.RolloverOffset; if (firstDisplayedLine < 0) { @@ -3179,7 +3179,7 @@ private void SetColumnizer (ILogLineColumnizer columnizer) private void SetColumnizerInternal (ILogLineColumnizer columnizer) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_SetColumnizerInternal, columnizer.GetName())); + //_logger.Info($"SetColumnizerInternal(): {columnizer.GetName()}"); var oldColumnizer = CurrentColumnizer; var oldColumnizerIsXmlType = CurrentColumnizer is ILogLineXmlColumnizer; @@ -3339,7 +3339,7 @@ private void AutoResizeColumns (BufferedDataGridView gridView) // possible solution => https://stackoverflow.com/questions/36287553/nullreferenceexception-when-trying-to-set-datagridview-column-width-brings-th // There are some rare situations with null ref exceptions when resizing columns and on filter finished // So catch them here. Better than crashing. - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_WhileResizingColumns, e)); + _logger.Error($"Error while resizing columns: {e}"); } } @@ -3973,12 +3973,12 @@ private void SelectLine (int lineNum, bool triggerSyncCall, bool shouldScroll) } catch (ArgumentOutOfRangeException e) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SelectLine_WhileSelectingLine, e)); + _logger.Error($"### SelectLine: Error while selecting line: {e}"); } catch (IndexOutOfRangeException e) { - // Occures sometimes (but cannot reproduce) - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_SelectLine_WhileSelectingLine, e)); + // Occurs sometimes (but cannot reproduce) + _logger.Error($"### SelectLine: Error while selecting line: {e}"); } } @@ -3999,10 +3999,10 @@ private void StartEditMode () dataGridView.CellEndEdit += OnDataGridViewCellEndEdit; editControl.SelectionStart = 0; } - else - { - _logger.Warn(Resources.LogWindow_Logger_Info_StartEditMode_EditControlInLogWindowWasNull); - } + //else + //{ + // _logger.Warn($"Edit control in logWindow was null"); + //} } } } @@ -4015,7 +4015,7 @@ private void UpdateEditColumnDisplay (DataGridViewTextBoxEditingControl editCont { var pos = editControl.SelectionStart + editControl.SelectionLength; StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_UpdateEditColumnDisplay, pos)); - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_UpdateEditColumnDisplay, editControl.SelectionStart, editControl.SelectionLength)); + //_logger.Debug($"### UpdateEditColumnDisplay: SelStart: {editControl.SelectionStart}, SelLen: {editControl.SelectionLength}")); } } @@ -4321,7 +4321,7 @@ private void MultiThreadedFilter (FilterParams filterParams, List filterRes long endTime = Environment.TickCount; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_MultiThreadedFilter_Duration, endTime - startTime)); + //_logger.Debug($"Multi threaded filter duration: {endTime - startTime} ms.")); OnDeRegisterCancelHandler(cancelHandler); StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_Filter_FilterDurationMs, endTime - startTime)); @@ -4376,7 +4376,7 @@ private void Filter (FilterParams filterParams, List filterResultLines, Lis long endTime = Environment.TickCount; - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_Filter_SingleThreadedFilterDuration, endTime - startTime)); + //_logger.Info($"Single threaded filter duration: {endTime - startTime} ms.")); StatusLineText(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_StatusLineText_Filter_FilterDurationMs, endTime - startTime)); } @@ -4633,7 +4633,7 @@ private void ClearFilterList () { _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Logger_Error_In_Function, nameof(ClearFilterList), e)); - _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Error_ClearFilterList_WhileClearingFilterList, e), Resources.LogExpert_Common_UI_Title_Error); + _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_UI_Error_ClearFilterList_WhileClearingFilterList, e), Resources.LogExpert_Common_UI_Title_Error); } } @@ -5039,10 +5039,10 @@ private static void FilterRestore (LogWindow newWin, PersistenceData persistence SetColumnizerFx fx = newWin.ForceColumnizer; _ = newWin.Invoke(fx, [columnizer]); } - else - { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Warn_FilterRestore_ColumnizerNameNotFound, persistenceData.ColumnizerName)); - } + //else + //{ + // _logger.Warn($"FilterRestore(): Columnizer {persistenceData.ColumnizerName} not found")); + //} _ = newWin.BeginInvoke(new RestoreFiltersFx(newWin.RestoreFilters), [persistenceData]); } @@ -5334,7 +5334,7 @@ private void InitPatternWindow () private void TestStatistic (PatternArgs patternArgs) { var beginLine = patternArgs.StartLine; - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_TestStatistic_TestStatisticsCalledWithStartLine, beginLine)); + //_logger.Info($"### TestStatistics: called with start line {beginLine}"); _patternArgs = patternArgs; @@ -5365,17 +5365,21 @@ private void TestStatistic (PatternArgs patternArgs) PatternBlock block; var maxBlockLen = patternArgs.EndLine - patternArgs.StartLine; //int searchLine = i + 1; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_TestStatistic_TestStatisticDebugInfo, i, searchLine)); + //_logger.Debug($"TestStatistic(): i={i} searchLine={searchLine}"); //bool firstBlock = true; searchLine++; UpdateProgressBar(searchLine); while (!_shouldCancel && (block = - DetectBlock(i, searchLine, maxBlockLen, _patternArgs.MaxDiffInBlock, - _patternArgs.MaxMisses, - processedLinesDict)) != null) - { - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_TestStatistic_DebugInfo_FoundBlock, block)); + DetectBlock(i, + searchLine, + maxBlockLen, + _patternArgs.MaxDiffInBlock, + _patternArgs.MaxMisses, + processedLinesDict) + ) != null) + { + //_logger.Debug($"Found block: {block}"); if (block.Weigth >= _patternArgs.MinWeight) { //PatternBlock existingBlock = FindExistingBlock(block, blockList); @@ -5421,7 +5425,6 @@ private void TestStatistic (PatternArgs patternArgs) // this.Invoke(new MethodInvoker(CreatePatternWindow)); //} _patternWindow.SetBlockList(blockList, _patternArgs); - _logger.Info(Resources.LogWindow_Logger_Info_TestStatistic_Ended); } private static void AddBlockTargetLinesToDict (Dictionary dict, PatternBlock block) @@ -6107,7 +6110,7 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) _logFileReader.PreProcessColumnizer = CurrentColumnizer is IPreProcessColumnizer processColumnizer ? processColumnizer : null; RegisterLogFileReaderEvents(); - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFile_LoadingLogfile, fileName)); + //_logger.Info($"Loading logfile: {fileName}"); _logFileReader.StartMonitoring(); if (isUsingDefaultColumnizer) @@ -6118,7 +6121,7 @@ public void LoadFile (string fileName, EncodingOptions encodingOptions) if (newColumnizer != null) { - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFile_PickedNewColumnizer, newColumnizer.GetName())); + //_logger.Debug($"Picked new columnizer {newColumnizer.GetName()}"); PreSelectColumnizer(newColumnizer); } @@ -6131,10 +6134,10 @@ public void LoadFilesAsMulti (string[] fileNames, EncodingOptions encodingOption { EnterLoadFileStatus(); - foreach (var name in fileNames) - { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_LoadFilesAsMulti_FileName, name)); - } + //foreach (var name in fileNames) + //{ + // //_logger.Info($"LoadFilesAsMulti: File: {name}"); + //} if (_logFileReader != null) { @@ -6283,7 +6286,7 @@ public void CloseLogWindow () if (IsTempFile) { - _logger.Info(Resources.LogWindow_Logger_Info_CloseLogWindow_DeletingTempFile); + //_logger.Info($"Deleting temp file {FileName}"); try { @@ -6565,9 +6568,9 @@ public void TryToTruncate () File.WriteAllText(Title, string.Empty); } } - catch (Exception ex) + catch (Exception) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Warn_TryToTruncate_UnexpectedIssueTruncatingFileExMessage, ex.Message)); + //_logger.Warn($"Unexpected issue truncating file: {ex.Message}"); StatusLineText(Resources.LogWindow_UI_StatusLineText_UnexpectedIssueTruncatingFile); throw; } @@ -6851,8 +6854,7 @@ public void AddBookmarkOverlays () if (_logger.IsDebugEnabled) { - //r.Location={r.Location.X}, width={r.Width}, scroll_offset={dataGridView.HorizontalScrollingOffset} - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_AddBookmarkOverlays, r.Location.X, r.Width, dataGridView.HorizontalScrollingOffset)); + _logger.Debug($"### AddBookmarkOverlay: r.Location={r.Location.X}, width={r.Width}, scroll_offset={dataGridView.HorizontalScrollingOffset}"); } overlay.Position = r.Location - new Size(dataGridView.HorizontalScrollingOffset, 0); @@ -7465,7 +7467,11 @@ public DateTime GetTimestampForLine (ref int lastLineNum, bool roundToSeconds) return DateTime.MinValue; } - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_GetTimestampForLineLastLineNumEnter, lastLineNum)); + if (_logger.IsDebugEnabled) + { + _logger.Debug($"### GetTimestampForLine: leave with lineNum={lastLineNum}"); + } + var timeStamp = DateTime.MinValue; var lookBack = false; if (lastLineNum >= 0 && lastLineNum < dataGridView.RowCount) @@ -7500,7 +7506,11 @@ public DateTime GetTimestampForLine (ref int lastLineNum, bool roundToSeconds) lastLineNum++; } - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Debug_GetTimestampForLineLeaveWithLineNumLastLineNum, lastLineNum)); + if (_logger.IsDebugEnabled) + { + _logger.Debug($"### GetTimestampForLine: found timestamp={timeStamp}"); + } + return timeStamp; } } @@ -7812,7 +7822,11 @@ public void AddOtherWindowToTimesync (LogWindow other) public void AddToTimeSync (LogWindow master) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_AddToTimeSync_SyncingWindow, Util.GetNameFromPath(FileName), Util.GetNameFromPath(master.FileName))); + //if (_logger.IsInfoEnabled) + //{ + // _logger.Info($"Syncing window for {Util.GetNameFromPath(FileName)} to {Util.GetNameFromPath(master.FileName)}"); + //} + lock (_timeSyncListLock) { if (IsTimeSynced && master.TimeSyncList != TimeSyncList) @@ -7835,7 +7849,11 @@ public void FreeFromTimeSync () { if (TimeSyncList != null) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogWindow_Logger_Info_FreeFromTimeSync_DeSyncingWindow, Util.GetNameFromPath(FileName))); + //if (_logger.IsInfoEnabled) + //{ + // _logger.Info($"De-Syncing window for {Util.GetNameFromPath(FileName)}"); + //} + TimeSyncList.WindowRemoved -= OnTimeSyncListWindowRemoved; TimeSyncList.RemoveWindow(this); TimeSyncList = null; diff --git a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs index a31a2416..a4a2d5e6 100644 --- a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs +++ b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs @@ -1,5 +1,3 @@ -using System.Globalization; - using LogExpert.Core.Callback; using LogExpert.Core.Classes; using LogExpert.Core.Classes.Filter; @@ -33,17 +31,17 @@ internal class RangeFinder (FilterParams filterParams, ColumnizerCallback callba public Range FindRange (int startLine) { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.RangeFinder_Logger_Info_FindRange, _filterParams.SearchText, _filterParams.RangeSearchText)); + //_logger.Info($"Starting range search for {_filterParams.SearchText} ... {_filterParams.RangeSearchText}"); if (_filterParams.RangeSearchText == null || _filterParams.RangeSearchText.Trim().Length == 0) { - _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_RangeSearchTextNotSetCancellingRangeSearch); + //_logger.Info("Search text not set. Cancelling range search."); return null; } if (_filterParams.SearchText == null || _filterParams.SearchText.Trim().Length == 0) { - _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_SearchTextNotSetCancellingRangeSearch); + //_logger.Info("Range search text not set. Cancelling range search."); return null; } @@ -84,7 +82,7 @@ public Range FindRange (int startLine) if (!foundStartLine) { - _logger.Info(Resources.RangeFinder_Logger_Info_FindRange_RangeStartNotFound); + //_logger.Info("Range start not found"); return null; } @@ -109,7 +107,7 @@ public Range FindRange (int startLine) lineNum--; range.EndLine = lineNum; - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.RangeFinder_Logger_Info_FindRange_Finished, range.EndLine - range.StartLine)); + //_logger.Info($"Range search finished. Found {range.EndLine - range.StartLine} lines"); return range; } diff --git a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs index 10710d16..0d8add67 100644 --- a/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs +++ b/src/LogExpert.UI/Controls/LogWindow/TimeSpreadCalculator.cs @@ -1,5 +1,3 @@ -using System.Globalization; - using LogExpert.Core.Callback; using LogExpert.Core.Classes; using LogExpert.Core.Interface; @@ -224,7 +222,7 @@ private void DoCalc () ? (int)Math.Round(_lineCount / (double)_displayHeight) : 1; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalc_CollectingDataForLinesWithStepSize, lastLineNum, step)); + //_logger.Debug($"Collecting data for {lastLineNum} lines with step size {step}")); List newDiffList = []; List maxList = []; @@ -267,7 +265,7 @@ private void DoCalcViaTime () if (_callback.GetLineCount() < 1) { OnCalcDone(EventArgs.Empty); - _logger.Debug(Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_EndBecauseOfLineCount); + //_logger.Debug($"End because of line count < 1"); return; } @@ -284,7 +282,7 @@ private void DoCalcViaTime () var step = overallSpanMillis > _displayHeight ? (long)Math.Round(overallSpanMillis / (double)_displayHeight) : 1; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TimeRangeIsMs, overallSpanMillis)); + //_logger.Debug($"Time range is {overallSpanMillis} ms"); lineNum = 0; var searchTimeStamp = _startTimestamp; @@ -307,7 +305,7 @@ private void DoCalcViaTime () var lineDiff = lineNum - oldLineNum; var timestamp = $"{searchTimeStamp:HH:mm:ss.fff}"; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_TestTimeLineDiff, timestamp, lineDiff)); + //_logger.Debug($"Test time {timestamp} line diff={lineDiff}")); if (lineDiff >= 0) { @@ -341,7 +339,7 @@ private void DoCalcViaTime () _average = lineDiffSum / (double)loopCount; //double average = maxList[maxList.Count / 2]; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_DoCalcViaTime_AverageDiffMinDiffMaxDiff, _average, minDiff, _maxDiff)); + //_logger.Debug($"Average diff={_average} minDiff={minDiff} maxDiff={_maxDiff}"); lock (_diffListLock) { @@ -393,7 +391,7 @@ private void CalcValuesViaTime (int maxDiff, double average) { foreach (var entry in DiffList) { - var lineDiff = entry.Diff; + //var lineDiff = entry.Diff; var diffFromAverage = entry.Diff - average; if (diffFromAverage < 0) @@ -404,8 +402,8 @@ private void CalcValuesViaTime (int maxDiff, double average) var value = (int)(diffFromAverage / maxDiff * _contrast); entry.Value = 255 - value; - var timestamp = $"{entry.Timestamp:HH:mm:ss.fff}"; - _logger.Debug(string.Format(CultureInfo.InvariantCulture, Resources.TimeSpreadCalculator_Logger_Debug_CalcValuesViaTime_TestTimeLineDiffValue, timestamp, lineDiff, value)); + //var timestamp = $"{entry.Timestamp:HH:mm:ss.fff}"; + //_logger.Debug($"Test time {timestamp} line diff={lineDiff} value={value}")); } } diff --git a/src/LogExpert.UI/Dialogs/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs index 3ca94d26..d73e9933 100644 --- a/src/LogExpert.UI/Dialogs/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/HighlightDialog.cs @@ -231,7 +231,6 @@ or PathTooLongException or NotSupportedException) { _ = MessageBox.Show(this, Resources.HighlightDialog_UI_SettingsCouldNotBeImported, Resources.LogExpert_Common_UI_Title_LogExpert); - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_FileAccessError, dlg.FileName, ex)); return; } @@ -502,7 +501,6 @@ or ArgumentNullException or InvalidOperationException or SystemException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringAddOfHighLightEntry, ex)); _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringAddOfHighLightEntry, ex.Message), Resources.LogExpert_Common_UI_Title_Error, MessageBoxButtons.OK, @@ -682,7 +680,6 @@ or ArgumentNullException or InvalidOperationException or SystemException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_Logger_Error_ErrorDuringSavingOfHighlightEntry, ex)); _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.HighlightDialog_UI_ErrorDuringSavingOfHighlightEntry, ex.Message), Resources.LogExpert_Common_UI_Title_Error); } } diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index 1f21c564..2f93de60 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -587,7 +587,7 @@ public ILogLineColumnizer FindColumnizerByFileMask (string fileName) } catch (ArgumentException e) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer, e)); + _logger.Error($"RegEx-error while finding columnizer: {e}"); } } } @@ -611,7 +611,7 @@ public HighlightGroup FindHighlightGroupByFileMask (string fileName) } catch (ArgumentException e) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Error_RegExErrorWhileFindingColumnizer, e)); + _logger.Error($"RegEx-error while finding columnizer: {e}"); } } } @@ -801,7 +801,7 @@ private void FillDefaultEncodingFromSettings (EncodingOptions encodingOptions) catch (ArgumentException) { //ConfigManager.Settings.Preferences.DefaultEncoding - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Warn_EncodingIsNotValid, ConfigManager.Settings.Preferences.DefaultEncoding)); + _logger.Warn($"### FillDefaultEncodingFromSettings: Encoding {ConfigManager.Settings.Preferences.DefaultEncoding} is not a valid encoding"); encodingOptions.DefaultEncoding = null; } } @@ -1632,7 +1632,6 @@ private void OpenSettings (int tabToOpen) [SupportedOSPlatform("windows")] private void NotifyWindowsForChangedPrefs (SettingsFlags flags) { - _logger.Info(Resources.LogTabWindow_Logger_Warn_ThePreferencesHaveChanged); ApplySettings(ConfigManager.Settings, flags); var setLastColumnWidth = ConfigManager.Settings.Preferences.SetLastColumnWidth; @@ -1775,7 +1774,7 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni { var columnizer = ColumnizerPicker.DecideColumnizerByName(columnizerName, PluginRegistry.PluginRegistry.Instance.RegisteredColumnizers); - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Info_StartingExternalToolWithSysoutRedirection, cmd, args)); + //_logger.Info($"Starting external tool with sysout redirection: {cmd} {args}")); startInfo.UseShellExecute = false; startInfo.RedirectStandardOutput = true; //process.OutputDataReceived += pipe.DataReceivedEventHandler; @@ -1803,8 +1802,6 @@ private void StartTool (string cmd, string args, bool sysoutPipe, string columni } else { - _logger.Info(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Info_StartingExternalTool, cmd, args)); - try { startInfo.UseShellExecute = false; @@ -2017,7 +2014,7 @@ private IDockContent DeserializeDockContent (string persistString) return win; } - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.LogTabWindow_Logger_Warn_DeserializeDockContent_LayoutDataContainsNonExistingLogWindowForFileName, fileName)); + //_logger.Warn("Layout data contains non-existing LogWindow for {fileName}")); } return null; @@ -2260,7 +2257,7 @@ private void OnLogTabWindowDragEnter (object sender, DragEventArgs e) { #if DEBUG var formats = e.Data.GetFormats(); - var s = Resources.LogTabWindow_Logger_Info_OnLogTabWindowDragEnter_DraggingSomethingOverLogExpertFormats; + var s = "Dragging something over LogExpert. Formats: "; foreach (var format in formats) { s += format; @@ -2288,7 +2285,7 @@ private void OnLogWindowDragDrop (object sender, DragEventArgs e) { #if DEBUG var formats = e.Data.GetFormats(); - var s = Resources.LogTabWindow_Logger_Debug_OnLogWindowDragDrop_DroppedFormats; + var s = "Dropped formats: "; foreach (var format in formats) { s += format; @@ -2535,10 +2532,10 @@ private void OnLogWindowSyncModeChanged (object sender, SyncModeEventArgs e) var icon = GetIcon(data.DiffSum, data); _ = BeginInvoke(new SetTabIconDelegate(SetTabIcon), (LogWindow.LogWindow)sender, icon); } - else - { - _logger.Warn(Resources.LogTabWindow_Logger_Warn_OnLogWindowSyncModeChanged_ReceivedSyncModeChangedEventWhileDisposingEventIgnored); - } + //else + //{ + // _logger.Warn("Received SyncModeChanged event while disposing. Event ignored."); + //} } [SupportedOSPlatform("windows")] diff --git a/src/LogExpert/Classes/LogExpertProxy.cs b/src/LogExpert/Classes/LogExpertProxy.cs index 6bf58334..763e51d9 100644 --- a/src/LogExpert/Classes/LogExpertProxy.cs +++ b/src/LogExpert/Classes/LogExpertProxy.cs @@ -59,7 +59,6 @@ public LogExpertProxy (ILogTabWindow logTabWindow) public void LoadFiles (string[] fileNames) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_LoadingFilesIntoLogTab); var logWin = _windowList[^1]; _ = logWin.Invoke(new MethodInvoker(logWin.SetForeground)); logWin.LoadFiles(fileNames); @@ -70,13 +69,13 @@ public void NewWindow (string[] fileNames) { if (_firstLogTabWindow.IsDisposed) { - _logger.Warn(Resources.LogExpertProxy_Logger_Warn_GUIThreadDisposedSettingNewOne); + _logger.Warn("### NewWindow: first GUI thread window is disposed. Setting a new one."); // may occur if a window is closed because of unhandled exception. // Determine a new 'firstWindow'. If no window is left, start a new one. RemoveWindow(_firstLogTabWindow); if (_windowList.Count == 0) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_NoWindowsLeftCreatingNewOne); + _logger.Info("### NewWindow: No windows left. New created window will be the new 'first' GUI window"); LoadFiles(fileNames); } else @@ -110,7 +109,6 @@ public void NewWindowOrLockedWindow (string[] fileNames) [SupportedOSPlatform("windows")] public void NewWindowWorker (string[] fileNames) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_CreatingNewWindow); IConfigManager configManager = ConfigManager.Instance; var logWin = AbstractLogTabWindow.Create(fileNames.Length > 0 ? fileNames @@ -129,7 +127,6 @@ public void WindowClosed (ILogTabWindow logWin) RemoveWindow(logWin); if (_windowList.Count == 0) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_LastTabWindowClosed); PluginRegistry.PluginRegistry.Instance.CleanupPlugins(); OnLastWindowClosed(); } @@ -159,13 +156,11 @@ public int GetLogWindowCount () private void AddWindow (ILogTabWindow window) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_AddWindow); _windowList.Add(window); } private void RemoveWindow (ILogTabWindow window) { - _logger.Info(Resources.LogExpertProxy_Logger_Info_RemoveWindow); _ = _windowList.Remove(window); } diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index c1d0f1ed..6bc371cb 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -138,20 +138,9 @@ public void ImportHighlightSettings (FileInfo fileInfo, ExportImportFlags import [SupportedOSPlatform("windows")] private Settings Load () { - _logger.Info(Resources.ConfigManager_Logger_Info_LoadingSettings); - - string dir; - - if (!File.Exists(Path.Combine(PortableModeDir, PortableModeSettingsFileName))) - { - _logger.Info(Resources.ConfigManager_Logger_Info_LoadSettingsStandardMode); - dir = ConfigDir; - } - else - { - _logger.Info(Resources.ConfigManager_Logger_Info_LoadSettingsPortableMode); - dir = Application.StartupPath; - } + var dir = !File.Exists(Path.Combine(PortableModeDir, PortableModeSettingsFileName)) + ? ConfigDir + : Application.StartupPath; if (!Directory.Exists(dir)) { @@ -170,15 +159,15 @@ private Settings Load () } catch (IOException ex) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_FileSystemErrorExMessage, ex.Message)); + _logger.Error($"File system error: {ex.Message}"); } catch (UnauthorizedAccessException ex) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_AccessDeniedExMessage, ex)); + _logger.Error($"Access denied: {ex}"); } catch (Exception ex) when (ex is not OperationCanceledException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_UnexpectedErrorExMessage, ex)); + _logger.Error($"Access denied: {ex}"); } return LoadOrCreateNew(null); @@ -214,7 +203,7 @@ or JsonWriterException or ArgumentNullException or ArgumentException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData, e)); + _logger.Error($"### LoadOrCreateNew: Error while deserializing config data: {e}"); settings = new Settings(); } } @@ -308,7 +297,6 @@ private void Save (Settings settings, SettingsFlags flags) { lock (_loadSaveLock) { - _logger.Info(Resources.ConfigManager_Logger_Info_SavingSettings); var dir = Settings.Preferences.PortableMode ? Application.StartupPath : ConfigDir; if (!Directory.Exists(dir)) @@ -409,7 +397,7 @@ or JsonWriterException or ArgumentNullException or ArgumentException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.ConfigManager_Logger_Error_ErrorWhileDeserializingConfigData, e)); + _logger.Error($"### Import: Error while deserializing config data: {e}"); newGroups = []; } diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index c2f8bfec..87f1db65 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -121,7 +121,7 @@ or ArgumentOutOfRangeException or ArgumentException or SecurityException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_IPCChannel_ClientError_Default, ex)); + _logger.Error($"IpcClientChannel error: {ex}"); errMsg = ex; counter--; Thread.Sleep(500); @@ -130,7 +130,7 @@ or ArgumentException if (counter == 0) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_IPCChannel_ClientError, errMsg)); + _logger.Error($"IpcClientChannel error, giving up: {errMsg}"); _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, errMsg), Resources.LogExpert_Common_UI_Title_LogExpert); } @@ -159,7 +159,7 @@ or SecurityException or ArgumentNullException or ArgumentException) { - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_MutexError, ex)); + _logger.Error($"Mutex error, giving up: {ex}"); cts.Cancel(); _ = MessageBox.Show(string.Format(CultureInfo.InvariantCulture, Resources.Program_UI_Error_Pipe_CannotConnectToFirstInstance, ex.Message), Resources.LogExpert_Common_UI_Title_LogExpert); } @@ -238,7 +238,7 @@ private static void SendMessageToProxy (IpcMessage message, LogExpertProxy proxy proxy.NewWindowOrLockedWindow([.. payLoad.Files]); break; default: - _logger.Error(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Error_Pipe_UnknownIPCMessage, message.Type, payLoad)); + _logger.Error($"Unknown IPC Message Type: {message.Type} with payload: {payLoad}"); break; } } @@ -248,7 +248,7 @@ private static bool CheckPayload (LoadPayload payLoad) { if (payLoad == null) { - _logger.Error(Resources.Program_Logger_Error_Payload_InvalidCommand); + _logger.Error("Invalid payload command: null"); return false; } @@ -265,22 +265,22 @@ private static void SendCommandToServer (string command) } catch (TimeoutException) { - _logger.Error(Resources.Program_Logger_Error_Pipe_TimeoutException); + _logger.Error("Timeout connecting to pipe server"); return; } catch (IOException ex) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Error_Pipe_IOException, ex)); + _logger.Warn($"An I/O error occurred while connecting to the pipe server: {ex}"); return; } catch (InvalidOperationException ioe) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_InvalidOperationException, ioe)); + _logger.Warn($"Invalid Operation while connecting to the pipe server: {ioe}"); return; } catch (UnauthorizedAccessException ex) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_UnauthorizedAccessException, ex)); + _logger.Warn($"Unauthorized access while connecting to the pipe server: {ex}"); return; } @@ -326,7 +326,7 @@ or ArgumentNullException or ArgumentOutOfRangeException or ArgumentException) { - _logger.Warn(string.Format(CultureInfo.InvariantCulture, Resources.Program_Logger_Warn_Pipe_CommonError, ex)); + _logger.Warn($"Pipe server error: {ex}"); } } } From 37473de93004047fc39ca42f2f355d67efed5d9b Mon Sep 17 00:00:00 2001 From: Hirogen Date: Sun, 7 Sep 2025 16:56:29 +0200 Subject: [PATCH 36/38] small optimizations --- .../Classes/Persister/Persister.cs | 212 +++++++++--------- .../Controls/LogWindow/RangeFinder.cs | 3 - src/LogExpert.UI/Dialogs/HighlightDialog.cs | 4 - 3 files changed, 112 insertions(+), 107 deletions(-) diff --git a/src/LogExpert.Core/Classes/Persister/Persister.cs b/src/LogExpert.Core/Classes/Persister/Persister.cs index 8ae747b9..d882931e 100644 --- a/src/LogExpert.Core/Classes/Persister/Persister.cs +++ b/src/LogExpert.Core/Classes/Persister/Persister.cs @@ -1,4 +1,5 @@ using System.Drawing; +using System.Globalization; using System.Text; using System.Text.Json; using System.Xml; @@ -44,7 +45,6 @@ public static string SavePersistenceDataWithFixedName (string persistenceFileNam return persistenceFileName; } - public static PersistenceData LoadPersistenceData (string logFileName, Preferences preferences) { var fileName = BuildPersisterFileName(logFileName, preferences); @@ -67,7 +67,6 @@ public static PersistenceData LoadPersistenceDataFromFixedFile (string persisten return Load(persistenceFile); } - /// /// Loads the persistence options out of the given persistence file name. /// @@ -86,7 +85,7 @@ public static PersistenceData LoadOptionsOnly (string fileName) return null; } - XmlNode fileNode = xmlDoc.SelectSingleNode("logexpert/file"); + var fileNode = xmlDoc.SelectSingleNode("logexpert/file"); if (fileNode != null) { var fileElement = fileNode as XmlElement; @@ -94,6 +93,7 @@ public static PersistenceData LoadOptionsOnly (string fileName) persistenceData.FileName = fileElement.GetAttribute("fileName"); persistenceData.Encoding = ReadEncoding(fileElement); } + return persistenceData; } @@ -143,7 +143,7 @@ private static string BuildPersisterFileName (string logFileName, Preferences pr { try { - Directory.CreateDirectory(dir); + _ = Directory.CreateDirectory(dir); } catch (Exception e) { @@ -168,10 +168,10 @@ private static string BuildSessionFileNameFromPath (string logFileName) private static void Save (string fileName, PersistenceData persistenceData) { XmlDocument xmlDoc = new(); - XmlElement rootElement = xmlDoc.CreateElement("logexpert"); - xmlDoc.AppendChild(rootElement); - XmlElement fileElement = xmlDoc.CreateElement("file"); - rootElement.AppendChild(fileElement); + var rootElement = xmlDoc.CreateElement("logexpert"); + _ = xmlDoc.AppendChild(rootElement); + var fileElement = xmlDoc.CreateElement("file"); + _ = rootElement.AppendChild(fileElement); fileElement.SetAttribute("fileName", persistenceData.FileName); fileElement.SetAttribute("lineCount", "" + persistenceData.LineCount); WriteBookmarks(xmlDoc, fileElement, persistenceData.BookmarkList); @@ -180,6 +180,7 @@ private static void Save (string fileName, PersistenceData persistenceData) WriteFilter(xmlDoc, fileElement, persistenceData.FilterParamsList); WriteFilterTabs(xmlDoc, fileElement, persistenceData.FilterTabDataList); WriteEncoding(xmlDoc, fileElement, persistenceData.Encoding); + if (xmlDoc.HasChildNodes) { xmlDoc.Save(fileName); @@ -190,8 +191,8 @@ private static void WriteEncoding (XmlDocument xmlDoc, XmlElement rootElement, E { if (encoding != null) { - XmlElement encodingElement = xmlDoc.CreateElement("encoding"); - rootElement.AppendChild(encodingElement); + var encodingElement = xmlDoc.CreateElement("encoding"); + _ = rootElement.AppendChild(encodingElement); encodingElement.SetAttribute("name", encoding.WebName); } } @@ -200,20 +201,21 @@ private static void WriteFilterTabs (XmlDocument xmlDoc, XmlElement rootElement, { if (dataList.Count > 0) { - XmlElement filterTabsElement = xmlDoc.CreateElement("filterTabs"); - rootElement.AppendChild(filterTabsElement); - foreach (FilterTabData data in dataList) + var filterTabsElement = xmlDoc.CreateElement("filterTabs"); + _ = rootElement.AppendChild(filterTabsElement); + + foreach (var data in dataList) { - PersistenceData persistenceData = data.PersistenceData; - XmlElement filterTabElement = xmlDoc.CreateElement("filterTab"); - filterTabsElement.AppendChild(filterTabElement); + var persistenceData = data.PersistenceData; + var filterTabElement = xmlDoc.CreateElement("filterTab"); + _ = filterTabsElement.AppendChild(filterTabElement); WriteBookmarks(xmlDoc, filterTabElement, persistenceData.BookmarkList); WriteRowHeightList(xmlDoc, filterTabElement, persistenceData.RowHeightList); WriteOptions(xmlDoc, filterTabElement, persistenceData); WriteFilter(xmlDoc, filterTabElement, persistenceData.FilterParamsList); WriteFilterTabs(xmlDoc, filterTabElement, persistenceData.FilterTabDataList); - XmlElement filterElement = xmlDoc.CreateElement("tabFilter"); - filterTabElement.AppendChild(filterElement); + var filterElement = xmlDoc.CreateElement("tabFilter"); + _ = filterTabElement.AppendChild(filterElement); List filterList = [data.FilterParams]; WriteFilter(xmlDoc, filterElement, filterList); } @@ -223,19 +225,19 @@ private static void WriteFilterTabs (XmlDocument xmlDoc, XmlElement rootElement, private static List ReadFilterTabs (XmlElement startNode) { List dataList = []; - XmlNode filterTabsNode = startNode.SelectSingleNode("filterTabs"); + var filterTabsNode = startNode.SelectSingleNode("filterTabs"); if (filterTabsNode != null) { - XmlNodeList filterTabNodeList = filterTabsNode.ChildNodes; // all "filterTab" nodes + var filterTabNodeList = filterTabsNode.ChildNodes; // all "filterTab" nodes foreach (XmlNode node in filterTabNodeList) { - PersistenceData persistenceData = ReadPersistenceDataFromNode(node); - XmlNode filterNode = node.SelectSingleNode("tabFilter"); + var persistenceData = ReadPersistenceDataFromNode(node); + var filterNode = node.SelectSingleNode("tabFilter"); if (filterNode != null) { - List filterList = ReadFilter(filterNode as XmlElement); + var filterList = ReadFilter(filterNode as XmlElement); FilterTabData data = new() { PersistenceData = persistenceData, @@ -246,36 +248,36 @@ private static List ReadFilterTabs (XmlElement startNode) } } } + return dataList; } - private static void WriteFilter (XmlDocument xmlDoc, XmlElement rootElement, List filterList) { - XmlElement filtersElement = xmlDoc.CreateElement("filters"); - rootElement.AppendChild(filtersElement); - foreach (FilterParams filterParams in filterList) + var filtersElement = xmlDoc.CreateElement("filters"); + _ = rootElement.AppendChild(filtersElement); + foreach (var filterParams in filterList) { - XmlElement filterElement = xmlDoc.CreateElement("filter"); - XmlElement paramsElement = xmlDoc.CreateElement("params"); + var filterElement = xmlDoc.CreateElement("filter"); + var paramsElement = xmlDoc.CreateElement("params"); MemoryStream stream = new(capacity: 200); JsonSerializer.Serialize(stream, filterParams); var base64Data = Convert.ToBase64String(stream.ToArray()); paramsElement.InnerText = base64Data; - filterElement.AppendChild(paramsElement); - filtersElement.AppendChild(filterElement); + _ = filterElement.AppendChild(paramsElement); + _ = filtersElement.AppendChild(filterElement); } } - private static List ReadFilter (XmlElement startNode) { List filterList = []; - XmlNode filtersNode = startNode.SelectSingleNode("filters"); + var filtersNode = startNode.SelectSingleNode("filters"); + if (filtersNode != null) { - XmlNodeList filterNodeList = filtersNode.ChildNodes; // all "filter" nodes + var filterNodeList = filtersNode.ChildNodes; // all "filter" nodes foreach (XmlNode node in filterNodeList) { foreach (XmlNode subNode in node.ChildNodes) @@ -288,7 +290,7 @@ private static List ReadFilter (XmlElement startNode) try { - FilterParams filterParams = JsonSerializer.Deserialize(stream); + var filterParams = JsonSerializer.Deserialize(stream); filterParams.Init(); filterList.Add(filterParams); } @@ -300,43 +302,43 @@ private static List ReadFilter (XmlElement startNode) } } } + return filterList; } - - private static void WriteBookmarks (XmlDocument xmlDoc, XmlElement rootElement, - SortedList bookmarkList) + private static void WriteBookmarks (XmlDocument xmlDoc, XmlElement rootElement, SortedList bookmarkList) { - XmlElement bookmarksElement = xmlDoc.CreateElement("bookmarks"); - rootElement.AppendChild(bookmarksElement); - foreach (Entities.Bookmark bookmark in bookmarkList.Values) + var bookmarksElement = xmlDoc.CreateElement("bookmarks"); + _ = rootElement.AppendChild(bookmarksElement); + + foreach (var bookmark in bookmarkList.Values) { - XmlElement bookmarkElement = xmlDoc.CreateElement("bookmark"); + var bookmarkElement = xmlDoc.CreateElement("bookmark"); bookmarkElement.SetAttribute("line", "" + bookmark.LineNum); - XmlElement textElement = xmlDoc.CreateElement("text"); + var textElement = xmlDoc.CreateElement("text"); textElement.InnerText = bookmark.Text; - XmlElement posXElement = xmlDoc.CreateElement("posX"); - XmlElement posYElement = xmlDoc.CreateElement("posY"); + var posXElement = xmlDoc.CreateElement("posX"); + var posYElement = xmlDoc.CreateElement("posY"); posXElement.InnerText = "" + bookmark.OverlayOffset.Width; posYElement.InnerText = "" + bookmark.OverlayOffset.Height; - bookmarkElement.AppendChild(textElement); - bookmarkElement.AppendChild(posXElement); - bookmarkElement.AppendChild(posYElement); - bookmarksElement.AppendChild(bookmarkElement); + _ = bookmarkElement.AppendChild(textElement); + _ = bookmarkElement.AppendChild(posXElement); + _ = bookmarkElement.AppendChild(posYElement); + _ = bookmarksElement.AppendChild(bookmarkElement); } } - private static PersistenceData Load (string fileName) { XmlDocument xmlDoc = new(); xmlDoc.Load(fileName); - XmlNode fileNode = xmlDoc.SelectSingleNode("logexpert/file"); + var fileNode = xmlDoc.SelectSingleNode("logexpert/file"); PersistenceData persistenceData = new(); if (fileNode != null) { persistenceData = ReadPersistenceDataFromNode(fileNode); } + return persistenceData; } @@ -351,21 +353,21 @@ private static PersistenceData ReadPersistenceDataFromNode (XmlNode node) var sLineCount = fileElement.GetAttribute("lineCount"); if (sLineCount != null && sLineCount.Length > 0) { - persistenceData.LineCount = int.Parse(sLineCount); + persistenceData.LineCount = int.Parse(sLineCount, CultureInfo.InvariantCulture); } + persistenceData.FilterParamsList = ReadFilter(fileElement); persistenceData.FilterTabDataList = ReadFilterTabs(fileElement); persistenceData.Encoding = ReadEncoding(fileElement); return persistenceData; } - private static Encoding ReadEncoding (XmlElement fileElement) { - XmlNode encodingNode = fileElement.SelectSingleNode("encoding"); + var encodingNode = fileElement.SelectSingleNode("encoding"); if (encodingNode != null) { - XmlAttribute encAttr = encodingNode.Attributes["name"]; + var encAttr = encodingNode.Attributes["name"]; try { return encAttr == null ? null : Encoding.GetEncoding(encAttr.Value); @@ -381,17 +383,17 @@ private static Encoding ReadEncoding (XmlElement fileElement) return Encoding.Default; } } + return null; } - private static SortedList ReadBookmarks (XmlElement startNode) { SortedList bookmarkList = []; - XmlNode boomarksNode = startNode.SelectSingleNode("bookmarks"); + var boomarksNode = startNode.SelectSingleNode("bookmarks"); if (boomarksNode != null) { - XmlNodeList bookmarkNodeList = boomarksNode.ChildNodes; // all "bookmark" nodes + var bookmarkNodeList = boomarksNode.ChildNodes; // all "bookmark" nodes foreach (XmlNode node in bookmarkNodeList) { string text = null; @@ -406,6 +408,7 @@ private static Encoding ReadEncoding (XmlElement fileElement) line = attr.InnerText; } } + foreach (XmlNode subNode in node.ChildNodes) { if (subNode.Name.Equals("text", StringComparison.OrdinalIgnoreCase)) @@ -421,48 +424,52 @@ private static Encoding ReadEncoding (XmlElement fileElement) posY = subNode.InnerText; } } + if (line == null || posX == null || posY == null) { _logger.Error($"Invalid XML format for bookmark: {node.InnerText}"); continue; } - var lineNum = int.Parse(line); + + var lineNum = int.Parse(line, CultureInfo.InvariantCulture); Entities.Bookmark bookmark = new(lineNum) { - OverlayOffset = new Size(int.Parse(posX), int.Parse(posY)) + OverlayOffset = new Size(int.Parse(posX, CultureInfo.InvariantCulture), int.Parse(posY, CultureInfo.InvariantCulture)) }; if (text != null) { bookmark.Text = text; } + bookmarkList.Add(lineNum, bookmark); } } + return bookmarkList; } private static void WriteRowHeightList (XmlDocument xmlDoc, XmlElement rootElement, SortedList rowHeightList) { - XmlElement rowheightElement = xmlDoc.CreateElement("rowheights"); - rootElement.AppendChild(rowheightElement); - foreach (RowHeightEntry entry in rowHeightList.Values) + var rowheightElement = xmlDoc.CreateElement("rowheights"); + _ = rootElement.AppendChild(rowheightElement); + foreach (var entry in rowHeightList.Values) { - XmlElement entryElement = xmlDoc.CreateElement("rowheight"); + var entryElement = xmlDoc.CreateElement("rowheight"); entryElement.SetAttribute("line", "" + entry.LineNum); entryElement.SetAttribute("height", "" + entry.Height); - rowheightElement.AppendChild(entryElement); + _ = rowheightElement.AppendChild(entryElement); } } private static SortedList ReadRowHeightList (XmlElement startNode) { SortedList rowHeightList = []; - XmlNode rowHeightsNode = startNode.SelectSingleNode("rowheights"); + var rowHeightsNode = startNode.SelectSingleNode("rowheights"); if (rowHeightsNode != null) { - XmlNodeList rowHeightNodeList = rowHeightsNode.ChildNodes; // all "rowheight" nodes + var rowHeightNodeList = rowHeightsNode.ChildNodes; // all "rowheight" nodes foreach (XmlNode node in rowHeightNodeList) { string height = null; @@ -478,97 +485,98 @@ private static SortedList ReadRowHeightList (XmlElement sta height = attr.InnerText; } } - var lineNum = int.Parse(line); - var heightValue = int.Parse(height); + + var lineNum = int.Parse(line, CultureInfo.InvariantCulture); + var heightValue = int.Parse(height, CultureInfo.InvariantCulture); rowHeightList.Add(lineNum, new RowHeightEntry(lineNum, heightValue)); } } + return rowHeightList; } - private static void WriteOptions (XmlDocument xmlDoc, XmlElement rootElement, PersistenceData persistenceData) { - XmlElement optionsElement = xmlDoc.CreateElement("options"); - rootElement.AppendChild(optionsElement); + var optionsElement = xmlDoc.CreateElement("options"); + _ = rootElement.AppendChild(optionsElement); - XmlElement element = xmlDoc.CreateElement("multifile"); + var element = xmlDoc.CreateElement("multifile"); element.SetAttribute("enabled", persistenceData.MultiFile ? "1" : "0"); element.SetAttribute("pattern", persistenceData.MultiFilePattern); element.SetAttribute("maxDays", "" + persistenceData.MultiFileMaxDays); foreach (var fileName in persistenceData.MultiFileNames) { - XmlElement entryElement = xmlDoc.CreateElement("fileEntry"); + var entryElement = xmlDoc.CreateElement("fileEntry"); entryElement.SetAttribute("fileName", "" + fileName); - element.AppendChild(entryElement); + _ = element.AppendChild(entryElement); } - optionsElement.AppendChild(element); + + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("currentline"); element.SetAttribute("line", "" + persistenceData.CurrentLine); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("firstDisplayedLine"); element.SetAttribute("line", "" + persistenceData.FirstDisplayedLine); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("filter"); element.SetAttribute("visible", persistenceData.FilterVisible ? "1" : "0"); element.SetAttribute("advanced", persistenceData.FilterAdvanced ? "1" : "0"); element.SetAttribute("position", "" + persistenceData.FilterPosition); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("bookmarklist"); element.SetAttribute("visible", persistenceData.BookmarkListVisible ? "1" : "0"); element.SetAttribute("position", "" + persistenceData.BookmarkListPosition); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("followTail"); element.SetAttribute("enabled", persistenceData.FollowTail ? "1" : "0"); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("tab"); element.SetAttribute("name", persistenceData.TabName); - rootElement.AppendChild(element); + _ = rootElement.AppendChild(element); element = xmlDoc.CreateElement("columnizer"); element.SetAttribute("name", persistenceData.ColumnizerName); - rootElement.AppendChild(element); + _ = rootElement.AppendChild(element); element = xmlDoc.CreateElement("highlightGroup"); element.SetAttribute("name", persistenceData.HighlightGroupName); - rootElement.AppendChild(element); + _ = rootElement.AppendChild(element); element = xmlDoc.CreateElement("bookmarkCommentColumn"); element.SetAttribute("visible", persistenceData.ShowBookmarkCommentColumn ? "1" : "0"); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); element = xmlDoc.CreateElement("filterSaveList"); element.SetAttribute("visible", persistenceData.FilterSaveListVisible ? "1" : "0"); - optionsElement.AppendChild(element); + _ = optionsElement.AppendChild(element); } - private static void ReadOptions (XmlElement startNode, PersistenceData persistenceData) { - XmlNode optionsNode = startNode.SelectSingleNode("options"); + var optionsNode = startNode.SelectSingleNode("options"); var value = GetOptionsAttribute(optionsNode, "multifile", "enabled"); persistenceData.MultiFile = value != null && value.Equals("1", StringComparison.OrdinalIgnoreCase); persistenceData.MultiFilePattern = GetOptionsAttribute(optionsNode, "multifile", "pattern"); value = GetOptionsAttribute(optionsNode, "multifile", "maxDays"); try { - persistenceData.MultiFileMaxDays = value != null ? short.Parse(value) : 0; + persistenceData.MultiFileMaxDays = value != null ? short.Parse(value, CultureInfo.InvariantCulture) : 0; } catch (Exception) { persistenceData.MultiFileMaxDays = 0; } - XmlNode multiFileNode = optionsNode.SelectSingleNode("multifile"); + var multiFileNode = optionsNode.SelectSingleNode("multifile"); if (multiFileNode != null) { - XmlNodeList multiFileNodeList = multiFileNode.ChildNodes; // all "fileEntry" nodes + var multiFileNodeList = multiFileNode.ChildNodes; // all "fileEntry" nodes foreach (XmlNode node in multiFileNodeList) { string fileName = null; @@ -579,6 +587,7 @@ private static void ReadOptions (XmlElement startNode, PersistenceData persisten fileName = attr.InnerText; } } + persistenceData.MultiFileNames.Add(fileName); } } @@ -586,12 +595,13 @@ private static void ReadOptions (XmlElement startNode, PersistenceData persisten value = GetOptionsAttribute(optionsNode, "currentline", "line"); if (value != null) { - persistenceData.CurrentLine = int.Parse(value); + persistenceData.CurrentLine = int.Parse(value, CultureInfo.InvariantCulture); } + value = GetOptionsAttribute(optionsNode, "firstDisplayedLine", "line"); if (value != null) { - persistenceData.FirstDisplayedLine = int.Parse(value); + persistenceData.FirstDisplayedLine = int.Parse(value, CultureInfo.InvariantCulture); } value = GetOptionsAttribute(optionsNode, "filter", "visible"); @@ -601,7 +611,7 @@ private static void ReadOptions (XmlElement startNode, PersistenceData persisten value = GetOptionsAttribute(optionsNode, "filter", "position"); if (value != null) { - persistenceData.FilterPosition = int.Parse(value); + persistenceData.FilterPosition = int.Parse(value, CultureInfo.InvariantCulture); } value = GetOptionsAttribute(optionsNode, "bookmarklist", "visible"); @@ -609,7 +619,7 @@ private static void ReadOptions (XmlElement startNode, PersistenceData persisten value = GetOptionsAttribute(optionsNode, "bookmarklist", "position"); if (value != null) { - persistenceData.BookmarkListPosition = int.Parse(value); + persistenceData.BookmarkListPosition = int.Parse(value, CultureInfo.InvariantCulture); } value = GetOptionsAttribute(optionsNode, "followTail", "enabled"); @@ -621,31 +631,33 @@ private static void ReadOptions (XmlElement startNode, PersistenceData persisten value = GetOptionsAttribute(optionsNode, "filterSaveList", "visible"); persistenceData.FilterSaveListVisible = value != null && value.Equals("1", StringComparison.OrdinalIgnoreCase); - XmlNode tabNode = startNode.SelectSingleNode("tab"); + var tabNode = startNode.SelectSingleNode("tab"); if (tabNode != null) { persistenceData.TabName = (tabNode as XmlElement).GetAttribute("name"); } - XmlNode columnizerNode = startNode.SelectSingleNode("columnizer"); + + var columnizerNode = startNode.SelectSingleNode("columnizer"); if (columnizerNode != null) { persistenceData.ColumnizerName = (columnizerNode as XmlElement).GetAttribute("name"); } - XmlNode highlightGroupNode = startNode.SelectSingleNode("highlightGroup"); + + var highlightGroupNode = startNode.SelectSingleNode("highlightGroup"); if (highlightGroupNode != null) { persistenceData.HighlightGroupName = (highlightGroupNode as XmlElement).GetAttribute("name"); } } - private static string GetOptionsAttribute (XmlNode optionsNode, string elementName, string attrName) { - XmlNode node = optionsNode.SelectSingleNode(elementName); + var node = optionsNode.SelectSingleNode(elementName); if (node == null) { return null; } + if (node is XmlElement) { var value = (node as XmlElement).GetAttribute(attrName); diff --git a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs index a4a2d5e6..a952c287 100644 --- a/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs +++ b/src/LogExpert.UI/Controls/LogWindow/RangeFinder.cs @@ -2,8 +2,6 @@ using LogExpert.Core.Classes; using LogExpert.Core.Classes.Filter; -using NLog; - using Range = LogExpert.Core.Entities.Range; namespace LogExpert.UI.Controls.LogWindow; @@ -22,7 +20,6 @@ internal class RangeFinder (FilterParams filterParams, ColumnizerCallback callba { #region Fields - private static readonly ILogger _logger = LogManager.GetCurrentClassLogger(); private readonly FilterParams _filterParams = filterParams.CloneWithCurrentColumnizer(); #endregion diff --git a/src/LogExpert.UI/Dialogs/HighlightDialog.cs b/src/LogExpert.UI/Dialogs/HighlightDialog.cs index d73e9933..9c19a4dd 100644 --- a/src/LogExpert.UI/Dialogs/HighlightDialog.cs +++ b/src/LogExpert.UI/Dialogs/HighlightDialog.cs @@ -10,15 +10,11 @@ using LogExpert.UI.Dialogs; using LogExpert.UI.Entities; -using NLog; - namespace LogExpert.Dialogs; [SupportedOSPlatform("windows")] internal partial class HighlightDialog : Form { - private static readonly ILogger _logger = LogManager.GetCurrentClassLogger(); - #region Private Fields private readonly Image _applyButtonImage; From 3e1a0ae2ca09e5931e41012ce0c22eec3bf24acd Mon Sep 17 00:00:00 2001 From: Hirogen Date: Sun, 7 Sep 2025 18:19:00 +0200 Subject: [PATCH 37/38] applying resources as well --- src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs index 2f93de60..69901820 100644 --- a/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs +++ b/src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.cs @@ -95,6 +95,8 @@ public LogTabWindow (string[] fileNames, int instanceNumber, bool showInstanceNu AutoScaleMode = AutoScaleMode.Dpi; InitializeComponent(); + ApplyTextResources(); + ApplyToolTips(); ConfigManager = configManager; From 3d997ca71adaa73c85e3b5de7e6769709f8ac98b Mon Sep 17 00:00:00 2001 From: Hirogen Date: Wed, 10 Sep 2025 19:58:07 +0200 Subject: [PATCH 38/38] ChooseIconDialog --- src/LogExpert.Resources/Resources.Designer.cs | 18 +++++++ src/LogExpert.Resources/Resources.de.resx | 6 +++ src/LogExpert.Resources/Resources.resx | 6 +++ .../Dialogs/ChooseIconDlg.Designer.cs | 50 +++++++++---------- src/LogExpert.UI/Dialogs/ChooseIconDlg.cs | 32 ++++++++---- src/LogExpert.UI/Extensions/LockFinder.cs | 3 +- 6 files changed, 78 insertions(+), 37 deletions(-) diff --git a/src/LogExpert.Resources/Resources.Designer.cs b/src/LogExpert.Resources/Resources.Designer.cs index 2c6d5ad4..5fd16d87 100644 --- a/src/LogExpert.Resources/Resources.Designer.cs +++ b/src/LogExpert.Resources/Resources.Designer.cs @@ -326,6 +326,24 @@ public static System.Drawing.Bitmap Check_circle { } } + /// + /// Looks up a localized string similar to Icon file.... + /// + public static string ChooseIconDialog_UI_Button_ChooseIconFile { + get { + return ResourceManager.GetString("ChooseIconDialog_UI_Button_ChooseIconFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose Icon. + /// + public static string ChooseIconDialog_UI_Text { + get { + return ResourceManager.GetString("ChooseIconDialog_UI_Text", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/LogExpert.Resources/Resources.de.resx b/src/LogExpert.Resources/Resources.de.resx index 142837bd..79dbe501 100644 --- a/src/LogExpert.Resources/Resources.de.resx +++ b/src/LogExpert.Resources/Resources.de.resx @@ -1442,4 +1442,10 @@ Ein ausgewähltes Tool erscheint in der Iconbar. Alle anderen verfügbaren Tools Lesezeichenkommentar + + Icon datei... + + + Icon Auswählen + \ No newline at end of file diff --git a/src/LogExpert.Resources/Resources.resx b/src/LogExpert.Resources/Resources.resx index fb7bb4f7..743fa474 100644 --- a/src/LogExpert.Resources/Resources.resx +++ b/src/LogExpert.Resources/Resources.resx @@ -1444,4 +1444,10 @@ Checked tools will appear in the icon bar. All other tools are available in the Bookmark Comment + + Icon file... + + + Choose Icon + \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/ChooseIconDlg.Designer.cs b/src/LogExpert.UI/Dialogs/ChooseIconDlg.Designer.cs index 6700865c..3e68a24f 100644 --- a/src/LogExpert.UI/Dialogs/ChooseIconDlg.Designer.cs +++ b/src/LogExpert.UI/Dialogs/ChooseIconDlg.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.UI.Dialogs; +namespace LogExpert.UI.Dialogs; partial class ChooseIconDlg { @@ -32,8 +32,8 @@ private void InitializeComponent() this.iconListView = new System.Windows.Forms.ListView(); this.iconFileLabel = new System.Windows.Forms.Label(); this.buttonChooseIconFile = new System.Windows.Forms.Button(); - this.okButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); + this.buttonOk = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); this.SuspendLayout(); // // iconListView @@ -58,7 +58,7 @@ private void InitializeComponent() this.iconFileLabel.Name = "iconFileLabel"; this.iconFileLabel.Size = new System.Drawing.Size(411, 35); this.iconFileLabel.TabIndex = 1; - this.iconFileLabel.Text = "label1"; + this.iconFileLabel.Text = "IconFileLabel"; // // buttonChooseIconFile // @@ -73,32 +73,32 @@ private void InitializeComponent() // // okButton // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.Location = new System.Drawing.Point(316, 226); - this.okButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(112, 35); - this.okButton.TabIndex = 3; - this.okButton.Text = "OK"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.OnOkButtonClick); + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOk.Location = new System.Drawing.Point(316, 226); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonOk.Name = "okButton"; + this.buttonOk.Size = new System.Drawing.Size(112, 35); + this.buttonOk.TabIndex = 3; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + this.buttonOk.Click += new System.EventHandler(this.OnOkButtonClick); // // cancelButton // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(440, 226); - this.cancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(112, 35); - this.cancelButton.TabIndex = 4; - this.cancelButton.Text = "Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(440, 226); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonCancel.Name = "cancelButton"; + this.buttonCancel.Size = new System.Drawing.Size(112, 35); + this.buttonCancel.TabIndex = 4; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; // // ChooseIconDlg // this.ClientSize = new System.Drawing.Size(568, 278); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.okButton); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOk); this.Controls.Add(this.buttonChooseIconFile); this.Controls.Add(this.iconFileLabel); this.Controls.Add(this.iconListView); @@ -119,6 +119,6 @@ private void InitializeComponent() private System.Windows.Forms.ListView iconListView; private System.Windows.Forms.Label iconFileLabel; private System.Windows.Forms.Button buttonChooseIconFile; -private System.Windows.Forms.Button okButton; -private System.Windows.Forms.Button cancelButton; +private System.Windows.Forms.Button buttonOk; +private System.Windows.Forms.Button buttonCancel; } \ No newline at end of file diff --git a/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs b/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs index 229f18e8..f8be593b 100644 --- a/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs +++ b/src/LogExpert.UI/Dialogs/ChooseIconDlg.cs @@ -1,6 +1,7 @@ -using LogExpert.UI.Extensions; using System.Runtime.Versioning; +using LogExpert.UI.Extensions; + namespace LogExpert.UI.Dialogs; [SupportedOSPlatform("windows")] @@ -12,7 +13,7 @@ internal partial class ChooseIconDlg : Form #region cTor - public ChooseIconDlg(string fileName) + public ChooseIconDlg (string fileName) { InitializeComponent(); @@ -20,6 +21,16 @@ public ChooseIconDlg(string fileName) AutoScaleMode = AutoScaleMode.Dpi; FileName = fileName; + + ApplyResources(); + } + + private void ApplyResources () + { + Text = Resources.ChooseIconDialog_UI_Text; + buttonChooseIconFile.Text = Resources.ChooseIconDialog_UI_Button_ChooseIconFile; + buttonOk.Text = Resources.LogExpert_Common_UI_Button_OK; + buttonCancel.Text = Resources.LogExpert_Common_UI_Button_Cancel; } #endregion @@ -34,11 +45,11 @@ public ChooseIconDlg(string fileName) #region Private Methods - private void FillIconList() + private void FillIconList () { iconListView.Items.Clear(); - Icon[,] icons = NativeMethods.ExtractIcons(FileName); + var icons = NativeMethods.ExtractIcons(FileName); if (icons == null) { @@ -59,14 +70,15 @@ private void FillIconList() { ImageIndex = i }; - iconListView.Items.Add(item); + + _ = iconListView.Items.Add(item); } } } - private void DisposeIcons() + private void DisposeIcons () { - ImageList imageList = iconListView.LargeImageList; + var imageList = iconListView.LargeImageList; iconListView.LargeImageList = null; foreach (Image image in imageList.Images) { @@ -78,13 +90,13 @@ private void DisposeIcons() #region Events handler - private void ChooseIconDlg_Load(object sender, EventArgs e) + private void ChooseIconDlg_Load (object sender, EventArgs e) { FillIconList(); iconFileLabel.Text = FileName; } - private void OnButtonChooseIconFileClick(object sender, EventArgs e) + private void OnButtonChooseIconFileClick (object sender, EventArgs e) { OpenFileDialog dlg = new() { @@ -108,7 +120,7 @@ private void OnButtonChooseIconFileClick(object sender, EventArgs e) } } - private void OnOkButtonClick(object sender, EventArgs e) + private void OnOkButtonClick (object sender, EventArgs e) { IconIndex = iconListView.SelectedIndices.Count > 0 ? iconListView.SelectedIndices[0] : -1; diff --git a/src/LogExpert.UI/Extensions/LockFinder.cs b/src/LogExpert.UI/Extensions/LockFinder.cs index b7bf8cae..b2979087 100644 --- a/src/LogExpert.UI/Extensions/LockFinder.cs +++ b/src/LogExpert.UI/Extensions/LockFinder.cs @@ -6,7 +6,6 @@ // Uses Windows Restart Manager. // A more involved and cross platform solution to this problem is here: https://github.com/cklutz/LockCheck - namespace LogExpert.UI.Extensions; internal class LockFinder @@ -47,7 +46,7 @@ public static bool CheckIfFileIsLocked (string path) /// /// Used to find processes holding a lock on the file. This would cause - /// other usage, such as file truncation or write opretions to throw + /// other usage, such as file truncation or write operations to throw /// IOException if an exclusive lock is attempted. /// /// Path being checked