¡@

Home 

c# Programming Glossary: dataobject

JavaScriptSerializer.Deserialize - how to change field names

http://stackoverflow.com/questions/1100191/javascriptserializer-deserialize-how-to-change-field-names

the following C# object for it Serializable public class DataObject XmlElement user_id public int UserId get set XmlElement detail_level.. one of the values. This test fails TestMethod public void DataObjectSimpleParseTest JavaScriptSerializer serializer new JavaScriptSerializer.. JavaScriptSerializer serializer new JavaScriptSerializer DataObject dataObject serializer.Deserialize DataObject JsonData Assert.IsNotNull..

Drag and drop virtual files using IStream

http://stackoverflow.com/questions/1187444/drag-and-drop-virtual-files-using-istream

it by yourself this is somewhat complicate because .net DataObject class is limited. I have working example of the opposite task.. explorer but it is easier because I do not needed own IDataObject implementation. So your task will be Find working IDataObject.. implementation. So your task will be Find working IDataObject implementation in .net. I recommend you look here Shell Style..

Drag and Drop between Instances of the same Windows Forms Application

http://stackoverflow.com/questions/1201812/drag-and-drop-between-instances-of-the-same-windows-forms-application

pictureBox_DragDrop object sender DragEventArgs dea if IDataObject dea.Data .GetDataPresent DataFormats.Bitmap sender as PictureBox.. DataFormats.Bitmap sender as PictureBox .Image Image IDataObject dea.Data .GetData DataFormats.Bitmap Any help would be greatly.. support both .NET and unmanaged recipients of the bitmap a DataObject class is used for the drag and drop operation as follows. To..

How to use filegroupdescriptor to drag file to explorer c#

http://stackoverflow.com/questions/1845654/how-to-use-filegroupdescriptor-to-drag-file-to-explorer-c-sharp

and Drop in C# In short what you have to do is to init the DataObject with FILEDESCRIPTOR you can find its declaration details on.. void listBox1_MouseDown object sender MouseEventArgs e DataObject dataObject new DataObject DragFileInfo filesInfo new DragFileInfo.. object sender MouseEventArgs e DataObject dataObject new DataObject DragFileInfo filesInfo new DragFileInfo d test.txt using MemoryStream..

Drag & drop of a dynamically created shortcut

http://stackoverflow.com/questions/1935925/drag-drop-of-a-dynamically-created-shortcut

above to create a temporary shortcut file I simply used DataObject for the drag and drop like in the following example private.. 0 link.Save tmp.lnk Starts the drag and drop operation DataObject shortcut new DataObject StringCollection files new StringCollection.. Starts the drag and drop operation DataObject shortcut new DataObject StringCollection files new StringCollection files.Add Path.GetFullPath..

Cut files to clipboard in C#

http://stackoverflow.com/questions/2077981/cut-files-to-clipboard-in-c-sharp

dropEffect.Write moveEffect 0 moveEffect.Length DataObject data new DataObject data.SetFileDropList files data.SetData.. moveEffect 0 moveEffect.Length DataObject data new DataObject data.SetFileDropList files data.SetData Preferred DropEffect..

Drag and drop to Desktop / Explorer

http://stackoverflow.com/questions/3040415/drag-and-drop-to-desktop-explorer

can do this as long as you pass it an appropriate DataObject . First copy the files somewhere. You can use System.IO.Path.GetTempPath.. following string paths ... DragDrop.DoDragDrop this new DataObject DataFormats.FileDrop paths DragDropEffects.Copy It is actually.. pre copying the files but that gets into some complicated IDataObject interactions so unless your files are potentially very large..

JavaScriptSerializer.Deserialize - how to change field names

http://stackoverflow.com/questions/1100191/javascriptserializer-deserialize-how-to-change-field-names

serializer new JavaScriptSerializer DataObject dataObject serializer.Deserialize DataObject JsonData Assert.IsNotNull.. DataObject JsonData Assert.IsNotNull dataObject Assert.AreEqual DetailLevel.Low dataObject.DetailLevel Assert.AreEqual.. dataObject Assert.AreEqual DetailLevel.Low dataObject.DetailLevel Assert.AreEqual 1234 dataObject.UserId And the last..

Drag and drop virtual files using IStream

http://stackoverflow.com/questions/1187444/drag-and-drop-virtual-files-using-istream

GetDataObjectContent System.Windows.Forms.IDataObject dataObject if dataObject null return null List IVirtualItem Result new.. System.Windows.Forms.IDataObject dataObject if dataObject null return null List IVirtualItem Result new List IVirtualItem.. Result new List IVirtualItem bool WideDescriptor dataObject.GetDataPresent ShlObj.CFSTR_FILEDESCRIPTORW bool AnsiDescriptor..

Drag and Drop between Instances of the same Windows Forms Application

http://stackoverflow.com/questions/1201812/drag-and-drop-between-instances-of-the-same-windows-forms-application

as follows. To start the drag operation DataObject dataObject new DataObject dataObject.SetData typeof BitmapTransfer new.. the drag operation DataObject dataObject new DataObject dataObject.SetData typeof BitmapTransfer new BitmapTransfer sender as PictureBox.. new BitmapTransfer sender as PictureBox .Image as Bitmap dataObject.SetData DataFormats.Bitmap sender as PictureBox .Image as Bitmap..

How to make Databinding type safe and support refactoring

http://stackoverflow.com/questions/1329138/how-to-make-databinding-type-safe-and-support-refactoring

public static void BindLabelText T this Label control T dataObject Expression Func T object dataMember as this is way one any.. any type of property is ok control.DataBindings.Add Text dataObject Name dataMember public static void BindEnabled T this Control.. public static void BindEnabled T this Control control T dataObject Expression Func T bool dataMember control.Bind c c.Enabled..

Pass concrete object type as parameter for generic method

http://stackoverflow.com/questions/16491618/pass-concrete-object-type-as-parameter-for-generic-method

public static Boolean PurgeDataObject this IDataObject dataObject Guid uid return DataProvider.DeleteDataObject T uid DataProvider.GetConnection.. T uid DataProvider.GetConnection dataObject contains an instance of a class that inherit from IDataObject.. public static Boolean PurgeDataObject this IDataObject dataObject Guid uid return PurgeDataObjectImpl dynamic dataObject uid private..

How to use filegroupdescriptor to drag file to explorer c#

http://stackoverflow.com/questions/1845654/how-to-use-filegroupdescriptor-to-drag-file-to-explorer-c-sharp

object sender MouseEventArgs e DataObject dataObject new DataObject DragFileInfo filesInfo new DragFileInfo d test.txt.. filesInfo contentStream GetFileContents filesInfo dataObject.SetData CFSTR_FILEDESCRIPTORW infoStream dataObject.SetData.. dataObject.SetData CFSTR_FILEDESCRIPTORW infoStream dataObject.SetData CFSTR_FILECONTENTS contentStream dataObject.SetData..