Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
 }
Exemplo n.º 5
0
 public EntityKeyAttribute(EntityKeyType type = EntityKeyType.PrefixedRandomString)
 {
     KeyType = type;
 }