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
- OlePropertyStructs.cs
- BidirectionalDictionary.cs
- Keyboard.cs
- GraphicsState.cs
- XmlNode.cs
- SizeFConverter.cs
- Span.cs
- BuildProviderAppliesToAttribute.cs
- HwndMouseInputProvider.cs
- hebrewshape.cs
- SafeNativeMethods.cs
- ModifierKeysConverter.cs
- GridViewRow.cs
- XmlEncoding.cs
- AxisAngleRotation3D.cs
- COM2FontConverter.cs
- CheckBoxField.cs
- OracleBinary.cs
- ExpressionEditorSheet.cs
- XmlSchemaSimpleContentExtension.cs
- DesignerDataConnection.cs
- FixedTextView.cs
- ScrollableControl.cs
- BitSet.cs
- UserNameSecurityToken.cs
- Material.cs
- QueryRewriter.cs
- HttpCookiesSection.cs
- ReadOnlyMetadataCollection.cs
- EntityParameter.cs
- SQLInt32Storage.cs
- TogglePattern.cs
- ECDiffieHellman.cs
- x509utils.cs
- TextRange.cs
- TypeViewSchema.cs
- WmlObjectListAdapter.cs
- Monitor.cs
- StorageTypeMapping.cs
- AppLevelCompilationSectionCache.cs
- SessionIDManager.cs
- ActivityBuilderHelper.cs
- AjaxFrameworkAssemblyAttribute.cs
- EditorZone.cs
- followingsibling.cs
- ProcessModelInfo.cs
- Executor.cs
- __ComObject.cs
- SSmlParser.cs
- FixedSOMLineRanges.cs
- BitmapInitialize.cs
- DoneReceivingAsyncResult.cs
- CodeTypeConstructor.cs
- ContentDisposition.cs
- IsolatedStorageSecurityState.cs
- LabelDesigner.cs
- GroupBoxRenderer.cs
- PropertySegmentSerializer.cs
- SecuritySessionFilter.cs
- TimeoutException.cs
- PathTooLongException.cs
- PropertyGroupDescription.cs
- ValidationManager.cs
- WindowsUpDown.cs
- UnSafeCharBuffer.cs
- ByteArrayHelperWithString.cs
- XmlIgnoreAttribute.cs
- AssociationTypeEmitter.cs
- Floater.cs
- DecoderBestFitFallback.cs
- SinglePageViewer.cs
- WebServiceReceiveDesigner.cs
- XmlReaderSettings.cs
- UpdateManifestForBrowserApplication.cs
- EventEntry.cs
- ConsoleCancelEventArgs.cs
- TableAdapterManagerNameHandler.cs
- DataGridViewCellStyleConverter.cs
- _SafeNetHandles.cs
- ConfigXmlText.cs
- WebPartCatalogCloseVerb.cs
- IsolatedStorageFileStream.cs
- DesignTimeParseData.cs
- XmlSchemaSimpleTypeUnion.cs
- Perspective.cs
- EncoderNLS.cs
- XslException.cs
- BamlRecords.cs
- MetadataItemCollectionFactory.cs
- RelOps.cs
- BrowserDefinitionCollection.cs
- CultureInfo.cs
- AnonymousIdentificationSection.cs
- ArgumentValueSerializer.cs
- NamespaceInfo.cs
- DataGridViewDataConnection.cs
- ManipulationDelta.cs
- FileInfo.cs
- FileCodeGroup.cs
- SqlConnectionStringBuilder.cs