Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Ink / ClipboardData.cs / 1305600 / 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
- ToolStripItemCollection.cs
- assertwrapper.cs
- ThreadExceptionEvent.cs
- SelectiveScrollingGrid.cs
- SelectorAutomationPeer.cs
- ColumnClickEvent.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- PageEventArgs.cs
- MeasureItemEvent.cs
- MobileErrorInfo.cs
- CollectionViewProxy.cs
- BmpBitmapDecoder.cs
- HtmlAnchor.cs
- ControlCodeDomSerializer.cs
- IsolatedStorage.cs
- Slider.cs
- PaginationProgressEventArgs.cs
- XmlAttribute.cs
- PersonalizationAdministration.cs
- Socket.cs
- DBParameter.cs
- DesignerMetadata.cs
- ReadOnlyKeyedCollection.cs
- XsltContext.cs
- AbstractDataSvcMapFileLoader.cs
- ConsoleCancelEventArgs.cs
- DBParameter.cs
- MediaPlayerState.cs
- keycontainerpermission.cs
- DefaultBinder.cs
- DataGridViewCheckBoxCell.cs
- DbProviderServices.cs
- AutomationPeer.cs
- ScrollProperties.cs
- InfiniteIntConverter.cs
- RawMouseInputReport.cs
- RawStylusActions.cs
- RelationshipWrapper.cs
- UserMapPath.cs
- SQLConvert.cs
- WebPartManager.cs
- DocumentPageView.cs
- XmlQueryStaticData.cs
- AutomationElement.cs
- SID.cs
- WindowsAuthenticationEventArgs.cs
- TemplatedWizardStep.cs
- NestedContainer.cs
- DoubleCollectionConverter.cs
- UserNameSecurityToken.cs
- Matrix.cs
- SchemaCollectionPreprocessor.cs
- ErrorEventArgs.cs
- ObjectDataSource.cs
- MessagingActivityHelper.cs
- PartialClassGenerationTaskInternal.cs
- TranslateTransform3D.cs
- ComboBoxRenderer.cs
- MultiSelector.cs
- ConsumerConnectionPoint.cs
- GeneralTransformGroup.cs
- CompoundFileReference.cs
- ObjectView.cs
- UICuesEvent.cs
- EarlyBoundInfo.cs
- XamlStyleSerializer.cs
- SmuggledIUnknown.cs
- Operator.cs
- XmlSignatureProperties.cs
- TimeoutException.cs
- SQLByteStorage.cs
- CodeCompileUnit.cs
- sqlinternaltransaction.cs
- SecurityPolicySection.cs
- ButtonRenderer.cs
- CollectionEditor.cs
- ContentFileHelper.cs
- FactoryGenerator.cs
- ContextStaticAttribute.cs
- BaseCodeDomTreeGenerator.cs
- EncoderBestFitFallback.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- KeyNotFoundException.cs
- CollectionViewProxy.cs
- CodeMethodReturnStatement.cs
- SplineKeyFrames.cs
- New.cs
- HtmlToClrEventProxy.cs
- RTLAwareMessageBox.cs
- _Events.cs
- FactoryRecord.cs
- XmlNamespaceManager.cs
- LineBreak.cs
- ResourcePermissionBaseEntry.cs
- Keywords.cs
- CompiledRegexRunnerFactory.cs
- cookiecollection.cs
- Image.cs
- CodeTypeOfExpression.cs
- DataViewManagerListItemTypeDescriptor.cs