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
- MenuItemStyleCollection.cs
- EnumCodeDomSerializer.cs
- ByteStorage.cs
- BindingFormattingDialog.cs
- MetadataArtifactLoaderFile.cs
- DesignerAdapterAttribute.cs
- TailCallAnalyzer.cs
- PropertyGroupDescription.cs
- ColumnReorderedEventArgs.cs
- MatchingStyle.cs
- ConfigXmlAttribute.cs
- LocalIdCollection.cs
- CompletionBookmark.cs
- ResXResourceReader.cs
- CustomPopupPlacement.cs
- RuleSetCollection.cs
- WebPartEditorCancelVerb.cs
- Figure.cs
- URLBuilder.cs
- DBConnection.cs
- MediaTimeline.cs
- FormsAuthenticationTicket.cs
- TextTreeFixupNode.cs
- safelink.cs
- ListViewEditEventArgs.cs
- SqlVersion.cs
- SourceSwitch.cs
- FlowSwitchLink.cs
- RightsManagementEncryptedStream.cs
- XmlSchemaAny.cs
- ManipulationDeltaEventArgs.cs
- ConstructorNeedsTagAttribute.cs
- CurrentChangingEventArgs.cs
- TdsParserStaticMethods.cs
- ProfessionalColors.cs
- TableSectionStyle.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DataGridViewCellMouseEventArgs.cs
- InvalidWMPVersionException.cs
- DefaultMemberAttribute.cs
- PageCatalogPart.cs
- FontUnitConverter.cs
- ElapsedEventArgs.cs
- FixedDocumentPaginator.cs
- DrawingAttributesDefaultValueFactory.cs
- FillErrorEventArgs.cs
- CngKey.cs
- WorkflowStateRollbackService.cs
- ControlEvent.cs
- ElementHost.cs
- SqlRowUpdatedEvent.cs
- GeometryGroup.cs
- MILUtilities.cs
- ExpanderAutomationPeer.cs
- DataServiceClientException.cs
- ListViewInsertEventArgs.cs
- ReadOnlyState.cs
- DbProviderFactories.cs
- ServiceHandle.cs
- NonParentingControl.cs
- WizardSideBarListControlItem.cs
- SafePointer.cs
- StoragePropertyMapping.cs
- Stylus.cs
- BlurEffect.cs
- PipelineModuleStepContainer.cs
- SystemTcpConnection.cs
- Repeater.cs
- LicenseManager.cs
- ContextMenuStrip.cs
- ListViewGroupItemCollection.cs
- IncrementalReadDecoders.cs
- XmlNode.cs
- CompilerGeneratedAttribute.cs
- DbReferenceCollection.cs
- GeneralEndpointIdentity.cs
- AppSettingsReader.cs
- WebConfigurationHostFileChange.cs
- MonitoringDescriptionAttribute.cs
- FastEncoderWindow.cs
- NamedElement.cs
- ContentFileHelper.cs
- TreeViewDesigner.cs
- VirtualPathData.cs
- TransportSecurityProtocolFactory.cs
- shaperfactoryquerycacheentry.cs
- ToolBar.cs
- XmlAutoDetectWriter.cs
- AttributeProviderAttribute.cs
- CodeDomConfigurationHandler.cs
- TimelineGroup.cs
- RepeaterItemCollection.cs
- AdjustableArrowCap.cs
- StatusBarItemAutomationPeer.cs
- TypeConstant.cs
- GlyphManager.cs
- JpegBitmapEncoder.cs
- PreloadedPackages.cs
- ToolBarOverflowPanel.cs
- TrackingServices.cs