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
- XamlReaderConstants.cs
- XmlNamespaceMappingCollection.cs
- VisualStyleRenderer.cs
- WebConfigurationManager.cs
- CFGGrammar.cs
- HostElement.cs
- OleDbPermission.cs
- LinkClickEvent.cs
- NoneExcludedImageIndexConverter.cs
- SortDescriptionCollection.cs
- GeneralTransform3DTo2DTo3D.cs
- JulianCalendar.cs
- HierarchicalDataSourceControl.cs
- ListViewInsertedEventArgs.cs
- PathNode.cs
- Form.cs
- TranslateTransform3D.cs
- WsrmMessageInfo.cs
- EventWaitHandleSecurity.cs
- WriteFileContext.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ChannelServices.cs
- SoapInteropTypes.cs
- XhtmlTextWriter.cs
- DataPagerFieldCollection.cs
- SequentialUshortCollection.cs
- PolicyDesigner.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- CachingHintValidation.cs
- StringResourceManager.cs
- AnnotationObservableCollection.cs
- DataBindingCollection.cs
- PropertyMapper.cs
- EntityDataSourceSelectedEventArgs.cs
- Helpers.cs
- ParseElement.cs
- QilTernary.cs
- FixedNode.cs
- TemplateControlCodeDomTreeGenerator.cs
- ScriptingJsonSerializationSection.cs
- _AutoWebProxyScriptWrapper.cs
- InvokePatternIdentifiers.cs
- Marshal.cs
- ClientRoleProvider.cs
- ResourceExpressionBuilder.cs
- TabletDeviceInfo.cs
- AsymmetricSignatureDeformatter.cs
- TabItem.cs
- BitmapEffectGroup.cs
- TextEditorSelection.cs
- OdbcTransaction.cs
- Transform3DCollection.cs
- PackWebResponse.cs
- DbProviderFactory.cs
- XmlJsonWriter.cs
- ProfileBuildProvider.cs
- XmlTextReaderImplHelpers.cs
- AggregateException.cs
- DaylightTime.cs
- CodeIndexerExpression.cs
- InputLangChangeRequestEvent.cs
- StateFinalizationDesigner.cs
- X509Certificate2.cs
- PagerSettings.cs
- XsltArgumentList.cs
- ColorAnimation.cs
- TextTreeFixupNode.cs
- Stylus.cs
- EdmItemCollection.cs
- ParentQuery.cs
- OrderedDictionaryStateHelper.cs
- InternalResources.cs
- TreeNodeStyleCollection.cs
- MultiPropertyDescriptorGridEntry.cs
- SafeNativeMethods.cs
- HtmlMeta.cs
- HtmlInputControl.cs
- PopupEventArgs.cs
- _NativeSSPI.cs
- AdornedElementPlaceholder.cs
- _NetworkingPerfCounters.cs
- DialogResultConverter.cs
- Context.cs
- ProfilePropertyNameValidator.cs
- CacheOutputQuery.cs
- SerialPort.cs
- Form.cs
- ImageMetadata.cs
- ByteAnimationBase.cs
- EnvironmentPermission.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- SequentialUshortCollection.cs
- EntityAdapter.cs
- SByteConverter.cs
- DataDesignUtil.cs
- OutputScope.cs
- ErrorEventArgs.cs
- BindingSourceDesigner.cs
- BitmapPalette.cs
- PerformanceCounter.cs