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
- complextypematerializer.cs
- XmlCustomFormatter.cs
- AssemblySettingAttributes.cs
- Exceptions.cs
- WrappedIUnknown.cs
- RelativeSource.cs
- DeviceFiltersSection.cs
- WorkflowTraceTransfer.cs
- VisualStyleInformation.cs
- MouseBinding.cs
- TypeConverterHelper.cs
- ProvidePropertyAttribute.cs
- BitSet.cs
- COMException.cs
- UrlAuthorizationModule.cs
- RowToParametersTransformer.cs
- ReadContentAsBinaryHelper.cs
- ListenerElementsCollection.cs
- TypeUsageBuilder.cs
- counter.cs
- BoundsDrawingContextWalker.cs
- MLangCodePageEncoding.cs
- ConnectionManagementElementCollection.cs
- SiteOfOriginPart.cs
- FreezableCollection.cs
- FontWeightConverter.cs
- LineServices.cs
- AsyncCodeActivity.cs
- FakeModelPropertyImpl.cs
- WorkBatch.cs
- DataListItem.cs
- TableCell.cs
- DecoderReplacementFallback.cs
- XmlSchemaCompilationSettings.cs
- WebPartZone.cs
- QueryIntervalOp.cs
- CaseInsensitiveHashCodeProvider.cs
- ParentControlDesigner.cs
- MethodAccessException.cs
- XmlWriterSettings.cs
- OAVariantLib.cs
- RIPEMD160Managed.cs
- SafeNativeMethods.cs
- AssemblyName.cs
- IntermediatePolicyValidator.cs
- ProfileParameter.cs
- StorageFunctionMapping.cs
- XmlSchemaInferenceException.cs
- SizeFConverter.cs
- TextUtf8RawTextWriter.cs
- XsdCachingReader.cs
- DnsPermission.cs
- CurrencyManager.cs
- DiscoveryUtility.cs
- XD.cs
- SQLConvert.cs
- DriveNotFoundException.cs
- SmtpTransport.cs
- SchemaCompiler.cs
- EntityCollectionChangedParams.cs
- NetworkStream.cs
- QueryResults.cs
- RotationValidation.cs
- regiisutil.cs
- WebServiceHandlerFactory.cs
- ReadWriteSpinLock.cs
- SoapReflectionImporter.cs
- CaseCqlBlock.cs
- NotifyIcon.cs
- AuthenticationException.cs
- Interlocked.cs
- SessionPageStateSection.cs
- PolyQuadraticBezierSegment.cs
- Animatable.cs
- Token.cs
- _emptywebproxy.cs
- Types.cs
- InputProcessorProfilesLoader.cs
- ServicesUtilities.cs
- ContentElement.cs
- VectorCollectionConverter.cs
- PriorityBinding.cs
- CapiSafeHandles.cs
- ListViewItemSelectionChangedEvent.cs
- EmptyImpersonationContext.cs
- MappingModelBuildProvider.cs
- ImageMap.cs
- GeometryConverter.cs
- assemblycache.cs
- PrimitiveDataContract.cs
- DataGridCommandEventArgs.cs
- ToolboxItemImageConverter.cs
- FixedDocument.cs
- CopyNodeSetAction.cs
- ConnectionOrientedTransportBindingElement.cs
- ToolboxDataAttribute.cs
- PerfCounters.cs
- ItemDragEvent.cs
- recordstate.cs
- hwndwrapper.cs