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
- StreamUpdate.cs
- XmlElement.cs
- DeviceContext2.cs
- Partitioner.cs
- SqlAliaser.cs
- DataSourceXmlAttributeAttribute.cs
- ActivityTrace.cs
- CrossContextChannel.cs
- StrongNameIdentityPermission.cs
- ControlIdConverter.cs
- HostProtectionPermission.cs
- IteratorFilter.cs
- ActiveXContainer.cs
- sortedlist.cs
- RoutedEvent.cs
- DigestTraceRecordHelper.cs
- PrintDialog.cs
- PropertyChangedEventArgs.cs
- RangeValidator.cs
- XmlReflectionImporter.cs
- SmiEventSink_Default.cs
- ManipulationDelta.cs
- TaskResultSetter.cs
- ValidationErrorCollection.cs
- Expander.cs
- OutputScopeManager.cs
- XLinq.cs
- InsufficientMemoryException.cs
- CaseDesigner.xaml.cs
- DataView.cs
- BindingsCollection.cs
- OleAutBinder.cs
- DispatcherTimer.cs
- CodeDirectionExpression.cs
- ManagedIStream.cs
- PathFigureCollection.cs
- MimeMapping.cs
- TextElementAutomationPeer.cs
- ItemsPanelTemplate.cs
- TextFindEngine.cs
- ConnectionStringsSection.cs
- XmlLanguage.cs
- InheritablePropertyChangeInfo.cs
- TypeContext.cs
- ConfigurationSectionGroupCollection.cs
- UrlPropertyAttribute.cs
- indexingfiltermarshaler.cs
- DesignerDataParameter.cs
- DataGridViewImageCell.cs
- ExpressionBuilderContext.cs
- MultiView.cs
- ListViewUpdateEventArgs.cs
- MimePart.cs
- validationstate.cs
- ObfuscationAttribute.cs
- DetailsViewDesigner.cs
- SafeViewOfFileHandle.cs
- TypeBuilder.cs
- ControlPropertyNameConverter.cs
- BevelBitmapEffect.cs
- DispatcherTimer.cs
- SiteMapHierarchicalDataSourceView.cs
- ColorConvertedBitmap.cs
- SchemaElementDecl.cs
- ExpressionVisitorHelpers.cs
- ListBoxItemWrapperAutomationPeer.cs
- MonthCalendarDesigner.cs
- WebPartZoneCollection.cs
- PaintValueEventArgs.cs
- CatalogPartCollection.cs
- Camera.cs
- Light.cs
- PropertyChangingEventArgs.cs
- WebPartConnectionsConfigureVerb.cs
- ParentUndoUnit.cs
- SqlParameterCollection.cs
- WebResponse.cs
- FormViewPageEventArgs.cs
- XhtmlBasicControlAdapter.cs
- BufferModeSettings.cs
- Pkcs9Attribute.cs
- Authorization.cs
- ping.cs
- ConnectivityStatus.cs
- UpdateCommand.cs
- OutputCacheSettingsSection.cs
- KnownTypesHelper.cs
- EnumerableValidator.cs
- SplitContainer.cs
- UnsafeNativeMethods.cs
- StrokeNode.cs
- DocumentSignatureManager.cs
- ScriptingRoleServiceSection.cs
- SqlServer2KCompatibilityAnnotation.cs
- CodeAssignStatement.cs
- ControlDesigner.cs
- ApplicationTrust.cs
- Metafile.cs
- QueryComponents.cs
- CatalogPartChrome.cs