public UserInterface() { InitializeComponent(); connection = new Connection(); connection.DataReceived += new EventHandler<ConnectionEventArgs>(connection_DataReceived); lift = new Lift(connection); }
public Lift(Connection connection) { this.connection = connection; connection.DataReceived += new EventHandler<ConnectionEventArgs>(connection_DataReceived); }