Example #1
0
        public SelectedNode(BaseNode node)
            : this()
        {
            Node = node;

            if (node is WorldNode)
                NodeType = SelectedNodeType.World;
            else if (node is BodyNode)
                NodeType = SelectedNodeType.Body;
            else if (node is FixtureNode)
                NodeType = SelectedNodeType.Fixture;
            else if (node is ShapeNode)
                NodeType = SelectedNodeType.Shape;
            else
                throw new Exception();
        }
Example #2
0
        private void cloneToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BaseNode node = (BaseNode)SelectedNode.Node.Clone();

            SelectedNode.Node.Parent.Nodes.Add(node);
        }