private void OpenDialogButton_Click(object sender, EventArgs e) { var result = JsonLoadDialog.ShowDialog(); if (result == DialogResult.OK) { OpenFiles?.Invoke(sender, JsonLoadDialog.FileName); } }