Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / MS / Internal / Ink / ClipboardData.cs / 1 / ClipboardData.cs
//---------------------------------------------------------------------------- // // File: ClipboardData.cs // // Description: // An abstract clipboard data class // // Features: // // History: // 11/17/2004 waynezen: Created // // Copyright (C) 2001 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Security; namespace MS.Internal.Ink { internal abstract class ClipboardData { //------------------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // // Internal Methods // //------------------------------------------------------------------------------- #region Internal Methods ////// Copy the data to the IDataObject /// /// The IDataObject instance ///Returns true if the data is copied. Otherwise, returns false ////// Critical: This code copies ink content to the clipboard and accepts a dataobject which is /// created under an elevation /// [SecurityCritical] internal bool CopyToDataObject(IDataObject dataObject) { // Check if the data can be copied if ( CanCopy() ) { // Do copy. DoCopy(dataObject); return true; } return false; } ////// Paste the data from the IDataObject /// /// The IDataObject instance internal void PasteFromDataObject(IDataObject dataObject) { // Check if we can paste. if ( CanPaste(dataObject) ) { // Do Paste. DoPaste(dataObject); } } internal abstract bool CanPaste(IDataObject dataObject); #endregion Internal Methods //-------------------------------------------------------------------------------- // // Protected Methods // //-------------------------------------------------------------------------------- #region Protected Methods // Those are the abstract methods which need to be implemented in the derived classes. protected abstract bool CanCopy(); protected abstract void DoCopy(IDataObject dataObject); protected abstract void DoPaste(IDataObject dataObject); #endregion Protected Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: ClipboardData.cs // // Description: // An abstract clipboard data class // // Features: // // History: // 11/17/2004 waynezen: Created // // Copyright (C) 2001 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Security; namespace MS.Internal.Ink { internal abstract class ClipboardData { //------------------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // // Internal Methods // //------------------------------------------------------------------------------- #region Internal Methods ////// Copy the data to the IDataObject /// /// The IDataObject instance ///Returns true if the data is copied. Otherwise, returns false ////// Critical: This code copies ink content to the clipboard and accepts a dataobject which is /// created under an elevation /// [SecurityCritical] internal bool CopyToDataObject(IDataObject dataObject) { // Check if the data can be copied if ( CanCopy() ) { // Do copy. DoCopy(dataObject); return true; } return false; } ////// Paste the data from the IDataObject /// /// The IDataObject instance internal void PasteFromDataObject(IDataObject dataObject) { // Check if we can paste. if ( CanPaste(dataObject) ) { // Do Paste. DoPaste(dataObject); } } internal abstract bool CanPaste(IDataObject dataObject); #endregion Internal Methods //-------------------------------------------------------------------------------- // // Protected Methods // //-------------------------------------------------------------------------------- #region Protected Methods // Those are the abstract methods which need to be implemented in the derived classes. protected abstract bool CanCopy(); protected abstract void DoCopy(IDataObject dataObject); protected abstract void DoPaste(IDataObject dataObject); #endregion Protected Methods } } // 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
- ValidatingReaderNodeData.cs
- SchemaNamespaceManager.cs
- DataGridItemEventArgs.cs
- PresentationSource.cs
- DataGridHeaderBorder.cs
- XmlSchemaNotation.cs
- CloseSequence.cs
- Translator.cs
- Assembly.cs
- ProfessionalColors.cs
- DesignerAttribute.cs
- EllipseGeometry.cs
- IMembershipProvider.cs
- Page.cs
- PeerCollaboration.cs
- SafeEventLogWriteHandle.cs
- UserInitiatedRoutedEventPermission.cs
- GridToolTip.cs
- Model3D.cs
- DataPagerFieldCommandEventArgs.cs
- webbrowsersite.cs
- SchemaImporterExtensionsSection.cs
- ISFTagAndGuidCache.cs
- HttpValueCollection.cs
- XXXOnTypeBuilderInstantiation.cs
- TraceSource.cs
- RegisterInfo.cs
- RightsManagementEncryptionTransform.cs
- InboundActivityHelper.cs
- XamlFxTrace.cs
- ReverseInheritProperty.cs
- CodeSnippetExpression.cs
- TreeViewItem.cs
- hresults.cs
- XamlStyleSerializer.cs
- StylusPointProperty.cs
- PathSegmentCollection.cs
- ContextDataSourceView.cs
- StringDictionary.cs
- ToolStrip.cs
- ListViewGroupItemCollection.cs
- GeometryCombineModeValidation.cs
- AppDomainAttributes.cs
- ConstructorNeedsTagAttribute.cs
- ToolboxItemAttribute.cs
- Localizer.cs
- initElementDictionary.cs
- PersistNameAttribute.cs
- EdmMember.cs
- ProtocolsSection.cs
- ComPlusTypeValidator.cs
- _ProxyChain.cs
- RectIndependentAnimationStorage.cs
- WebPart.cs
- RecordsAffectedEventArgs.cs
- Transform.cs
- OperationAbortedException.cs
- TemplateContainer.cs
- PageBreakRecord.cs
- ObjectDataSourceMethodEventArgs.cs
- ResourcePermissionBaseEntry.cs
- SettingsContext.cs
- TargetException.cs
- FontClient.cs
- ShutDownListener.cs
- ServiceObjectContainer.cs
- AppDomain.cs
- StringResourceManager.cs
- BoundColumn.cs
- TextBounds.cs
- CustomLineCap.cs
- ServicesSection.cs
- SolidColorBrush.cs
- SymbolType.cs
- SendContent.cs
- Knowncolors.cs
- AggregationMinMaxHelpers.cs
- DetailsViewUpdatedEventArgs.cs
- InheritanceContextHelper.cs
- Unit.cs
- AttachedPropertiesService.cs
- PtsHost.cs
- WebServiceClientProxyGenerator.cs
- PictureBox.cs
- MessagePropertyDescription.cs
- DynamicScriptObject.cs
- TypefaceCollection.cs
- CustomErrorCollection.cs
- ButtonColumn.cs
- ConvertTextFrag.cs
- CryptoConfig.cs
- MimeTypePropertyAttribute.cs
- MdiWindowListItemConverter.cs
- ObjectCacheHost.cs
- NTAccount.cs
- XmlAtomicValue.cs
- PTProvider.cs
- FontUnit.cs
- SamlAudienceRestrictionCondition.cs
- ByteArrayHelperWithString.cs