public void OnFileLoad(object sender, EventArgs e) { FileConfiguration fileConfiguration = SetImportConfiguration(); IList <ValidationResult> errors = Validate(fileConfiguration); if (errors.Any()) { FileView.ShowError(CreateErrorString(errors)); } else { FileView.FileLoadEvent -= OnFileLoad; StartImportEvent?.Invoke(fileConfiguration, e); FileView.Close(); } }