Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / DragEvent.cs / 1 / DragEvent.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms {
using System.Diagnostics;
using System;
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using Microsoft.Win32;
///
///
///
/// Provides data for the , , or event.
///
///
[System.Runtime.InteropServices.ComVisible(true)]
public class DragEventArgs : EventArgs {
///
///
/// The data associated with this event.
///
private readonly IDataObject data;
///
///
/// The current state of the shift, ctrl, and alt keys.
///
private readonly int keyState;
///
///
/// The mouse x location.
///
private readonly int x;
///
///
/// The mouse y location.
///
private readonly int y;
///
///
/// The effect that should be applied to the mouse cursor.
///
private readonly DragDropEffects allowedEffect;
///
///
///
/// Initializes a new instance of the
/// class.
///
///
///
private DragDropEffects effect;
///
///
///
/// Initializes a new instance of the class.
///
///
public DragEventArgs(IDataObject data, int keyState, int x, int y, DragDropEffects allowedEffect, DragDropEffects effect) {
this.data = data;
this.keyState = keyState;
this.x = x;
this.y = y;
this.allowedEffect = allowedEffect;
this.effect = effect;
}
///
///
///
/// The
/// that contains the data associated with this event.
///
///
public IDataObject Data {
get {
return data;
}
}
///
///
///
/// Gets
/// the current state of the SHIFT, CTRL, and ALT keys.
///
///
///
public int KeyState {
get {
return keyState;
}
}
///
///
///
/// Gets the
/// x-coordinate
/// of the mouse pointer.
///
///
public int X {
get {
return x;
}
}
///
///
///
/// Gets
/// the y-coordinate
/// of the mouse pointer.
///
///
public int Y {
get {
return y;
}
}
///
///
///
/// Gets which drag-and-drop operations are allowed by the
/// originator (or source) of the drag event.
///
///
public DragDropEffects AllowedEffect {
get {
return allowedEffect;
}
}
///
///
///
/// Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
///
///
public DragDropEffects Effect {
get {
return effect;
}
set {
effect = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms {
using System.Diagnostics;
using System;
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using Microsoft.Win32;
///
///
///
/// Provides data for the , , or event.
///
///
[System.Runtime.InteropServices.ComVisible(true)]
public class DragEventArgs : EventArgs {
///
///
/// The data associated with this event.
///
private readonly IDataObject data;
///
///
/// The current state of the shift, ctrl, and alt keys.
///
private readonly int keyState;
///
///
/// The mouse x location.
///
private readonly int x;
///
///
/// The mouse y location.
///
private readonly int y;
///
///
/// The effect that should be applied to the mouse cursor.
///
private readonly DragDropEffects allowedEffect;
///
///
///
/// Initializes a new instance of the
/// class.
///
///
///
private DragDropEffects effect;
///
///
///
/// Initializes a new instance of the class.
///
///
public DragEventArgs(IDataObject data, int keyState, int x, int y, DragDropEffects allowedEffect, DragDropEffects effect) {
this.data = data;
this.keyState = keyState;
this.x = x;
this.y = y;
this.allowedEffect = allowedEffect;
this.effect = effect;
}
///
///
///
/// The
/// that contains the data associated with this event.
///
///
public IDataObject Data {
get {
return data;
}
}
///
///
///
/// Gets
/// the current state of the SHIFT, CTRL, and ALT keys.
///
///
///
public int KeyState {
get {
return keyState;
}
}
///
///
///
/// Gets the
/// x-coordinate
/// of the mouse pointer.
///
///
public int X {
get {
return x;
}
}
///
///
///
/// Gets
/// the y-coordinate
/// of the mouse pointer.
///
///
public int Y {
get {
return y;
}
}
///
///
///
/// Gets which drag-and-drop operations are allowed by the
/// originator (or source) of the drag event.
///
///
public DragDropEffects AllowedEffect {
get {
return allowedEffect;
}
}
///
///
///
/// Gets or sets which drag-and-drop operations are allowed by the target of the drag event.
///
///
public DragDropEffects Effect {
get {
return effect;
}
set {
effect = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- COM2TypeInfoProcessor.cs
- SQLGuid.cs
- QueryContext.cs
- SelectionItemPattern.cs
- BuiltInExpr.cs
- ParagraphResult.cs
- VScrollProperties.cs
- ConsoleCancelEventArgs.cs
- HashMembershipCondition.cs
- EntityDataSourceDataSelection.cs
- ConfigurationManagerInternalFactory.cs
- SafeLibraryHandle.cs
- CompilerError.cs
- HScrollBar.cs
- WebConfigurationHost.cs
- DataServiceQueryContinuation.cs
- GroupQuery.cs
- XmlMembersMapping.cs
- CompositeFontParser.cs
- Matrix3D.cs
- IntSecurity.cs
- PathTooLongException.cs
- GPPOINTF.cs
- OpCopier.cs
- MainMenu.cs
- CookieHandler.cs
- DynamicControlParameter.cs
- SchemaInfo.cs
- ConstructorBuilder.cs
- OperationResponse.cs
- MetadataPropertyAttribute.cs
- EndpointIdentity.cs
- UniqueEventHelper.cs
- VersionPair.cs
- IncrementalReadDecoders.cs
- XmlSchemaValidationException.cs
- BooleanStorage.cs
- ReceiveActivityDesignerTheme.cs
- EndpointBehaviorElement.cs
- DataFormat.cs
- ModelItemDictionary.cs
- DetailsViewAutoFormat.cs
- Triplet.cs
- EmptyQuery.cs
- Button.cs
- CheckBoxBaseAdapter.cs
- WebPartDisplayModeCancelEventArgs.cs
- IgnoreSection.cs
- TextBoxAutomationPeer.cs
- PeerConnector.cs
- ToolZone.cs
- ZipIOLocalFileDataDescriptor.cs
- HotCommands.cs
- TransactionsSectionGroup.cs
- ListViewSortEventArgs.cs
- _LocalDataStoreMgr.cs
- SqlDuplicator.cs
- StdRegProviderWrapper.cs
- DateTimeConverter.cs
- RtfToXamlReader.cs
- DiagnosticStrings.cs
- CharacterString.cs
- FixedDocumentPaginator.cs
- InputBuffer.cs
- BaseProcessor.cs
- DisplayNameAttribute.cs
- XmlBoundElement.cs
- ComboBoxRenderer.cs
- FormattedText.cs
- UInt32Storage.cs
- DecoderFallbackWithFailureFlag.cs
- GridPattern.cs
- EventLogPermissionAttribute.cs
- UndoManager.cs
- WebServiceParameterData.cs
- Decorator.cs
- ValidateNames.cs
- WorkflowService.cs
- BitmapEffect.cs
- MethodSet.cs
- Stack.cs
- HttpInputStream.cs
- ConfigurationPropertyCollection.cs
- CookieProtection.cs
- RowType.cs
- StateDesignerConnector.cs
- ContractReference.cs
- FormsAuthenticationUser.cs
- Helpers.cs
- EventWaitHandle.cs
- DataGridBoolColumn.cs
- LoggedException.cs
- BooleanSwitch.cs
- WebServiceMethodData.cs
- DataGridViewBindingCompleteEventArgs.cs
- XmlAttributeProperties.cs
- SerializationObjectManager.cs
- XmlCountingReader.cs
- ToolStripLocationCancelEventArgs.cs
- SparseMemoryStream.cs