private void addNewPassengerToolStripMenuItem_Click(object sender, EventArgs e) { AddNewPassenger anp = new AddNewPassenger(label1.Text); anp.MdiParent = this; anp.StartPosition = FormStartPosition.CenterScreen; anp.Show(); }
private void btnSubmit_Click(object sender, EventArgs e) { lblError.Text = string.Empty; AddNewPassenger?.Invoke(tbName.Text, tbFloor.Text); }
private void InvokeAddNewPassengerEvent(int currentFloor) { AddNewPassenger.Invoke(currentFloor); }