private void SetKeyType(EntityKeyType value) { if (InvokeRequired) { Invoke(new MethodInvoker(() => SetKeyType(value))); return; } switch (value) { case EntityKeyType.Component: radioButtonComponent.Checked = true; break; case EntityKeyType.Properties: radioButtonProperties.Checked = true; break; case EntityKeyType.Empty: radioButtonNoKey.Checked = true; break; default: throw new ArgumentOutOfRangeException("value"); } SetButtonStatus(); }
private EntityKeyType GetKeyType() { if (InvokeRequired) { EntityKeyType keyType = EntityKeyType.Empty; Invoke(new MethodInvoker(() => keyType = GetKeyType())); return(keyType); } if (radioButtonNoKey.Checked) { return(EntityKeyType.Empty); } if (radioButtonComponent.Checked) { return(EntityKeyType.Component); } if (radioButtonProperties.Checked) { return(EntityKeyType.Properties); } return(EntityKeyType.Empty); }
private void SetKeyType(EntityKeyType value) { if(InvokeRequired) { Invoke(new MethodInvoker(() => SetKeyType(value))); return; } switch(value) { case EntityKeyType.Component: radioButtonComponent.Checked = true; break; case EntityKeyType.Properties: radioButtonProperties.Checked = true; break; case EntityKeyType.Empty: radioButtonNoKey.Checked = true; break; default: throw new ArgumentOutOfRangeException("value"); } SetButtonStatus(); }
public MetaProperty UseAsEntityKey(EntityKeyType keyType) { IsKeyProperty = true; KeyType = keyType; return(this); }
public EntityKeyAttribute(EntityKeyType type = EntityKeyType.PrefixedRandomString) { KeyType = type; }