Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Documents / TextTreeInsertUndoUnit.cs / 1 / TextTreeInsertUndoUnit.cs
//---------------------------------------------------------------------------- // // File: TextTreeInsertUndoUnit.cs // // Description: Undo unit for TextContainer.InsertText and InsertEmbeddedObject calls. // // History: // 03/03/2004 : [....] - Created // //--------------------------------------------------------------------------- using System; using MS.Internal; namespace System.Windows.Documents { // Undo unit for TextContainer.InsertText and InsertEmbeddedObject calls. internal class TextTreeInsertUndoUnit : TextTreeUndoUnit { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors // Create a new undo unit instance. // symbolOffset and symbolCount track the offset of the inserted content // and its symbol count, respectively. internal TextTreeInsertUndoUnit(TextContainer tree, int symbolOffset, int symbolCount) : base(tree, symbolOffset) { Invariant.Assert(symbolCount > 0, "Creating no-op insert undo unit!"); _symbolCount = symbolCount; } #endregion Constructors //------------------------------------------------------ // // Public Methods // //----------------------------------------------------- #region Public Methods // Called by the undo manager. Restores tree state to its condition // when the unit was created. Assumes the tree state matches conditions // just after the unit was created. public override void DoCore() { TextPointer start; TextPointer end; VerifyTreeContentHashCode(); start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward); this.TextContainer.DeleteContentInternal(start, end); } #endregion Public Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields // Count of symbols to remove. private readonly int _symbolCount; #endregion Private Fields } } // 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
- FilterableData.cs
- DefaultValueTypeConverter.cs
- HttpWriter.cs
- CatalogZoneBase.cs
- SHA1.cs
- UnsafeNativeMethodsMilCoreApi.cs
- IisNotInstalledException.cs
- MemoryFailPoint.cs
- Error.cs
- PerfService.cs
- TabItemWrapperAutomationPeer.cs
- columnmapkeybuilder.cs
- ByteRangeDownloader.cs
- DLinqColumnProvider.cs
- SqlUdtInfo.cs
- WinFormsSecurity.cs
- StrongNameUtility.cs
- MarkupExtensionParser.cs
- EventSourceCreationData.cs
- CmsUtils.cs
- TreeNodeMouseHoverEvent.cs
- EventlogProvider.cs
- columnmapfactory.cs
- Typeface.cs
- CreateUserWizardStep.cs
- TagPrefixCollection.cs
- TransformerConfigurationWizardBase.cs
- ContentOperations.cs
- WebPartConnection.cs
- DataTemplateKey.cs
- DropShadowBitmapEffect.cs
- MLangCodePageEncoding.cs
- CodeCompileUnit.cs
- InsufficientMemoryException.cs
- CodeDomComponentSerializationService.cs
- MarginCollapsingState.cs
- DescendentsWalkerBase.cs
- WebPermission.cs
- XmlSchemaParticle.cs
- Path.cs
- SafeNativeMethods.cs
- PlainXmlDeserializer.cs
- BooleanStorage.cs
- XmlSerializableReader.cs
- ObjectDisposedException.cs
- BoundPropertyEntry.cs
- Underline.cs
- BufferedStream2.cs
- SQLByteStorage.cs
- Focus.cs
- TypeConverterMarkupExtension.cs
- PeerHopCountAttribute.cs
- EventLogLink.cs
- ResourceDefaultValueAttribute.cs
- AddInServer.cs
- _OSSOCK.cs
- BrowserInteropHelper.cs
- TreeViewImageKeyConverter.cs
- ServiceBehaviorElement.cs
- ADMembershipProvider.cs
- ObjectSet.cs
- ElementNotAvailableException.cs
- Type.cs
- XPathChildIterator.cs
- GeneralTransformGroup.cs
- BulletedListEventArgs.cs
- NextPreviousPagerField.cs
- IriParsingElement.cs
- PixelFormats.cs
- CodeSnippetStatement.cs
- EntityDataSourceQueryBuilder.cs
- BitmapMetadataEnumerator.cs
- RectangleConverter.cs
- HttpCapabilitiesBase.cs
- DBDataPermission.cs
- HeaderCollection.cs
- DoubleCollectionValueSerializer.cs
- CLSCompliantAttribute.cs
- MD5CryptoServiceProvider.cs
- MediaScriptCommandRoutedEventArgs.cs
- loginstatus.cs
- DelegateHelpers.Generated.cs
- ColumnTypeConverter.cs
- PageFunction.cs
- _DynamicWinsockMethods.cs
- MetadataProperty.cs
- _SafeNetHandles.cs
- ToolZone.cs
- HttpCacheVaryByContentEncodings.cs
- UxThemeWrapper.cs
- OneOfConst.cs
- Array.cs
- DBConnectionString.cs
- HtmlTableCellCollection.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- WindowsBrush.cs
- EditCommandColumn.cs
- KeyGestureValueSerializer.cs
- IdentityReference.cs
- Point3DAnimationBase.cs