public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn) { //throw new Exception("The method or operation is not implemented."); if (actn == NodeElementContextAction.Delete) { } }
public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn) { if (actn == NodeElementContextAction.Delete) { foreach (RelationReference r in ChildRelations) { // remove all relations as this entity is going away ModelTreeNode top = (ModelTreeNode)tn.TreeView.TopNode.Parent; Model modl = (Model)top.NodeObject; modl.Relations.Remove(r.Relation); } ChildRelations = null; foreach (RelationReference p in ParentRelations) { // remove all relations as this entity is going away ModelTreeNode top = (ModelTreeNode)tn.TreeView.TopNode.Parent; Model modl = (Model)top.NodeObject; modl.Relations.Remove(p.Relation); } ParentRelations = null; ((ModelTreeNode)tn.Parent).NodeObject.PerformContextAction(actn, tn); } else if (actn == NodeElementContextAction.Add) { } }
public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn) { if (actn == NodeElementContextAction.Delete) { Entity del = (Entity)tn.NodeObject; Remove(del); // remove item from memory tn.Parent.Nodes.Remove(tn); } else if (actn == NodeElementContextAction.Add) { Entity ne = new Entity(); ne.LogicalName = "New Entity"; ModelTreeNode mtn = new ModelTreeNode(ne.LogicalName); mtn.NodeObject = ne; tn.Parent.Nodes.Add(mtn); } }
public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn) { throw new Exception("The method or operation is not implemented."); }
public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn) { Field fld = (Field)tn.NodeObject; tn.Parent.Nodes.Remove(tn); }