Exemple #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);
     }
 }
        /// <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;
            }
        }
 static XPClassInfo FindDCXPClassInfo(TypeInfo typeInfo) {
     var xpoTypeInfoSource = XpandModuleBase.XpoTypeInfoSource;
     var generatedEntityType = xpoTypeInfoSource.GetGeneratedEntityType(typeInfo.Type);
     return generatedEntityType == null ? null : xpoTypeInfoSource.XPDictionary.GetClassInfo(generatedEntityType);
 }
Exemple #4
0
 public override void InitTypeInfo(TypeInfo info)
 {
     base.InitTypeInfo(info);
     info.IsDomainComponent = IsTypePersistent(info.Type);
 }
Exemple #5
0
 public override void InitTypeInfo(TypeInfo info)
 {
     base.InitTypeInfo(info);
 }