Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / CancelEventArgs.cs / 1 / CancelEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
///
/// Provides data for the
/// event.
///
///
[HostProtection(SharedState = true)]
public class CancelEventArgs : EventArgs {
///
/// Indicates, on return, whether or not the operation should be cancelled
/// or not. 'true' means cancel it, 'false' means don't.
///
private bool cancel;
///
///
/// Initializes a new instance of the class with
/// cancel set to .
///
///
public CancelEventArgs() : this(false) {
}
///
///
/// Initializes a new instance of the class with
/// cancel set to the given value.
///
///
public CancelEventArgs(bool cancel)
: base() {
this.cancel = cancel;
}
///
///
/// Gets or sets a value
/// indicating whether the operation should be cancelled.
///
///
public bool Cancel {
get {
return cancel;
}
set {
this.cancel = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
///
/// Provides data for the
/// event.
///
///
[HostProtection(SharedState = true)]
public class CancelEventArgs : EventArgs {
///
/// Indicates, on return, whether or not the operation should be cancelled
/// or not. 'true' means cancel it, 'false' means don't.
///
private bool cancel;
///
///
/// Initializes a new instance of the class with
/// cancel set to .
///
///
public CancelEventArgs() : this(false) {
}
///
///
/// Initializes a new instance of the class with
/// cancel set to the given value.
///
///
public CancelEventArgs(bool cancel)
: base() {
this.cancel = cancel;
}
///
///
/// Gets or sets a value
/// indicating whether the operation should be cancelled.
///
///
public bool Cancel {
get {
return cancel;
}
set {
this.cancel = 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
- datacache.cs
- HandledEventArgs.cs
- RuleSetReference.cs
- Rule.cs
- _Events.cs
- BrowserCapabilitiesFactoryBase.cs
- OutputScopeManager.cs
- CustomValidator.cs
- EmptyEnumerator.cs
- StyleCollection.cs
- CalendarDateRange.cs
- XPathAncestorQuery.cs
- DiscoveryMessageProperty.cs
- EventRecordWrittenEventArgs.cs
- ByteViewer.cs
- DataControlLinkButton.cs
- DependencyPropertyKind.cs
- X509ThumbprintKeyIdentifierClause.cs
- StreamUpgradeProvider.cs
- TextSelectionHelper.cs
- ManifestResourceInfo.cs
- HyperLinkDataBindingHandler.cs
- SqlColumnizer.cs
- SelectorItemAutomationPeer.cs
- MultiView.cs
- PartialClassGenerationTaskInternal.cs
- HttpCapabilitiesBase.cs
- FixUpCollection.cs
- TreeNode.cs
- ImageListUtils.cs
- XmlSchemaInferenceException.cs
- EncoderExceptionFallback.cs
- AssignDesigner.xaml.cs
- BindingsCollection.cs
- WebPartZoneCollection.cs
- PartialClassGenerationTaskInternal.cs
- PersistenceTypeAttribute.cs
- ListViewHitTestInfo.cs
- SynchronizedInputHelper.cs
- SourceLocation.cs
- WindowsStatusBar.cs
- MenuItem.cs
- ActiveXMessageFormatter.cs
- DetailsView.cs
- FileStream.cs
- NamespaceCollection.cs
- PropertyFilterAttribute.cs
- HttpProcessUtility.cs
- HttpResponseHeader.cs
- WebPartCatalogAddVerb.cs
- DelegateSerializationHolder.cs
- ProtocolsConfigurationHandler.cs
- AsnEncodedData.cs
- LocalFileSettingsProvider.cs
- DesignerView.cs
- HotSpot.cs
- AnnotationResource.cs
- HttpCookiesSection.cs
- BindingMemberInfo.cs
- ObjectQueryState.cs
- ScaleTransform.cs
- CodeTypeConstructor.cs
- ToolStripPanel.cs
- RotationValidation.cs
- TreeViewHitTestInfo.cs
- cookiecollection.cs
- Marshal.cs
- LabelDesigner.cs
- LinqTreeNodeEvaluator.cs
- EventlogProvider.cs
- SyndicationItem.cs
- ToolStripSplitButton.cs
- CodeAccessPermission.cs
- ExtensionQuery.cs
- TableCellCollection.cs
- TraceListener.cs
- ListViewItem.cs
- SafeRightsManagementEnvironmentHandle.cs
- ClientBuildManager.cs
- ParameterElement.cs
- FrameSecurityDescriptor.cs
- StringSorter.cs
- FullTextLine.cs
- XmlCharCheckingWriter.cs
- Int16AnimationBase.cs
- ArglessEventHandlerProxy.cs
- CommandBinding.cs
- CompositionCommandSet.cs
- HyperLinkColumn.cs
- Base64Encoder.cs
- DocumentAutomationPeer.cs
- HotCommands.cs
- RegexWriter.cs
- SafeLibraryHandle.cs
- typedescriptorpermissionattribute.cs
- ClientEventManager.cs
- EditorPartCollection.cs
- SectionVisual.cs
- DockPatternIdentifiers.cs
- ButtonFieldBase.cs