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
- InvocationExpression.cs
- HwndKeyboardInputProvider.cs
- IdnMapping.cs
- ProviderSettings.cs
- VScrollProperties.cs
- ConnectionsZoneAutoFormat.cs
- AjaxFrameworkAssemblyAttribute.cs
- DataSourceConverter.cs
- SchemaImporterExtensionsSection.cs
- DesignerObject.cs
- GridViewAutomationPeer.cs
- __Error.cs
- ToolStripItem.cs
- InertiaRotationBehavior.cs
- WpfWebRequestHelper.cs
- GlyphingCache.cs
- Console.cs
- DataServiceQueryOfT.cs
- FragmentQueryProcessor.cs
- BevelBitmapEffect.cs
- ExtractorMetadata.cs
- DataGridViewComboBoxColumn.cs
- PathStreamGeometryContext.cs
- NativeMethods.cs
- ListViewUpdateEventArgs.cs
- ProxyElement.cs
- SplashScreenNativeMethods.cs
- FileReservationCollection.cs
- TextRenderingModeValidation.cs
- LayoutTable.cs
- NullableFloatAverageAggregationOperator.cs
- BamlLocalizationDictionary.cs
- PathGradientBrush.cs
- UIElementIsland.cs
- SpecialNameAttribute.cs
- RoleServiceManager.cs
- InputLanguageCollection.cs
- MemberRestriction.cs
- CounterCreationData.cs
- SyndicationElementExtension.cs
- StdValidatorsAndConverters.cs
- MaskDescriptors.cs
- ByteViewer.cs
- WebPartCatalogCloseVerb.cs
- WebBrowsableAttribute.cs
- XPathNodeInfoAtom.cs
- FaultPropagationRecord.cs
- BamlTreeUpdater.cs
- Utilities.cs
- CompModSwitches.cs
- BehaviorEditorPart.cs
- PathGeometry.cs
- WebPartsSection.cs
- PageStatePersister.cs
- Typography.cs
- DataTableMappingCollection.cs
- BoundColumn.cs
- SerializableAttribute.cs
- RuntimeHelpers.cs
- shaperfactoryquerycachekey.cs
- NestedContainer.cs
- XmlSchemaFacet.cs
- CryptoHelper.cs
- BitmapEncoder.cs
- AsyncOperation.cs
- MetadataCollection.cs
- InputLanguageEventArgs.cs
- PrintingPermission.cs
- XmlSchemaDatatype.cs
- Trace.cs
- IBuiltInEvidence.cs
- ObservableDictionary.cs
- TabControl.cs
- EntityContainerAssociationSetEnd.cs
- CapabilitiesUse.cs
- COM2PropertyBuilderUITypeEditor.cs
- VersionPair.cs
- Config.cs
- ListViewContainer.cs
- TypeDescriptionProvider.cs
- ItemType.cs
- DataGridPagerStyle.cs
- Vector3D.cs
- BamlLocalizabilityResolver.cs
- XmlDataSourceNodeDescriptor.cs
- DataGridViewCellPaintingEventArgs.cs
- CustomErrorsSection.cs
- ReversePositionQuery.cs
- FreeFormDesigner.cs
- CacheEntry.cs
- ISFTagAndGuidCache.cs
- AppSettingsExpressionBuilder.cs
- OleDbMetaDataFactory.cs
- FormViewUpdatedEventArgs.cs
- DataControlFieldCell.cs
- ReliableDuplexSessionChannel.cs
- TreeNodeBinding.cs
- SafeFindHandle.cs
- EDesignUtil.cs
- PopOutPanel.cs