public override void LoadFromXML(XElement xml) { base.LoadFromXML(xml); String portDefString = XmlUtilits.GetFieldValue(xml, "PortDefenitionGuid", Guid.Empty.ToString()); if (!Guid.TryParse(portDefString, out PortDefenitionGuid)) { PortDefenitionGuid = Guid.Empty; } rectanglePainter.LoadFromXML(xml); String side = XmlUtilits.GetFieldValue(xml, "ConnectionPortLocation", RectangleSide.Left.ToString()); ConnectionPortLocation = (RectangleSide)Enum.Parse(typeof(RectangleSide), side, true); }
public override void LoadFromXML(XElement xml) { base.LoadFromXML(xml); painter.LoadFromXML(xml); /* Check min size */ if (Painter.Width < 30) { Painter.Width = 30; } if (Painter.Height < 30) { Painter.Height = 30; } UpdateAnchorsPositions(); }