Exemplo n.º 1
0
 public ToolBoxItemFunctionModel(
     MethodInfo mi,
     AttributeTuple <DesignElementAttribute, Type> data,
     DesignerResource resource)
     : base(data, resource)
 {
     this.MethodInfo = mi;
 }
Exemplo n.º 2
0
 public ToolBoxItemFunctionModel(
     MethodInfo mi,
     AttributeTuple <DesignElementAttribute, Type> data,
     DesignerResource resource)
     : base(data, resource)
 {
     this.MethodInfo  = mi;
     this.IsSupportJS = mi.HasAttribute <JSCodeMapAttribute>();
 }
Exemplo n.º 3
0
        private static IEnumerable <AttributeTuple <DesignElementAttribute, MethodInfo> > GetFunctionsCore(Type declareType)
        {
            return(declareType.GetMethods()
                   .Where(pi => pi.HasAttribute <DXFunctionAttribute>())
                   .Select(mi =>
            {
                var attr = Migration(mi.GetAttribute <DXFunctionAttribute>());
                var tuple = new AttributeTuple <DesignElementAttribute, MethodInfo>(attr, mi);

                attr.Category = mi.DeclaringType.GetAttribute <DXModuleAttribute>().DisplayName;

                return tuple;
            }));
        }
Exemplo n.º 4
0
        // 일반 레이아웃 및 컴포넌트
        public ToolBoxItemModel(AttributeTuple <DesignElementAttribute, Type> data, DesignerResource resource)
        {
            this.Metadata = data;
            this.Resource = resource;
            this.ToolTip  = this.Resource.ToolTip;
            this.Category = Metadata.Attribute.Category;

            string displayName = Metadata.Attribute.DisplayName;

            // Default Display Name
            if (string.IsNullOrEmpty(displayName))
            {
                displayName = Metadata.Element.GetType().Name;
            }

            this.Title = displayName;
        }
Exemplo n.º 5
0
 public PropertyGridItemModel(AttributeTuple <DesignElementAttribute, PropertyInfo> data, ISetter setter)
 {
     this.Metadata = data;
     this.Setter   = setter;
 }
Exemplo n.º 6
0
 private int CreatePropertyHash(AttributeTuple <DesignElementAttribute, PropertyInfo> attr)
 {
     return($"{attr.Attribute.Key}{attr.Attribute.DisplayName}{attr.Element.PropertyType.MetadataToken}".GetHashCode());
 }
Exemplo n.º 7
0
 public PropertyItem(AttributeTuple <DesignElementAttribute, PropertyInfo> data)
 {
     this.Metadata = data.Attribute;
     this.Property = data.Element.GetDependencyProperty();
 }