Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / UndoUnit.cs / 1305376 / UndoUnit.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation { using System; using System.Collections.Generic; using System.Text; using System.Activities.Presentation.View; using System.Activities.Presentation.Model; public abstract class UndoUnit { EditingContext context; ModelItem designerRoot; public string Description { get; set; } public abstract void Redo(); public abstract void Undo(); protected UndoUnit(EditingContext context) { if (context == null) { throw FxTrace.Exception.AsError(new ArgumentNullException("context")); } this.context = context; } protected void SaveGlobalState() { DesignerView designerView = context.Services.GetService(); if (designerView != null && designerView.RootDesigner != null) { designerRoot = ((WorkflowViewElement)designerView.RootDesigner).ModelItem; } } protected void ApplyGlobalState() { DesignerView designerView = context.Services.GetService (); if (designerView != null && designerView.RootDesigner != null) { ModelItem currentDesignerRoot = ((WorkflowViewElement)designerView.RootDesigner).ModelItem; if (currentDesignerRoot != designerRoot) { designerView.MakeRootDesigner(designerRoot); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation { using System; using System.Collections.Generic; using System.Text; using System.Activities.Presentation.View; using System.Activities.Presentation.Model; public abstract class UndoUnit { EditingContext context; ModelItem designerRoot; public string Description { get; set; } public abstract void Redo(); public abstract void Undo(); protected UndoUnit(EditingContext context) { if (context == null) { throw FxTrace.Exception.AsError(new ArgumentNullException("context")); } this.context = context; } protected void SaveGlobalState() { DesignerView designerView = context.Services.GetService (); if (designerView != null && designerView.RootDesigner != null) { designerRoot = ((WorkflowViewElement)designerView.RootDesigner).ModelItem; } } protected void ApplyGlobalState() { DesignerView designerView = context.Services.GetService (); if (designerView != null && designerView.RootDesigner != null) { ModelItem currentDesignerRoot = ((WorkflowViewElement)designerView.RootDesigner).ModelItem; if (currentDesignerRoot != designerRoot) { designerView.MakeRootDesigner(designerRoot); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BamlBinaryReader.cs
- StringToken.cs
- DataGridViewLayoutData.cs
- StatusBarPanel.cs
- OdbcCommand.cs
- ProcessHost.cs
- QueueProcessor.cs
- BrowsableAttribute.cs
- DisplayNameAttribute.cs
- DataGridViewRowCancelEventArgs.cs
- ReferentialConstraint.cs
- ToolStripContainer.cs
- TextShapeableCharacters.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CompilerErrorCollection.cs
- JsonFormatReaderGenerator.cs
- ObjectConverter.cs
- WorkflowRuntimeService.cs
- ImageMapEventArgs.cs
- ExpressionVisitor.cs
- JulianCalendar.cs
- FileLevelControlBuilderAttribute.cs
- IntSecurity.cs
- AspNetPartialTrustHelpers.cs
- DataAccessor.cs
- EntityDataSourceColumn.cs
- ColumnMapProcessor.cs
- LeaseManager.cs
- ReliabilityContractAttribute.cs
- RemotingServices.cs
- PersistenceTypeAttribute.cs
- HttpPostedFile.cs
- ProgramPublisher.cs
- EventArgs.cs
- AVElementHelper.cs
- HttpCacheVaryByContentEncodings.cs
- AsyncResult.cs
- TransformedBitmap.cs
- PropertyGeneratedEventArgs.cs
- FileRegion.cs
- SocketAddress.cs
- IBuiltInEvidence.cs
- EnvironmentPermission.cs
- BehaviorDragDropEventArgs.cs
- CoreSwitches.cs
- Span.cs
- XmlCharCheckingWriter.cs
- CodeRemoveEventStatement.cs
- CapacityStreamGeometryContext.cs
- ObjectCloneHelper.cs
- EntityViewContainer.cs
- HostExecutionContextManager.cs
- EntryIndex.cs
- StrongNameKeyPair.cs
- CounterCreationDataConverter.cs
- XPathQueryGenerator.cs
- Bold.cs
- AssemblyUtil.cs
- SecurityTraceRecordHelper.cs
- IntSecurity.cs
- XComponentModel.cs
- FormViewUpdatedEventArgs.cs
- Logging.cs
- ExternalFile.cs
- SqlAggregateChecker.cs
- JsonServiceDocumentSerializer.cs
- DataGridColumnHeaderAutomationPeer.cs
- SmiMetaData.cs
- HotSpot.cs
- SQLByte.cs
- DiscoveryOperationContextExtension.cs
- CorrelationTokenInvalidatedHandler.cs
- DataGridViewCellPaintingEventArgs.cs
- StdValidatorsAndConverters.cs
- UIElement3D.cs
- MediaTimeline.cs
- SuppressMergeCheckAttribute.cs
- SslSecurityTokenParameters.cs
- EnumConverter.cs
- ByteAnimation.cs
- AutoSizeToolBoxItem.cs
- OleAutBinder.cs
- SchemaImporterExtension.cs
- DeploymentExceptionMapper.cs
- CannotUnloadAppDomainException.cs
- WebBrowser.cs
- StrokeNodeEnumerator.cs
- ControlParameter.cs
- IdnElement.cs
- AspNetSynchronizationContext.cs
- FixedDSBuilder.cs
- WebPartZone.cs
- ResourceProperty.cs
- UIPermission.cs
- TableRow.cs
- PointAnimationClockResource.cs
- AudioSignalProblemOccurredEventArgs.cs
- ManagementExtension.cs
- XmlSchemaAnnotation.cs
- Propagator.Evaluator.cs