//------------------------------------------------------------------------------ // // 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; } } } }