diff --git a/src/LogExpert/Config/Preferences.cs b/src/LogExpert/Config/Preferences.cs
index 6e4c99b0..d425c565 100644
--- a/src/LogExpert/Config/Preferences.cs
+++ b/src/LogExpert/Config/Preferences.cs
@@ -98,6 +98,8 @@ public class Preferences
public bool useLegacyReader;
+ public bool ShowErrorMessageAllowOnlyOneInstances { get; set; }
+
#endregion
}
}
\ No newline at end of file
diff --git a/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.Designer.cs b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.Designer.cs
new file mode 100644
index 00000000..d03d6dfa
--- /dev/null
+++ b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.Designer.cs
@@ -0,0 +1,102 @@
+
+namespace LogExpert.Dialogs
+{
+ partial class AllowOnlyOneInstanceErrorDialog
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #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.checkBoxIgnoreMessage = new System.Windows.Forms.CheckBox();
+ this.buttonOk = new System.Windows.Forms.Button();
+ this.labelErrorText = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // checkBoxIgnoreMessage
+ //
+ this.checkBoxIgnoreMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.checkBoxIgnoreMessage.AutoSize = true;
+ this.checkBoxIgnoreMessage.Location = new System.Drawing.Point(9, 56);
+ this.checkBoxIgnoreMessage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.checkBoxIgnoreMessage.Name = "checkBoxIgnoreMessage";
+ this.checkBoxIgnoreMessage.Size = new System.Drawing.Size(177, 17);
+ this.checkBoxIgnoreMessage.TabIndex = 0;
+ this.checkBoxIgnoreMessage.Text = "Show this message only once\\?";
+ this.checkBoxIgnoreMessage.UseVisualStyleBackColor = true;
+ //
+ // buttonOk
+ //
+ this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.buttonOk.Location = new System.Drawing.Point(209, 53);
+ this.buttonOk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.Size = new System.Drawing.Size(74, 23);
+ this.buttonOk.TabIndex = 1;
+ this.buttonOk.Text = "Ok";
+ this.buttonOk.UseVisualStyleBackColor = true;
+ this.buttonOk.Click += new System.EventHandler(this.OnButtonOkClick);
+ //
+ // labelErrorText
+ //
+ this.labelErrorText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelErrorText.AutoEllipsis = true;
+ this.labelErrorText.Location = new System.Drawing.Point(9, 8);
+ this.labelErrorText.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+ this.labelErrorText.Name = "labelErrorText";
+ this.labelErrorText.Size = new System.Drawing.Size(273, 43);
+ this.labelErrorText.TabIndex = 2;
+ this.labelErrorText.Text = "Only one instance allowed, uncheck \\\"View Settings => Allow only 1 Instances\\\" to" +
+ " start multiple instances!";
+ //
+ // AllowOnlyOneInstanceErrorDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(293, 84);
+ this.Controls.Add(this.labelErrorText);
+ this.Controls.Add(this.buttonOk);
+ this.Controls.Add(this.checkBoxIgnoreMessage);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.MaximizeBox = false;
+ this.Name = "AllowOnlyOneInstanceErrorDialog";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Text = "AllowOnlyOneInstanceErrorDialog";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox checkBoxIgnoreMessage;
+ private System.Windows.Forms.Button buttonOk;
+ private System.Windows.Forms.Label labelErrorText;
+ }
+}
\ No newline at end of file
diff --git a/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.cs b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.cs
new file mode 100644
index 00000000..2c2c29f1
--- /dev/null
+++ b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.cs
@@ -0,0 +1,25 @@
+using System.Windows.Forms;
+
+namespace LogExpert.Dialogs
+{
+ public partial class AllowOnlyOneInstanceErrorDialog : Form
+ {
+ public bool DoNotShowThisMessageAgain { get; private set; }
+
+ public AllowOnlyOneInstanceErrorDialog()
+ {
+ InitializeComponent();
+ SetText();
+ }
+
+ private void SetText()
+ {
+ labelErrorText.Text = @"Only one instance allowed, uncheck ""View Settings => Allow only 1 Instances"" to start multiple instances!";
+ }
+
+ private void OnButtonOkClick(object sender, System.EventArgs e)
+ {
+ DoNotShowThisMessageAgain = checkBoxIgnoreMessage.Checked;
+ }
+ }
+}
diff --git a/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.resx b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.resx
new file mode 100644
index 00000000..1af7de15
--- /dev/null
+++ b/src/LogExpert/Dialogs/AllowOnlyOneInstanceErrorDialog.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/src/LogExpert/Dialogs/SettingsDialog.Designer.cs b/src/LogExpert/Dialogs/SettingsDialog.Designer.cs
index d9a8b28f..b0c51df4 100644
--- a/src/LogExpert/Dialogs/SettingsDialog.Designer.cs
+++ b/src/LogExpert/Dialogs/SettingsDialog.Designer.cs
@@ -151,6 +151,7 @@ private void InitializeComponent()
this.buttonImport = new System.Windows.Forms.Button();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.checkBoxShowErrorMessageOnlyOneInstance = new System.Windows.Forms.CheckBox();
this.tabControlSettings.SuspendLayout();
this.tabPageViewSettings.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.upDownMaximumFilterEntriesDisplayed)).BeginInit();
@@ -241,7 +242,7 @@ private void InitializeComponent()
0,
0});
this.upDownMaximumFilterEntriesDisplayed.Name = "upDownMaximumFilterEntriesDisplayed";
- this.upDownMaximumFilterEntriesDisplayed.Size = new System.Drawing.Size(80, 26);
+ this.upDownMaximumFilterEntriesDisplayed.Size = new System.Drawing.Size(106, 26);
this.upDownMaximumFilterEntriesDisplayed.TabIndex = 13;
this.upDownMaximumFilterEntriesDisplayed.Value = new decimal(new int[] {
20,
@@ -269,7 +270,7 @@ private void InitializeComponent()
0,
0});
this.upDownMaximumFilterEntries.Name = "upDownMaximumFilterEntries";
- this.upDownMaximumFilterEntries.Size = new System.Drawing.Size(80, 26);
+ this.upDownMaximumFilterEntries.Size = new System.Drawing.Size(106, 26);
this.upDownMaximumFilterEntries.TabIndex = 11;
this.upDownMaximumFilterEntries.Value = new decimal(new int[] {
30,
@@ -304,12 +305,13 @@ private void InitializeComponent()
this.comboBoxEncoding.Location = new System.Drawing.Point(688, 29);
this.comboBoxEncoding.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.comboBoxEncoding.Name = "comboBoxEncoding";
- this.comboBoxEncoding.Size = new System.Drawing.Size(151, 28);
+ this.comboBoxEncoding.Size = new System.Drawing.Size(177, 28);
this.comboBoxEncoding.TabIndex = 8;
this.toolTip.SetToolTip(this.comboBoxEncoding, "Encoding to be used when no BOM header and no persistence data is available.");
//
// groupBoxMisc
//
+ this.groupBoxMisc.Controls.Add(this.checkBoxShowErrorMessageOnlyOneInstance);
this.groupBoxMisc.Controls.Add(this.cpDownColumnWidth);
this.groupBoxMisc.Controls.Add(this.checkBoxColumnSize);
this.groupBoxMisc.Controls.Add(this.buttonTailColor);
@@ -321,14 +323,14 @@ private void InitializeComponent()
this.groupBoxMisc.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBoxMisc.Name = "groupBoxMisc";
this.groupBoxMisc.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.groupBoxMisc.Size = new System.Drawing.Size(384, 226);
+ this.groupBoxMisc.Size = new System.Drawing.Size(410, 226);
this.groupBoxMisc.TabIndex = 7;
this.groupBoxMisc.TabStop = false;
this.groupBoxMisc.Text = "Misc";
//
// cpDownColumnWidth
//
- this.cpDownColumnWidth.Location = new System.Drawing.Point(231, 174);
+ this.cpDownColumnWidth.Location = new System.Drawing.Point(304, 175);
this.cpDownColumnWidth.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cpDownColumnWidth.Maximum = new decimal(new int[] {
9000,
@@ -359,18 +361,18 @@ private void InitializeComponent()
this.checkBoxColumnSize.TabIndex = 5;
this.checkBoxColumnSize.Text = "Set last column width";
this.checkBoxColumnSize.UseVisualStyleBackColor = true;
- this.checkBoxColumnSize.CheckedChanged += new System.EventHandler(this.columnSizeCheckBox_CheckedChanged);
+ this.checkBoxColumnSize.CheckedChanged += new System.EventHandler(this.OnColumnSizeCheckBoxCheckedChanged);
//
// buttonTailColor
//
- this.buttonTailColor.Location = new System.Drawing.Point(231, 134);
+ this.buttonTailColor.Location = new System.Drawing.Point(304, 135);
this.buttonTailColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.buttonTailColor.Name = "buttonTailColor";
this.buttonTailColor.Size = new System.Drawing.Size(84, 32);
this.buttonTailColor.TabIndex = 4;
this.buttonTailColor.Text = "Color...";
this.buttonTailColor.UseVisualStyleBackColor = true;
- this.buttonTailColor.Click += new System.EventHandler(this.tailColorButton_Click);
+ this.buttonTailColor.Click += new System.EventHandler(this.OnTailColorButtonClick);
//
// checkBoxTailState
//
@@ -497,7 +499,7 @@ private void InitializeComponent()
this.buttonChangeFont.TabIndex = 1;
this.buttonChangeFont.Text = "Change...";
this.buttonChangeFont.UseVisualStyleBackColor = true;
- this.buttonChangeFont.Click += new System.EventHandler(this.changeFontButton_Click);
+ this.buttonChangeFont.Click += new System.EventHandler(this.OnChangeFontButtonClick);
//
// labelFont
//
@@ -594,7 +596,7 @@ private void InitializeComponent()
this.buttonTimespreadColor.TabIndex = 7;
this.buttonTimespreadColor.Text = "Color...";
this.buttonTimespreadColor.UseVisualStyleBackColor = true;
- this.buttonTimespreadColor.Click += new System.EventHandler(this.timespreadColorButton_Click);
+ this.buttonTimespreadColor.Click += new System.EventHandler(this.OnTimespreadColorButtonClick);
//
// checkBoxTimeSpread
//
@@ -718,7 +720,7 @@ private void InitializeComponent()
this.buttonToolDelete.TabIndex = 2;
this.buttonToolDelete.Text = "Remove";
this.buttonToolDelete.UseVisualStyleBackColor = true;
- this.buttonToolDelete.Click += new System.EventHandler(this.toolDeleteButton_Click);
+ this.buttonToolDelete.Click += new System.EventHandler(this.OnToolDeleteButtonClick);
//
// buttonToolAdd
//
@@ -729,7 +731,7 @@ private void InitializeComponent()
this.buttonToolAdd.TabIndex = 1;
this.buttonToolAdd.Text = "Add new";
this.buttonToolAdd.UseVisualStyleBackColor = true;
- this.buttonToolAdd.Click += new System.EventHandler(this.toolAddButton_Click);
+ this.buttonToolAdd.Click += new System.EventHandler(this.OnToolAddButtonClick);
//
// buttonToolDown
//
@@ -740,7 +742,7 @@ private void InitializeComponent()
this.buttonToolDown.TabIndex = 4;
this.buttonToolDown.Text = "Down";
this.buttonToolDown.UseVisualStyleBackColor = true;
- this.buttonToolDown.Click += new System.EventHandler(this.toolDownButton_Click);
+ this.buttonToolDown.Click += new System.EventHandler(this.OnToolDownButtonClick);
//
// buttonToolUp
//
@@ -751,7 +753,7 @@ private void InitializeComponent()
this.buttonToolUp.TabIndex = 3;
this.buttonToolUp.Text = "Up";
this.buttonToolUp.UseVisualStyleBackColor = true;
- this.buttonToolUp.Click += new System.EventHandler(this.toolUpButton_Click);
+ this.buttonToolUp.Click += new System.EventHandler(this.OnToolUpButtonClick);
//
// listBoxTools
//
@@ -761,7 +763,7 @@ private void InitializeComponent()
this.listBoxTools.Name = "listBoxTools";
this.listBoxTools.Size = new System.Drawing.Size(406, 165);
this.listBoxTools.TabIndex = 0;
- this.listBoxTools.SelectedIndexChanged += new System.EventHandler(this.toolListBox_SelectedIndexChanged);
+ this.listBoxTools.SelectedIndexChanged += new System.EventHandler(this.OnToolListBoxSelectedIndexChanged);
//
// groupBoxToolSettings
//
@@ -829,7 +831,7 @@ private void InitializeComponent()
this.buttonIcon.Text = " Icon...";
this.buttonIcon.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.buttonIcon.UseVisualStyleBackColor = true;
- this.buttonIcon.Click += new System.EventHandler(this.iconButton_Click);
+ this.buttonIcon.Click += new System.EventHandler(this.OnIconButtonClick);
//
// labelToolName
//
@@ -878,7 +880,7 @@ private void InitializeComponent()
this.checkBoxSysout.TabIndex = 6;
this.checkBoxSysout.Text = "Pipe sysout to tab";
this.checkBoxSysout.UseVisualStyleBackColor = true;
- this.checkBoxSysout.CheckedChanged += new System.EventHandler(this.sysoutCheckBoxA_CheckedChanged);
+ this.checkBoxSysout.CheckedChanged += new System.EventHandler(this.OnSysoutCheckBoxACheckedChanged);
//
// buttonArguments
//
@@ -889,7 +891,7 @@ private void InitializeComponent()
this.buttonArguments.TabIndex = 5;
this.buttonArguments.Text = "...";
this.buttonArguments.UseVisualStyleBackColor = true;
- this.buttonArguments.Click += new System.EventHandler(this.argButtonA_Click);
+ this.buttonArguments.Click += new System.EventHandler(this.OnArgButtonAClick);
//
// labelTool
//
@@ -910,7 +912,7 @@ private void InitializeComponent()
this.buttonTool.TabIndex = 3;
this.buttonTool.Text = "...";
this.buttonTool.UseVisualStyleBackColor = true;
- this.buttonTool.Click += new System.EventHandler(this.toolButtonA_Click);
+ this.buttonTool.Click += new System.EventHandler(this.OnToolButtonAClick);
//
// textBoxTool
//
@@ -986,7 +988,7 @@ private void InitializeComponent()
this.buttonDelete.TabIndex = 3;
this.buttonDelete.Text = "Delete";
this.buttonDelete.UseVisualStyleBackColor = true;
- this.buttonDelete.Click += new System.EventHandler(this.deleteButton_Click);
+ this.buttonDelete.Click += new System.EventHandler(this.OnDeleteButtonClick);
//
// dataGridViewColumnizer
//
@@ -1005,7 +1007,7 @@ private void InitializeComponent()
this.dataGridViewColumnizer.RowHeadersWidth = 62;
this.dataGridViewColumnizer.Size = new System.Drawing.Size(934, 365);
this.dataGridViewColumnizer.TabIndex = 2;
- this.dataGridViewColumnizer.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.columnizerDataGridView_RowsAdded);
+ this.dataGridViewColumnizer.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.OnColumnizerDataGridViewRowsAdded);
//
// columnFileMask
//
@@ -1247,7 +1249,7 @@ private void InitializeComponent()
this.listBoxPlugin.Size = new System.Drawing.Size(322, 344);
this.listBoxPlugin.TabIndex = 0;
this.listBoxPlugin.ValueMember = "Text";
- this.listBoxPlugin.SelectedIndexChanged += new System.EventHandler(this.pluginListBox_SelectedIndexChanged);
+ this.listBoxPlugin.SelectedIndexChanged += new System.EventHandler(this.OnPluginListBoxSelectedIndexChanged);
//
// groupBoxSettings
//
@@ -1286,7 +1288,7 @@ private void InitializeComponent()
this.buttonConfigPlugin.TabIndex = 0;
this.buttonConfigPlugin.Text = "Configure...";
this.buttonConfigPlugin.UseVisualStyleBackColor = true;
- this.buttonConfigPlugin.Click += new System.EventHandler(this.configPluginButton_Click);
+ this.buttonConfigPlugin.Click += new System.EventHandler(this.OnConfigPluginButtonClick);
//
// tabPageSessions
//
@@ -1363,7 +1365,7 @@ private void InitializeComponent()
this.buttonSessionSaveDir.TabIndex = 3;
this.buttonSessionSaveDir.Text = "...";
this.buttonSessionSaveDir.UseVisualStyleBackColor = true;
- this.buttonSessionSaveDir.Click += new System.EventHandler(this.sessionSaveDirButton_Click);
+ this.buttonSessionSaveDir.Click += new System.EventHandler(this.OnSessionSaveDirButtonClick);
//
// radioButtonSessionSaveOwn
//
@@ -1567,7 +1569,7 @@ private void InitializeComponent()
0,
0,
0});
- this.upDownLinesPerBlock.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
+ this.upDownLinesPerBlock.ValueChanged += new System.EventHandler(this.OnNumericUpDown1ValueChanged);
//
// upDownBlockCount
//
@@ -1666,6 +1668,17 @@ private void InitializeComponent()
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.Width = 259;
//
+ // checkBoxShowErrorMessageOnlyOneInstance
+ //
+ this.checkBoxShowErrorMessageOnlyOneInstance.AutoSize = true;
+ this.checkBoxShowErrorMessageOnlyOneInstance.Location = new System.Drawing.Point(210, 66);
+ this.checkBoxShowErrorMessageOnlyOneInstance.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ this.checkBoxShowErrorMessageOnlyOneInstance.Name = "checkBoxShowErrorMessageOnlyOneInstance";
+ this.checkBoxShowErrorMessageOnlyOneInstance.Size = new System.Drawing.Size(192, 24);
+ this.checkBoxShowErrorMessageOnlyOneInstance.TabIndex = 7;
+ this.checkBoxShowErrorMessageOnlyOneInstance.Text = "Show Error Message?";
+ this.checkBoxShowErrorMessageOnlyOneInstance.UseVisualStyleBackColor = true;
+ //
// SettingsDialog
//
this.AcceptButton = this.buttonOk;
@@ -1689,7 +1702,7 @@ private void InitializeComponent()
this.helpProvider.SetShowHelp(this, true);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Settings";
- this.Load += new System.EventHandler(this.SettingsDialog_Load);
+ this.Load += new System.EventHandler(this.OnSettingsDialogLoad);
this.tabControlSettings.ResumeLayout(false);
this.tabPageViewSettings.ResumeLayout(false);
this.tabPageViewSettings.PerformLayout();
@@ -1867,5 +1880,6 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox checkBoxAutoPick;
private System.Windows.Forms.CheckBox checkBoxPortableMode;
private System.Windows.Forms.RadioButton radioButtonSessionApplicationStartupDir;
+ private System.Windows.Forms.CheckBox checkBoxShowErrorMessageOnlyOneInstance;
}
}
diff --git a/src/LogExpert/Dialogs/SettingsDialog.cs b/src/LogExpert/Dialogs/SettingsDialog.cs
index b1f528ae..3dd13317 100644
--- a/src/LogExpert/Dialogs/SettingsDialog.cs
+++ b/src/LogExpert/Dialogs/SettingsDialog.cs
@@ -149,7 +149,7 @@ private void FillDialog()
upDownPollingInterval.Value = Preferences.pollingInterval;
checkBoxMultiThread.Checked = Preferences.multiThreadFilter;
- dataGridViewColumnizer.DataError += columnizerDataGridView_DataError;
+ dataGridViewColumnizer.DataError += OnColumnizerDataGridViewDataError;
FillColumnizerList();
FillPluginList();
@@ -165,6 +165,7 @@ private void FillDialog()
checkBoxAskCloseTabs.Checked = Preferences.askForClose;
checkBoxColumnFinder.Checked = Preferences.showColumnFinder;
checkBoxLegacyReader.Checked = Preferences.useLegacyReader;
+ checkBoxShowErrorMessageOnlyOneInstance.Checked = Preferences.ShowErrorMessageAllowOnlyOneInstances;
}
private void FillPortableMode()
@@ -218,7 +219,7 @@ private void OnToolButtonClick(TextBox textBox)
}
}
- private void ArgsButtonClick(TextBox textBox)
+ private void OnArgsButtonClick(TextBox textBox)
{
ToolArgsDialog dlg = new ToolArgsDialog(_logTabWin, this);
dlg.Arg = textBox.Text;
@@ -228,7 +229,7 @@ private void ArgsButtonClick(TextBox textBox)
}
}
- private void WorkingDirButtonClick(TextBox textBox)
+ private void OnWorkingDirButtonClick(TextBox textBox)
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.RootFolder = Environment.SpecialFolder.MyComputer;
@@ -572,12 +573,12 @@ private void FillEncodingList()
#region Events handler
- private void SettingsDialog_Load(object sender, EventArgs e)
+ private void OnSettingsDialogLoad(object sender, EventArgs e)
{
FillDialog();
}
- private void changeFontButton_Click(object sender, EventArgs e)
+ private void OnChangeFontButtonClick(object sender, EventArgs e)
{
FontDialog dlg = new FontDialog();
dlg.ShowEffects = false;
@@ -659,6 +660,8 @@ private void OnOkButtonClick(object sender, EventArgs e)
Preferences.maximumFilterEntries = (int)upDownMaximumFilterEntries.Value;
Preferences.maximumFilterEntriesDisplayed = (int)upDownMaximumFilterEntriesDisplayed.Value;
+ Preferences.ShowErrorMessageAllowOnlyOneInstances = checkBoxShowErrorMessageOnlyOneInstance.Checked;
+
SavePluginSettings();
SaveHighlightMaskList();
@@ -666,18 +669,18 @@ private void OnOkButtonClick(object sender, EventArgs e)
SaveMultifileData();
}
- private void toolButtonA_Click(object sender, EventArgs e)
+ private void OnToolButtonAClick(object sender, EventArgs e)
{
OnToolButtonClick(textBoxTool);
}
- private void argButtonA_Click(object sender, EventArgs e)
+ private void OnArgButtonAClick(object sender, EventArgs e)
{
- ArgsButtonClick(textBoxArguments);
+ OnArgsButtonClick(textBoxArguments);
}
//TODO Remove or refactor this function
- private void columnizerDataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
+ private void OnColumnizerDataGridViewRowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
DataGridViewComboBoxCell comboCell = (DataGridViewComboBoxCell) dataGridViewColumnizer.Rows[e.RowIndex].Cells[1];
if (comboCell.Items.Count > 0)
@@ -686,7 +689,7 @@ private void columnizerDataGridView_RowsAdded(object sender, DataGridViewRowsAdd
}
}
- private void deleteButton_Click(object sender, EventArgs e)
+ private void OnDeleteButtonClick(object sender, EventArgs e)
{
if (dataGridViewColumnizer.CurrentRow != null && !dataGridViewColumnizer.CurrentRow.IsNewRow)
{
@@ -696,17 +699,17 @@ private void deleteButton_Click(object sender, EventArgs e)
}
}
- private void columnizerDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
+ private void OnColumnizerDataGridViewDataError(object sender, DataGridViewDataErrorEventArgs e)
{
e.Cancel = true;
}
- private void sysoutCheckBoxA_CheckedChanged(object sender, EventArgs e)
+ private void OnSysoutCheckBoxACheckedChanged(object sender, EventArgs e)
{
comboBoxColumnizer.Enabled = checkBoxSysout.Checked;
}
- private void tailColorButton_Click(object sender, EventArgs e)
+ private void OnTailColorButtonClick(object sender, EventArgs e)
{
ColorDialog dlg = new ColorDialog();
dlg.Color = Preferences.showTailColor;
@@ -717,12 +720,12 @@ private void tailColorButton_Click(object sender, EventArgs e)
}
}
- private void columnSizeCheckBox_CheckedChanged(object sender, EventArgs e)
+ private void OnColumnSizeCheckBoxCheckedChanged(object sender, EventArgs e)
{
cpDownColumnWidth.Enabled = checkBoxColumnSize.Checked;
}
- private void timespreadColorButton_Click(object sender, EventArgs e)
+ private void OnTimespreadColorButtonClick(object sender, EventArgs e)
{
ColorDialog dlg = new ColorDialog();
dlg.Color = Preferences.timeSpreadColor;
@@ -733,7 +736,7 @@ private void timespreadColorButton_Click(object sender, EventArgs e)
}
}
- private void pluginListBox_SelectedIndexChanged(object sender, EventArgs e)
+ private void OnPluginListBoxSelectedIndexChanged(object sender, EventArgs e)
{
_selectedPlugin?.HideConfigForm();
@@ -765,7 +768,7 @@ private void pluginListBox_SelectedIndexChanged(object sender, EventArgs e)
}
}
- private void sessionSaveDirButton_Click(object sender, EventArgs e)
+ private void OnSessionSaveDirButtonClick(object sender, EventArgs e)
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
@@ -830,7 +833,7 @@ private void OnPortableModeCheckedChanged(object sender, EventArgs e)
}
- private void configPluginButton_Click(object sender, EventArgs e)
+ private void OnConfigPluginButtonClick(object sender, EventArgs e)
{
if (!_selectedPlugin.HasEmbeddedForm())
{
@@ -838,12 +841,12 @@ private void configPluginButton_Click(object sender, EventArgs e)
}
}
- private void numericUpDown1_ValueChanged(object sender, EventArgs e)
+ private void OnNumericUpDown1ValueChanged(object sender, EventArgs e)
{
//TODO implement
}
- private void toolListBox_SelectedIndexChanged(object sender, EventArgs e)
+ private void OnToolListBoxSelectedIndexChanged(object sender, EventArgs e)
{
GetCurrentToolValues();
_selectedTool = listBoxTools.SelectedItem as ToolEntry;
@@ -853,7 +856,7 @@ private void toolListBox_SelectedIndexChanged(object sender, EventArgs e)
DisplayCurrentIcon();
}
- private void toolUpButton_Click(object sender, EventArgs e)
+ private void OnToolUpButtonClick(object sender, EventArgs e)
{
int i = listBoxTools.SelectedIndex;
@@ -869,7 +872,7 @@ private void toolUpButton_Click(object sender, EventArgs e)
}
}
- private void toolDownButton_Click(object sender, EventArgs e)
+ private void OnToolDownButtonClick(object sender, EventArgs e)
{
int i = listBoxTools.SelectedIndex;
@@ -885,13 +888,13 @@ private void toolDownButton_Click(object sender, EventArgs e)
}
}
- private void toolAddButton_Click(object sender, EventArgs e)
+ private void OnToolAddButtonClick(object sender, EventArgs e)
{
listBoxTools.Items.Add(new ToolEntry());
listBoxTools.SelectedIndex = listBoxTools.Items.Count - 1;
}
- private void toolDeleteButton_Click(object sender, EventArgs e)
+ private void OnToolDeleteButtonClick(object sender, EventArgs e)
{
int i = listBoxTools.SelectedIndex;
@@ -912,7 +915,7 @@ private void toolDeleteButton_Click(object sender, EventArgs e)
}
}
- private void iconButton_Click(object sender, EventArgs e)
+ private void OnIconButtonClick(object sender, EventArgs e)
{
if (_selectedTool != null)
{
@@ -941,7 +944,7 @@ private void OnCancelButtonClick(object sender, EventArgs e)
private void OnWorkingDirButtonClick(object sender, EventArgs e)
{
- WorkingDirButtonClick(textBoxWorkingDir);
+ OnWorkingDirButtonClick(textBoxWorkingDir);
}
private void OnMultiFilePatternTextChanged(object sender, EventArgs e)
diff --git a/src/LogExpert/Dialogs/SettingsDialog.resx b/src/LogExpert/Dialogs/SettingsDialog.resx
index ded11c9a..9426b76c 100644
--- a/src/LogExpert/Dialogs/SettingsDialog.resx
+++ b/src/LogExpert/Dialogs/SettingsDialog.resx
@@ -120,15 +120,6 @@
144, 17
-
- 144, 17
-
-
- True
-
-
- True
-
True
@@ -141,21 +132,12 @@
True
-
- True
-
-
- True
-
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/LogExpert.csproj b/src/LogExpert/LogExpert.csproj
index fc5aa1f1..56865f31 100644
--- a/src/LogExpert/LogExpert.csproj
+++ b/src/LogExpert/LogExpert.csproj
@@ -103,6 +103,12 @@
Form
+
+ Form
+
+
+ AllowOnlyOneInstanceErrorDialog.cs
+
Component
@@ -356,6 +362,9 @@
+
+ AllowOnlyOneInstanceErrorDialog.cs
+
DateTimeDragControl.cs
Designer
diff --git a/src/LogExpert/Program.cs b/src/LogExpert/Program.cs
index 599e5ef7..8977e24f 100644
--- a/src/LogExpert/Program.cs
+++ b/src/LogExpert/Program.cs
@@ -157,9 +157,16 @@ private static void Sub_Main(string[] orgArgs)
MessageBox.Show($"Cannot open connection to first instance ({errMsg})", "LogExpert");
}
- if (settings.preferences.allowOnlyOneInstance)
+ if (settings.preferences.allowOnlyOneInstance && settings.preferences.ShowErrorMessageAllowOnlyOneInstances)
{
- MessageBox.Show($"Only one instance allowed, uncheck \"View Settings => Allow only 1 Instances\" to start multiple instances!", "Logexpert");
+ AllowOnlyOneInstanceErrorDialog a = new AllowOnlyOneInstanceErrorDialog();
+ if (a.ShowDialog() == DialogResult.OK)
+ {
+ settings.preferences.ShowErrorMessageAllowOnlyOneInstances = !a.DoNotShowThisMessageAgain;
+ ConfigManager.Save(SettingsFlags.All);
+ }
+
+ //MessageBox.Show($"Only one instance allowed, uncheck \"View Settings => Allow only 1 Instances\" to start multiple instances!", "Logexpert");
}
}