private void _DrawAllFrameSubframes(EasyGraph dataGraph, FrameContainer frameContainer, Frame isA_nilFrame, DataVertex isA_nilFrameDataVertex)
        {
            foreach (Slot slot in isA_nilFrame.slots)
            {
                Frame nextFrame = frameContainer.FrameFinder(slot.value);
                if (nextFrame != null)
                {
                    DataVertex nextFrameDataVertex = new DataVertex();
                    if (_GetVertexByItsFrame(nextFrame, dataGraph) == null)
                    {
                        nextFrameDataVertex.Text = nextFrame.name;
                        nextFrameDataVertex.ID   = nextFrame.Id;

                        dataGraph.AddVertex(nextFrameDataVertex);
                    }
                    else
                    {
                        nextFrameDataVertex = _DrawGetVertexById(nextFrame.Id, dataGraph);
                    }
                    var dataEdge = new DataEdge(nextFrameDataVertex, isA_nilFrameDataVertex)
                    {
                    };
                    dataGraph.AddEdge(dataEdge);

                    //TODO: Здесь супер функция по отрисовке всех из-а для этого
                }
            }
        }
        private DataVertex AddNewVertexSafety(Frame mainFrame, EasyGraph dataGraph)
        {
            DataVertex mainVertex = _GetVertexByItsFrame(mainFrame, dataGraph);

            if (mainVertex == null)
            {
                mainVertex = new DataVertex(mainFrame.name)
                {
                    ID = mainFrame.Id
                };
                dataGraph.AddVertex(mainVertex);
            }
            return(mainVertex);
        }
        public void DrawAllKB(FrameContainer mainFrameContainer)
        {
            try
            {
                List <Frame>  currentFrames       = mainFrameContainer.GetAllFrames();
                List <Domain> currentDomains      = mainFrameContainer.GetDomains();
                List <string> currentDomainValues = new List <string>();

                foreach (Domain domain in currentDomains)
                {
                    foreach (string value in domain.values)
                    {
                        currentDomainValues.Add(value);
                    }
                }

                EasyGraph dataGraph = new EasyGraph();//TODO: Нужно определить полем в классе.

                foreach (Frame frame in currentFrames)
                {
                    //находим корневой фрейм

                    bool isFrameInDomains = currentDomainValues.Contains(frame.name);
                    bool isFrameIsNil     = frame.isA == "null";

                    if (!isFrameInDomains && isFrameIsNil)
                    {
                        Frame nilFrame = frame;

                        DataVertex nilDataVertex = new DataVertex(nilFrame.name)
                        {
                            ID = nilFrame.Id
                        };

                        dataGraph.AddVertex(nilDataVertex);

                        DrawAllRelatedVertices(nilFrame, ref dataGraph, mainFrameContainer);
                    }
                }

                _graphArea.SetEdgesDashStyle(EdgeDashStyle.Solid);

                var logicCore = new GXLogicCoreExample()
                {
                    Graph = dataGraph
                };

                //CompoundFDP,ISOM,LinLog,
                //Sugiyama
                logicCore.DefaultLayoutAlgorithm = LayoutAlgorithmTypeEnum.LinLog;

                logicCore.DefaultLayoutAlgorithmParams = logicCore.AlgorithmFactory.CreateLayoutParameters(LayoutAlgorithmTypeEnum.LinLog);

                logicCore.DefaultOverlapRemovalAlgorithm = OverlapRemovalAlgorithmTypeEnum.FSA;

                logicCore.DefaultEdgeRoutingAlgorithm = EdgeRoutingAlgorithmTypeEnum.None;


                logicCore.AsyncAlgorithmCompute = true;

                _graphArea.LogicCore = logicCore;

                _graphArea.GenerateGraph(true, false);
            }
            catch (Exception e)
            {
                MessageBox.Show("При отрисовке что-то пошло не так :( \n" + e.ToString());
            }
        }