示例#1
0
        public static string GetNodeGUIName(Node node)
        {
            CustomNode attr =
                node.GetType().GetCustomAttributes(typeof(CustomNode), false).FirstOrDefault() as CustomNode;

            if (attr != null)
            {
                return(attr.Name);
            }
            return(string.Empty);
        }
示例#2
0
        public static int GetNodeOrderPriority(string className)
        {
            var type = Type.GetType(className);

            if (type != null)
            {
                CustomNode attr =
                    type.GetCustomAttributes(typeof(CustomNode), false).FirstOrDefault() as CustomNode;
                if (attr != null)
                {
                    return(attr.OrderPriority);
                }
            }
            return(CustomNode.kDEFAULT_PRIORITY);
        }
示例#3
0
        public static string GetNodeGUIName(string className)
        {
            var type = Type.GetType(className);

            if (type != null)
            {
                CustomNode attr =
                    type.GetCustomAttributes(typeof(CustomNode), false).FirstOrDefault() as CustomNode;
                if (attr != null)
                {
                    return(attr.Name);
                }
            }
            return(string.Empty);
        }
示例#4
0
 public CustomNodeInfo(Type t, CustomNode n)
 {
     node = n;
     type = t;
 }