Пример #1
0
        //Defines the nodes
        public void createLeftNodes(Node Root, BowtieSubTreePlacement place)
        {
            double width    = 70;
            double height   = 25;
            int    fontSize = 10;

            //Defining nodes.
            Node n0 = AddNode("Good Feelings", "#ED0006", Brushes.Black, Shapes.Rectangle, 80, height, fontSize);

            Node n02 = AddNode("Positive", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n03 = AddNode("Thankful", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n04 = AddNode("Happy", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n05 = AddNode("Comfortable", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            //Level two nodes
            Node n021 = AddNode("Enthusiastic", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n022 = AddNode("Excited", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n031 = AddNode("Grateful", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n032 = AddNode("Lucky", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n041 = AddNode("Cheerful", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n042 = AddNode("Wonderful", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n043 = AddNode("Joyful", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n044 = AddNode("Great", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n051 = AddNode("Relaxed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n052 = AddNode("Peaceful", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n053 = AddNode("Calm", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            DiagramControl.SetBowtieSubTreePlacement(n0, place);

            //Creating conections between nodes
            Connect(Root, n0);

            Connect(n0, n02);
            Connect(n0, n03);
            Connect(n0, n04);
            Connect(n0, n05);

            Connect(n02, n021);
            Connect(n02, n022);

            Connect(n03, n031);
            Connect(n03, n032);

            Connect(n04, n041);
            Connect(n04, n042);
            Connect(n04, n043);
            Connect(n04, n044);

            Connect(n05, n051);
            Connect(n05, n052);
            Connect(n05, n053);
        }
Пример #2
0
        //Defines the nodes
        public void createRightNodes(Node Root, BowtieSubTreePlacement place)
        {
            double width    = 70;
            double height   = 25;
            int    fontSize = 10;

            Node n0 = AddNode("Bad Feelings", "#ED0006", Brushes.Black, Shapes.Rectangle, 80, height, fontSize);

            Node n01 = AddNode("Angry", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n02 = AddNode("Alone", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n03 = AddNode("Sad", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n04 = AddNode("Confused", "#E02B5F", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n011 = AddNode("Annoyed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n012 = AddNode("Furious", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n021 = AddNode("Lonely", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n022 = AddNode("Lost", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n031 = AddNode("Upset", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n032 = AddNode("Disappointed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            Node n041 = AddNode("Tensed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n042 = AddNode("Embarrassed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n043 = AddNode("Ashamed", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n044 = AddNode("Frustrated", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);
            Node n045 = AddNode("Guilty", "#25A0DA", Brushes.Black, Shapes.Rectangle, width, height, fontSize);

            DiagramControl.SetBowtieSubTreePlacement(n0, place);

            //Creating conections between nodes
            Connect(Root, n0);

            Connect(n0, n01);
            Connect(n0, n04);
            Connect(n0, n02);

            Connect(n0, n03);

            Connect(n01, n011);
            Connect(n01, n012);

            Connect(n02, n021);
            Connect(n02, n022);

            Connect(n03, n031);
            Connect(n03, n032);

            Connect(n04, n041);
            Connect(n04, n042);
            Connect(n04, n043);
            Connect(n04, n044);
            Connect(n04, n045);
        }