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) { ShowDetailsForm(); } }
/// <summary> /// This class should be created and passed into Application.Run( ... ) /// </summary> public CustomApplicationContext() { InitializeContext(); hostManager = new HostManager(notifyIcon); hostManager.BuildServerAssociations(); if (!hostManager.IsDecorated) { ShowDetailsForm(); } }
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 &MPI Sync Manager", 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)); }