private void PortSelected(object sender, EventArgs e) { string portName = ((ToolStripMenuItem)sender).Text; if (_port != null && _port.IsOpen) { _port.Close(); _port.Dispose(); } _port = new HotwirePort(portName, 9600); _port.Open(); _debugForm.Port = _port; }
public HotwireControl(Configuration configuration, HotwirePort port) { _configuration = configuration; _port = port; }