Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- HwndSource.cs
- HtmlFormWrapper.cs
- AuthenticateEventArgs.cs
- PageContentCollection.cs
- HtmlWindow.cs
- WebEvents.cs
- PersistenceContextEnlistment.cs
- ContextMarshalException.cs
- SqlClientMetaDataCollectionNames.cs
- ProxyHelper.cs
- UInt64Converter.cs
- SystemUnicastIPAddressInformation.cs
- EntityContainerRelationshipSet.cs
- EmbeddedMailObject.cs
- ThicknessAnimation.cs
- Int32CollectionConverter.cs
- FilterException.cs
- MimeObjectFactory.cs
- RuleSetDialog.cs
- DelayedRegex.cs
- GlyphRunDrawing.cs
- HtmlTableRow.cs
- HierarchicalDataSourceControl.cs
- BrushConverter.cs
- RichTextBoxContextMenu.cs
- CrossSiteScriptingValidation.cs
- StyleXamlParser.cs
- ProcessModuleCollection.cs
- EnumValAlphaComparer.cs
- CodeGenerator.cs
- XsltContext.cs
- SchemaElementDecl.cs
- Error.cs
- ResourceExpressionEditor.cs
- GridErrorDlg.cs
- Model3DGroup.cs
- SqlWorkflowPersistenceService.cs
- SHA256Managed.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ResourcesBuildProvider.cs
- XmlSignatureProperties.cs
- VersionedStream.cs
- TextServicesCompartmentContext.cs
- CodeRegionDirective.cs
- HostSecurityManager.cs
- AttributeAction.cs
- TypeSemantics.cs
- ErrorWrapper.cs
- SecuritySessionClientSettings.cs
- Blend.cs
- METAHEADER.cs
- RequestCache.cs
- NativeMethods.cs
- mediaeventshelper.cs
- TypeConverter.cs
- ProxyWebPart.cs
- RuntimeHandles.cs
- FaultCallbackWrapper.cs
- RMEnrollmentPage1.cs
- Soap.cs
- ExternalException.cs
- RootBrowserWindow.cs
- HttpWebRequestElement.cs
- XmlStreamNodeWriter.cs
- SwitchLevelAttribute.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CloseSequenceResponse.cs
- ObjectComplexPropertyMapping.cs
- MessagePropertyDescriptionCollection.cs
- IdentityHolder.cs
- BindingWorker.cs
- dataSvcMapFileLoader.cs
- ToolStripGrip.cs
- Utils.cs
- MouseButtonEventArgs.cs
- SafeThreadHandle.cs
- FunctionUpdateCommand.cs
- ResourceReferenceExpression.cs
- ErrorProvider.cs
- BatchServiceHost.cs
- UpdatePanelControlTrigger.cs
- Buffer.cs
- BidPrivateBase.cs
- SequentialUshortCollection.cs
- BitmapInitialize.cs
- ControlIdConverter.cs
- SqlParameter.cs
- EditorPartCollection.cs
- DuplicateContext.cs
- MD5CryptoServiceProvider.cs
- LassoSelectionBehavior.cs
- GregorianCalendarHelper.cs
- CollectionView.cs
- DetailsViewUpdatedEventArgs.cs
- RoleExceptions.cs
- tooltip.cs
- OpenTypeMethods.cs
- NativeMethods.cs
- PermissionToken.cs
- AnonymousIdentificationSection.cs