private void AddNewComputeX(Root root) { var cx = new ComputeX(root.Get <ComputeXRoot>(), true); // the data root implements undo/redo functionality ItemCreated.Record(root, cx); ItemLinked.Record(root, root.Get <Relation_Store_ComputeX>(), TX, cx); }
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); }
private void AddNewColumnX(Root root) { var cx = new ColumnX(root.Get <ColumnXRoot>(), true); var sto = Item as Store; // the data root implements undo/redo functionality ItemCreated.Record(root, cx); ItemLinked.Record(root, root.Get <Relation_Store_ColumnX>(), sto, cx); }
private QueryX CreateQueryX(ComputeX cx, Store st) { var qxNew = new QueryX(this, QueryType.Value, true); ItemCreated.Record(Owner, qxNew); ItemLinked.Record(Owner, _relation_ComputeX_QueryX, cx, qxNew); ItemLinked.Record(Owner, _relation_Store_QueryX, st, qxNew); return(qxNew); }
private QueryX CreateQueryX(ViewX vx, Store st) { var qxNew = new QueryX(this, QueryType.View, true); ItemCreated.Record(Owner, qxNew); ItemLinked.Record(Owner, _relation_ViewX_QueryX, vx, qxNew); ItemLinked.Record(Owner, _relation_Store_QueryX, st, qxNew); return(qxNew); }
private void AddNewChildRelation(Root root) { var rx = new RelationX_RowX_RowX(root.Get <RelationXRoot>(), true); // the data root implements undo/redo functionality ItemCreated.Record(root, rx); ItemLinked.Record(root, root.Get <Relation_StoreX_ChildRelation>(), TX, rx); ChildDelta -= 2; }
private QueryX CreateQueryX(ViewX vx, Relation re) { var qxNew = new QueryX(this, QueryType.View); ItemCreated.Record(Owner, qxNew); ItemLinked.Record(Owner, _relation_ViewX_QueryX, vx, qxNew); ItemLinked.Record(Owner, _relation_Relation_QueryX, re, qxNew); ClearParentTailFlags(qxNew); return(qxNew); }
internal void AddComputeXQueryX(ComputeX cx, QueryX qx1, Relation rx, bool isReversed) { qx1.IsTail = false; var qx2 = new QueryX(this, QueryType.Value); qx2.IsReversed = isReversed; ItemCreated.Record(Owner, qx2); ItemLinked.Record(Owner, _relation_QueryX_QueryX, qx1, qx2); ItemLinked.Record(Owner, _relation_Relation_QueryX, rx, qx2); }
private QueryX CreateQueryX(QueryX qx, Relation re, QueryType kind) { qx.IsTail = false; var qxNew = new QueryX(this, kind); ItemCreated.Record(Owner, qx); ItemLinked.Record(Owner, _relation_QueryX_QueryX, qx, qxNew); ItemLinked.Record(Owner, _relation_Relation_QueryX, re, qxNew); ClearParentTailFlags(qxNew); return(qxNew); }
internal void AddNewComputeX(Model_666_ComputeList m) { var st = m.Item; var cx = new ComputeX(_computeXManager, true); var qx = new QueryX(_queryXManager, QueryType.Value, true, true); // the data root implements undo/redo functionality ItemCreated.Record(Owner, cx); ItemCreated.Record(Owner, qx); ItemLinked.Record(Owner, _relation_Store_QueryX, st, qx); ItemLinked.Record(Owner, _relation_Store_ComputeX, st, cx); ItemLinked.Record(Owner, _relation_ComputeX_QueryX, cx, qx); }
internal override DropAction ModelDrop(Root root, ItemModel dropModel, bool doDrop) { if (dropModel.GetItem() is Property np) { if (doDrop) { ItemLinked.Record(root, _relation_Store_NameProperty, Item, np); ChildDelta++; AutoExpandLeft = true; } return(DropAction.Link); } return(DropAction.None); }
internal override DropAction ModelDrop(Root root, LineModel dropModel, bool doDrop) { if (dropModel.Item is Property np) { if (doDrop) { ItemLinked.Record(root, root.Get <Relation_Store_SummaryProperty>(), TX, np); ChildDelta++; AutoExpandLeft = true; } return(DropAction.Link); } return(DropAction.None); }
internal override DropAction ModelDrop(Root root, ItemModel dropModel, bool doDrop) { if (dropModel.GetItem() is RowX rx) { var(_, tail) = _relation_RowX_RowX.GetHeadTail(); if (tail == rx.Owner) { if (doDrop) { ItemLinked.Record(root, _relation_RowX_RowX, Item, rx); } return(DropAction.Link); } } return(DropAction.None); }
internal bool QueryRelationDrop(QueryX qx1, Relation r2, bool doDrop) { if (_relation_Relation_QueryX.TryGetParent(qx1, out Relation r1)) { var(_, t1) = r1.GetHeadTail(); var(h2, t2) = r2.GetHeadTail(); if (t1 == h2 || t1 == t2) { if (doDrop) { qx1.IsTail = false; var qx2 = new QueryX(this, QueryType.Value); qx2.IsReversed = t1 == t2; ItemCreated.Record(Owner, qx2); ItemLinked.Record(Owner, _relation_QueryX_QueryX, qx1, qx2); ItemLinked.Record(Owner, _relation_Relation_QueryX, r2, qx2); } return(true); } } return(false); }