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
- IndexedSelectQueryOperator.cs
- ContentDesigner.cs
- UIElementParagraph.cs
- ModuleBuilder.cs
- DataGridViewSelectedCellCollection.cs
- DetailsViewDeleteEventArgs.cs
- WebBrowserSiteBase.cs
- Model3DGroup.cs
- InfoCardArgumentException.cs
- HyperLink.cs
- UIElementParagraph.cs
- ThemeableAttribute.cs
- externdll.cs
- HtmlControl.cs
- Set.cs
- SQLString.cs
- CheckBoxFlatAdapter.cs
- SQLUtility.cs
- SerializationStore.cs
- Parameter.cs
- TripleDESCryptoServiceProvider.cs
- RequiredFieldValidator.cs
- UInt32.cs
- DecimalStorage.cs
- MessageQueuePermissionEntryCollection.cs
- KnownTypeAttribute.cs
- ParentQuery.cs
- FocusManager.cs
- SynchronizationLockException.cs
- ExtensionSimplifierMarkupObject.cs
- WebEvents.cs
- X509WindowsSecurityToken.cs
- ObjectListCommandsPage.cs
- SHA256.cs
- ObjectManager.cs
- StaticSiteMapProvider.cs
- AssemblyCache.cs
- DataViewListener.cs
- OperatingSystem.cs
- TimersDescriptionAttribute.cs
- StateRuntime.cs
- SiteOfOriginPart.cs
- XmlWrappingReader.cs
- SessionStateUtil.cs
- PerspectiveCamera.cs
- bidPrivateBase.cs
- ConfigXmlText.cs
- CloseSequence.cs
- XmlDataCollection.cs
- Axis.cs
- QilReplaceVisitor.cs
- Int32CollectionValueSerializer.cs
- XPathDocumentIterator.cs
- InfiniteIntConverter.cs
- XamlDebuggerXmlReader.cs
- RSAOAEPKeyExchangeDeformatter.cs
- MultipleViewPatternIdentifiers.cs
- DependencyObjectValidator.cs
- StringValueSerializer.cs
- Cast.cs
- CounterSet.cs
- CodeAttributeArgumentCollection.cs
- TiffBitmapDecoder.cs
- SoapSchemaExporter.cs
- MulticastDelegate.cs
- pingexception.cs
- Error.cs
- CacheDependency.cs
- ButtonBaseAdapter.cs
- JsonDeserializer.cs
- XmlSerializer.cs
- ProfileServiceManager.cs
- InvalidOleVariantTypeException.cs
- IntSecurity.cs
- ApplicationContext.cs
- NativeMethods.cs
- TextAction.cs
- CallbackDebugBehavior.cs
- DataGridComponentEditor.cs
- Matrix.cs
- ListViewUpdateEventArgs.cs
- ColumnWidthChangingEvent.cs
- ToolStripProgressBar.cs
- MenuItemBindingCollection.cs
- ZipIOCentralDirectoryBlock.cs
- ExtractorMetadata.cs
- Relationship.cs
- DocumentCollection.cs
- PostBackTrigger.cs
- XmlAttributeAttribute.cs
- MemoryFailPoint.cs
- TypeConvertions.cs
- SinglePhaseEnlistment.cs
- GradientBrush.cs
- VisualTreeUtils.cs
- MetadataUtilsSmi.cs
- Maps.cs
- SafeRegistryKey.cs
- BaseCodeDomTreeGenerator.cs
- DefaultValueAttribute.cs