private void buttonOk_Click(object sender, EventArgs e) { /* * https://stackoverflow.com/questions/1665533/communicate-between-two-windows-forms-in-c-sharp */ OKButtonClick?.Invoke(this, EventArgs.Empty); this.DialogResult = DialogResult.OK; this.Hide(); }
private void okButton_Click(object sender, EventArgs e) { OKButtonClick.Invoke(this, null); Close(); }