Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- FontSourceCollection.cs
- COM2EnumConverter.cs
- WebPartUserCapability.cs
- DataSvcMapFileSerializer.cs
- XslException.cs
- Variant.cs
- sqlnorm.cs
- SerializationEventsCache.cs
- PageHandlerFactory.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ScrollBarRenderer.cs
- COM2AboutBoxPropertyDescriptor.cs
- ControlCodeDomSerializer.cs
- OleDbSchemaGuid.cs
- DBCommand.cs
- ScriptingSectionGroup.cs
- PriorityBindingExpression.cs
- CFStream.cs
- ConstraintStruct.cs
- PolicyDesigner.cs
- TaskExtensions.cs
- TypographyProperties.cs
- WebDescriptionAttribute.cs
- CurrentChangingEventArgs.cs
- XamlTypeMapper.cs
- NotSupportedException.cs
- ListenerHandler.cs
- SuspendDesigner.cs
- AssemblyResourceLoader.cs
- FormViewModeEventArgs.cs
- BamlLocalizabilityResolver.cs
- SslStream.cs
- AlgoModule.cs
- CultureMapper.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DataGridRow.cs
- FontInfo.cs
- Formatter.cs
- HttpRequest.cs
- WebProxyScriptElement.cs
- GetPageNumberCompletedEventArgs.cs
- Soap.cs
- WithStatement.cs
- ActivityDesignerHighlighter.cs
- XmlAttributeProperties.cs
- VectorCollection.cs
- PeerEndPoint.cs
- cookiecollection.cs
- CuspData.cs
- TextPattern.cs
- ASCIIEncoding.cs
- KnownIds.cs
- ExpressionBinding.cs
- EdmToObjectNamespaceMap.cs
- StyleSelector.cs
- EntityStoreSchemaGenerator.cs
- NestedContainer.cs
- AnnotationObservableCollection.cs
- TrackingMemoryStream.cs
- figurelength.cs
- ScrollViewer.cs
- ModelPropertyCollectionImpl.cs
- DataFormats.cs
- ClickablePoint.cs
- RuntimeWrappedException.cs
- XamlGridLengthSerializer.cs
- TemplateControlCodeDomTreeGenerator.cs
- FreezableDefaultValueFactory.cs
- ToolStripArrowRenderEventArgs.cs
- AuthenticationConfig.cs
- TabPanel.cs
- MenuCommand.cs
- HttpResponseHeader.cs
- StorageInfo.cs
- ExternalCalls.cs
- MethodBody.cs
- DynamicUpdateCommand.cs
- Axis.cs
- ConstraintConverter.cs
- XMLSchema.cs
- BitArray.cs
- CompositeActivityMarkupSerializer.cs
- SqlInternalConnectionTds.cs
- XPathArrayIterator.cs
- SqlVersion.cs
- ObfuscationAttribute.cs
- AuthenticationModuleElement.cs
- SqlMethodTransformer.cs
- DataException.cs
- Bookmark.cs
- ParserStreamGeometryContext.cs
- NetworkCredential.cs
- UnsafeNativeMethods.cs
- Rule.cs
- SoapProtocolReflector.cs
- BitSet.cs
- TrustLevel.cs
- SQLDateTime.cs
- OleDbInfoMessageEvent.cs
- JsonStringDataContract.cs