예제 #1
0
        public TargetControl(PropertyInfo _propInfo)
        {
            type     = TCType.Property;
            propInfo = _propInfo;
            UiControlLevelSpec levelSpec = propInfo?.GetCustomAttribute <UiControlLevelSpec>();

            setup = levelSpec != null ? levelSpec.Setup : new UiControlSetup();
        }
예제 #2
0
        public TargetControl(IList _list, int _listIndex)
        {
            type      = TCType.List;
            list      = _list;
            listIndex = _listIndex;
            UiControlLevelSpec levelSpec = propInfo?.GetCustomAttribute <UiControlLevelSpec>();

            setup = levelSpec != null ? levelSpec.Setup : new UiControlSetup();
        }
예제 #3
0
        public TargetControl(FieldInfo _fieldInfo, object _target = null)
        {
            fieldInfo = _fieldInfo;
            if (fieldInfo != null && _target != null && fieldInfo.FieldType == typeof(ContentAccessor))
            {
                type     = TCType.ContentAccessor;
                accessor = fieldInfo.GetValue(_target) as ContentAccessor;
            }
            else
            {
                type = TCType.Field;
            }
            UiControlLevelSpec levelSpec = fieldInfo?.GetCustomAttribute <UiControlLevelSpec>();

            setup = levelSpec != null ? levelSpec.Setup : new UiControlSetup();
        }