public MainWindow() { InitializeComponent(); sPort = new SerialPortClass(this); _ = new Control(this, sPort); }
public Control(MainWindow main, SerialPortClass sPort) { this.sPort = sPort; this.main = main; AddListener(); }