Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Behaviors / CancellationHandlerDesigner.cs / 1305376 / CancellationHandlerDesigner.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; [ActivityDesignerTheme(typeof(CancellationDesignerTheme))] internal sealed class CancellationHandlerActivityDesigner : SequentialActivityDesigner { #region Properties and Methods public override bool CanExpandCollapse { get { return false; } } 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); } } 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 } #region CompensationDesignerTheme internal sealed class CancellationDesignerTheme : CompositeDesignerTheme { public CancellationDesignerTheme(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, 0xFF, 0xB0, 0x90); this.BackColorEnd = Color.FromArgb(0x35, 0xFF, 0xB0, 0x90); } } #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; [ActivityDesignerTheme(typeof(CancellationDesignerTheme))] internal sealed class CancellationHandlerActivityDesigner : SequentialActivityDesigner { #region Properties and Methods public override bool CanExpandCollapse { get { return false; } } 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); } } 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 } #region CompensationDesignerTheme internal sealed class CancellationDesignerTheme : CompositeDesignerTheme { public CancellationDesignerTheme(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, 0xFF, 0xB0, 0x90); this.BackColorEnd = Color.FromArgb(0x35, 0xFF, 0xB0, 0x90); } } #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
- Control.cs
- AppModelKnownContentFactory.cs
- RelationshipType.cs
- _NegoStream.cs
- PictureBox.cs
- Function.cs
- AudioFileOut.cs
- BinaryReader.cs
- ManagedWndProcTracker.cs
- TableSectionStyle.cs
- EntityContainerAssociationSet.cs
- XmlSchemaChoice.cs
- KeyedCollection.cs
- ParameterToken.cs
- TreeViewItemAutomationPeer.cs
- MetadataSerializer.cs
- _ShellExpression.cs
- ListViewGroupCollectionEditor.cs
- Header.cs
- Delegate.cs
- COM2Properties.cs
- HorizontalAlignConverter.cs
- ComplexObject.cs
- ToolStripItemRenderEventArgs.cs
- SymbolDocumentGenerator.cs
- WindowsPrincipal.cs
- ResXResourceReader.cs
- RemotingClientProxy.cs
- SourceElementsCollection.cs
- GenericXmlSecurityTokenAuthenticator.cs
- RenamedEventArgs.cs
- DrawingState.cs
- RenderData.cs
- ConnectionPoint.cs
- ObjectPersistData.cs
- DatagramAdapter.cs
- MobileControl.cs
- WindowsUpDown.cs
- ParameterElement.cs
- GenericTextProperties.cs
- TextContainerHelper.cs
- DataStorage.cs
- SecureConversationVersion.cs
- Helper.cs
- DocumentOutline.cs
- ObjectDataSourceDisposingEventArgs.cs
- MethodExpression.cs
- SequentialOutput.cs
- WpfWebRequestHelper.cs
- CopyNamespacesAction.cs
- PageHandlerFactory.cs
- InvokeWebServiceDesigner.cs
- SafeIUnknown.cs
- TextTrailingCharacterEllipsis.cs
- DispatchOperationRuntime.cs
- SqlDataSourceEnumerator.cs
- TransportationConfigurationTypeInstallComponent.cs
- PathFigure.cs
- WebPartCancelEventArgs.cs
- BindingCompleteEventArgs.cs
- LocalClientSecuritySettings.cs
- KeyValuePairs.cs
- GenerateHelper.cs
- MouseActionConverter.cs
- WSHttpBindingBase.cs
- OleDbConnection.cs
- SeverityFilter.cs
- AssemblyHash.cs
- EncoderParameters.cs
- Drawing.cs
- DataBoundControlHelper.cs
- LeftCellWrapper.cs
- XamlPoint3DCollectionSerializer.cs
- SamlDelegatingWriter.cs
- FileDialogPermission.cs
- DataGridViewDataErrorEventArgs.cs
- InputBuffer.cs
- ThreadInterruptedException.cs
- BrushProxy.cs
- DtdParser.cs
- FillErrorEventArgs.cs
- ProfileSettingsCollection.cs
- ContentElementAutomationPeer.cs
- HtmlFormParameterReader.cs
- SQLInt32.cs
- ListItemCollection.cs
- ExtensionQuery.cs
- UIElementCollection.cs
- ItemCheckedEvent.cs
- ExpressionNode.cs
- XmlNamespaceManager.cs
- WinFormsSpinner.cs
- ContentPlaceHolder.cs
- ReflectionServiceProvider.cs
- Atom10FormatterFactory.cs
- BaseValidatorDesigner.cs
- ScrollBarRenderer.cs
- Padding.cs
- xdrvalidator.cs
- RevocationPoint.cs