static void Main(string[] args) { var contextMenu = new TrayMenu(); var pluginManager = new PluginManager(contextMenu); pluginManager.LoadPlugins(); var worker = new TrayWorker(contextMenu); Application.Run(); }
public TrayWorker(TrayMenu menu) { _notifyIcon = new NotifyIcon { Text = "TrayPluginSystem", Icon = Resources.Main }; menu.AddSeparator(); menu.Add(new ToolStripMenuItem("Выход", Resources.Exit, OnQuit)); _notifyIcon.ContextMenuStrip = menu.ContextMenu; _notifyIcon.Visible = true; }