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
- ProviderMetadataCachedInformation.cs
- Quad.cs
- XmlLanguageConverter.cs
- OpenFileDialog.cs
- ResourceDescriptionAttribute.cs
- CodeExpressionRuleDeclaration.cs
- EventSchemaTraceListener.cs
- WeakEventManager.cs
- FormViewCommandEventArgs.cs
- ReferenceSchema.cs
- DataGridPageChangedEventArgs.cs
- ConnectionPoolManager.cs
- ObjectDisposedException.cs
- ToolStripHighContrastRenderer.cs
- DataGridViewLinkCell.cs
- HitTestFilterBehavior.cs
- LogEntrySerializer.cs
- XmlSchemaComplexType.cs
- HashCodeCombiner.cs
- FontDriver.cs
- NumericPagerField.cs
- SqlClientWrapperSmiStreamChars.cs
- OperatingSystemVersionCheck.cs
- SymbolType.cs
- XPathAncestorQuery.cs
- SqlDataAdapter.cs
- TextParaClient.cs
- VirtualPath.cs
- ClientEndpointLoader.cs
- MembershipValidatePasswordEventArgs.cs
- ClientOptions.cs
- WorkflowServiceBehavior.cs
- DefaultValueTypeConverter.cs
- ReferenceService.cs
- RepeaterItem.cs
- SafeNativeMethods.cs
- FunctionImportMapping.cs
- FlowPosition.cs
- SystemIPInterfaceProperties.cs
- HebrewNumber.cs
- ClientApiGenerator.cs
- ParenthesizePropertyNameAttribute.cs
- DbgUtil.cs
- Scene3D.cs
- DesignerAttribute.cs
- HostedHttpContext.cs
- ToolTipService.cs
- ContainerActivationHelper.cs
- SerializationFieldInfo.cs
- ProcessHostFactoryHelper.cs
- PersonalizationProviderHelper.cs
- ConfigurationSection.cs
- PerfProviderCollection.cs
- ColorAnimationBase.cs
- ParallelTimeline.cs
- LocatorPart.cs
- BitmapFrameDecode.cs
- BooleanProjectedSlot.cs
- RuntimeCompatibilityAttribute.cs
- SelectionProcessor.cs
- LogWriteRestartAreaState.cs
- Util.cs
- TableLayoutStyle.cs
- SqlProvider.cs
- HttpWriter.cs
- RecipientInfo.cs
- AsmxEndpointPickerExtension.cs
- MetadataArtifactLoaderFile.cs
- SymLanguageVendor.cs
- EncoderParameters.cs
- UrlMappingsSection.cs
- PolyLineSegment.cs
- DataObject.cs
- XmlILModule.cs
- SqlUDTStorage.cs
- MenuItemStyleCollection.cs
- DataGridColumnCollection.cs
- UndirectedGraph.cs
- _TimerThread.cs
- BulletChrome.cs
- XmlKeywords.cs
- ByteConverter.cs
- RootBrowserWindowAutomationPeer.cs
- SafeProcessHandle.cs
- BindingList.cs
- __FastResourceComparer.cs
- DecoderExceptionFallback.cs
- WebPartDescription.cs
- XmlILStorageConverter.cs
- MemberAssignment.cs
- SoapAttributeAttribute.cs
- WeakHashtable.cs
- SoapCodeExporter.cs
- CryptoConfig.cs
- PictureBox.cs
- Camera.cs
- OdbcPermission.cs
- MiniMapControl.xaml.cs
- CurrencyManager.cs
- OptionalRstParameters.cs