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
- Path.cs
- IdleTimeoutMonitor.cs
- BookmarkCallbackWrapper.cs
- RequiredFieldValidator.cs
- ItemChangedEventArgs.cs
- DirectoryObjectSecurity.cs
- TraceHwndHost.cs
- GCHandleCookieTable.cs
- oledbmetadatacollectionnames.cs
- HandledMouseEvent.cs
- AutoResetEvent.cs
- handlecollector.cs
- DbProviderFactoriesConfigurationHandler.cs
- QilPatternFactory.cs
- GeneralTransform3DTo2DTo3D.cs
- OpenTypeLayoutCache.cs
- BitmapFrame.cs
- JpegBitmapDecoder.cs
- Number.cs
- ThousandthOfEmRealPoints.cs
- ZoneButton.cs
- OleDbDataReader.cs
- SamlAuthenticationClaimResource.cs
- PhoneCall.cs
- WebPartCloseVerb.cs
- TypeElement.cs
- NativeCompoundFileAPIs.cs
- StringSorter.cs
- CommonServiceBehaviorElement.cs
- CheckBoxBaseAdapter.cs
- RouteParametersHelper.cs
- DuplicateWaitObjectException.cs
- ObjectDataSourceView.cs
- XmlSchemaGroup.cs
- CodeMethodReturnStatement.cs
- ClassValidator.cs
- ProfileService.cs
- ToolStripLabel.cs
- MetadataException.cs
- SoapServerProtocol.cs
- GrammarBuilderRuleRef.cs
- DESCryptoServiceProvider.cs
- SettingsAttributes.cs
- Permission.cs
- coordinator.cs
- FormsAuthenticationConfiguration.cs
- NameSpaceEvent.cs
- LinqDataView.cs
- QueuePropertyVariants.cs
- ComponentFactoryHelpers.cs
- MetadataItemEmitter.cs
- WebPartMovingEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- UTF7Encoding.cs
- ImpersonateTokenRef.cs
- StrokeCollection2.cs
- ClientTarget.cs
- MonitorWrapper.cs
- ProxyWebPartConnectionCollection.cs
- EdmMember.cs
- FreezableCollection.cs
- UnitySerializationHolder.cs
- ResizeGrip.cs
- XmlCountingReader.cs
- MenuCommand.cs
- WindowsStatic.cs
- QuadraticBezierSegment.cs
- CheckBoxList.cs
- InitializingNewItemEventArgs.cs
- CodeSnippetStatement.cs
- LinqDataSourceStatusEventArgs.cs
- XmlDictionary.cs
- NullableIntMinMaxAggregationOperator.cs
- Ops.cs
- SecureConversationVersion.cs
- CodeMethodInvokeExpression.cs
- assemblycache.cs
- CodeAttributeDeclaration.cs
- ClientSideProviderDescription.cs
- UTF7Encoding.cs
- PageClientProxyGenerator.cs
- ProcessHost.cs
- ControlEvent.cs
- CollectionEditVerbManager.cs
- SQLInt32Storage.cs
- JavaScriptSerializer.cs
- DetailsViewInsertedEventArgs.cs
- Stream.cs
- ObjectTokenCategory.cs
- DesignBindingEditor.cs
- Tuple.cs
- ParserStreamGeometryContext.cs
- RawStylusSystemGestureInputReport.cs
- ResourceCollectionInfo.cs
- SafeUserTokenHandle.cs
- securitycriticaldata.cs
- ProxyAttribute.cs
- CompilationSection.cs
- FontStretch.cs
- StrongTypingException.cs