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
- XmlLanguage.cs
- FrameworkRichTextComposition.cs
- Unit.cs
- PropertyEmitter.cs
- GACMembershipCondition.cs
- FolderLevelBuildProvider.cs
- ActivationServices.cs
- DependencyPropertyValueSerializer.cs
- MessageSmuggler.cs
- ByteStorage.cs
- listitem.cs
- PbrsForward.cs
- DataFormat.cs
- GradientBrush.cs
- QueryRewriter.cs
- KeyInfo.cs
- UIElementIsland.cs
- CodeTypeMemberCollection.cs
- StylusPointPropertyInfo.cs
- ObjectDataProvider.cs
- IFlowDocumentViewer.cs
- MenuAutomationPeer.cs
- SByte.cs
- CompModHelpers.cs
- AttributeQuery.cs
- ServiceParser.cs
- ReadonlyMessageFilter.cs
- KeyPressEvent.cs
- GridViewDeleteEventArgs.cs
- ListBoxAutomationPeer.cs
- DaylightTime.cs
- Block.cs
- RouteTable.cs
- Flowchart.cs
- SessionPageStateSection.cs
- CacheModeConverter.cs
- UIElementCollection.cs
- ObsoleteAttribute.cs
- IntranetCredentialPolicy.cs
- ProcessHostConfigUtils.cs
- SpeechEvent.cs
- DocumentViewerBaseAutomationPeer.cs
- Tracking.cs
- PreProcessor.cs
- FileRegion.cs
- DebugView.cs
- _ServiceNameStore.cs
- TextElementCollection.cs
- EventWaitHandle.cs
- CollectionView.cs
- CreatingCookieEventArgs.cs
- XmlQueryOutput.cs
- WebZone.cs
- CompatibleIComparer.cs
- MaterialGroup.cs
- SchemaNotation.cs
- XmlDownloadManager.cs
- XpsS0ValidatingLoader.cs
- SimpleRecyclingCache.cs
- HostElement.cs
- StoreItemCollection.Loader.cs
- RecordConverter.cs
- CfgParser.cs
- WaitHandleCannotBeOpenedException.cs
- MessageSmuggler.cs
- PassportAuthentication.cs
- ExpressionPrinter.cs
- RegistrationServices.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- FormsAuthenticationEventArgs.cs
- FamilyCollection.cs
- CellTreeNodeVisitors.cs
- PathFigureCollection.cs
- PeerValidationBehavior.cs
- ExceptionHandler.cs
- DefaultPropertiesToSend.cs
- WinEventHandler.cs
- SimpleNameService.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ScrollViewerAutomationPeer.cs
- MetadataArtifactLoaderCompositeResource.cs
- Figure.cs
- GroupBoxAutomationPeer.cs
- XmlElementList.cs
- HtmlPhoneCallAdapter.cs
- RIPEMD160.cs
- TypeSystemProvider.cs
- HostedImpersonationContext.cs
- MessageQueueCriteria.cs
- log.cs
- QilList.cs
- ServerValidateEventArgs.cs
- DataTransferEventArgs.cs
- EnvelopedPkcs7.cs
- FormatterServicesNoSerializableCheck.cs
- DetailsViewInsertedEventArgs.cs
- ErasingStroke.cs
- DynamicValueConverter.cs
- EntityDataSourceWrapper.cs
- ProcessHostConfigUtils.cs