mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-05 08:15:54 +00:00
Added tray icon
This commit is contained in:
14
DnsServerTrayIcon/ContextMenuNotifyIconExtensions.cs
Normal file
14
DnsServerTrayIcon/ContextMenuNotifyIconExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DnsServerTrayIcon
|
||||
{
|
||||
public static class ContextMenuNotifyIconExtensions
|
||||
{
|
||||
public static void ShowContextMenu(this NotifyIcon notifyIcon)
|
||||
{
|
||||
MethodInfo methodInfo = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
methodInfo.Invoke(notifyIcon, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user