private void WriteWrokSheetDrawing_Content_DrawingPosition(string tag, DrawingPosition item, XElement rootNode) { XElement fromNode = new XElement(XName.Get(tag, ExcelCommon.Schema_SheetDrawings)); fromNode.Add(new XElement(XName.Get("col", ExcelCommon.Schema_SheetDrawings)) { Value = item.Column.ToString() }); fromNode.Add(new XElement(XName.Get("colOff", ExcelCommon.Schema_SheetDrawings)) { Value = item.ColumnOff.ToString() }); fromNode.Add(new XElement(XName.Get("row", ExcelCommon.Schema_SheetDrawings)) { Value = item.Row.ToString() }); fromNode.Add(new XElement(XName.Get("rowOff", ExcelCommon.Schema_SheetDrawings)) { Value = item.RowOff.ToString() }); rootNode.Add(fromNode); }
private void ReadWrokSheetDrawings_Position(DrawingPosition drawingPosition, XElement xnode) { XElement childNode = xnode.Element(XName.Get("col", ExcelCommon.Schema_SheetDrawings)); if (childNode != null) drawingPosition.Column = GetInt(childNode.Value); childNode = xnode.Element(XName.Get("colOff", ExcelCommon.Schema_SheetDrawings)); if (childNode != null) drawingPosition.ColumnOff = GetInt(childNode.Value); childNode = xnode.Element(XName.Get("row", ExcelCommon.Schema_SheetDrawings)); if (childNode != null) drawingPosition.Row = GetInt(childNode.Value); childNode = xnode.Element(XName.Get("rowOff", ExcelCommon.Schema_SheetDrawings)); if (childNode != null) drawingPosition.RowOff = GetInt(childNode.Value); }