Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Annotations / Storage / StoreContentChangedEventArgs.cs / 1 / StoreContentChangedEventArgs.cs
//------------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description:
// The AnnotationStore.StoreContentChanged event is generated when any
// changes are made to an annotation in an AnnotationStore.
//
// File contains the StoreContentChangedEventArgs class, the
// AnnotationStoreEnum and the StoreContentChangedEventHandler delegate.
// Spec: http://team/sites/ag/Specifications/CAF%20Storage%20Spec.doc
//
// History:
// 07/10/2003: rruiz: Created (split from AnnotationStore.cs file).
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Xml;
namespace System.Windows.Annotations.Storage
{
///
/// Event handler delegate for AnnotationUpdated event. Listeners for
/// this event must supply a delegate with this signature.
///
/// AnnotationStore in which the change took place
/// the event data
public delegate void StoreContentChangedEventHandler(object sender, StoreContentChangedEventArgs e);
///
/// Possible actions performed on an IAnnotation in an AnnotationStore.
///
public enum StoreContentAction
{
///
/// Annotation was added to the store
///
Added,
///
/// Annotation was deleted from the store
///
Deleted
}
///
/// The AnnotationUpdated event is generated when any changes are made
/// to an annotation in an AnnotationStore. An instance of this class
/// specifies the action that was taken and the IAnnotation that was
/// acted upon.
///
public class StoreContentChangedEventArgs : System.EventArgs
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Creates an instance of AnnotationUpdatedEventArgs with the
/// specified action and annotation.
///
/// the action that was performed on an annotation
/// the annotation that was updated
public StoreContentChangedEventArgs(StoreContentAction action, Annotation annotation)
{
if (annotation == null)
throw new ArgumentNullException("annotation");
_action = action;
_annotation = annotation;
}
#endregion Constructors
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
//------------------------------------------------------
//
// Public Operators
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
#region Public Properties
///
/// Returns the IAnnotation that was updated.
///
public Annotation Annotation
{
get
{
return _annotation;
}
}
///
/// Returns the action that was performed on the annotation.
///
public StoreContentAction Action
{
get
{
return _action;
}
}
#endregion Public Properties
//-----------------------------------------------------
//
// Public Events
//
//-----------------------------------------------------
//-----------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
private StoreContentAction _action; // action taken on the annotation
private Annotation _annotation; // annotation that was updated
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description:
// The AnnotationStore.StoreContentChanged event is generated when any
// changes are made to an annotation in an AnnotationStore.
//
// File contains the StoreContentChangedEventArgs class, the
// AnnotationStoreEnum and the StoreContentChangedEventHandler delegate.
// Spec: http://team/sites/ag/Specifications/CAF%20Storage%20Spec.doc
//
// History:
// 07/10/2003: rruiz: Created (split from AnnotationStore.cs file).
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Xml;
namespace System.Windows.Annotations.Storage
{
///
/// Event handler delegate for AnnotationUpdated event. Listeners for
/// this event must supply a delegate with this signature.
///
/// AnnotationStore in which the change took place
/// the event data
public delegate void StoreContentChangedEventHandler(object sender, StoreContentChangedEventArgs e);
///
/// Possible actions performed on an IAnnotation in an AnnotationStore.
///
public enum StoreContentAction
{
///
/// Annotation was added to the store
///
Added,
///
/// Annotation was deleted from the store
///
Deleted
}
///
/// The AnnotationUpdated event is generated when any changes are made
/// to an annotation in an AnnotationStore. An instance of this class
/// specifies the action that was taken and the IAnnotation that was
/// acted upon.
///
public class StoreContentChangedEventArgs : System.EventArgs
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Creates an instance of AnnotationUpdatedEventArgs with the
/// specified action and annotation.
///
/// the action that was performed on an annotation
/// the annotation that was updated
public StoreContentChangedEventArgs(StoreContentAction action, Annotation annotation)
{
if (annotation == null)
throw new ArgumentNullException("annotation");
_action = action;
_annotation = annotation;
}
#endregion Constructors
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
//------------------------------------------------------
//
// Public Operators
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
#region Public Properties
///
/// Returns the IAnnotation that was updated.
///
public Annotation Annotation
{
get
{
return _annotation;
}
}
///
/// Returns the action that was performed on the annotation.
///
public StoreContentAction Action
{
get
{
return _action;
}
}
#endregion Public Properties
//-----------------------------------------------------
//
// Public Events
//
//-----------------------------------------------------
//-----------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
private StoreContentAction _action; // action taken on the annotation
private Annotation _annotation; // annotation that was updated
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResXBuildProvider.cs
- ActivityTypeResolver.xaml.cs
- BitHelper.cs
- ComMethodElementCollection.cs
- Classification.cs
- SamlAction.cs
- LinqDataSourceInsertEventArgs.cs
- PinnedBufferMemoryStream.cs
- SymmetricKeyWrap.cs
- MyContact.cs
- HttpConfigurationSystem.cs
- autovalidator.cs
- COM2TypeInfoProcessor.cs
- FrameworkContentElementAutomationPeer.cs
- QueryOutputWriter.cs
- MenuItemCollectionEditorDialog.cs
- PrinterResolution.cs
- XamlTemplateSerializer.cs
- WizardPanel.cs
- RsaSecurityKey.cs
- CommandValueSerializer.cs
- Automation.cs
- XmlNamespaceMappingCollection.cs
- BookmarkScopeInfo.cs
- CreateUserWizardStep.cs
- WebPartMovingEventArgs.cs
- Span.cs
- XmlMemberMapping.cs
- CodeTypeMember.cs
- WebMessageBodyStyleHelper.cs
- CounterNameConverter.cs
- InvalidCardException.cs
- DefaultBinder.cs
- ContextQuery.cs
- OSEnvironmentHelper.cs
- BindableAttribute.cs
- SystemColors.cs
- Missing.cs
- MD5CryptoServiceProvider.cs
- TextElementEnumerator.cs
- UnsafeNativeMethodsTablet.cs
- IListConverters.cs
- XsltException.cs
- WindowsPrincipal.cs
- PtsHelper.cs
- VirtualPath.cs
- WebPartDisplayModeCollection.cs
- BaseResourcesBuildProvider.cs
- HttpProfileBase.cs
- PageCodeDomTreeGenerator.cs
- AnnotationStore.cs
- DeflateEmulationStream.cs
- DispatcherProcessingDisabled.cs
- ParameterModifier.cs
- TextEmbeddedObject.cs
- Rules.cs
- WebBrowserProgressChangedEventHandler.cs
- ApplicationId.cs
- SystemResources.cs
- GeneralTransform2DTo3DTo2D.cs
- TdsParserStateObject.cs
- RegexGroup.cs
- HtmlLinkAdapter.cs
- ThreadLocal.cs
- ExceptionHelpers.cs
- RadioButton.cs
- PropertyKey.cs
- XhtmlConformanceSection.cs
- DataServiceRequestException.cs
- XmlCharCheckingReader.cs
- FontResourceCache.cs
- ToolStripSettings.cs
- LayoutUtils.cs
- ReadOnlyDictionary.cs
- ToolboxComponentsCreatingEventArgs.cs
- PreProcessInputEventArgs.cs
- CDSsyncETWBCLProvider.cs
- StrongName.cs
- DataGridViewImageCell.cs
- RoutedEventHandlerInfo.cs
- PropertyNames.cs
- WebPartRestoreVerb.cs
- KeyGestureConverter.cs
- SqlProcedureAttribute.cs
- MetadataException.cs
- MetadataItem_Static.cs
- DocumentPageTextView.cs
- ImageCodecInfoPrivate.cs
- documentsequencetextpointer.cs
- WindowsGraphics.cs
- ToolBarTray.cs
- ComPlusAuthorization.cs
- CultureTable.cs
- DataReceivedEventArgs.cs
- ByteAnimation.cs
- EntityClientCacheKey.cs
- ConnectionPointCookie.cs
- ClientSettingsProvider.cs
- FilterableAttribute.cs
- RealizationDrawingContextWalker.cs