Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Activities / Designers / StateFinalizationDesigner.cs / 1305376 / StateFinalizationDesigner.cs
namespace System.Workflow.Activities { using System; using System.Text; using System.Reflection; using System.Collections; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Drawing.Drawing2D; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Collections.ObjectModel; #region StateFinalizationDesigner [ActivityDesignerTheme(typeof(StateFinalizationDesignerTheme))] internal sealed class StateFinalizationDesigner : System.Workflow.Activities.SequenceDesigner { #region Properties and Methods public override bool CanBeParentedTo(CompositeActivityDesigner parentActivityDesigner) { if (parentActivityDesigner == null) throw new ArgumentNullException("parentActivityDesigner"); if (!(parentActivityDesigner.Activity is StateActivity)) return false; return base.CanBeParentedTo(parentActivityDesigner); } protected override void DoDefaultAction() { base.DoDefaultAction(); EnsureVisible(); } public override bool CanExpandCollapse { get { return false; } } public override bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollectionactivitiesToInsert) { foreach (Activity activity in activitiesToInsert) { if (activity is IEventActivity) return false; } return base.CanInsertActivities(insertLocation, activitiesToInsert); } #endregion } #endregion #region StateFinalizationDesignerTheme internal sealed class StateFinalizationDesignerTheme : CompositeDesignerTheme { public StateFinalizationDesignerTheme(WorkflowTheme theme) : base(theme) { this.ShowDropShadow = false; this.ConnectorStartCap = LineAnchor.None; this.ConnectorEndCap = LineAnchor.ArrowAnchor; this.ForeColor = Color.FromArgb(0xFF, 0x80, 0x00, 0x00); this.BorderColor = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0); this.BorderStyle = DashStyle.Dash; this.BackColorStart = Color.FromArgb(0x00, 0x00, 0x00, 0x00); this.BackColorEnd = Color.FromArgb(0x00, 0x00, 0x00, 0x00); } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.Activities { using System; using System.Text; using System.Reflection; using System.Collections; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Drawing.Drawing2D; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Collections.ObjectModel; #region StateFinalizationDesigner [ActivityDesignerTheme(typeof(StateFinalizationDesignerTheme))] internal sealed class StateFinalizationDesigner : System.Workflow.Activities.SequenceDesigner { #region Properties and Methods public override bool CanBeParentedTo(CompositeActivityDesigner parentActivityDesigner) { if (parentActivityDesigner == null) throw new ArgumentNullException("parentActivityDesigner"); if (!(parentActivityDesigner.Activity is StateActivity)) return false; return base.CanBeParentedTo(parentActivityDesigner); } protected override void DoDefaultAction() { base.DoDefaultAction(); EnsureVisible(); } public override bool CanExpandCollapse { get { return false; } } public override bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollection activitiesToInsert) { foreach (Activity activity in activitiesToInsert) { if (activity is IEventActivity) return false; } return base.CanInsertActivities(insertLocation, activitiesToInsert); } #endregion } #endregion #region StateFinalizationDesignerTheme internal sealed class StateFinalizationDesignerTheme : CompositeDesignerTheme { public StateFinalizationDesignerTheme(WorkflowTheme theme) : base(theme) { this.ShowDropShadow = false; this.ConnectorStartCap = LineAnchor.None; this.ConnectorEndCap = LineAnchor.ArrowAnchor; this.ForeColor = Color.FromArgb(0xFF, 0x80, 0x00, 0x00); this.BorderColor = Color.FromArgb(0xFF, 0xE0, 0xE0, 0xE0); this.BorderStyle = DashStyle.Dash; this.BackColorStart = Color.FromArgb(0x00, 0x00, 0x00, 0x00); this.BackColorEnd = Color.FromArgb(0x00, 0x00, 0x00, 0x00); } } #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
- WinFormsSpinner.cs
- ReadonlyMessageFilter.cs
- SerializationEventsCache.cs
- BamlStream.cs
- InkCanvasInnerCanvas.cs
- RequestedSignatureDialog.cs
- StateElementCollection.cs
- DaylightTime.cs
- FontFamily.cs
- Attributes.cs
- SimpleBitVector32.cs
- SecurityMode.cs
- ListViewTableRow.cs
- AnchoredBlock.cs
- SudsParser.cs
- ApplicationBuildProvider.cs
- Trace.cs
- DataGridViewBindingCompleteEventArgs.cs
- TraceUtils.cs
- HighlightComponent.cs
- WorkflowQueueInfo.cs
- Substitution.cs
- DataServiceHostFactory.cs
- ContextStack.cs
- Query.cs
- StringReader.cs
- XmlException.cs
- CustomError.cs
- ObjectHelper.cs
- PerformanceCounterPermissionAttribute.cs
- ZoneButton.cs
- CombinedGeometry.cs
- FontSizeConverter.cs
- UInt16.cs
- Literal.cs
- WindowsListViewItem.cs
- HttpApplicationFactory.cs
- ProfileEventArgs.cs
- StringArrayConverter.cs
- URLBuilder.cs
- DependencyObjectValidator.cs
- _CookieModule.cs
- TableLayoutCellPaintEventArgs.cs
- SchemaCollectionPreprocessor.cs
- ToolStripOverflow.cs
- XhtmlStyleClass.cs
- UnauthorizedWebPart.cs
- Assembly.cs
- ActiveXSite.cs
- EventLogPermissionAttribute.cs
- ServicePerformanceCounters.cs
- XmlSortKey.cs
- TimerElapsedEvenArgs.cs
- StringResourceManager.cs
- PageRouteHandler.cs
- OrderedEnumerableRowCollection.cs
- DesignerActionItem.cs
- SourceItem.cs
- TreeBuilderXamlTranslator.cs
- GroupLabel.cs
- ItemsControlAutomationPeer.cs
- DiagnosticTraceSource.cs
- TriggerAction.cs
- Parallel.cs
- ByteAnimationUsingKeyFrames.cs
- WebCategoryAttribute.cs
- IncrementalHitTester.cs
- TTSVoice.cs
- XamlInt32CollectionSerializer.cs
- FlowLayoutPanelDesigner.cs
- CodeStatementCollection.cs
- SelectionGlyph.cs
- DataContext.cs
- EventLogPermission.cs
- Help.cs
- DataSetMappper.cs
- InfoCardSymmetricCrypto.cs
- OneOfTypeConst.cs
- WarningException.cs
- PropertyChangedEventManager.cs
- MergePropertyDescriptor.cs
- Helpers.cs
- ElementAction.cs
- XhtmlBasicListAdapter.cs
- SmiContext.cs
- counter.cs
- TdsEnums.cs
- ElementHost.cs
- SiteMapNode.cs
- BitmapFrameDecode.cs
- DesignTimeType.cs
- SetterBase.cs
- SqlCommandBuilder.cs
- RootBrowserWindowAutomationPeer.cs
- DataGridViewRowCancelEventArgs.cs
- AppearanceEditorPart.cs
- BasicExpandProvider.cs
- TemplateXamlParser.cs
- WindowsSolidBrush.cs
- CurrentChangingEventManager.cs