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
- XmlDocumentFieldSchema.cs
- FormParameter.cs
- ContextMarshalException.cs
- Triplet.cs
- SchemaTableOptionalColumn.cs
- ArraySubsetEnumerator.cs
- PromptStyle.cs
- DependencyPropertyAttribute.cs
- PermissionSet.cs
- CodeDOMProvider.cs
- StructureChangedEventArgs.cs
- CatalogZoneBase.cs
- RandomNumberGenerator.cs
- AddInSegmentDirectoryNotFoundException.cs
- EqualityComparer.cs
- ContainerAction.cs
- GAC.cs
- GeneratedView.cs
- Verify.cs
- Context.cs
- HtmlInputText.cs
- SqlCacheDependencyDatabase.cs
- Wildcard.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- XamlInterfaces.cs
- CommandSet.cs
- RsaSecurityToken.cs
- Decorator.cs
- X509CertificateStore.cs
- PerformanceCountersElement.cs
- WSTrustDec2005.cs
- SiteMapSection.cs
- Error.cs
- EntityConnection.cs
- SystemIPv6InterfaceProperties.cs
- Type.cs
- DataGridAddNewRow.cs
- SHA512.cs
- PenCursorManager.cs
- IItemProperties.cs
- ZoneMembershipCondition.cs
- StoreItemCollection.cs
- SerializableAuthorizationContext.cs
- PageAsyncTask.cs
- DataGridItemAutomationPeer.cs
- Point3D.cs
- NumericUpDown.cs
- OneToOneMappingSerializer.cs
- MessageBuilder.cs
- XmlAtomErrorReader.cs
- ListItem.cs
- Number.cs
- EntityDataSourceChangingEventArgs.cs
- ControlParser.cs
- SHA384Managed.cs
- TreeViewHitTestInfo.cs
- ThicknessAnimation.cs
- XmlArrayAttribute.cs
- NamespaceDisplay.xaml.cs
- BitmapEffectState.cs
- PublisherIdentityPermission.cs
- xsdvalidator.cs
- XmlHierarchyData.cs
- TypeGeneratedEventArgs.cs
- TextBlockAutomationPeer.cs
- CompositeCollection.cs
- DbProviderFactory.cs
- BamlTreeMap.cs
- ViewCellRelation.cs
- RadioButtonList.cs
- TextElementAutomationPeer.cs
- StorageAssociationSetMapping.cs
- MediaTimeline.cs
- ObjectDataSourceStatusEventArgs.cs
- AssociatedControlConverter.cs
- QueryExpr.cs
- sqlser.cs
- ConstructorBuilder.cs
- StateElementCollection.cs
- CatalogZoneBase.cs
- ListViewSelectEventArgs.cs
- DataGridRelationshipRow.cs
- XmlNode.cs
- TextServicesCompartmentContext.cs
- UnsafeNativeMethods.cs
- WebConvert.cs
- ImportCatalogPart.cs
- SrgsToken.cs
- EntityCollection.cs
- XhtmlConformanceSection.cs
- ColorAnimationBase.cs
- XmlSchemaSimpleTypeList.cs
- RegionInfo.cs
- XmlSerializableServices.cs
- PopupRootAutomationPeer.cs
- RowToFieldTransformer.cs
- DrawItemEvent.cs
- SingleResultAttribute.cs
- querybuilder.cs
- ImageDrawing.cs