Exemplo n.º 1
0
        public MyComPorts()
        {
            timer.Interval = 500;
            timer.Tick    += Tick;
            timer.Start();

            contextMenu = new ContextMenu(new MenuItem[] {
                new MenuItem("Exit", Exit)
            });

            trayIcon = new NotifyIcon()
            {
                Icon        = Resources.AppIcon,
                ContextMenu = contextMenu,
                Visible     = true
            };

            PortManager.Refresh();
        }
Exemplo n.º 2
0
        void Refresh(object sender, EventArgs e)
        {
            PortManager.Refresh();

            BuildMenu();
        }