public GirlSymbolClass(String name, Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram, Syncfusion.Windows.Forms.Diagram.Model model1, Syncfusion.Windows.Forms.Diagram.Model model2)
        {
            bmpnode                     = new BitmapNode(new Bitmap(@"..\..\..\..\..\..\..\Common\Images\Diagram\Drill Down images\image5_48.png"));
            bmpnode.Name                = name;
            bmpnode.PinPoint            = new Point(305, 130);
            bmpnode.LineStyle.LineWidth = 0;
            this.AppendChild(bmpnode);
            this.diagram1 = diagram;

            this.model1 = model1;
            this.model2 = model2;
        }
Exemple #2
0
        public HomeNode(Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram, Syncfusion.Windows.Forms.Diagram.Model model1, Syncfusion.Windows.Forms.Diagram.Model model2)
        {
            bmpnode                     = new BitmapNode(new Bitmap(@"..\..\..\..\..\..\..\Common\Images\Diagram\Drill Down images\house_48_hot(1).png"));
            bmpnode.Name                = "Grand Mother";
            bmpnode.PinPoint            = new Point(30, 30);
            bmpnode.Size                = new SizeF(20, 20);
            bmpnode.LineStyle.LineWidth = 0;
            this.AppendChild(bmpnode);

            mod1 = model1;
            mod2 = model2;
            dig  = diagram;
        }
        public GrandMotherSymbolClass(Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram, Syncfusion.Windows.Forms.Diagram.Model model1, Syncfusion.Windows.Forms.Diagram.Model model2, bool Previous)
        {
            bmpnode      = new BitmapNode(new Bitmap(@"..\..\..\..\..\..\..\Common\Images\Diagram\Drill Down images\prev.png"));
            bmpnode.Name = "Back";
            bmpnode.LineStyle.LineWidth = 0;
            bmpnode.PinPoint            = new Point(300, 180);
            this.AppendChild(bmpnode);

            this.dig = diagram;

            this.mod1 = model1;
            this.mod2 = model2;
        }
        public MapControl2()
        {
            InitializeComponent();

            var panelMinimap = new System.Windows.Forms.Panel();

            panelMinimap.BackColor        = System.Drawing.Color.Aqua;
            this.miniMapWinFormHost.Child = panelMinimap;
            this.minimapView       = new View(panelMinimap);
            this.minimapController = new DiagramController();
            this.minimapController.Initialize(this.minimapView);
            this.minimapModel = new Syncfusion.Windows.Forms.Diagram.Model();
            minimapModel.BackgroundStyle.Color = System.Drawing.Color.Green;
            this.minimapView.Model             = this.minimapModel;
        }
Exemple #5
0
        public GrandMotherSymbolClass(Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram, Syncfusion.Windows.Forms.Diagram.Model model1, Syncfusion.Windows.Forms.Diagram.Model model2)
        {
#if !NETCORE
            bmpnode = new BitmapNode(new Bitmap(@"..\..\..\..\..\..\common\Images\Diagram\Drill Down images\image2_48.png"));
#else
            bmpnode = new BitmapNode(new Bitmap(@"..\..\..\..\..\..\..\common\Images\Diagram\Drill Down images\image2_48.png"));
#endif
            bmpnode.Name                = "Grand Mother";
            bmpnode.PinPoint            = new Point(300, 180);
            bmpnode.LineStyle.LineWidth = 0;
            this.AppendChild(bmpnode);

            this.dig = diagram;

            this.mod1 = model1;
            this.mod2 = model2;
        }
        protected override void OnMouseEnter(EventArgs e)
        {
            base.OnMouseEnter(e);

            Syncfusion.Windows.Forms.Diagram.Model diagramModel = this.Root;
            Node thisNode = this as IGraphNode as Node;

            if (thisNode.Name.ToString() == "Boys")
            {
                tooltips.IsBalloon = true;
                tooltips.SetToolTip(this.dig, "Click Here!");
                tooltips.Active = true;
            }
            else
            {
                tooltips.Active = false;
            }
        }
        protected override void OnMouseDoubleClick(EventArgs e)
        {
            // Get node root.
            Syncfusion.Windows.Forms.Diagram.Model diagramModel = this.Root;
            // Begin model update.
            diagramModel.BeginUpdate();

            // If node is expanded collapse its, else expand.
            if (m_bExpanded == false)
            {
                this.ExpandSubNodes(true);
            }
            else
            {
                this.CollapseSubNodes(true);
            }

            diagramModel.EndUpdate();
        }
