Beispiel #1
0
        private QueryX CreateQueryX(GraphX gx, Store st)
        {
            var qxNew = new QueryX(this, QueryType.Graph, true);

            ItemCreated.Record(Owner, qxNew);
            ItemLinked.Record(Owner, _relation_GraphX_QueryX, gx, qxNew);
            ItemLinked.Record(Owner, _relation_Store_QueryX, st, qxNew);
            return(qxNew);
        }
Beispiel #2
0
        private void RefreshGraphX(GraphX gx)
        {
            RebuildGraphX_ARGBList_NodeOwners(gx);

            foreach (var g in gx.Items)
            {
                RefreshGraph(g);
            }
        }
Beispiel #3
0
        private bool CreateGraph(GraphX gd, out Graph graph, Item seed = null)
        {
            if (!gd.TryGetGraph(seed, out graph))
            {
                graph = new Graph(gd, seed);
            }

            RefreshGraph(graph);

            return(true);
        }
Beispiel #4
0
        private void RebuildGraphX_ARGBList_NodeOwners(GraphX gx)
        {
            var GraphX_QueryX       = Get <Relation_GraphX_QueryX>();
            var QueryX_QueryX       = Get <Relation_QueryX_QueryX>();
            var Store_ColumnX       = Get <Relation_Store_ColumnX>();
            var GraphX_ColorColumnX = Get <Relation_GraphX_ColorColumnX>();

            gx.Color.Reset();
            gx.NodeOwners.Clear();

            if (GraphX_ColorColumnX.TryGetChild(gx, out ColumnX cx) && Store_ColumnX.TryGetParent(cx, out Store tx) && tx.Count > 0)
            {
                var items = tx.GetItems();
                foreach (var item in items)
                {
                    gx.Color.BuildARGBList(cx.Value.GetString(item));
                }
            }

            if (GraphX_QueryX.TryGetChildren(gx, out IList <QueryX> qxList))
            {
                var workQueue = new Queue <QueryX>(qxList);
                while (workQueue.Count > 0)
                {
                    var qx = workQueue.Dequeue();
                    if (qx.PathParm != null)
                    {
                        gx.Color.BuildARGBList(qx.PathParm.LineColor);
                    }
                    if (QueryX_QueryX.TryGetChildren(qx, out IList <QueryX> qcList))
                    {
                        foreach (var qc in qcList)
                        {
                            workQueue.Enqueue(qc);
                        }
                    }
                    if (qx.QueryKind == QueryType.Path && qx.IsHead)
                    {
                        GetHeadTail(qx, out Store head, out Store t);
                        gx.NodeOwners.Add(head);

                        var qt = qx;
                        while (QueryX_QueryX.TryGetChild(qt, out QueryX qn))
                        {
                            qt = qn;
                        }

                        GetHeadTail(qt, out Store h, out Store tail);
                        gx.NodeOwners.Add(tail);
                    }
                }
            }
        }
Beispiel #5
0
        private void ValidateGraphQuery(GraphX gx, bool clearError = false)
        {
            if (clearError)
            {
                _errorManager.ClearError(gx);
            }

            if (_relation_GraphX_QueryX.TryGetChildren(gx, out IList <QueryX> pathQuery))
            {
                ValidateQueryHierarchy(pathQuery, clearError);
            }
        }
Beispiel #6
0
        int GetSymbolQueryXCount(GraphX gx, Store nodeOwner)
        {
            var N = 0;

            if (Get <Relation_GraphX_SymbolQueryX>().TryGetChildren(gx, out IList <QueryX> qxList))
            {
                foreach (var qx in qxList)
                {
                    if (Get <Relation_Store_QueryX>().TryGetParent(qx, out Store parent) && nodeOwner == parent)
                    {
                        N++;
                    }
                }
            }
            return(N);
        }
Beispiel #7
0
        private void ValidateGraphQuery(GraphX gx, bool clearError = false)
        {
            if (clearError)
            {
                ClearError(gx);
            }

            if (Get <Relation_GraphX_QueryX>().TryGetChildren(gx, out IList <QueryX> pathQuery))
            {
                ValidateQueryHierarchy(pathQuery, clearError);
            }

            if (Get <Relation_GraphX_SymbolQueryX>().TryGetChildren(gx, out IList <QueryX> list))
            {
                ValidateQueryHierarchy(list, clearError);
            }
        }
Beispiel #8
0
 internal bool TryGetParent(SymbolX sx, out GraphX p) => _relation_GraphX_SymbolX.TryGetParent(sx, out p);
 internal Model_687_NodeColorProperty(Model_686_NodeColorList owner, GraphX aux, Property item) : base(owner, item)
 {
     Aux = aux;
 }
 internal Model_684_GraphNode(Model_683_GraphNodeList owner, GraphX aux, Store item) : base(owner, item)
 {
     Aux = aux;
 }
Beispiel #11
0
 internal Model_686_NodeColorList(Model_684_GraphNode owner, GraphX aux, Store item) : base(owner, item)
 {
     Aux = aux;
 }
Beispiel #12
0
 internal Model_689_NodeSymbol(Model_688_NodeSymbolList owner, GraphX aux1, SymbolX aux2, QueryX item) : base(owner, item)
 {
     Aux1 = aux1; Aux2 = aux2;
 }
Beispiel #13
0
 internal Model_691_GraphRoot(Model_682_GraphRootList owner, Store item, GraphX aux1, QueryX aux2) : base(owner, item)
 {
     Aux1 = aux1; Aux2 = aux2;
 }
Beispiel #14
0
 internal Model_688_NodeSymbolList(Model_684_GraphNode owner, GraphX aux, Store item) : base(owner, item)
 {
     Aux = aux;
 }
 internal Model_692_GraphLink(ItemModel owner, QueryX item, GraphX aux1, IdKey idKey) : base(owner, item)
 {
     Aux1 = aux1; _idKey = idKey;
 }
Beispiel #16
0
 internal Model_68A_NodeToolTipList(Model_684_GraphNode owner, GraphX aux, Store item) : base(owner, item)
 {
     Aux = aux;
 }
 internal Model_68B_NodeToolTip(Model_68A_NodeToolTipList owner, GraphX aux, Property item) : base(owner, item)
 {
     Aux = aux;
 }