Beispiel #1
0
        public void Serialize(ElementPropertyBag epb)
        {
            ConnectionPropertyBag cpb = new ConnectionPropertyBag();

            cpb.ToElementId            = ToElement.Id;
            cpb.ToConnectionPoint      = ToConnectionPoint;
            cpb.ElementConnectionPoint = ElementConnectionPoint;
            epb.Connections.Add(cpb);
        }
Beispiel #2
0
 public void Serialize(ElementPropertyBag epb, IEnumerable <GraphicElement> elementsBeingSerialized)
 {
     // If partial serialization (like copying a subset of shapes, don't include unselected connectors.)
     if (elementsBeingSerialized.Contains(ToElement))
     {
         ConnectionPropertyBag cpb = new ConnectionPropertyBag();
         cpb.ToElementId            = ToElement.Id;
         cpb.ToConnectionPoint      = ToConnectionPoint;
         cpb.ElementConnectionPoint = ElementConnectionPoint;
         epb.Connections.Add(cpb);
     }
 }
Beispiel #3
0
 public void Deserialize(List <GraphicElement> elements, ConnectionPropertyBag cpb, Dictionary <Guid, Guid> oldNewGuidMap)
 {
     ToElement              = elements.Single(e => e.Id == oldNewGuidMap[cpb.ToElementId]);
     ToConnectionPoint      = cpb.ToConnectionPoint;
     ElementConnectionPoint = cpb.ElementConnectionPoint;
 }
Beispiel #4
0
 public void Deserialize(List <GraphicElement> elements, ConnectionPropertyBag cpb)
 {
     ToElement              = elements.Single(e => e.Id == cpb.ToElementId);
     ToConnectionPoint      = cpb.ToConnectionPoint;
     ElementConnectionPoint = cpb.ElementConnectionPoint;
 }