[Feature] Settings option to close always directly stm after focus lost (#170), version 1.0.17.32

This commit is contained in:
Markus Hofknecht 2021-05-02 15:21:07 +02:00
parent ec8f677593
commit b9acf24962
4 changed files with 11 additions and 4 deletions

View file

@ -839,7 +839,8 @@ namespace SystemTrayMenu.Business
if (!IsActive())
{
Point position = Control.MousePosition;
if (AsList.Any(m => m.IsMouseOn(position)))
if (Properties.Settings.Default.StaysOpenWhenFocusLost &&
AsList.Any(m => m.IsMouseOn(position)))
{
if (!keyboardInput.InUse)
{

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.17.31")]
[assembly: AssemblyFileVersion("1.0.17.31")]
[assembly: AssemblyVersion("1.0.17.32")]
[assembly: AssemblyFileVersion("1.0.17.32")]

View file

@ -640,13 +640,13 @@ namespace SystemTrayMenu.UserInterface
this.checkBoxStayOpenWhenFocusLost.AutoSize = true;
this.checkBoxStayOpenWhenFocusLost.Checked = true;
this.checkBoxStayOpenWhenFocusLost.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBoxStayOpenWhenFocusLost.Enabled = false;
this.checkBoxStayOpenWhenFocusLost.Location = new System.Drawing.Point(3, 28);
this.checkBoxStayOpenWhenFocusLost.Name = "checkBoxStayOpenWhenFocusLost";
this.checkBoxStayOpenWhenFocusLost.Size = new System.Drawing.Size(212, 19);
this.checkBoxStayOpenWhenFocusLost.TabIndex = 0;
this.checkBoxStayOpenWhenFocusLost.Text = "checkBoxStayOpenWhenFocusLost";
this.checkBoxStayOpenWhenFocusLost.UseVisualStyleBackColor = true;
this.checkBoxStayOpenWhenFocusLost.CheckedChanged += new System.EventHandler(this.CheckBoxStayOpenWhenFocusLost_CheckedChanged);
//
// tableLayoutPanelTimeUntilCloses
//

View file

@ -108,6 +108,7 @@ namespace SystemTrayMenu.UserInterface
new Language() { Name = "Italiano", Value = "it" },
new Language() { Name = "Nederlands", Value = "nl" },
new Language() { Name = "Português (Brasil)", Value = "pt-BR" },
// new Language() { Name = "русский", Value = "ru" },
};
comboBoxLanguage.DataSource = dataSource;
@ -374,5 +375,10 @@ namespace SystemTrayMenu.UserInterface
RegisterHotkeys();
inHotkey = false;
}
private void CheckBoxStayOpenWhenFocusLost_CheckedChanged(object sender, EventArgs e)
{
numericUpDownTimeUntilClose.Enabled = checkBoxStayOpenWhenFocusLost.Checked;
}
}
}