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

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

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