Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Behaviors / CompensationDesigner.cs / 1305376 / CompensationDesigner.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Collections; using System.Collections.ObjectModel; using System.Collections.Generic; using System.Diagnostics; using System.ComponentModel; using System.ComponentModel.Design; using System.Workflow.ComponentModel.Design; #region CompensationDesigner [ActivityDesignerTheme(typeof(CompensationDesignerTheme))] internal sealed class CompensationHandlerActivityDesigner : SequentialActivityDesigner { #region Members, Constructor and Destructor public override ReadOnlyCollectionViews { get { List views = new List (); foreach (DesignerView view in base.Views) { // disable the fault handlers, cancellation handler and compensation handler if ((view.ViewId != 2) && (view.ViewId != 3) && (view.ViewId != 4) ) views.Add(view); } return new ReadOnlyCollection (views); } } #endregion #region Properties and Methods public override bool CanExpandCollapse { get { return false; } } public override bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollection activitiesToInsert) { foreach (Activity activity in activitiesToInsert) { if (Helpers.IsFrameworkActivity(activity)) return false; } return base.CanInsertActivities(insertLocation, activitiesToInsert); } #endregion } #endregion #region CompensationDesignerTheme internal sealed class CompensationDesignerTheme : CompositeDesignerTheme { public CompensationDesignerTheme(WorkflowTheme theme) : base(theme) { this.ShowDropShadow = false; this.ConnectorStartCap = LineAnchor.None; this.ConnectorEndCap = LineAnchor.ArrowAnchor; this.ForeColor = Color.FromArgb(0xFF, 0x00, 0x00, 0x00); this.BorderColor = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0); this.BorderStyle = DashStyle.Dash; this.BackColorStart = Color.FromArgb(0x35, 0xB0, 0xE0, 0xFF); this.BackColorEnd = Color.FromArgb(0x35, 0xB0, 0xE0, 0xFF); } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Collections; using System.Collections.ObjectModel; using System.Collections.Generic; using System.Diagnostics; using System.ComponentModel; using System.ComponentModel.Design; using System.Workflow.ComponentModel.Design; #region CompensationDesigner [ActivityDesignerTheme(typeof(CompensationDesignerTheme))] internal sealed class CompensationHandlerActivityDesigner : SequentialActivityDesigner { #region Members, Constructor and Destructor public override ReadOnlyCollection Views { get { List views = new List (); foreach (DesignerView view in base.Views) { // disable the fault handlers, cancellation handler and compensation handler if ((view.ViewId != 2) && (view.ViewId != 3) && (view.ViewId != 4) ) views.Add(view); } return new ReadOnlyCollection (views); } } #endregion #region Properties and Methods public override bool CanExpandCollapse { get { return false; } } public override bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollection activitiesToInsert) { foreach (Activity activity in activitiesToInsert) { if (Helpers.IsFrameworkActivity(activity)) return false; } return base.CanInsertActivities(insertLocation, activitiesToInsert); } #endregion } #endregion #region CompensationDesignerTheme internal sealed class CompensationDesignerTheme : CompositeDesignerTheme { public CompensationDesignerTheme(WorkflowTheme theme) : base(theme) { this.ShowDropShadow = false; this.ConnectorStartCap = LineAnchor.None; this.ConnectorEndCap = LineAnchor.ArrowAnchor; this.ForeColor = Color.FromArgb(0xFF, 0x00, 0x00, 0x00); this.BorderColor = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0); this.BorderStyle = DashStyle.Dash; this.BackColorStart = Color.FromArgb(0x35, 0xB0, 0xE0, 0xFF); this.BackColorEnd = Color.FromArgb(0x35, 0xB0, 0xE0, 0xFF); } } #endregion } // 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
- AnimationTimeline.cs
- DocumentOrderQuery.cs
- MultitargetUtil.cs
- DynamicPropertyHolder.cs
- FlowDocument.cs
- SafeFileMappingHandle.cs
- HostExecutionContextManager.cs
- StorageSetMapping.cs
- WinFormsUtils.cs
- Page.cs
- DataGridViewCellLinkedList.cs
- TypeDelegator.cs
- SerializableAttribute.cs
- XmlReflectionMember.cs
- TreeBuilderBamlTranslator.cs
- Shape.cs
- OleDbEnumerator.cs
- AppearanceEditorPart.cs
- HTTPRemotingHandler.cs
- FastEncoder.cs
- ScriptIgnoreAttribute.cs
- EncodingTable.cs
- WindowsFormsHelpers.cs
- DataSourceBooleanViewSchemaConverter.cs
- XmlCharacterData.cs
- OperationBehaviorAttribute.cs
- OrderedDictionary.cs
- OleDbReferenceCollection.cs
- EntityDescriptor.cs
- FullTrustAssembly.cs
- CollectionBase.cs
- UriSectionReader.cs
- DeclaredTypeElementCollection.cs
- ReliableSessionBindingElement.cs
- ArrayWithOffset.cs
- ProcessHostConfigUtils.cs
- TrustManager.cs
- DbCommandDefinition.cs
- XhtmlTextWriter.cs
- WebBrowsableAttribute.cs
- SamlAttributeStatement.cs
- SqlUtil.cs
- Rijndael.cs
- WriteTimeStream.cs
- XPathDocument.cs
- CorrelationTokenInvalidatedHandler.cs
- StreamReader.cs
- Point4D.cs
- AccessibleObject.cs
- TypeNameHelper.cs
- MessageQueueTransaction.cs
- CollectionViewGroup.cs
- DataConnectionHelper.cs
- UnsafeNativeMethods.cs
- BookmarkResumptionRecord.cs
- FileEnumerator.cs
- DataDocumentXPathNavigator.cs
- Lease.cs
- _CacheStreams.cs
- InvokeProviderWrapper.cs
- TransformerConfigurationWizardBase.cs
- InputProviderSite.cs
- DrawingVisualDrawingContext.cs
- PagerStyle.cs
- SimpleMailWebEventProvider.cs
- DataGridColumnCollection.cs
- VectorValueSerializer.cs
- UiaCoreApi.cs
- AutomationPropertyInfo.cs
- _SslStream.cs
- SigningCredentials.cs
- RawKeyboardInputReport.cs
- GeneralTransform3DCollection.cs
- GlyphRunDrawing.cs
- NetStream.cs
- DataGrid.cs
- UIElementHelper.cs
- SspiWrapper.cs
- SweepDirectionValidation.cs
- DecimalKeyFrameCollection.cs
- coordinator.cs
- SqlStatistics.cs
- XmlCharType.cs
- EncoderFallback.cs
- CommonObjectSecurity.cs
- PropertyMapper.cs
- RenderCapability.cs
- PLINQETWProvider.cs
- XmlParserContext.cs
- PackWebRequest.cs
- MetabaseSettingsIis7.cs
- RequestUriProcessor.cs
- EncoderReplacementFallback.cs
- ELinqQueryState.cs
- IsolationInterop.cs
- UrlPath.cs
- CopyOnWriteList.cs
- WizardForm.cs
- GridSplitter.cs
- ellipse.cs