Game Development Reference
In-Depth Information
return image;
}
internal static CustomData PasteCustomData()
{
object rawData = PasteArbitraryData(CustomData.DataFormat.Name,
false);
CustomData data = null;
if (rawData != null && rawData is CustomData)
{
data = (CustomData)rawData;
}
return data;
}
private static void CopyArbitraryData(string format, object data)
{
IDataObject dataObject = new DataObject();
dataObject.SetData(format, true, data);
Clipboard.SetDataObject(dataObject, true);
}
private static object PasteArbitraryData(string format, bool autoConvert)
{
object data = null;
IDataObject dataObject = Clipboard.GetDataObject();
if (dataObject.GetDataPresent(format))
{
if (autoConvert)
{
data = dataObject.GetData(format, true);
}
else
{
data = dataObject.GetData(format);
}
}
Search Nedrilad ::




Custom Search