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
- FtpCachePolicyElement.cs
- ObjectStateEntryDbDataRecord.cs
- AttachmentCollection.cs
- ColumnResizeUndoUnit.cs
- DesignConnection.cs
- Effect.cs
- ConfigurationFileMap.cs
- util.cs
- PassportAuthentication.cs
- BaseResourcesBuildProvider.cs
- FileDetails.cs
- KeyInfo.cs
- COM2IProvidePropertyBuilderHandler.cs
- SplineKeyFrames.cs
- TreeViewTemplateSelector.cs
- SimpleTextLine.cs
- TypeUtil.cs
- CodeMemberEvent.cs
- BamlLocalizationDictionary.cs
- RequestTimeoutManager.cs
- VerificationAttribute.cs
- NameValueFileSectionHandler.cs
- AssemblyNameProxy.cs
- pingexception.cs
- AdornedElementPlaceholder.cs
- ContractCodeDomInfo.cs
- ConstructorExpr.cs
- LookupTables.cs
- DocumentGrid.cs
- PrintController.cs
- DocumentReference.cs
- Converter.cs
- FtpWebRequest.cs
- ValidationResult.cs
- ImageMapEventArgs.cs
- CollectionViewProxy.cs
- Properties.cs
- RayHitTestParameters.cs
- WebServiceParameterData.cs
- Executor.cs
- DefaultAuthorizationContext.cs
- HtmlControlDesigner.cs
- TableColumnCollectionInternal.cs
- EntityContainerAssociationSetEnd.cs
- ProcessProtocolHandler.cs
- oledbmetadatacollectionnames.cs
- XmlTypeMapping.cs
- FixedPage.cs
- ValidatingCollection.cs
- FileUtil.cs
- SoapReflectionImporter.cs
- ApplicationManager.cs
- RoleService.cs
- TextBoxView.cs
- brushes.cs
- Polyline.cs
- ValidationErrorInfo.cs
- XamlSerializerUtil.cs
- SignedXml.cs
- GroupStyle.cs
- Literal.cs
- FileLogRecordHeader.cs
- ConfigXmlElement.cs
- TextTreeExtractElementUndoUnit.cs
- TypeHelpers.cs
- LocalBuilder.cs
- ResourceDefaultValueAttribute.cs
- WindowsContainer.cs
- Camera.cs
- Journal.cs
- ScriptHandlerFactory.cs
- ErrorStyle.cs
- XmlILStorageConverter.cs
- Panel.cs
- ProfilePropertySettings.cs
- AppSettingsSection.cs
- NullRuntimeConfig.cs
- RecognitionResult.cs
- DataIdProcessor.cs
- ContextDataSource.cs
- RegistryPermission.cs
- SmiRecordBuffer.cs
- PagedDataSource.cs
- TailPinnedEventArgs.cs
- DefaultDiscoveryService.cs
- SByteConverter.cs
- AuthenticationSection.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- UnsafeNativeMethods.cs
- TableLayout.cs
- ErrorFormatter.cs
- ProcessHostFactoryHelper.cs
- MediaContext.cs
- TreeNodeEventArgs.cs
- DesignBindingPicker.cs
- HandleCollector.cs
- MachineKeySection.cs
- Compiler.cs
- WebPartManagerInternals.cs
- ObjectQuery.cs