using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using ChemAxon.NET.IKVM.Chemistry;
using ChemAxon.NET.API;
using ChemAxon.NET.API.IO;
namespace ChemAxon.NET.UnitTest.API.Examples.IO.OLE
{
public class OleExample
{
public void CopyOLE_To_Clipboard_Example()
{
IOleHandler ole = MainFactory.IO.OpenOle();
ole.CopyTo(MainFactory.Chemistry.CreateMolecule("benzene"));
}
public void PasteOLE_From_Clipboard_Example()
{
IOleHandler ole = MainFactory.IO.OpenOle();
if (ole.IsMarvinOleDocumentOnClipboard())
{
IJChemMolecule molecule;
ole.PasteFrom(out molecule);
Console.WriteLine("Molecule from clipboard:");
Console.WriteLine(molecule.Formula);
}
else
Console.WriteLine("There is no molecule on the clipboard!");
}
}
}