LabelEditEvent.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / LabelEditEvent.cs / 1 / LabelEditEvent.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Windows.Forms { 
 
    using System.Diagnostics;
 
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using Microsoft.Win32; 

 
    ///  
    /// 
    ///     
    ///       Provides data for the  event.
    ///    
    /// 
    public class LabelEditEventArgs : EventArgs { 
        private readonly string label;
        private readonly int item; 
        private bool cancelEdit = false; 

        ///  
        /// 
        ///    
        ///       Initializes a new instance
        ///       of the  class with the specified 
        ///       index to the  to edit.
        ///     
        ///  
        public LabelEditEventArgs(int item) {
            this.item = item; 
            this.label = null;
        }

        ///  
        /// 
        ///     
        ///       Initializes a new instance 
        ///       of the  class with the specified index to the  being
        ///       edited and the new text for the label of the . 
        ///    
        /// 
        public LabelEditEventArgs(int item, string label) {
            this.item = item; 
            this.label = label;
        } 
 
        /// 
        ///  
        ///    
        ///       Gets the new text assigned to the label of the .
        ///    
        ///  
        public string Label {
            get { 
                return label; 
            }
        } 

        /// 
        /// 
        ///     
        ///       Gets the zero-based index of the  containing the label to
        ///       edit. 
        ///     
        /// 
        public int Item { 
            get {
                return item;
            }
        } 

        ///  
        ///  
        ///    
        ///       Gets or sets a value indicating whether changes made to the label of 
        ///       the  should be canceled.
        ///    
        /// 
        public bool CancelEdit { 
            get {
                return cancelEdit; 
            } 
            set {
                cancelEdit = value; 
            }
        }
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK