protected virtual DataObject CreateDataObject(Shapes.IDiagramShapeCollection coll, DiagramDocument clipdoc) { DataObject obj1 = new DataObject(); obj1.SetData(clipdoc.DataFormat, clipdoc); Bitmap bitmap1 = this.GetBitmapFromCollection(clipdoc); obj1.SetData(DataFormats.Bitmap, true, bitmap1); string text1 = null; LayerCollectionObjectEnumerator enumerator1 = clipdoc.GetEnumerator(); while (enumerator1.MoveNext()) { Shapes.DiagramShape obj2 = enumerator1.Current; Shapes.ITextNode node1 = obj2 as Shapes.ITextNode; if (node1 != null) { if (text1 == null) { text1 = node1.Text; continue; } text1 = text1 + Environment.NewLine + node1.Text; continue; } Shapes.DiagramText text2 = obj2 as Shapes.DiagramText; if (text2 != null) { if (text1 == null) { text1 = text2.Text; continue; } text1 = text1 + Environment.NewLine + text2.Text; } } if (text1 != null) { obj1.SetData(DataFormats.UnicodeText, true, text1); } return obj1; }