private void btnAddNewPlace_Click(object sender, EventArgs e) { bool isThereTextInAnyTxtbox = (Controls.OfType <TextBox>().All(t => t.Text == "")) ? false : true; if (isThereTextInAnyTxtbox) { PlaceAdded?.Invoke(sender, e); clearTxTBoxes(); } }
private void ucPlaceAdded(object sender, EventArgs e) { PlaceAdded?.Invoke(sender, e); }