Ejemplo n.º 1
0
        public NodeView(NodeView parentNodeView, INode2 node, NodeFilter filter, int depth, bool openModules)
        {
            FParentNodeView = parentNodeView;
            FNode           = node;
            FFilter         = filter;
            FDepth          = depth;
            FOpenModules    = openModules;

            FNode.Added              += HandleNodeAdded;
            FNode.Removed            += HandleNodeRemoved;
            FNode.StatusChanged      += HandleNodeStatusChanged;
            FNode.InnerStatusChanged += HandleNodeInnerStatusChanged;
            FNode.Renamed            += HandleNodeRenamed;
            FChildNodes.Updated      += HandleChildNodesUpdated;

            // Set flags
            Flags = FilterFlags.None;
            var nodeInfo = FNode.NodeInfo;

            if (nodeInfo != null)
            {
                switch (nodeInfo.Type)
                {
                case NodeType.Native:
                    Flags |= FilterFlags.Native;
                    break;

                case NodeType.Patch:
                    Flags |= FilterFlags.Patch;
                    break;

                case NodeType.Module:
                    Flags |= FilterFlags.Module;
                    break;

                case NodeType.Freeframe:
                    Flags |= FilterFlags.Freeframe;
                    break;

                case NodeType.VST:
                    Flags |= FilterFlags.VST;
                    break;

                case NodeType.Effect:
                    Flags |= FilterFlags.Effect;
                    break;

                case NodeType.Plugin:
                    Flags |= FilterFlags.Plugin;
                    break;

                case NodeType.Dynamic:
                    Flags |= FilterFlags.Dynamic;
                    break;

                case NodeType.VL:
                    Flags |= FilterFlags.VL;
                    break;

                case NodeType.Text:
                    Flags |= FilterFlags.Text;
                    break;

                case NodeType.Unknown:
                    Flags |= FilterFlags.Unknown;
                    break;

                default:
                    throw new Exception("Invalid value for NodeType");
                }
            }

            if (FNode.HasGUI)
            {
                Flags |= FilterFlags.Window;
            }

            ReloadChildren();
        }
Ejemplo n.º 2
0
 private void AddNodeView(NodeView nodeView)
 {
     nodeView.Renamed += HandleNodeViewRenamed;
     FChildNodes.Add(nodeView);
 }
Ejemplo n.º 3
0
 private void RemoveNodeView(NodeView nodeView)
 {
     nodeView.Renamed -= HandleNodeViewRenamed;
     FChildNodes.Remove(nodeView);
     nodeView.Dispose();
 }
Ejemplo n.º 4
0
 public RNodeView(NodeView parentNodeView, INode2 node, NodeFilter filter, int depth)
     : base(parentNodeView, node, filter, depth)
 {
 }