private NotifyIcon notifyIcon; // the icon that sits in the system tray #endregion Fields #region Constructors /// <summary> /// This class should be created and passed into Application.Run( ... ) /// </summary> public CustomApplicationContext() { InitializeContext(); hostManager = new HostManager(notifyIcon); hostManager.BuildServerAssociations(); if (!hostManager.IsDecorated) { ShowIntroForm(); } }
/// <summary> /// This class should be created and passed into Application.Run( ... ) /// </summary> public CustomApplicationContext() { InitializeContext(); hostManager = new HostManager(notifyIcon); hostManager.BuildServerAssociations(); if (!hostManager.IsDecorated) { ShowIntroForm(); } }
private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = false; hostManager.BuildServerAssociations(); hostManager.BuildContextMenu(notifyIcon.ContextMenuStrip); notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); notifyIcon.ContextMenuStrip.Items.Add(hostManager.ToolStripMenuItemWithHandler("Show &Details", showDetailsItem_Click)); notifyIcon.ContextMenuStrip.Items.Add(hostManager.ToolStripMenuItemWithHandler("&Help/About", showHelpItem_Click)); notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); notifyIcon.ContextMenuStrip.Items.Add(hostManager.ToolStripMenuItemWithHandler("&Exit", exitItem_Click)); }