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
- TabControlCancelEvent.cs
- HtmlWindowCollection.cs
- EditBehavior.cs
- SimplePropertyEntry.cs
- CollectionMarkupSerializer.cs
- DataGridRowAutomationPeer.cs
- StateMachineHistory.cs
- GlobalDataBindingHandler.cs
- SHA1Cng.cs
- XPathAncestorIterator.cs
- DataGridViewCellValueEventArgs.cs
- InternalCache.cs
- SplineKeyFrames.cs
- ErrorReporting.cs
- FtpRequestCacheValidator.cs
- DataAccessException.cs
- UriSectionReader.cs
- FlowDocumentReaderAutomationPeer.cs
- ProcessDesigner.cs
- DurableMessageDispatchInspector.cs
- PageCache.cs
- Int64Storage.cs
- HMACSHA512.cs
- DocumentSequence.cs
- DropAnimation.xaml.cs
- EntityTransaction.cs
- UpdateEventArgs.cs
- CallbackBehaviorAttribute.cs
- DataGridViewElement.cs
- SystemDiagnosticsSection.cs
- IntegerFacetDescriptionElement.cs
- LabelEditEvent.cs
- AnnotationMap.cs
- AncestorChangedEventArgs.cs
- ExtentJoinTreeNode.cs
- TextSegment.cs
- ExternalException.cs
- InvalidDataContractException.cs
- HttpCachePolicy.cs
- SystemException.cs
- MissingMethodException.cs
- ZipIOExtraFieldPaddingElement.cs
- RawStylusInputReport.cs
- DoubleLinkListEnumerator.cs
- MenuItemBinding.cs
- AnnotationObservableCollection.cs
- ListComponentEditor.cs
- RTTrackingProfile.cs
- PeerEndPoint.cs
- Walker.cs
- AnimationClockResource.cs
- HashAlgorithm.cs
- FontCacheLogic.cs
- ControlHelper.cs
- FixedDocument.cs
- X509KeyIdentifierClauseType.cs
- ReadOnlyPermissionSet.cs
- ButtonFieldBase.cs
- CommandDevice.cs
- DBSqlParserColumnCollection.cs
- ProxyFragment.cs
- PolicyVersion.cs
- MultipartContentParser.cs
- ToolStripDropTargetManager.cs
- InputProcessorProfiles.cs
- PropertyGridEditorPart.cs
- VariableDesigner.xaml.cs
- DataGridViewElement.cs
- OleDbTransaction.cs
- WindowsFormsLinkLabel.cs
- XmlArrayItemAttribute.cs
- StructuredTypeEmitter.cs
- RadioButtonBaseAdapter.cs
- MulticastOption.cs
- storepermissionattribute.cs
- ControlBindingsCollection.cs
- XmlSchemaNotation.cs
- XmlSchemaSimpleTypeList.cs
- XamlPathDataSerializer.cs
- EditorOptionAttribute.cs
- XsltQilFactory.cs
- BindingList.cs
- ScriptResourceAttribute.cs
- EncodingNLS.cs
- SecurityDescriptor.cs
- Enum.cs
- DataGridCommandEventArgs.cs
- NativeMethods.cs
- SpecialFolderEnumConverter.cs
- SolidColorBrush.cs
- FormClosedEvent.cs
- ColorPalette.cs
- AnnotationResourceCollection.cs
- QueryCursorEventArgs.cs
- RecordConverter.cs
- ErrorActivity.cs
- StrongNameKeyPair.cs
- CapabilitiesSection.cs
- XhtmlBasicPageAdapter.cs
- PersonalizableTypeEntry.cs