From 2cd9cc2d80a2e42b627f73af20fb49262329a81e Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 08:17:50 +0300 Subject: [PATCH 1/6] Fix text Regex Helper button Set SearchDialog.buttonRegexHelper.Autosize --- .../Dialogs/SearchDialog.Designer.cs | 331 +++++++++--------- 1 file changed, 166 insertions(+), 165 deletions(-) diff --git a/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs index 8a0e20dc..0dd33305 100644 --- a/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs +++ b/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs @@ -1,4 +1,4 @@ -namespace LogExpert.Dialogs; +namespace LogExpert.Dialogs; partial class SearchDialog { @@ -20,222 +20,223 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } -#region Windows Form Designer generated code + #region Windows Form Designer generated code -/// -/// Required method for Designer support - do not modify -/// the contents of this method with the code editor. -/// -private void InitializeComponent() -{ - this.buttonOk = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelSearchFor = new System.Windows.Forms.Label(); - this.checkBoxCaseSensitive = new System.Windows.Forms.CheckBox(); - this.checkBoxRegex = new System.Windows.Forms.CheckBox(); - this.buttonRegexHelper = new System.Windows.Forms.Button(); - this.radioButtonFromTop = new System.Windows.Forms.RadioButton(); - this.radioButtonFromSelected = new System.Windows.Forms.RadioButton(); - this.groupBoxSearchStart = new System.Windows.Forms.GroupBox(); - this.groupBoxOptions = new System.Windows.Forms.GroupBox(); - this.groupBoxDirection = new System.Windows.Forms.GroupBox(); - this.radioButtonBackward = new System.Windows.Forms.RadioButton(); - this.radioButtonForward = new System.Windows.Forms.RadioButton(); - this.comboBoxSearchFor = new System.Windows.Forms.ComboBox(); - this.helpProvider1 = new System.Windows.Forms.HelpProvider(); - this.groupBoxSearchStart.SuspendLayout(); - this.groupBoxOptions.SuspendLayout(); - this.groupBoxDirection.SuspendLayout(); - this.SuspendLayout(); + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent () + { + buttonOk = new Button(); + buttonCancel = new Button(); + labelSearchFor = new Label(); + checkBoxCaseSensitive = new CheckBox(); + checkBoxRegex = new CheckBox(); + buttonRegexHelper = new Button(); + radioButtonFromTop = new RadioButton(); + radioButtonFromSelected = new RadioButton(); + groupBoxSearchStart = new GroupBox(); + groupBoxOptions = new GroupBox(); + groupBoxDirection = new GroupBox(); + radioButtonBackward = new RadioButton(); + radioButtonForward = new RadioButton(); + comboBoxSearchFor = new ComboBox(); + helpProvider1 = new HelpProvider(); + groupBoxSearchStart.SuspendLayout(); + groupBoxOptions.SuspendLayout(); + groupBoxDirection.SuspendLayout(); + SuspendLayout(); // // buttonOk // - this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOk.Location = new System.Drawing.Point(317, 215); - this.buttonOk.Name = "buttonOk"; - this.buttonOk.Size = new System.Drawing.Size(75, 23); - this.buttonOk.TabIndex = 5; - this.buttonOk.Text = "OK"; - this.buttonOk.UseVisualStyleBackColor = true; - this.buttonOk.Click += new System.EventHandler(this.OnButtonOkClick); + buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonOk.DialogResult = DialogResult.OK; + buttonOk.Location = new Point(317, 215); + buttonOk.Name = "buttonOk"; + buttonOk.Size = new Size(75, 23); + buttonOk.TabIndex = 5; + buttonOk.Text = "OK"; + buttonOk.UseVisualStyleBackColor = true; + buttonOk.Click += OnButtonOkClick; // // buttonCancel // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(398, 215); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 23); - this.buttonCancel.TabIndex = 6; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.OnButtonCancelClick); + buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonCancel.DialogResult = DialogResult.Cancel; + buttonCancel.Location = new Point(398, 215); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(75, 23); + buttonCancel.TabIndex = 6; + buttonCancel.Text = "Cancel"; + buttonCancel.UseVisualStyleBackColor = true; + buttonCancel.Click += OnButtonCancelClick; // // labelSearchFor // - this.labelSearchFor.AutoSize = true; - this.labelSearchFor.Location = new System.Drawing.Point(10, 9); - this.labelSearchFor.Name = "labelSearchFor"; - this.labelSearchFor.Size = new System.Drawing.Size(87, 20); - this.labelSearchFor.TabIndex = 0; - this.labelSearchFor.Text = "&Search for:"; + labelSearchFor.AutoSize = true; + labelSearchFor.Location = new Point(10, 9); + labelSearchFor.Name = "labelSearchFor"; + labelSearchFor.Size = new Size(63, 15); + labelSearchFor.TabIndex = 0; + labelSearchFor.Text = "&Search for:"; // // checkBoxCaseSensitive // - this.checkBoxCaseSensitive.AutoSize = true; - this.checkBoxCaseSensitive.Location = new System.Drawing.Point(6, 19); - this.checkBoxCaseSensitive.Name = "checkBoxCaseSensitive"; - this.checkBoxCaseSensitive.Size = new System.Drawing.Size(137, 24); - this.checkBoxCaseSensitive.TabIndex = 4; - this.checkBoxCaseSensitive.Text = "&Case sensitive"; - this.checkBoxCaseSensitive.UseVisualStyleBackColor = true; + checkBoxCaseSensitive.AutoSize = true; + checkBoxCaseSensitive.Location = new Point(6, 19); + checkBoxCaseSensitive.Name = "checkBoxCaseSensitive"; + checkBoxCaseSensitive.Size = new Size(99, 19); + checkBoxCaseSensitive.TabIndex = 4; + checkBoxCaseSensitive.Text = "&Case sensitive"; + checkBoxCaseSensitive.UseVisualStyleBackColor = true; // // checkBoxRegex // - this.checkBoxRegex.AutoSize = true; - this.checkBoxRegex.Location = new System.Drawing.Point(6, 43); - this.checkBoxRegex.Name = "checkBoxRegex"; - this.checkBoxRegex.Size = new System.Drawing.Size(171, 24); - this.checkBoxRegex.TabIndex = 5; - this.checkBoxRegex.Text = "&Regular expression"; - this.checkBoxRegex.UseVisualStyleBackColor = true; + checkBoxRegex.AutoSize = true; + checkBoxRegex.Location = new Point(6, 43); + checkBoxRegex.Name = "checkBoxRegex"; + checkBoxRegex.Size = new Size(125, 19); + checkBoxRegex.TabIndex = 5; + checkBoxRegex.Text = "&Regular expression"; + checkBoxRegex.UseVisualStyleBackColor = true; // // buttonRegexHelper // - this.buttonRegexHelper.Location = new System.Drawing.Point(6, 72); - this.buttonRegexHelper.Name = "buttonRegexHelper"; - this.buttonRegexHelper.Size = new System.Drawing.Size(84, 26); - this.buttonRegexHelper.TabIndex = 3; - this.buttonRegexHelper.Text = "Regex-&Helper"; - this.buttonRegexHelper.UseVisualStyleBackColor = true; - this.buttonRegexHelper.Click += new System.EventHandler(this.OnButtonRegexClick); + buttonRegexHelper.AutoSize = true; + buttonRegexHelper.Location = new Point(6, 72); + buttonRegexHelper.Name = "buttonRegexHelper"; + buttonRegexHelper.Size = new Size(89, 26); + buttonRegexHelper.TabIndex = 3; + buttonRegexHelper.Text = "Regex-&Helper"; + buttonRegexHelper.UseVisualStyleBackColor = true; + buttonRegexHelper.Click += OnButtonRegexClick; // // radioButtonFromTop // - this.radioButtonFromTop.AutoSize = true; - this.radioButtonFromTop.Location = new System.Drawing.Point(6, 19); - this.radioButtonFromTop.Name = "radioButtonFromTop"; - this.radioButtonFromTop.Size = new System.Drawing.Size(98, 24); - this.radioButtonFromTop.TabIndex = 7; - this.radioButtonFromTop.TabStop = true; - this.radioButtonFromTop.Text = "From top"; - this.radioButtonFromTop.UseVisualStyleBackColor = true; + radioButtonFromTop.AutoSize = true; + radioButtonFromTop.Location = new Point(6, 19); + radioButtonFromTop.Name = "radioButtonFromTop"; + radioButtonFromTop.Size = new Size(74, 19); + radioButtonFromTop.TabIndex = 7; + radioButtonFromTop.TabStop = true; + radioButtonFromTop.Text = "From top"; + radioButtonFromTop.UseVisualStyleBackColor = true; // // radioButtonFromSelected // - this.radioButtonFromSelected.AutoSize = true; - this.radioButtonFromSelected.Location = new System.Drawing.Point(6, 42); - this.radioButtonFromSelected.Name = "radioButtonFromSelected"; - this.radioButtonFromSelected.Size = new System.Drawing.Size(163, 24); - this.radioButtonFromSelected.TabIndex = 8; - this.radioButtonFromSelected.TabStop = true; - this.radioButtonFromSelected.Text = "From selected line"; - this.radioButtonFromSelected.UseVisualStyleBackColor = true; + radioButtonFromSelected.AutoSize = true; + radioButtonFromSelected.Location = new Point(6, 42); + radioButtonFromSelected.Name = "radioButtonFromSelected"; + radioButtonFromSelected.Size = new Size(121, 19); + radioButtonFromSelected.TabIndex = 8; + radioButtonFromSelected.TabStop = true; + radioButtonFromSelected.Text = "From selected line"; + radioButtonFromSelected.UseVisualStyleBackColor = true; // // groupBoxSearchStart // - this.groupBoxSearchStart.Controls.Add(this.radioButtonFromTop); - this.groupBoxSearchStart.Controls.Add(this.radioButtonFromSelected); - this.groupBoxSearchStart.Location = new System.Drawing.Point(12, 74); - this.groupBoxSearchStart.Name = "groupBoxSearchStart"; - this.groupBoxSearchStart.Size = new System.Drawing.Size(179, 79); - this.groupBoxSearchStart.TabIndex = 1; - this.groupBoxSearchStart.TabStop = false; - this.groupBoxSearchStart.Text = "Search start"; + groupBoxSearchStart.Controls.Add(radioButtonFromTop); + groupBoxSearchStart.Controls.Add(radioButtonFromSelected); + groupBoxSearchStart.Location = new Point(12, 74); + groupBoxSearchStart.Name = "groupBoxSearchStart"; + groupBoxSearchStart.Size = new Size(179, 79); + groupBoxSearchStart.TabIndex = 1; + groupBoxSearchStart.TabStop = false; + groupBoxSearchStart.Text = "Search start"; // // groupBoxOptions // - this.groupBoxOptions.Controls.Add(this.checkBoxCaseSensitive); - this.groupBoxOptions.Controls.Add(this.checkBoxRegex); - this.groupBoxOptions.Controls.Add(this.buttonRegexHelper); - this.groupBoxOptions.Location = new System.Drawing.Point(198, 74); - this.groupBoxOptions.Name = "groupBoxOptions"; - this.groupBoxOptions.Size = new System.Drawing.Size(275, 104); - this.groupBoxOptions.TabIndex = 2; - this.groupBoxOptions.TabStop = false; - this.groupBoxOptions.Text = "Options"; + groupBoxOptions.Controls.Add(checkBoxCaseSensitive); + groupBoxOptions.Controls.Add(checkBoxRegex); + groupBoxOptions.Controls.Add(buttonRegexHelper); + groupBoxOptions.Location = new Point(198, 74); + groupBoxOptions.Name = "groupBoxOptions"; + groupBoxOptions.Size = new Size(275, 104); + groupBoxOptions.TabIndex = 2; + groupBoxOptions.TabStop = false; + groupBoxOptions.Text = "Options"; // // groupBoxDirection // - this.groupBoxDirection.Controls.Add(this.radioButtonBackward); - this.groupBoxDirection.Controls.Add(this.radioButtonForward); - this.groupBoxDirection.Location = new System.Drawing.Point(13, 159); - this.groupBoxDirection.Name = "groupBoxDirection"; - this.groupBoxDirection.Size = new System.Drawing.Size(122, 79); - this.groupBoxDirection.TabIndex = 4; - this.groupBoxDirection.TabStop = false; - this.groupBoxDirection.Text = "Direction"; + groupBoxDirection.Controls.Add(radioButtonBackward); + groupBoxDirection.Controls.Add(radioButtonForward); + groupBoxDirection.Location = new Point(13, 159); + groupBoxDirection.Name = "groupBoxDirection"; + groupBoxDirection.Size = new Size(122, 79); + groupBoxDirection.TabIndex = 4; + groupBoxDirection.TabStop = false; + groupBoxDirection.Text = "Direction"; // // radioButtonBackward // - this.radioButtonBackward.AutoSize = true; - this.radioButtonBackward.Location = new System.Drawing.Point(7, 44); - this.radioButtonBackward.Name = "radioButtonBackward"; - this.radioButtonBackward.Size = new System.Drawing.Size(104, 24); - this.radioButtonBackward.TabIndex = 1; - this.radioButtonBackward.TabStop = true; - this.radioButtonBackward.Text = "Backward"; - this.radioButtonBackward.UseVisualStyleBackColor = true; + radioButtonBackward.AutoSize = true; + radioButtonBackward.Location = new Point(7, 44); + radioButtonBackward.Name = "radioButtonBackward"; + radioButtonBackward.Size = new Size(76, 19); + radioButtonBackward.TabIndex = 1; + radioButtonBackward.TabStop = true; + radioButtonBackward.Text = "Backward"; + radioButtonBackward.UseVisualStyleBackColor = true; // // radioButtonForward // - this.radioButtonForward.AutoSize = true; - this.radioButtonForward.Location = new System.Drawing.Point(7, 20); - this.radioButtonForward.Name = "radioButtonForward"; - this.radioButtonForward.Size = new System.Drawing.Size(92, 24); - this.radioButtonForward.TabIndex = 0; - this.radioButtonForward.TabStop = true; - this.radioButtonForward.Text = "Forward"; - this.radioButtonForward.UseVisualStyleBackColor = true; + radioButtonForward.AutoSize = true; + radioButtonForward.Location = new Point(7, 20); + radioButtonForward.Name = "radioButtonForward"; + radioButtonForward.Size = new Size(68, 19); + radioButtonForward.TabIndex = 0; + radioButtonForward.TabStop = true; + radioButtonForward.Text = "Forward"; + radioButtonForward.UseVisualStyleBackColor = true; // // comboBoxSearchFor // - this.comboBoxSearchFor.FormattingEnabled = true; - this.comboBoxSearchFor.Location = new System.Drawing.Point(13, 34); - this.comboBoxSearchFor.Name = "comboBoxSearchFor"; - this.comboBoxSearchFor.Size = new System.Drawing.Size(460, 28); - this.comboBoxSearchFor.TabIndex = 0; + comboBoxSearchFor.FormattingEnabled = true; + comboBoxSearchFor.Location = new Point(13, 34); + comboBoxSearchFor.Name = "comboBoxSearchFor"; + comboBoxSearchFor.Size = new Size(460, 23); + comboBoxSearchFor.TabIndex = 0; // // helpProvider1 // - this.helpProvider1.HelpNamespace = "LogExpert.chm"; + helpProvider1.HelpNamespace = "LogExpert.chm"; // // SearchDialog // - this.AcceptButton = this.buttonOk; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(488, 250); - this.Controls.Add(this.comboBoxSearchFor); - this.Controls.Add(this.groupBoxDirection); - this.Controls.Add(this.groupBoxOptions); - this.Controls.Add(this.groupBoxSearchStart); - this.Controls.Add(this.labelSearchFor); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOk); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.helpProvider1.SetHelpKeyword(this, "Search and Navigation.htm"); - this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SearchDialog"; - this.helpProvider1.SetShowHelp(this, true); - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Search"; - this.groupBoxSearchStart.ResumeLayout(false); - this.groupBoxSearchStart.PerformLayout(); - this.groupBoxOptions.ResumeLayout(false); - this.groupBoxOptions.PerformLayout(); - this.groupBoxDirection.ResumeLayout(false); - this.groupBoxDirection.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + AcceptButton = buttonOk; + CancelButton = buttonCancel; + ClientSize = new Size(488, 250); + Controls.Add(comboBoxSearchFor); + Controls.Add(groupBoxDirection); + Controls.Add(groupBoxOptions); + Controls.Add(groupBoxSearchStart); + Controls.Add(labelSearchFor); + Controls.Add(buttonCancel); + Controls.Add(buttonOk); + FormBorderStyle = FormBorderStyle.FixedDialog; + helpProvider1.SetHelpKeyword(this, "Search and Navigation.htm"); + helpProvider1.SetHelpNavigator(this, HelpNavigator.Topic); + MaximizeBox = false; + MinimizeBox = false; + Name = "SearchDialog"; + helpProvider1.SetShowHelp(this, true); + StartPosition = FormStartPosition.CenterParent; + Text = "Search"; + groupBoxSearchStart.ResumeLayout(false); + groupBoxSearchStart.PerformLayout(); + groupBoxOptions.ResumeLayout(false); + groupBoxOptions.PerformLayout(); + groupBoxDirection.ResumeLayout(false); + groupBoxDirection.PerformLayout(); + ResumeLayout(false); + PerformLayout(); -} + } -#endregion + #endregion -private System.Windows.Forms.Button buttonOk; + private System.Windows.Forms.Button buttonOk; private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.Label labelSearchFor; private System.Windows.Forms.CheckBox checkBoxCaseSensitive; From ee521cc934f061edc515f71085b417cdd71bb205 Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 08:48:50 +0300 Subject: [PATCH 2/6] Fix exception in RegexHelperDialog Insert new items into comboBox dataSource - _expressionHistoryList and _testtextHistoryList instead of directly into comboBox.Items. --- src/LogExpert.UI/Dialogs/RegexHelperDialog.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs b/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs index ac401d8b..277295b4 100644 --- a/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs +++ b/src/LogExpert.UI/Dialogs/RegexHelperDialog.cs @@ -109,12 +109,12 @@ private void OnCaseSensitiveCheckBoxCheckedChanged (object sender, EventArgs e) private void OnButtonOkClick (object sender, EventArgs e) { var text = comboBoxRegex.Text; - comboBoxRegex.Items.Remove(text); - comboBoxRegex.Items.Insert(0, text); + _ = _expressionHistoryList.Remove(text); + _expressionHistoryList.Insert(0, text); text = comboBoxTestText.Text; - comboBoxTestText.Items.Remove(text); - comboBoxTestText.Items.Insert(0, text); + _ = _testtextHistoryList.Remove(text); + _testtextHistoryList.Insert(0, text); if (comboBoxRegex.Items.Count > MAX_HISTORY) { From 79d59d94ac222cc3ae8a64adaaacfe734afb0356 Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 08:50:48 +0300 Subject: [PATCH 3/6] Log actual exception instead of ThreapdExceptionEventArgs or UnhandledExceptionEventArgs --- src/LogExpert/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index a895f909..c9113ef8 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -319,7 +319,7 @@ private static void ShowUnhandledException (object exceptionObject) private static void Application_ThreadException (object sender, ThreadExceptionEventArgs e) { - _logger.Fatal(e); + _logger.Fatal(e.Exception, "Application.ThreadException: "); Thread thread = new(ShowUnhandledException) { @@ -333,7 +333,7 @@ private static void Application_ThreadException (object sender, ThreadExceptionE private static void CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e) { - _logger.Fatal(e); + _logger.Fatal(e.ExceptionObject as Exception, "AppDomain.CurrentDomain.UnhandledException: "); var exceptionObject = e.ExceptionObject; From 0bacf4e003c8bddc82e24a3675169e670cddef47 Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 08:52:40 +0300 Subject: [PATCH 4/6] Reduce excessive log messages from PluginRegistry Moved _logger.Info call into if statement where it should be --- src/PluginRegistry/PluginRegistry.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PluginRegistry/PluginRegistry.cs b/src/PluginRegistry/PluginRegistry.cs index 1d0a595f..f20de420 100644 --- a/src/PluginRegistry/PluginRegistry.cs +++ b/src/PluginRegistry/PluginRegistry.cs @@ -155,10 +155,10 @@ private void LoadPluginAssembly (string dllName, string interfaceName) foreach (var type in types) { - _logger.Info($"Type {type.FullName} in assembly {assembly.FullName} implements {interfaceName}"); - if (type.GetInterfaces().Any(i => i.FullName == interfaceName)) { + _logger.Info($"Type {type.FullName} in assembly {assembly.FullName} implements {interfaceName}"); + var cti = type.GetConstructor(Type.EmptyTypes); if (cti != null) { From 4a3f5acab254d6c32290c034ce527dcec071f1b7 Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 15:37:28 +0300 Subject: [PATCH 5/6] Replace buttonRegexHelper with linkLabelRegexHelper Replaced the `Button` control `buttonRegexHelper` with a `LinkLabel` control `linkLabelRegexHelper` to improve the UI for the search dialog. Updated `TabIndex` values across multiple controls to ensure proper tab navigation order. Adjusted properties of `linkLabelRegexHelper` for accessibility and alignment with the new design. Modified `groupBoxOptions` and `groupBoxDirection` controls to reflect the new layout, including size and `TabIndex` adjustments. Removed the declaration of `buttonRegexHelper` and added `linkLabelRegexHelper` in the private fields section. --- .../Dialogs/SearchDialog.Designer.cs | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs index 0dd33305..18be919e 100644 --- a/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs +++ b/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs @@ -33,7 +33,7 @@ private void InitializeComponent () labelSearchFor = new Label(); checkBoxCaseSensitive = new CheckBox(); checkBoxRegex = new CheckBox(); - buttonRegexHelper = new Button(); + linkLabelRegexHelper = new LinkLabel(); radioButtonFromTop = new RadioButton(); radioButtonFromSelected = new RadioButton(); groupBoxSearchStart = new GroupBox(); @@ -55,7 +55,7 @@ private void InitializeComponent () buttonOk.Location = new Point(317, 215); buttonOk.Name = "buttonOk"; buttonOk.Size = new Size(75, 23); - buttonOk.TabIndex = 5; + buttonOk.TabIndex = 7; buttonOk.Text = "OK"; buttonOk.UseVisualStyleBackColor = true; buttonOk.Click += OnButtonOkClick; @@ -67,7 +67,7 @@ private void InitializeComponent () buttonCancel.Location = new Point(398, 215); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(75, 23); - buttonCancel.TabIndex = 6; + buttonCancel.TabIndex = 8; buttonCancel.Text = "Cancel"; buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Click += OnButtonCancelClick; @@ -101,16 +101,17 @@ private void InitializeComponent () checkBoxRegex.Text = "&Regular expression"; checkBoxRegex.UseVisualStyleBackColor = true; // - // buttonRegexHelper + // linkLabelRegexHelper // - buttonRegexHelper.AutoSize = true; - buttonRegexHelper.Location = new Point(6, 72); - buttonRegexHelper.Name = "buttonRegexHelper"; - buttonRegexHelper.Size = new Size(89, 26); - buttonRegexHelper.TabIndex = 3; - buttonRegexHelper.Text = "Regex-&Helper"; - buttonRegexHelper.UseVisualStyleBackColor = true; - buttonRegexHelper.Click += OnButtonRegexClick; + linkLabelRegexHelper.AccessibleDescription = "Open regular expressions helper dialog"; + linkLabelRegexHelper.AutoSize = true; + linkLabelRegexHelper.Location = new Point(158, 46); + linkLabelRegexHelper.Name = "linkLabelRegexHelper"; + linkLabelRegexHelper.Size = new Size(79, 15); + linkLabelRegexHelper.TabIndex = 6; + linkLabelRegexHelper.TabStop = true; + linkLabelRegexHelper.Text = "Regex-&Helper"; + linkLabelRegexHelper.Click += OnButtonRegexClick; // // radioButtonFromTop // @@ -118,7 +119,7 @@ private void InitializeComponent () radioButtonFromTop.Location = new Point(6, 19); radioButtonFromTop.Name = "radioButtonFromTop"; radioButtonFromTop.Size = new Size(74, 19); - radioButtonFromTop.TabIndex = 7; + radioButtonFromTop.TabIndex = 0; radioButtonFromTop.TabStop = true; radioButtonFromTop.Text = "From top"; radioButtonFromTop.UseVisualStyleBackColor = true; @@ -129,7 +130,7 @@ private void InitializeComponent () radioButtonFromSelected.Location = new Point(6, 42); radioButtonFromSelected.Name = "radioButtonFromSelected"; radioButtonFromSelected.Size = new Size(121, 19); - radioButtonFromSelected.TabIndex = 8; + radioButtonFromSelected.TabIndex = 0; radioButtonFromSelected.TabStop = true; radioButtonFromSelected.Text = "From selected line"; radioButtonFromSelected.UseVisualStyleBackColor = true; @@ -149,11 +150,11 @@ private void InitializeComponent () // groupBoxOptions.Controls.Add(checkBoxCaseSensitive); groupBoxOptions.Controls.Add(checkBoxRegex); - groupBoxOptions.Controls.Add(buttonRegexHelper); + groupBoxOptions.Controls.Add(linkLabelRegexHelper); groupBoxOptions.Location = new Point(198, 74); groupBoxOptions.Name = "groupBoxOptions"; - groupBoxOptions.Size = new Size(275, 104); - groupBoxOptions.TabIndex = 2; + groupBoxOptions.Size = new Size(275, 79); + groupBoxOptions.TabIndex = 3; groupBoxOptions.TabStop = false; groupBoxOptions.Text = "Options"; // @@ -163,8 +164,8 @@ private void InitializeComponent () groupBoxDirection.Controls.Add(radioButtonForward); groupBoxDirection.Location = new Point(13, 159); groupBoxDirection.Name = "groupBoxDirection"; - groupBoxDirection.Size = new Size(122, 79); - groupBoxDirection.TabIndex = 4; + groupBoxDirection.Size = new Size(178, 79); + groupBoxDirection.TabIndex = 2; groupBoxDirection.TabStop = false; groupBoxDirection.Text = "Direction"; // @@ -174,7 +175,7 @@ private void InitializeComponent () radioButtonBackward.Location = new Point(7, 44); radioButtonBackward.Name = "radioButtonBackward"; radioButtonBackward.Size = new Size(76, 19); - radioButtonBackward.TabIndex = 1; + radioButtonBackward.TabIndex = 0; radioButtonBackward.TabStop = true; radioButtonBackward.Text = "Backward"; radioButtonBackward.UseVisualStyleBackColor = true; @@ -241,7 +242,7 @@ private void InitializeComponent () private System.Windows.Forms.Label labelSearchFor; private System.Windows.Forms.CheckBox checkBoxCaseSensitive; private System.Windows.Forms.CheckBox checkBoxRegex; -private System.Windows.Forms.Button buttonRegexHelper; +private System.Windows.Forms.LinkLabel linkLabelRegexHelper; private System.Windows.Forms.RadioButton radioButtonFromTop; private System.Windows.Forms.RadioButton radioButtonFromSelected; private System.Windows.Forms.GroupBox groupBoxSearchStart; From 95bf3b0ba71a4325dd73af9a48b2b9906044b568 Mon Sep 17 00:00:00 2001 From: Andis Date: Thu, 2 Oct 2025 15:58:24 +0300 Subject: [PATCH 6/6] Revert "Log actual exception instead of ThreapdExceptionEventArgs or UnhandledExceptionEventArgs" This reverts commit 79d59d94ac222cc3ae8a64adaaacfe734afb0356. --- src/LogExpert/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs index c9113ef8..a895f909 100644 --- a/src/LogExpert/Program.cs +++ b/src/LogExpert/Program.cs @@ -319,7 +319,7 @@ private static void ShowUnhandledException (object exceptionObject) private static void Application_ThreadException (object sender, ThreadExceptionEventArgs e) { - _logger.Fatal(e.Exception, "Application.ThreadException: "); + _logger.Fatal(e); Thread thread = new(ShowUnhandledException) { @@ -333,7 +333,7 @@ private static void Application_ThreadException (object sender, ThreadExceptionE private static void CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e) { - _logger.Fatal(e.ExceptionObject as Exception, "AppDomain.CurrentDomain.UnhandledException: "); + _logger.Fatal(e); var exceptionObject = e.ExceptionObject;