예제 #1
0
        private void removeItem(GoObject itemToDelete)
        {
            if (itemToDelete.IsAnImplementationOf <MoleculeNode>())
            {
                RemoveMoleculeNode((MoleculeNode)itemToDelete);
            }

            else if (itemToDelete.IsAnImplementationOf <ReactionNode>())
            {
                RemoveReactionNode((ReactionNode)itemToDelete);
            }
        }
예제 #2
0
 protected override bool ComputeInsideMarginsSkip(GoObject child)
 {
     if (child.IsAnImplementationOf <GoLink>())
     {
         return(true);
     }
     if (child.IsAnImplementationOf <PortNode>())
     {
         return(true);
     }
     return(base.ComputeInsideMarginsSkip(child));
 }
예제 #3
0
 public override bool Remove(GoObject obj)
 {
     if (obj.IsAnImplementationOf <IBaseNode>() && DiagramModel != null)
     {
         DiagramModel.RemoveNodeId(obj as IBaseNode);
     }
     return(base.Remove(obj));
 }
예제 #4
0
        public override void Add(GoObject obj)
        {
            if (obj == null)
            {
                return;
            }
            base.Add(obj);

            //DiagramModel is null in deserialization process therefore fill DiagramModel._nodes in DiagramSerializer.XmlDocumentToModel
            if (obj.IsAnImplementationOf <IBaseNode>() && DiagramModel != null)
            {
                DiagramModel.AddNodeId(obj as IBaseNode);
            }
        }