mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-10 06:24:46 +12:00
#115, version 0.11.2.1
[Feature] Show icon in taskbar when application is running #115
This commit is contained in:
parent
50231f5a3c
commit
e24a8fff36
|
@ -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();
|
||||
|
|
|
@ -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")]
|
||||
|
|
Loading…
Reference in a new issue