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
- XmlArrayItemAttributes.cs
- ElementsClipboardData.cs
- HandlerFactoryWrapper.cs
- AssociationSet.cs
- TableRow.cs
- Token.cs
- CodeCommentStatementCollection.cs
- _UncName.cs
- NamedElement.cs
- Point3DKeyFrameCollection.cs
- TemplateControl.cs
- CacheSection.cs
- HtmlInputImage.cs
- DocumentXmlWriter.cs
- StylusPointProperty.cs
- TableRowCollection.cs
- AssemblyCollection.cs
- WorkerRequest.cs
- FrameworkElementFactory.cs
- TextTreeUndo.cs
- ProviderConnectionPointCollection.cs
- ConfigurationPermission.cs
- RuntimeUtils.cs
- DataSourceCache.cs
- SourceInterpreter.cs
- WorkflowTransactionOptions.cs
- GridViewPageEventArgs.cs
- XhtmlCssHandler.cs
- GZipUtils.cs
- GridViewUpdateEventArgs.cs
- SqlClientWrapperSmiStream.cs
- OledbConnectionStringbuilder.cs
- _TransmitFileOverlappedAsyncResult.cs
- TagNameToTypeMapper.cs
- FloatUtil.cs
- PassportAuthenticationModule.cs
- FloatUtil.cs
- InvalidAsynchronousStateException.cs
- TemplateKey.cs
- mansign.cs
- ParallelForEach.cs
- CodeCommentStatementCollection.cs
- Rect3D.cs
- EndpointNameMessageFilter.cs
- DependencyPropertyKind.cs
- PersianCalendar.cs
- TextLine.cs
- AuthenticationServiceManager.cs
- CallContext.cs
- SearchExpression.cs
- FileSystemWatcher.cs
- SqlParameterCollection.cs
- WebPartCancelEventArgs.cs
- AuthenticationModuleElement.cs
- TypeDependencyAttribute.cs
- EntityProxyTypeInfo.cs
- dsa.cs
- ExecutedRoutedEventArgs.cs
- DataGridDesigner.cs
- ResourceReferenceExpression.cs
- ColorTransformHelper.cs
- Process.cs
- BamlBinaryWriter.cs
- HuffmanTree.cs
- AllMembershipCondition.cs
- Propagator.ExtentPlaceholderCreator.cs
- IChannel.cs
- NavigationProperty.cs
- Exception.cs
- AnnotationMap.cs
- EntityCommandExecutionException.cs
- DataGridViewTextBoxEditingControl.cs
- FieldMetadata.cs
- PersonalizationDictionary.cs
- UIElement3D.cs
- NetworkInformationException.cs
- Matrix.cs
- ExpressionParser.cs
- SymLanguageType.cs
- HandleValueEditor.cs
- ProviderUtil.cs
- CommonDialog.cs
- DataFieldEditor.cs
- ToolZone.cs
- TextTreeUndoUnit.cs
- SocketStream.cs
- DataGridToolTip.cs
- XmlValidatingReaderImpl.cs
- IDispatchConstantAttribute.cs
- EventDescriptorCollection.cs
- AsyncSerializedWorker.cs
- Guid.cs
- xmlfixedPageInfo.cs
- SrgsRule.cs
- TimeZone.cs
- MembershipValidatePasswordEventArgs.cs
- IntAverageAggregationOperator.cs
- storagemappingitemcollection.viewdictionary.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SafeLocalMemHandle.cs