示例#1
0
文件: Edge.cs 项目: codyn-net/studio
        public Edge(Cdn.Edge obj, Wrappers.Wrapper from, Wrappers.Wrapper to) : base(obj)
        {
            Renderer = new Renderers.Edge(this);

            if (obj != null && from != null)
            {
                obj.Input = from;
            }

            UpdateFrom();

            if (obj != null && to != null)
            {
                obj.Output = to;
            }

            UpdateTo();

            obj.AddNotification("output", OnToChanged);
            obj.AddNotification("input", OnFromChanged);

            obj.ActionAdded   += HandleActionAdded;
            obj.ActionRemoved += HandleActionRemoved;

            CalculateAnchors();
        }
示例#2
0
        public Cdn.Edge GetActionTemplate(Cdn.EdgeAction action, bool match_full)
        {
            IntPtr raw_ret = cdn_edge_get_action_template(Handle, action == null ? IntPtr.Zero : action.Handle, match_full);

            Cdn.Edge ret = GLib.Object.GetObject(raw_ret) as Cdn.Edge;
            return(ret);
        }
示例#3
0
        private void AddAll(GLib.Object obj, Dictionary <GLib.Object, bool> ret)
        {
            ret[obj] = true;

            Cdn.Object o = obj as Cdn.Object;

            Cdn.Node grp = obj as Cdn.Node;

            if (grp != null)
            {
                foreach (Cdn.Object child in grp.Children)
                {
                    AddAll(child, ret);
                }

                foreach (string name in grp.VariableInterface.Names)
                {
                    d_selected[grp.Variable(name)] = true;
                }
            }

            if (o != null)
            {
                foreach (Cdn.Variable prop in o.Variables)
                {
                    d_selected[prop] = true;
                }
            }

            Cdn.Edge link = obj as Cdn.Edge;

            if (link != null)
            {
                foreach (Cdn.EdgeAction action in link.Actions)
                {
                    d_selected[action] = true;
                }
            }
        }
示例#4
0
文件: Edge.cs 项目: codyn-net/studio
 protected Edge(Cdn.Edge obj) : this(obj, null, null)
 {
 }