Exemple #8
0
    protected override void OnMouseClick(EventArgs e)
    {
        base.OnMouseClick(e);
        if (m_bIsExpander)
        {
            Syncfusion.Windows.Forms.Diagram.Model diagramModel = this.Root;

            diagramModel.BeginUpdate();

            if (m_bExpanded == false)
            {
                this.ExpandSubNodes(true);
            }
            else
            {
                this.CollapseSubNodes(true);
            }
            diagramModel.EndUpdate();
        }
    }
Exemple #9
0
        // DrillDown is implemented by just changing the diagram models
        protected override void OnMouseClick(EventArgs e)
        {
            try
            {
                int flag = 0;
                // Get node root.
                Syncfusion.Windows.Forms.Diagram.Model diagramModel = this.Root;
                Node node = this as IGraphNode as Node;

                if (node is TextNode)
                {
                    //|| node is MyGroup2 || node is MyGroup3)
                    node.EditStyle.AllowSelect = false;
                }
                else
                {
                    if (flag == 0)
                    {
                        this.dig.Controller.SelectAll();
                        this.dig.Controller.Delete();
                        this.mod1.Nodes.Clear();
                        flag = 1;
                    }

                    Syncfusion.Windows.Forms.Diagram.TextNode txtnode1 = new TextNode(" Coevals Diagram ");
                    txtnode1.FontStyle.Size   = 16;
                    txtnode1.FontStyle.Family = "Arial";
                    txtnode1.FontStyle.Bold   = true;

                    txtnode1.FontColorStyle.Color = Color.MidnightBlue;
                    txtnode1.LineStyle.LineColor  = Color.Transparent;
                    txtnode1.SizeToText(new Size(1000, 1000));
                    txtnode1.PinPoint = new PointF(335, 25);
                    this.dig.Model.AppendChild(txtnode1);

                    this.dig.Model.AppendChild(new HomeNode(this.dig, this.mod1, this.mod2));

                    // Grand Mother
                    GM          = new GrandMotherSymbolClass();
                    GM.PinPoint = new PointF(305, 145);

                    this.dig.Model.AppendChild(GM);

                    // GrandMothers Daiughter
                    GMDaughter.PinPoint = new PointF(150, 200);
                    this.dig.Model.AppendChild(GMDaughter);

                    // Connection b/w Grandma and her daughter
                    ConnectNodes(GM, GMDaughter);

                    // GrandMothers Son
                    GMSon          = new ManSymbolClass();
                    GMSon.PinPoint = new PointF(450, 200);
                    this.dig.Model.AppendChild(GMSon);

                    // Connection b/w Grandma and her Son
                    ConnectNodes(GM, GMSon);



                    // Boy
                    BoySymbolClass mySymbolBoy3 = new BoySymbolClass("Boys", this.dig, this.mod1, this.mod2);
                    mySymbolBoy3.Name     = "Boys";
                    mySymbolBoy3.PinPoint = new PointF(450, 290);

                    //ToolTip
                    this.dig.Model.AppendChild(mySymbolBoy3);


                    //mySymbolBoy3 = new MySymbol4Girl();

                    // Connection b/w Father and his girl
                    ConnectNodes(GMSon, mySymbolBoy3);

                    // Girl
                    mySymbolGirl          = new GirlSymbolClass();
                    mySymbolGirl.PinPoint = new PointF(370, 290);
                    this.dig.Model.AppendChild(mySymbolGirl);

                    // Connection b/w Father and his girl
                    ConnectNodes(GMSon, mySymbolGirl);

                    // Girl
                    mySymbolGirl          = new GirlSymbolClass();
                    mySymbolGirl.PinPoint = new PointF(520, 290);
                    this.dig.Model.AppendChild(mySymbolGirl);

                    // Connection b/w Father and his girl
                    ConnectNodes(GMSon, mySymbolGirl);

                    // Mother Childerns
                    // Girl
                    mySymbolGirl          = new GirlSymbolClass();
                    mySymbolGirl.PinPoint = new PointF(150, 290);
                    this.dig.Model.AppendChild(mySymbolGirl);

                    // Connection b/w Father and his girl
                    ConnectNodes(GMDaughter, mySymbolGirl);

                    // Girl
                    GirlSymbolClass mySymbolGirl3 = new GirlSymbolClass("Girls", this.dig, this.mod1, this.mod2);
                    mySymbolGirl3.Name     = "Girls";
                    mySymbolGirl3.PinPoint = new PointF(220, 290);
                    this.dig.Model.AppendChild(mySymbolGirl3);

                    // Connection b/w Mother and his girl
                    ConnectNodes(GMDaughter, mySymbolGirl3);

                    // Boy
                    mySymbolBoy          = new BoySymbolClass();
                    mySymbolBoy.PinPoint = new PointF(280, 290);
                    this.dig.Model.AppendChild(mySymbolBoy);
                    // Connection b/w Mother and his girl
                    ConnectNodes(GMDaughter, mySymbolBoy);

                    // Boy
                    mySymbolBoy          = new BoySymbolClass();
                    mySymbolBoy.PinPoint = new PointF(90, 290);
                    this.dig.Model.AppendChild(mySymbolBoy);

                    // Connection b/w Mother and his Boy
                    ConnectNodes(GMDaughter, mySymbolBoy);


                    this.Nodes.Clear();
                    this.dig.View.SelectionList.Clear();
                }
            }
            catch { }
        }
        protected override void OnMouseClick(EventArgs e)
        {
            // Get node root.
            Syncfusion.Windows.Forms.Diagram.Model diagramModel = this.Root;
            Node thisNode = this as IGraphNode as Node;

            if (thisNode.Name.ToString() == "Boys")
            {
                this.dig.Controller.SelectAll();
                this.dig.Controller.Delete();
                this.mod1.Nodes.Clear();


                Syncfusion.Windows.Forms.Diagram.TextNode txtnode1 = new TextNode(" Coevals Diagram ");
                txtnode1.FontStyle.Size      = 20;
                txtnode1.FontStyle.Bold      = true;
                txtnode1.FontStyle.Family    = "Segoe UI";
                txtnode1.LineStyle.LineColor = Color.Transparent;
                txtnode1.SizeToText(new Size(1000, 1000));
                txtnode1.PinPoint = new PointF(335, 25);
                this.dig.Model.AppendChild(txtnode1);

                Syncfusion.Windows.Forms.Diagram.TextNode txtnode2 = new TextNode("Friends!");
                txtnode2.FontStyle.Size      = 8;
                txtnode2.FontStyle.Family    = "Segoe UI";
                txtnode2.LineStyle.LineColor = Color.Transparent;
                txtnode2.PinPoint            = new PointF(280, 150);
                txtnode1.SizeToText(new Size(1000, 1000));
                this.dig.Model.AppendChild(txtnode2);

                this.dig.Model.AppendChild(new HomeNode(this.dig, this.mod1, this.mod2));

                BoySymbolClass symbol1 = new BoySymbolClass();
                symbol1.PinPoint = new PointF(280, 120);
                this.dig.Model.AppendChild(symbol1);

                BoySymbolClass symbol2 = new BoySymbolClass();
                symbol2.PinPoint = new PointF(380, 180);
                this.dig.Model.AppendChild(symbol2);

                BoySymbolClass symbol3 = new BoySymbolClass();
                symbol3.PinPoint = new PointF(380, 280);
                this.dig.Model.AppendChild(symbol3);

                BoySymbolClass symbol4 = new BoySymbolClass();
                symbol4.PinPoint = new PointF(280, 320);
                this.dig.Model.AppendChild(symbol4);

                BoySymbolClass symbol5 = new BoySymbolClass();
                symbol5.PinPoint = new PointF(180, 280);
                this.dig.Model.AppendChild(symbol5);

                BoySymbolClass symbol6 = new BoySymbolClass();
                symbol6.PinPoint = new PointF(180, 180);
                this.dig.Model.AppendChild(symbol6);

                // Grand Mother
                GrandMotherSymbolClass gm = new GrandMotherSymbolClass(this.dig, this.mod1, this.mod2, true);
                gm.PinPoint            = new PointF(65, 30);
                gm.Size                = new SizeF(20, 20);
                gm.LineStyle.LineColor = Color.Transparent;
                this.dig.Model.AppendChild(gm);


                ConnectNodes(symbol1, symbol2);
                ConnectNodes(symbol2, symbol3);
                ConnectNodes(symbol4, symbol3);
                ConnectNodes(symbol4, symbol5);
                ConnectNodes(symbol5, symbol6);
                ConnectNodes(symbol1, symbol6);
                this.dig.View.SelectionList.Clear();
                this.Nodes.Clear();
            }
        }
 public void InitModel(Syncfusion.Windows.Forms.Diagram.Model AModel)
 {
     this.diagram.Model = AModel;
     this.model = AModel;
 }