Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- SymmetricAlgorithm.cs
- XPathItem.cs
- DES.cs
- WebSysDisplayNameAttribute.cs
- GeometryDrawing.cs
- ResourcesBuildProvider.cs
- PrintPreviewControl.cs
- CodeDirectiveCollection.cs
- EntitySetBase.cs
- UnionCodeGroup.cs
- Atom10FeedFormatter.cs
- DbProviderFactory.cs
- UiaCoreTypesApi.cs
- OleDbWrapper.cs
- HostingEnvironmentSection.cs
- FilterQueryOptionExpression.cs
- RetriableClipboard.cs
- ColumnCollection.cs
- UIElementHelper.cs
- Baml2006ReaderFrame.cs
- NavigationProgressEventArgs.cs
- RadialGradientBrush.cs
- BasePattern.cs
- ViewEvent.cs
- SecurityCriticalDataForSet.cs
- ServerValidateEventArgs.cs
- PrtCap_Base.cs
- TransformGroup.cs
- ViewStateException.cs
- NullRuntimeConfig.cs
- XPathAncestorQuery.cs
- ScriptMethodAttribute.cs
- DesignTableCollection.cs
- CommonProperties.cs
- TemplateComponentConnector.cs
- DictionaryBase.cs
- XmlAnyElementAttributes.cs
- InstalledFontCollection.cs
- DesignTimeVisibleAttribute.cs
- FieldBuilder.cs
- RootBrowserWindow.cs
- ListViewAutomationPeer.cs
- SqlCacheDependencyDatabaseCollection.cs
- CheckBox.cs
- EnumMember.cs
- SpeechSeg.cs
- XmlAggregates.cs
- KeyConstraint.cs
- SecurityState.cs
- LZCodec.cs
- SetStoryboardSpeedRatio.cs
- LoginName.cs
- ADMembershipProvider.cs
- EdmFunction.cs
- SchemaNamespaceManager.cs
- ScrollEventArgs.cs
- ToolStripButton.cs
- XmlSerializerSection.cs
- ProgressBarRenderer.cs
- DataGridViewButtonCell.cs
- _Win32.cs
- SizeValueSerializer.cs
- ProfileEventArgs.cs
- CodeDomConfigurationHandler.cs
- ExpressionLink.cs
- InheritedPropertyChangedEventArgs.cs
- MouseBinding.cs
- OdbcConnectionStringbuilder.cs
- JsonSerializer.cs
- HMACSHA256.cs
- RequestNavigateEventArgs.cs
- XmlDocumentViewSchema.cs
- InvalidComObjectException.cs
- NetworkCredential.cs
- Roles.cs
- WindowsToolbarItemAsMenuItem.cs
- InvokeWebService.cs
- WorkflowTerminatedException.cs
- FieldTemplateUserControl.cs
- CatalogPartCollection.cs
- NullableLongMinMaxAggregationOperator.cs
- LicenseContext.cs
- RegexInterpreter.cs
- XmlDocument.cs
- PartialTrustHelpers.cs
- JsonServiceDocumentSerializer.cs
- D3DImage.cs
- DesignerActionPropertyItem.cs
- ChangePassword.cs
- InfoCardSchemas.cs
- WindowsFormsSynchronizationContext.cs
- FontUnit.cs
- DataGridColumnCollection.cs
- LicenseManager.cs
- UpdateProgress.cs
- GiveFeedbackEventArgs.cs
- ResXFileRef.cs
- QueryContinueDragEventArgs.cs
- UndirectedGraph.cs
- AuthenticationConfig.cs