protected virtual bool CancelNameChanged(EntityNameChangeEventArgs e) { if (_entityNameChanged != null) { _entityNameChanged(e); return(e.Cancel); } return(false); }
protected virtual bool CancelNameChanged(string newValue) { if (_nameChanged != null) { EntityNameChangeEventArgs e = new EntityNameChangeEventArgs(this, newValue, _name); _nameChanged(e); return(e.Cancel); } return(false); }
void item_NameChanged(EntityNameChangeEventArgs e) { if (e.NewValue == null) { e.Cancel = true; return; } if (Contains(e.NewValue)) { e.Cancel = true; return; } if (CancelNameChanged(e)) { return; } }