private bool ApplyChanges() { try { CurrentEditorOwner.ApplyChanges(_editingNode, CurrentEditor); _errorProvider?.Clear(); return(true); } catch (ArgumentException ex) { if (_errorProvider == null) { _errorProvider = new ErrorProvider(); } _errorProvider.SetError(CurrentEditor, ex.Message); return(false); } }
private bool ApplyChanges() { try { CurrentEditorOwner.ApplyChanges(_editingNode, CurrentEditor); _errorProvider.Clear(); return(true); } catch (ArgumentException ex) { _errorProvider.SetError(CurrentEditor, ex.Message); /*CurrentEditor.Validating -= EditorValidating; * MessageBox.Show(this, ex.Message, "Value is not valid", MessageBoxButtons.OK, MessageBoxIcon.Warning); * CurrentEditor.Focus(); * CurrentEditor.Validating += EditorValidating;*/ return(false); } }