예제 #1
0
 public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn)
 {
     //throw new Exception("The method or operation is not implemented.");
     if (actn == NodeElementContextAction.Delete)
     {
     }
 }
예제 #2
0
 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)
     {
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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)
            {

            }
        }
예제 #5
0
 public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn)
 {
     throw new Exception("The method or operation is not implemented.");
 }
예제 #6
0
 public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn)
 {
     throw new Exception("The method or operation is not implemented.");
 }
예제 #7
0
        public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn)
        {
            Field fld = (Field)tn.NodeObject;

            tn.Parent.Nodes.Remove(tn);
        }
예제 #8
0
 public void PerformContextAction(NodeElementContextAction actn, ModelTreeNode tn)
 {
     Field fld = (Field)tn.NodeObject;
     tn.Parent.Nodes.Remove(tn);
 }