Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / PtsHost / DirtyTextRange.cs / 1305600 / DirtyTextRange.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DirtyTextRange.cs // // Description: Dirty text range describes change in the TextContainer. // // History: // 06/06/2003 : [....] - created. // //--------------------------------------------------------------------------- using System; using System.Windows.Controls; using System.Windows.Documents; namespace MS.Internal.PtsHost { // --------------------------------------------------------------------- // Dirty text range describes change in the TextContainer. // --------------------------------------------------------------------- internal struct DirtyTextRange { // ------------------------------------------------------------------ // Constructor // // startIndex - Index of the starting position of the change. // positionsAdded - Number of characters added. // positionsRemoved - Number of characters removed. // ----------------------------------------------------------------- internal DirtyTextRange(int startIndex, int positionsAdded, int positionsRemoved) { StartIndex = startIndex; PositionsAdded = positionsAdded; PositionsRemoved = positionsRemoved; } // ------------------------------------------------------------------ // Constructor // // change - TextContainer change data. // ------------------------------------------------------------------ internal DirtyTextRange(TextContainerChangeEventArgs change) { StartIndex = change.ITextPosition.Offset; PositionsAdded = 0; PositionsRemoved = 0; switch (change.TextChange) { case TextChangeType.ContentAdded: PositionsAdded = change.Count; break; case TextChangeType.ContentRemoved: PositionsRemoved = change.Count; break; case TextChangeType.PropertyModified: PositionsAdded = change.Count; PositionsRemoved = change.Count; break; } } // ----------------------------------------------------------------- // Index of the starting position of the change. // ------------------------------------------------------------------ internal int StartIndex; // ----------------------------------------------------------------- // Number of characters added. // ----------------------------------------------------------------- internal int PositionsAdded; // ----------------------------------------------------------------- // Number of characters removed. // ------------------------------------------------------------------ internal int PositionsRemoved; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DirtyTextRange.cs // // Description: Dirty text range describes change in the TextContainer. // // History: // 06/06/2003 : [....] - created. // //--------------------------------------------------------------------------- using System; using System.Windows.Controls; using System.Windows.Documents; namespace MS.Internal.PtsHost { // --------------------------------------------------------------------- // Dirty text range describes change in the TextContainer. // --------------------------------------------------------------------- internal struct DirtyTextRange { // ------------------------------------------------------------------ // Constructor // // startIndex - Index of the starting position of the change. // positionsAdded - Number of characters added. // positionsRemoved - Number of characters removed. // ----------------------------------------------------------------- internal DirtyTextRange(int startIndex, int positionsAdded, int positionsRemoved) { StartIndex = startIndex; PositionsAdded = positionsAdded; PositionsRemoved = positionsRemoved; } // ------------------------------------------------------------------ // Constructor // // change - TextContainer change data. // ------------------------------------------------------------------ internal DirtyTextRange(TextContainerChangeEventArgs change) { StartIndex = change.ITextPosition.Offset; PositionsAdded = 0; PositionsRemoved = 0; switch (change.TextChange) { case TextChangeType.ContentAdded: PositionsAdded = change.Count; break; case TextChangeType.ContentRemoved: PositionsRemoved = change.Count; break; case TextChangeType.PropertyModified: PositionsAdded = change.Count; PositionsRemoved = change.Count; break; } } // ----------------------------------------------------------------- // Index of the starting position of the change. // ------------------------------------------------------------------ internal int StartIndex; // ----------------------------------------------------------------- // Number of characters added. // ----------------------------------------------------------------- internal int PositionsAdded; // ----------------------------------------------------------------- // Number of characters removed. // ------------------------------------------------------------------ internal int PositionsRemoved; } } // 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
- EventRoute.cs
- _TransmitFileOverlappedAsyncResult.cs
- SQLDoubleStorage.cs
- ImageConverter.cs
- Point3DCollectionValueSerializer.cs
- SchemaCompiler.cs
- BaseTemplateParser.cs
- Canonicalizers.cs
- MsmqTransportReceiveParameters.cs
- ConfigurationCollectionAttribute.cs
- DataGridPageChangedEventArgs.cs
- clipboard.cs
- DynamicRendererThreadManager.cs
- XmlNodeList.cs
- TextContainer.cs
- LocalizabilityAttribute.cs
- Size3D.cs
- OpenFileDialog.cs
- FloaterParagraph.cs
- BufferAllocator.cs
- DetailsView.cs
- Dispatcher.cs
- GroupQuery.cs
- CollectionViewGroupInternal.cs
- DataServiceSaveChangesEventArgs.cs
- SqlTypeConverter.cs
- SafeNativeMethods.cs
- IListConverters.cs
- PreviewKeyDownEventArgs.cs
- ProfileManager.cs
- sqlcontext.cs
- GenericRootAutomationPeer.cs
- Set.cs
- OleDbDataAdapter.cs
- RouteItem.cs
- WebPartConnectionsCloseVerb.cs
- TriggerCollection.cs
- ControlUtil.cs
- TrackingMemoryStreamFactory.cs
- EmptyImpersonationContext.cs
- WinFormsComponentEditor.cs
- Int16AnimationBase.cs
- RequestQueryProcessor.cs
- DependencyObject.cs
- ServicesUtilities.cs
- OleDbErrorCollection.cs
- StatusBarDrawItemEvent.cs
- Source.cs
- EventLogPropertySelector.cs
- CheckBoxList.cs
- ImageInfo.cs
- RuntimeConfigurationRecord.cs
- Logging.cs
- ProxyGenerator.cs
- DataPagerCommandEventArgs.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- TiffBitmapDecoder.cs
- BamlTreeNode.cs
- DiscoveryClientProtocol.cs
- Panel.cs
- RightNameExpirationInfoPair.cs
- WinEventTracker.cs
- SqlBuilder.cs
- WindowShowOrOpenTracker.cs
- TextEndOfParagraph.cs
- clipboard.cs
- PopOutPanel.cs
- DiscoveryEndpointElement.cs
- ContextMenuAutomationPeer.cs
- UserControl.cs
- MarkupObject.cs
- DetailsViewInsertedEventArgs.cs
- Vector3D.cs
- SqlMethodCallConverter.cs
- MetabaseReader.cs
- ServerValidateEventArgs.cs
- DeriveBytes.cs
- OdbcHandle.cs
- SwitchElementsCollection.cs
- CssClassPropertyAttribute.cs
- MenuItemStyle.cs
- DocumentGridPage.cs
- SendActivity.cs
- XmlIncludeAttribute.cs
- SynchronousChannelMergeEnumerator.cs
- SpellerStatusTable.cs
- QilVisitor.cs
- validation.cs
- XmlWriter.cs
- LoaderAllocator.cs
- WindowsImpersonationContext.cs
- SqlConnectionString.cs
- OleDbDataReader.cs
- BitmapEffectGroup.cs
- BindingWorker.cs
- DayRenderEvent.cs
- AttachedPropertyMethodSelector.cs
- FlowLayoutPanelDesigner.cs
- Substitution.cs
- SearchForVirtualItemEventArgs.cs