Exemplo n.º 1
0
 public new void EnumMembers(TypeInfo info, EnumMembersHandler handler)
 {
     foreach (var property in GetPropertyDescriptors(info.Type))
     {
         if (CanRegister(property.PropertyType))
             handler(property, property.Name);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the data value displayed in the control.
        /// </summary>
        public void SetDataValue(DataValue value, TypeInfo targetType)
        {
            DataTypeCB.SelectedItem = BuiltInType.Null;
            ValueRankCB.SelectedItem = ValueRankOptions.Scalar;

            StatusCode = StatusCodes.Good;
            SourceTimestamp = DateTime.MinValue;
            ServerTimestamp = DateTime.MinValue;

            if (value != null)
            {
                SetValue(value.WrappedValue);

                StatusCode = value.StatusCode;
                SourceTimestamp = value.SourceTimestamp;
                ServerTimestamp = value.ServerTimestamp;

                StatusCodeCK.Checked = true;
                SourceTimestampCK.Checked = true;
                ServerTimestampCK.Checked = true;
            }

            // allow data type to be changed by default.
            DataTypeCB.Enabled = true;

            if (targetType != null)
            {
                DataType = targetType.BuiltInType;
                ValueRank = targetType.ValueRank;

                DataTypeCB.Enabled = false;
                ValueRankCB.Enabled = false;
            }
        }
Exemplo n.º 3
0
 static XPClassInfo FindDCXPClassInfo(TypeInfo typeInfo) {
     var xpoTypeInfoSource = XpandModuleBase.XpoTypeInfoSource;
     var generatedEntityType = xpoTypeInfoSource.GetGeneratedEntityType(typeInfo.Type);
     return generatedEntityType == null ? null : xpoTypeInfoSource.XPDictionary.GetClassInfo(generatedEntityType);
 }
Exemplo n.º 4
0
 public override void InitTypeInfo(TypeInfo info)
 {
     base.InitTypeInfo(info);
     info.IsDomainComponent = IsTypePersistent(info.Type);
 }
Exemplo n.º 5
0
 public override void InitTypeInfo(TypeInfo info)
 {
     base.InitTypeInfo(info);
 }