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
- XPathScanner.cs
- ReverseInheritProperty.cs
- HtmlTableCell.cs
- BlurBitmapEffect.cs
- XmlSchemaObjectTable.cs
- PenContexts.cs
- PartitionedStream.cs
- GridProviderWrapper.cs
- InputScopeConverter.cs
- WorkflowMessageEventHandler.cs
- UserNameSecurityToken.cs
- Expressions.cs
- DataBinder.cs
- Registry.cs
- NestedContainer.cs
- BaseParaClient.cs
- CopyAction.cs
- WmpBitmapEncoder.cs
- WorkflowStateRollbackService.cs
- _SslStream.cs
- ServiceDescription.cs
- UIElementPropertyUndoUnit.cs
- DataColumn.cs
- PrivateFontCollection.cs
- WCFBuildProvider.cs
- sqlinternaltransaction.cs
- RelationshipConverter.cs
- ObjectDataSourceMethodEventArgs.cs
- UTF32Encoding.cs
- SafeFileMappingHandle.cs
- MonikerProxyAttribute.cs
- SplitContainer.cs
- EntityDataSourceMemberPath.cs
- GridViewColumn.cs
- OdbcConnectionFactory.cs
- Helpers.cs
- NetStream.cs
- WindowsTreeView.cs
- LinkLabelLinkClickedEvent.cs
- FunctionCommandText.cs
- Msec.cs
- IndividualDeviceConfig.cs
- UInt32.cs
- CodeAccessPermission.cs
- TemplateParser.cs
- DeviceContexts.cs
- IISUnsafeMethods.cs
- ButtonChrome.cs
- SequentialOutput.cs
- bindurihelper.cs
- TimestampInformation.cs
- UnsupportedPolicyOptionsException.cs
- RelativeSource.cs
- HostedHttpContext.cs
- JsonReaderDelegator.cs
- Int64.cs
- CanExecuteRoutedEventArgs.cs
- Clipboard.cs
- TrackingServices.cs
- Schema.cs
- WrapPanel.cs
- SystemIPInterfaceProperties.cs
- ItemContainerPattern.cs
- EventLogPermissionEntryCollection.cs
- WSDualHttpSecurityMode.cs
- X509UI.cs
- WebMessageEncodingElement.cs
- XsdDateTime.cs
- BamlTreeUpdater.cs
- FontStyle.cs
- ThousandthOfEmRealDoubles.cs
- CroppedBitmap.cs
- OneOfScalarConst.cs
- DesignSurface.cs
- _IPv4Address.cs
- LogReservationCollection.cs
- DataGridViewCellParsingEventArgs.cs
- CodeCompileUnit.cs
- PageParser.cs
- EqualityArray.cs
- DateTimeValueSerializerContext.cs
- ISAPIWorkerRequest.cs
- SolidBrush.cs
- XpsResourcePolicy.cs
- StringCollectionEditor.cs
- TrackBarRenderer.cs
- SqlTrackingWorkflowInstance.cs
- DataFormats.cs
- DataErrorValidationRule.cs
- StrokeCollectionConverter.cs
- codemethodreferenceexpression.cs
- MemberAssignmentAnalysis.cs
- Lasso.cs
- BitmapData.cs
- ExchangeUtilities.cs
- EventManager.cs
- DataRecordInfo.cs
- XmlCharCheckingWriter.cs
- RenderOptions.cs
- WebMessageEncoderFactory.cs