Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectNavigationPropertyMapping.cs
- WebBrowserContainer.cs
- DataTableMapping.cs
- CriticalExceptions.cs
- SchemaObjectWriter.cs
- SemanticValue.cs
- XmlSchemaObject.cs
- File.cs
- SerTrace.cs
- List.cs
- DuplicateDetector.cs
- LineServicesRun.cs
- JsonEncodingStreamWrapper.cs
- Region.cs
- HttpRequestCacheValidator.cs
- MiniParameterInfo.cs
- ZoneLinkButton.cs
- SwitchLevelAttribute.cs
- TreeViewAutomationPeer.cs
- GifBitmapDecoder.cs
- AssemblyCollection.cs
- Formatter.cs
- Vars.cs
- DocumentsTrace.cs
- NavigatorInput.cs
- ItemMap.cs
- DisposableCollectionWrapper.cs
- BreakRecordTable.cs
- StateMachine.cs
- BinaryParser.cs
- ValidatorCompatibilityHelper.cs
- RegexInterpreter.cs
- Double.cs
- FieldMetadata.cs
- TextSelection.cs
- User.cs
- FormViewInsertedEventArgs.cs
- NumberAction.cs
- IInstanceTable.cs
- AttributeSetAction.cs
- RC2CryptoServiceProvider.cs
- Cursor.cs
- GroupItem.cs
- PolicyManager.cs
- CultureMapper.cs
- StatusBarPanelClickEvent.cs
- ResourceDefaultValueAttribute.cs
- ControlValuePropertyAttribute.cs
- InputMethod.cs
- HttpWebRequest.cs
- NativeObjectSecurity.cs
- XmlDeclaration.cs
- HtmlTableRowCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- BufferBuilder.cs
- ListViewAutomationPeer.cs
- UndoUnit.cs
- CodeDirectoryCompiler.cs
- WebServiceMethodData.cs
- TimeEnumHelper.cs
- PropertyItem.cs
- TypeConverterHelper.cs
- TraceListener.cs
- WebBrowserBase.cs
- ServiceModelTimeSpanValidator.cs
- WebResponse.cs
- smtppermission.cs
- LicenseException.cs
- Identity.cs
- FlowDecisionLabelFeature.cs
- MimeMapping.cs
- FixedSOMTableCell.cs
- AnimationStorage.cs
- DBPropSet.cs
- Cursor.cs
- UpdatePanel.cs
- BitmapEffectInput.cs
- RegexMatchCollection.cs
- Stacktrace.cs
- RefreshEventArgs.cs
- QueryAccessibilityHelpEvent.cs
- Point3DAnimationUsingKeyFrames.cs
- ManagedWndProcTracker.cs
- LinkTarget.cs
- BufferedGraphicsContext.cs
- AuthorizationPolicyTypeElementCollection.cs
- Byte.cs
- RegexCompiler.cs
- ObjRef.cs
- WrapPanel.cs
- TextRange.cs
- BinaryMethodMessage.cs
- ChtmlTextBoxAdapter.cs
- RedistVersionInfo.cs
- SqlCaseSimplifier.cs
- CroppedBitmap.cs
- ScriptControlDescriptor.cs
- input.cs
- WindowInteropHelper.cs
- UnionExpr.cs