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(); }
void Refresh(object sender, EventArgs e) { PortManager.Refresh(); BuildMenu(); }