コード例 #1
0
ファイル: MindMap.cs プロジェクト: LamHV155/MindMap
        public MindMap(Color colorBoard, Color colorParent, Color colorChild, Color colorPath, string shapeParent, string shapeChild, string style)
        {
            InitializeComponent();
            int width  = Screen.PrimaryScreen.WorkingArea.Width;
            int height = Screen.PrimaryScreen.WorkingArea.Height;

            this.Width    = width;
            this.Height   = height;
            this.listNode = new List <Node>();


            this.M_colorBoard      = colorBoard;
            this.M_colorChildNode  = colorChild;
            this.M_colorParentNode = colorParent;
            this.M_colorPath       = colorPath;
            this.M_shapeChildNode  = shapeChild;
            this.M_shapeParentNode = shapeParent;
            this.M_stylePath       = style;

            Timer timer = new Timer();

            timer.Interval = 1000;
            timer.Tick    += Timer_Tick;
            timer.Enabled  = true;

            idnode = TOPICcontroller.getID();

            formatTable = new FormatTable(new Point(this.Width - 300, 100), new Size(290, this.Height - 100), Color.FromArgb(225, 225, 225), Color.Black, this);
            this.Controls.Add(createToolPanel());
            this.Controls.Add(createBoardAndMainNode());
        }
コード例 #2
0
ファイル: MindMap.cs プロジェクト: LamHV155/MindMap
        //Tools Panel & Board
        #region Panel & Board
        public Board createBoardAndMainNode()
        {
            Board board = new Board(-1, M_colorBoard, new Point(0, 100), new Size(this.Width - 20, this.Height - 140));

            this.board = board;
            Size  nSize     = new Size(180, 100);
            Point nLocation = new Point(board.Width / 2 - nSize.Width / 2, board.Height / 2 - nSize.Height / 2);

            path = new mPath(4, M_colorPath, M_stylePath);

            idnode = TOPICcontroller.getID();
            Node n = createNode(idnode, "Main Topic", nLocation, nSize, M_colorParentNode, Color.White, path, 1, null, 14, M_shapeParentNode);

            board.picbox.Controls.Add(n);

            displayBorderNode(n);
            idnode++;


            isExisted = false;
            listNode.Clear();
            //Add List
            listNode.Add(n);

            return(board);
        }