Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Ink / ClipboardData.cs / 1305600 / 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
- SubstitutionList.cs
- AnnotationMap.cs
- HttpCookiesSection.cs
- MetaType.cs
- RefreshPropertiesAttribute.cs
- SafeCertificateContext.cs
- ProjectionAnalyzer.cs
- PageFunction.cs
- StringPropertyBuilder.cs
- PrinterSettings.cs
- FormParameter.cs
- Bidi.cs
- XmlSchemaDatatype.cs
- SqlConnectionPoolProviderInfo.cs
- COSERVERINFO.cs
- NativeWindow.cs
- InputMethod.cs
- CompilerError.cs
- ListSourceHelper.cs
- ContainerSelectorBehavior.cs
- SingleAnimationUsingKeyFrames.cs
- CodePageEncoding.cs
- ColorDialog.cs
- CompilerHelpers.cs
- WebPartEditVerb.cs
- TimeSpanSecondsConverter.cs
- RelatedPropertyManager.cs
- HitTestFilterBehavior.cs
- BitmapFrame.cs
- ClientCredentialsSecurityTokenManager.cs
- SafeCryptContextHandle.cs
- MouseGesture.cs
- StaticSiteMapProvider.cs
- XamlTypeMapper.cs
- TrackBarRenderer.cs
- CacheMode.cs
- LinqDataSourceDisposeEventArgs.cs
- HostingPreferredMapPath.cs
- HttpWebRequestElement.cs
- WhitespaceReader.cs
- RegexCode.cs
- XpsDocumentEvent.cs
- DisplayNameAttribute.cs
- ProbeMatchesMessageCD1.cs
- TreeNodeCollection.cs
- EntitySqlException.cs
- ClientConfigurationSystem.cs
- TcpChannelHelper.cs
- DataGridRow.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- XD.cs
- externdll.cs
- BaseDataListDesigner.cs
- InvalidCastException.cs
- PageDeviceFont.cs
- XsltCompileContext.cs
- LinearGradientBrush.cs
- MemberCollection.cs
- WindowsGraphicsCacheManager.cs
- Parameter.cs
- SelectorItemAutomationPeer.cs
- XmlSchemaAttribute.cs
- Console.cs
- MonitoringDescriptionAttribute.cs
- MailMessageEventArgs.cs
- WinFormsUtils.cs
- Types.cs
- ToolStripComboBox.cs
- TemplateManager.cs
- cookiecontainer.cs
- TextEffect.cs
- PriorityBinding.cs
- TextParagraphProperties.cs
- IfJoinedCondition.cs
- PageParserFilter.cs
- XmlSchemaSequence.cs
- fixedPageContentExtractor.cs
- LeftCellWrapper.cs
- PartialCachingAttribute.cs
- PagedDataSource.cs
- MiniAssembly.cs
- TargetFrameworkAttribute.cs
- remotingproxy.cs
- ChameleonKey.cs
- BrowserCapabilitiesFactory.cs
- ClientSponsor.cs
- HebrewNumber.cs
- XmlSchemaSubstitutionGroup.cs
- TypeSemantics.cs
- AmbiguousMatchException.cs
- SqlErrorCollection.cs
- RuleAttributes.cs
- serverconfig.cs
- x509store.cs
- TextElementEnumerator.cs
- RegexWorker.cs
- PenThreadPool.cs
- TextEvent.cs
- PerformanceCounterLib.cs
- SettingsProviderCollection.cs