Пример #1
0
        //选择节点
        private void SelectNode(int index)
        {
            if (index < 0)
            {
                return;
            }
            ResetRibbonControls();
            Node newNode = myGdb.Nodes.ElementAt(index).Value;

            if (newNode == null)
            {
                return;
            }
            if (myCurModifyNode != null && newNode.Guid == myCurModifyNode.Guid)
            {
                return;
            }
            myCurModifyNode = newNode;
            UpdateEndNodeComboBox();
            //绑定Ribbon文本框
            StatusNameBox.Text = newNode.Name;
            LoadNodeInfo(myCurModifyNode);
            BuildSubGraph(myCurModifyNode);
            ClearArrows(DrawingSurface);
            int neibour = myCurModifyNode.OutBound.Select(x => x.To.Name).Distinct().Count();

            myGraphRenderer.DrawNewGraph(DrawingSurface, neibour, mySubGraph);
        }