Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- MultiBinding.cs
- CodeTypeDeclarationCollection.cs
- TableStyle.cs
- WmlCalendarAdapter.cs
- LocalizationComments.cs
- NativeCppClassAttribute.cs
- FilteredAttributeCollection.cs
- SapiRecognizer.cs
- ColumnClickEvent.cs
- GridViewCancelEditEventArgs.cs
- ComMethodElement.cs
- EntityDataSourceContextCreatingEventArgs.cs
- DataControlFieldCollection.cs
- Constant.cs
- TraceUtils.cs
- BindUriHelper.cs
- WindowsSysHeader.cs
- Evidence.cs
- TextBox.cs
- SelectorAutomationPeer.cs
- EmptyArray.cs
- StylusTip.cs
- Funcletizer.cs
- AlignmentYValidation.cs
- ControlParameter.cs
- ThicknessAnimation.cs
- FullTextBreakpoint.cs
- ILGenerator.cs
- StringArrayConverter.cs
- BrowserCapabilitiesCodeGenerator.cs
- SignedInfo.cs
- PositiveTimeSpanValidator.cs
- AppLevelCompilationSectionCache.cs
- ItemCollection.cs
- ActivationServices.cs
- TileModeValidation.cs
- WorkflowInstanceRecord.cs
- WebScriptEndpointElement.cs
- Object.cs
- SiteMapHierarchicalDataSourceView.cs
- ReaderOutput.cs
- MatrixCamera.cs
- ListControl.cs
- ButtonField.cs
- XmlSerializer.cs
- BookmarkScope.cs
- GradientBrush.cs
- SpoolingTask.cs
- XPathException.cs
- ElementAction.cs
- HttpListenerPrefixCollection.cs
- ServiceModelConfiguration.cs
- DataGridViewHitTestInfo.cs
- Semaphore.cs
- Storyboard.cs
- DbDataSourceEnumerator.cs
- BrowserCapabilitiesFactory.cs
- GridViewDeleteEventArgs.cs
- BamlResourceSerializer.cs
- ClickablePoint.cs
- TextDecoration.cs
- DesignOnlyAttribute.cs
- DataGridViewCellValueEventArgs.cs
- QilScopedVisitor.cs
- FunctionCommandText.cs
- XmlDocumentType.cs
- ConnectionPoolManager.cs
- SafeWaitHandle.cs
- ProviderIncompatibleException.cs
- BookmarkScope.cs
- AttachedPropertyMethodSelector.cs
- EllipseGeometry.cs
- ValidationService.cs
- BitmapEffectInput.cs
- CompensationDesigner.cs
- DiffuseMaterial.cs
- DoubleCollectionValueSerializer.cs
- DateTimeValueSerializer.cs
- HttpHandlerAction.cs
- ControlDesignerState.cs
- IssuanceLicense.cs
- Dump.cs
- KeyboardDevice.cs
- MenuItemStyleCollection.cs
- EncoderFallback.cs
- EnumUnknown.cs
- AppDomainResourcePerfCounters.cs
- DrawingDrawingContext.cs
- Events.cs
- SimpleWebHandlerParser.cs
- WizardPanel.cs
- ChineseLunisolarCalendar.cs
- RenderDataDrawingContext.cs
- JournalEntryStack.cs
- GridViewColumnCollectionChangedEventArgs.cs
- LocatorPart.cs
- ColorPalette.cs
- AssemblyBuilder.cs
- FontInfo.cs
- ConfigViewGenerator.cs