mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-16 02:13:39 +12:00
[Feature] Settings menu - Always on top behavior (#417), version 1.3.0.6
This commit is contained in:
parent
9c43fb181f
commit
88bdabf5f2
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.3.0.5")]
|
[assembly: AssemblyVersion("1.3.0.6")]
|
||||||
[assembly: AssemblyFileVersion("1.3.0.5")]
|
[assembly: AssemblyFileVersion("1.3.0.6")]
|
||||||
|
|
|
@ -275,7 +275,7 @@ Thanks for ideas, reporting issues and contributing!
|
||||||
#285 #286 [dao-net](https://github.com/dao-net),
|
#285 #286 [dao-net](https://github.com/dao-net),
|
||||||
#288 William P.,
|
#288 William P.,
|
||||||
#294 #295 #296 Stefan Mahrer,
|
#294 #295 #296 Stefan Mahrer,
|
||||||
#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 [chip33](https://github.com/chip33),
|
#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 #416 [chip33](https://github.com/chip33),
|
||||||
#298 [phanirithvij](https://github.com/phanirithvij),
|
#298 [phanirithvij](https://github.com/phanirithvij),
|
||||||
#306 [wini2](https://github.com/wini2),
|
#306 [wini2](https://github.com/wini2),
|
||||||
#370 [dna5589](https://github.com/dna5589),
|
#370 [dna5589](https://github.com/dna5589),
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace SystemTrayMenu.Helper
|
||||||
aboutBox.AppMoreInfo += "#235 #242 243 #247, #271 Tom, #237 Torsten S., #240 video Patrick, #244 Gunter D., #246 #329 MACE4GITHUB, #259 #310 vanjac, ";
|
aboutBox.AppMoreInfo += "#235 #242 243 #247, #271 Tom, #237 Torsten S., #240 video Patrick, #244 Gunter D., #246 #329 MACE4GITHUB, #259 #310 vanjac, ";
|
||||||
aboutBox.AppMoreInfo += "#262 terencemcdonnell, #269 petersnows25, #272 Peter M., #273 #274 ParasiteDelta, #275 #276 #278 donaldaken, ";
|
aboutBox.AppMoreInfo += "#262 terencemcdonnell, #269 petersnows25, #272 Peter M., #273 #274 ParasiteDelta, #275 #276 #278 donaldaken, ";
|
||||||
aboutBox.AppMoreInfo += "#277 Jan S., #282 akuznets, #283 #284 #289 RuSieg, #285 #286 dao-net, #288 William P., #294 #295 #296 Stefan Mahrer, ";
|
aboutBox.AppMoreInfo += "#277 Jan S., #282 akuznets, #283 #284 #289 RuSieg, #285 #286 dao-net, #288 William P., #294 #295 #296 Stefan Mahrer, ";
|
||||||
aboutBox.AppMoreInfo += "#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 chip33, #298 phanirithvij, #306 wini2, #370 dna5589, #372 not-nef, #376 Michelle H. ";
|
aboutBox.AppMoreInfo += "#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 #416 chip33, #298 phanirithvij, #306 wini2, #370 dna5589, #372 not-nef, #376 Michelle H. ";
|
||||||
aboutBox.AppMoreInfo += "#377 SoenkeHob, #380 #394 TransLucida, #384 boydfields, #386 visusys, #387 #411 yrctw" + Environment.NewLine;
|
aboutBox.AppMoreInfo += "#377 SoenkeHob, #380 #394 TransLucida, #384 boydfields, #386 visusys, #387 #411 yrctw" + Environment.NewLine;
|
||||||
aboutBox.AppMoreInfo += @"
|
aboutBox.AppMoreInfo += @"
|
||||||
Sponsors - Thank you!
|
Sponsors - Thank you!
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace SystemTrayMenu.UserInterface
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using SystemTrayMenu.DataClasses;
|
using SystemTrayMenu.DataClasses;
|
||||||
using SystemTrayMenu.DllImports;
|
using SystemTrayMenu.DllImports;
|
||||||
|
@ -1100,7 +1101,7 @@ namespace SystemTrayMenu.UserInterface
|
||||||
{
|
{
|
||||||
if (e.Button == MouseButtons.Left)
|
if (e.Button == MouseButtons.Left)
|
||||||
{
|
{
|
||||||
SettingsForm.ShowSingleInstance(this);
|
new Thread(SettingsForm.ShowSingleInstance).Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,23 +589,16 @@ namespace SystemTrayMenu.UserInterface
|
||||||
return RegisterHotkeys(false);
|
return RegisterHotkeys(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowSingleInstance(IWin32Window owner = null)
|
public static void ShowSingleInstance()
|
||||||
{
|
{
|
||||||
if (IsOpen())
|
if (IsOpen())
|
||||||
{
|
{
|
||||||
settingsForm.Activate();
|
settingsForm.HandleInvoke(settingsForm.Activate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
settingsForm = new();
|
settingsForm = new();
|
||||||
if (owner == null)
|
settingsForm.ShowDialog();
|
||||||
{
|
|
||||||
settingsForm.ShowDialog();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
settingsForm.Show(owner);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
24
Utilities/FormsExtensions.cs
Normal file
24
Utilities/FormsExtensions.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// <copyright file="FormsExtensions.cs" company="PlaceholderCompany">
|
||||||
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||||
|
// </copyright>
|
||||||
|
|
||||||
|
namespace SystemTrayMenu.Utilities
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
internal static class FormsExtensions
|
||||||
|
{
|
||||||
|
public static void HandleInvoke(this Control instance, Action action)
|
||||||
|
{
|
||||||
|
if (instance.InvokeRequired)
|
||||||
|
{
|
||||||
|
instance.Invoke(action);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
action();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue