private Shape(XElementData data, int id, DrawPosition from, DrawPosition to, Drawings drawings) { this.data = data; this.drawings = drawings; SetPositions(from, to); WriteContents(id, from, to); }
private bool TryLoadDrawings() { if (data.Element("drawing") == null) { return(false); } var drawingsId = data.Element("drawing").AttributeValue("r", "id"); var targetPath = relationshipsData.Descendants("Relationship").Single(r => r["Id"] == drawingsId)["Target"]; drawings = new Drawings(string.Format("{0}/{1}", worksheetFolder, targetPath)); return(true); }
public static Shape FromExisting(XElementData data, Drawings drawings) { return(new Shape(data, drawings)); }
private Shape(XElementData data, Drawings drawings) { this.data = data; this.drawings = drawings; ShapeProperties = null; // shape properties for existing shapes will not be initialized }
public static Shape New(XElementData data, int id, DrawPosition from, DrawPosition to, Drawings drawings) { return(new Shape(data, id, from, to, drawings)); }