Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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.
//
//-----------------------------------------------------------------------------
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodePageUtils.cs
- WebPartMenu.cs
- ListManagerBindingsCollection.cs
- MouseButton.cs
- TextEditorTables.cs
- NetSectionGroup.cs
- KerberosSecurityTokenProvider.cs
- ZoneButton.cs
- RangeEnumerable.cs
- fixedPageContentExtractor.cs
- MissingManifestResourceException.cs
- CellTreeNode.cs
- ProviderIncompatibleException.cs
- SqlDataRecord.cs
- Screen.cs
- TabletDeviceInfo.cs
- LinkClickEvent.cs
- RectConverter.cs
- Debug.cs
- _NTAuthentication.cs
- PersonalizationProviderCollection.cs
- HtmlHistory.cs
- TraceContextEventArgs.cs
- TreeChangeInfo.cs
- ClientOptions.cs
- Visitors.cs
- DateTimeFormatInfo.cs
- LockCookie.cs
- TypeTypeConverter.cs
- ProfileModule.cs
- MediaSystem.cs
- SemanticResultKey.cs
- EditorZone.cs
- Rights.cs
- ModuleBuilderData.cs
- odbcmetadatafactory.cs
- SqlParameterCollection.cs
- AssemblyCacheEntry.cs
- ApplicationDirectory.cs
- ProxyHelper.cs
- DataStreamFromComStream.cs
- XmlSortKey.cs
- GACMembershipCondition.cs
- QilInvoke.cs
- NetTcpBindingCollectionElement.cs
- TemplatePagerField.cs
- CapiNative.cs
- LinqDataSourceEditData.cs
- IsolatedStorageFile.cs
- DataGrid.cs
- ListBoxItemAutomationPeer.cs
- StringAnimationBase.cs
- Html32TextWriter.cs
- TextRenderer.cs
- MenuItem.cs
- CssTextWriter.cs
- CharConverter.cs
- backend.cs
- TextFormatterImp.cs
- DockPattern.cs
- RuleDefinitions.cs
- ToolStripMenuItem.cs
- ECDsaCng.cs
- AutomationProperty.cs
- CapabilitiesAssignment.cs
- DispatcherSynchronizationContext.cs
- AutoCompleteStringCollection.cs
- NavigationProperty.cs
- RuntimeIdentifierPropertyAttribute.cs
- SmiConnection.cs
- ManifestSignatureInformation.cs
- RMPublishingDialog.cs
- TypeDescriptionProvider.cs
- AuthorizationRuleCollection.cs
- QueryExtender.cs
- DriveInfo.cs
- PolyQuadraticBezierSegment.cs
- PublisherIdentityPermission.cs
- WmpBitmapEncoder.cs
- ConsumerConnectionPointCollection.cs
- TypedReference.cs
- CollectionDataContract.cs
- UniformGrid.cs
- CLSCompliantAttribute.cs
- XmlSchemaObjectTable.cs
- Certificate.cs
- EntitySqlQueryState.cs
- Console.cs
- AutoResetEvent.cs
- XsdDateTime.cs
- MsmqChannelFactoryBase.cs
- DeflateEmulationStream.cs
- SourceFileBuildProvider.cs
- SymLanguageVendor.cs
- MatrixCamera.cs
- ObjectDataSourceEventArgs.cs
- Freezable.cs
- XmlSchemaAnnotation.cs
- TripleDESCryptoServiceProvider.cs
- Track.cs