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
- DbConnectionClosed.cs
- ConstructorExpr.cs
- ExpressionVisitor.cs
- BinaryMethodMessage.cs
- COM2ICategorizePropertiesHandler.cs
- VisualStyleElement.cs
- CqlLexerHelpers.cs
- RuntimeHandles.cs
- DocumentEventArgs.cs
- WpfWebRequestHelper.cs
- InheritanceContextChangedEventManager.cs
- SupportsEventValidationAttribute.cs
- DataGridPageChangedEventArgs.cs
- VarRemapper.cs
- OdbcEnvironment.cs
- XomlCompilerError.cs
- XpsFilter.cs
- WebEncodingValidatorAttribute.cs
- CodeTypeParameterCollection.cs
- CaseCqlBlock.cs
- WmlPhoneCallAdapter.cs
- ApplicationDirectoryMembershipCondition.cs
- BamlBinaryWriter.cs
- RelatedPropertyManager.cs
- TreeNodeEventArgs.cs
- EditorPartChrome.cs
- CompModSwitches.cs
- PreviewControlDesigner.cs
- webproxy.cs
- configsystem.cs
- GlyphingCache.cs
- DBDataPermissionAttribute.cs
- TypeGeneratedEventArgs.cs
- DiagnosticStrings.cs
- DataService.cs
- COSERVERINFO.cs
- PlacementWorkspace.cs
- SettingsPropertyWrongTypeException.cs
- DoubleLinkListEnumerator.cs
- StrongNameUtility.cs
- CssClassPropertyAttribute.cs
- EventDescriptor.cs
- ControlCommandSet.cs
- RegistryKey.cs
- ContentElement.cs
- PriorityBindingExpression.cs
- FontEmbeddingManager.cs
- DefaultParameterValueAttribute.cs
- Visitor.cs
- ViewCellSlot.cs
- ButtonBaseDesigner.cs
- MappingSource.cs
- Margins.cs
- WsatTransactionFormatter.cs
- SurrogateChar.cs
- SendActivity.cs
- MarkupCompilePass2.cs
- StringCollection.cs
- IFormattable.cs
- ValidationRuleCollection.cs
- BaseResourcesBuildProvider.cs
- x509store.cs
- TrackBar.cs
- RotateTransform.cs
- TextTreeNode.cs
- KeyedCollection.cs
- RawStylusInput.cs
- ProxyWebPart.cs
- SymbolEqualComparer.cs
- CodeDomExtensionMethods.cs
- StringStorage.cs
- Assert.cs
- ProfileSettingsCollection.cs
- SharedPerformanceCounter.cs
- SafeNativeMethods.cs
- RequestSecurityTokenResponseCollection.cs
- EmptyStringExpandableObjectConverter.cs
- PersonalizableTypeEntry.cs
- WebPartUtil.cs
- AesCryptoServiceProvider.cs
- SortExpressionBuilder.cs
- SharedStatics.cs
- FormViewPagerRow.cs
- OleServicesContext.cs
- MobileControlPersister.cs
- milrender.cs
- WinEventQueueItem.cs
- ImageInfo.cs
- categoryentry.cs
- StaticResourceExtension.cs
- LeaseManager.cs
- ListViewDeletedEventArgs.cs
- WindowsToolbarAsMenu.cs
- WebBrowser.cs
- DesignerAdapterUtil.cs
- ContentFileHelper.cs
- ListBindableAttribute.cs
- CriticalFinalizerObject.cs
- SpeakCompletedEventArgs.cs
- OrderedHashRepartitionEnumerator.cs