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
- FlowLayoutPanelDesigner.cs
- ToolStripItemTextRenderEventArgs.cs
- AnnotationDocumentPaginator.cs
- BaseDataListDesigner.cs
- CookieProtection.cs
- GestureRecognitionResult.cs
- AttachedPropertiesService.cs
- _RequestCacheProtocol.cs
- FileLogRecordEnumerator.cs
- figurelength.cs
- HeaderFilter.cs
- EntityDesignerDataSourceView.cs
- Cursor.cs
- ServicePoint.cs
- WindowsListViewGroupHelper.cs
- CompiledRegexRunner.cs
- TypeSystem.cs
- PersonalizableAttribute.cs
- LinkDesigner.cs
- DataReceivedEventArgs.cs
- DecimalAnimationUsingKeyFrames.cs
- WebScriptClientGenerator.cs
- TableItemProviderWrapper.cs
- SwitchAttribute.cs
- RegisteredExpandoAttribute.cs
- VisualStyleTypesAndProperties.cs
- ConnectionsZone.cs
- FontSourceCollection.cs
- DbParameterCollectionHelper.cs
- ReadOnlyDictionary.cs
- DependencyPropertyHelper.cs
- BatchWriter.cs
- XmlSerializableReader.cs
- DataServiceConfiguration.cs
- ObfuscationAttribute.cs
- ProvidersHelper.cs
- ItemList.cs
- VerificationException.cs
- UIElement.cs
- HtmlControlPersistable.cs
- TableSectionStyle.cs
- LoadRetryHandler.cs
- NavigationFailedEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- OperatorExpressions.cs
- SettingsContext.cs
- GridLength.cs
- ErrorStyle.cs
- DataSourceControlBuilder.cs
- PointCollectionConverter.cs
- SqlDependencyListener.cs
- RemotingConfiguration.cs
- SystemIPGlobalStatistics.cs
- Bind.cs
- ScrollChrome.cs
- CollectionChange.cs
- DbModificationClause.cs
- GradientStopCollection.cs
- EFColumnProvider.cs
- XamlReader.cs
- TypedElement.cs
- CompilerHelpers.cs
- VirtualPathData.cs
- DataObjectFieldAttribute.cs
- RowTypeElement.cs
- ProgressBar.cs
- Property.cs
- Control.cs
- DBNull.cs
- TextTrailingWordEllipsis.cs
- SerialErrors.cs
- SmiXetterAccessMap.cs
- EntitySqlQueryBuilder.cs
- ElapsedEventArgs.cs
- ListViewItem.cs
- Privilege.cs
- WebPartChrome.cs
- SqlDataSourceEnumerator.cs
- WebServiceMethodData.cs
- Helpers.cs
- ClientType.cs
- SecurityTokenSerializer.cs
- DataSourceControl.cs
- ButtonChrome.cs
- BinaryReader.cs
- DisplayNameAttribute.cs
- EFTableProvider.cs
- SecurityUtils.cs
- MemoryRecordBuffer.cs
- EmptyCollection.cs
- ScriptComponentDescriptor.cs
- UriScheme.cs
- ChtmlFormAdapter.cs
- ValidateNames.cs
- MobileCapabilities.cs
- EventDescriptorCollection.cs
- ObjectComplexPropertyMapping.cs
- GridToolTip.cs
- PointLight.cs
- Constraint.cs