AODL.Document.Export.OpenDocument.OpenDocumentTextExporter.CopyGraphics C# (CSharp) Method

CopyGraphics() private method

Copies the graphics.
private CopyGraphics ( IDocument document, string directory ) : void
document IDocument The document.
directory string The directory.
return void
    private void CopyGraphics(IDocument document, string directory)
    {
      string picturedir    = directory+@"\Pictures\";

      foreach(Graphic graphic in document.Graphics)
      {
        if (graphic.GraphicRealPath != null)
        {
          //Loaded or added
          if (graphic.GraphicFileName == null)
          {
            FileInfo fInfo  = new FileInfo(graphic.GraphicRealPath);
            if (!File.Exists(picturedir+fInfo.Name))
              File.Copy(graphic.GraphicRealPath, picturedir+fInfo.Name);
            //this.BinaryFileCopy(graphic.GraphicRealPath, picturedir+fInfo.Name);
          }
          else
            File.Copy(graphic.GraphicRealPath, picturedir+graphic.GraphicFileName);
          //this.BinaryFileCopy(graphic.GraphicRealPath, picturedir+graphic.GraphicFileName);
        }
      }
      //MovePicturesIfLoaded(document, picturedir);
    }