object GetOwner() { EntityTypeCustomTypeDescriptor typeDescriptor = Context.Instance as EntityTypeCustomTypeDescriptor; if (typeDescriptor != null) { return(typeDescriptor.EntityType); } EntityCustomTypeDescriptor entityDescriptor = Context.Instance as EntityCustomTypeDescriptor; if (entityDescriptor != null) { return(entityDescriptor.Entity); } return(Context.Instance); }
private void UpdateProperties() { List <object> list = new List <object>(this.objectSelection.Count); foreach (object current in this.objectSelection) { object item = current; if (current is EntityType) { item = new EntityTypeCustomTypeDescriptor(this.currentEntityType, null); } list.Add(item); } if (list.Count != 0) { MainForm.Instance.PropertiesForm.SelectObjects(list.ToArray(), false); return; } MainForm.Instance.PropertiesForm.SelectObjects(null, false); }