Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- TraceSection.cs
- WindowsFormsLinkLabel.cs
- SoapCommonClasses.cs
- BamlLocalizer.cs
- ListParagraph.cs
- ScrollBarRenderer.cs
- HebrewNumber.cs
- OleAutBinder.cs
- InputScopeConverter.cs
- SqlTypeConverter.cs
- SplitterEvent.cs
- ResourceDisplayNameAttribute.cs
- RoleService.cs
- BoolExpr.cs
- PersonalizationProviderHelper.cs
- CodeTypeDeclarationCollection.cs
- ParameterToken.cs
- DataBoundControlAdapter.cs
- TextDpi.cs
- VariableReference.cs
- GlobalizationAssembly.cs
- ResourceDefaultValueAttribute.cs
- CompareValidator.cs
- ComboBoxAutomationPeer.cs
- WindowsListViewSubItem.cs
- QuaternionConverter.cs
- AttachedAnnotation.cs
- ButtonBaseAutomationPeer.cs
- WebRequest.cs
- SystemException.cs
- DynamicDiscoSearcher.cs
- ExclusiveCanonicalizationTransform.cs
- PrimitiveCodeDomSerializer.cs
- EntityContainerEntitySet.cs
- MouseWheelEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Utils.cs
- HttpApplicationFactory.cs
- RegistrySecurity.cs
- ToolboxComponentsCreatingEventArgs.cs
- DataError.cs
- Transactions.cs
- LineBreakRecord.cs
- RootBrowserWindowAutomationPeer.cs
- InvokeGenerator.cs
- GridViewSelectEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- HttpModuleAction.cs
- CodeDelegateInvokeExpression.cs
- HwndAppCommandInputProvider.cs
- TypedServiceOperationListItem.cs
- BufferBuilder.cs
- HttpCapabilitiesEvaluator.cs
- XmlBinaryWriterSession.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Hyperlink.cs
- RequestCache.cs
- EncryptedType.cs
- FastEncoderStatics.cs
- ObjectPropertyMapping.cs
- MultiView.cs
- ScriptComponentDescriptor.cs
- RichTextBoxContextMenu.cs
- SeverityFilter.cs
- CultureInfoConverter.cs
- StateChangeEvent.cs
- ServicesExceptionNotHandledEventArgs.cs
- SrgsSubset.cs
- WebControlAdapter.cs
- SyndicationSerializer.cs
- SubMenuStyle.cs
- Pens.cs
- ActivityBindForm.cs
- SslStream.cs
- COM2PropertyDescriptor.cs
- AnnotationObservableCollection.cs
- OutputScope.cs
- COAUTHIDENTITY.cs
- DescendantBaseQuery.cs
- CurrencyWrapper.cs
- DbParameterHelper.cs
- CacheEntry.cs
- IssuanceLicense.cs
- Point.cs
- CannotUnloadAppDomainException.cs
- sqlpipe.cs
- CorrelationInitializer.cs
- RpcCryptoRequest.cs
- QilExpression.cs
- BuildProvider.cs
- ValidationEventArgs.cs
- SamlSerializer.cs
- EmbeddedMailObject.cs
- BitVec.cs
- DataRecord.cs
- XmlMemberMapping.cs
- PagerSettings.cs
- DesignSurfaceManager.cs
- VirtualDirectoryMapping.cs
- AttachmentService.cs