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)
{
diff --git a/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs b/src/LogExpert.UI/Dialogs/SearchDialog.Designer.cs
index 8a0e20dc..18be919e 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,227 +20,229 @@ 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();
+ linkLabelRegexHelper = new LinkLabel();
+ 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 = 7;
+ 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 = 8;
+ 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;
- //
- // 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);
+ 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;
+ //
+ // linkLabelRegexHelper
+ //
+ 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
//
- 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 = 0;
+ 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 = 0;
+ 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(linkLabelRegexHelper);
+ groupBoxOptions.Location = new Point(198, 74);
+ groupBoxOptions.Name = "groupBoxOptions";
+ groupBoxOptions.Size = new Size(275, 79);
+ groupBoxOptions.TabIndex = 3;
+ 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(178, 79);
+ groupBoxDirection.TabIndex = 2;
+ 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 = 0;
+ 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;
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;
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)
{