コード例 #1
0
        static void Main(string[] args)
        {
            var contextMenu   = new TrayMenu();
            var pluginManager = new PluginManager(contextMenu);

            pluginManager.LoadPlugins();

            var worker = new TrayWorker(contextMenu);

            Application.Run();
        }
コード例 #2
0
        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;
        }