mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-28 19:10:26 +12:00
parent
01b8fbe4dc
commit
2b9822c24b
|
@ -842,8 +842,10 @@ namespace SystemTrayMenu.Controls
|
|||
private void TabPanelDetails_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (TabPanelDetails.SelectedTab == TabPageAssemblyDetails)
|
||||
{
|
||||
AssemblyNamesComboBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -355,7 +355,11 @@ namespace SystemTrayMenu
|
|||
get { return _text; }
|
||||
set
|
||||
{
|
||||
if (value == null) value = "";
|
||||
if (value == null)
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
|
||||
if (_text != value)
|
||||
{
|
||||
_text = value;
|
||||
|
|
|
@ -168,8 +168,10 @@ namespace SystemTrayMenu.Handler
|
|||
{
|
||||
// Is current selection is still valid for this search then skip selecting different item
|
||||
if (textselected.ToLower().StartsWith(keyInput.ToLower()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dgvBefore = dgv;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,10 @@ namespace SystemTrayMenu.Helper
|
|||
//MH: Removed, otherwise wrong icon
|
||||
// | Shell32.SHGFI_USEFILEATTRIBUTES ;
|
||||
|
||||
if (true == linkOverlay) flags += Shell32.SHGFI_LINKOVERLAY;
|
||||
if (true == linkOverlay)
|
||||
{
|
||||
flags += Shell32.SHGFI_LINKOVERLAY;
|
||||
}
|
||||
|
||||
/* Check the size specified for return. */
|
||||
if (IconSize.Small == size)
|
||||
|
@ -139,7 +142,11 @@ namespace SystemTrayMenu.Helper
|
|||
}
|
||||
|
||||
// Cleanup
|
||||
if (!linkOverlay) User32.DestroyIcon(hIcon);
|
||||
if (!linkOverlay)
|
||||
{
|
||||
User32.DestroyIcon(hIcon);
|
||||
}
|
||||
|
||||
User32.DestroyIcon(shfi.hIcon);
|
||||
}
|
||||
|
||||
|
@ -158,7 +165,10 @@ namespace SystemTrayMenu.Helper
|
|||
//MH: Removed SHGFI_USEFILEATTRIBUTES, otherwise was wrong folder icon
|
||||
uint flags = Shell32.SHGFI_ICON; // | Shell32.SHGFI_USEFILEATTRIBUTES;
|
||||
|
||||
if (true == linkOverlay) flags += Shell32.SHGFI_LINKOVERLAY;
|
||||
if (true == linkOverlay)
|
||||
{
|
||||
flags += Shell32.SHGFI_LINKOVERLAY;
|
||||
}
|
||||
|
||||
if (FolderType.Open == folderType)
|
||||
{
|
||||
|
|
|
@ -43,9 +43,11 @@ namespace SystemTrayMenu.Helper
|
|||
|
||||
// invoke the event to notify the parent.
|
||||
if (KeyPressed != null)
|
||||
{
|
||||
KeyPressed(this, new KeyPressedEventArgs(modifier, key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<KeyPressedEventArgs> KeyPressed;
|
||||
|
||||
|
@ -68,7 +70,9 @@ namespace SystemTrayMenu.Helper
|
|||
_window.KeyPressed += delegate (object sender, KeyPressedEventArgs args)
|
||||
{
|
||||
if (KeyPressed != null)
|
||||
{
|
||||
KeyPressed(this, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -84,8 +88,10 @@ namespace SystemTrayMenu.Helper
|
|||
|
||||
// register the hot key.
|
||||
if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
|
||||
{
|
||||
throw new InvalidOperationException("Couldn’t register the hot key.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A hot key has been pressed.
|
||||
|
|
|
@ -111,7 +111,9 @@ namespace SystemTrayMenu.Helper
|
|||
string info = string.Empty;
|
||||
|
||||
if (ShellHelper.LoWord(m.WParam) == (int)CMD_CUSTOM.ExpandCollapse)
|
||||
{
|
||||
info = "Expands or collapses the current selected item";
|
||||
}
|
||||
else
|
||||
{
|
||||
info = "";/* ContextMenuHelper.GetCommandString(
|
||||
|
@ -134,8 +136,10 @@ namespace SystemTrayMenu.Helper
|
|||
{
|
||||
if (_oContextMenu2.HandleMenuMsg(
|
||||
(uint)m.Msg, m.WParam, m.LParam) == S_OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -146,8 +150,10 @@ namespace SystemTrayMenu.Helper
|
|||
{
|
||||
if (_oContextMenu3.HandleMenuMsg2(
|
||||
(uint)m.Msg, m.WParam, m.LParam, IntPtr.Zero) == S_OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -555,13 +561,19 @@ namespace SystemTrayMenu.Helper
|
|||
}
|
||||
|
||||
if (iContextMenuPtr != IntPtr.Zero)
|
||||
{
|
||||
Marshal.Release(iContextMenuPtr);
|
||||
}
|
||||
|
||||
if (iContextMenuPtr2 != IntPtr.Zero)
|
||||
{
|
||||
Marshal.Release(iContextMenuPtr2);
|
||||
}
|
||||
|
||||
if (iContextMenuPtr3 != IntPtr.Zero)
|
||||
{
|
||||
Marshal.Release(iContextMenuPtr3);
|
||||
}
|
||||
|
||||
ReleaseAll();
|
||||
}
|
||||
|
@ -1516,8 +1528,10 @@ namespace SystemTrayMenu.Helper
|
|||
protected void OnHookInvoked(HookEventArgs e)
|
||||
{
|
||||
if (HookInvoked != null)
|
||||
{
|
||||
HookInvoked(this, e);
|
||||
}
|
||||
}
|
||||
// ************************************************************************
|
||||
|
||||
// ************************************************************************
|
||||
|
@ -1539,7 +1553,9 @@ namespace SystemTrayMenu.Helper
|
|||
protected int CoreHookProc(int code, IntPtr wParam, IntPtr lParam)
|
||||
{
|
||||
if (code < 0)
|
||||
{
|
||||
return CallNextHookEx(m_hhook, code, wParam, lParam);
|
||||
}
|
||||
|
||||
// Let clients determine what to do
|
||||
HookEventArgs e = new HookEventArgs();
|
||||
|
@ -1617,10 +1633,14 @@ namespace SystemTrayMenu.Helper
|
|||
{
|
||||
uint param32 = (uint)(ptr.ToInt64() | 0xffffffffL);
|
||||
if ((param32 & 0x80000000) == 0x80000000)
|
||||
{
|
||||
return (param32 >> 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (param32 >> 16) & 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the Low Word of a WParam of a WindowMessage
|
||||
|
|
|
@ -430,8 +430,10 @@ namespace SystemTrayMenu
|
|||
if (!worker.CancellationPending)
|
||||
{
|
||||
if (menuData.Validity == MenuDataValidity.Invalid)
|
||||
{
|
||||
menuData.Validity = MenuDataValidity.Valid;
|
||||
}
|
||||
}
|
||||
|
||||
return menuData;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue