#115, version 0.11.2.1

[Feature] Show icon in taskbar when application is running #115
This commit is contained in:
Markus Hofknecht 2020-06-28 20:20:19 +02:00
parent 50231f5a3c
commit e24a8fff36
2 changed files with 16 additions and 5 deletions

View file

@ -50,21 +50,32 @@ namespace SystemTrayMenu
private void TaskbarForm_Resize(object sender, EventArgs e)
{
taskbarForm.WindowState = FormWindowState.Normal;
SetStateNormal();
}
internal void TasbkarItemActivated(object sender, EventArgs e)
{
taskbarForm.WindowState = FormWindowState.Normal;
SetStateNormal();
taskbarForm.Activate();
taskbarForm.Focus();
menus.SwitchOpenCloseByTaskbarItem();
}
private void TaskbarForm_Deactivate(object sender, EventArgs e)
{
taskbarForm.WindowState = FormWindowState.Normal;
SetStateNormal();
}
/// <summary>
/// This ensures that next click on taskbaritem works as activate event/click event
/// </summary>
private void SetStateNormal()
{
if (Form.ActiveForm == taskbarForm)
{
taskbarForm.WindowState = FormWindowState.Normal;
}
}
public void Dispose()
{
taskbarForm.Dispose();

View file

@ -35,5 +35,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("0.11.2.0")]
[assembly: AssemblyFileVersion("0.11.2.0")]
[assembly: AssemblyVersion("0.11.2.1")]
[assembly: AssemblyFileVersion("0.11.2.1")]