Esempio n. 1
0
        public static NodeUIPolicy CreateUIPolicy(Attachments.Attach attach)
        {
            if (attach != null)
            {
                Type type = Type.GetType("Behaviac.Design.NodeUI." + attach.ExportClass + "UIPolicy");
                if (type != null)
                {
                    return((NodeUIPolicy)Activator.CreateInstance(type));
                }
            }

            return(new NodeUIPolicy());
        }
        protected Nodes.Behavior GetBehavior()
        {
            Attachments.Attach attach   = _object as Attachments.Attach;
            Nodes.BaseNode     baseNode = (attach != null) ? attach.Node : _object as Nodes.BaseNode;
            Nodes.Behavior     behavior = (baseNode != null) ? baseNode.Behavior as Nodes.Behavior : null;

            if (behavior == null && _root != null)
            {
                behavior = _root.Behavior as Nodes.Behavior;
            }

            return(behavior);
        }