Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ConnectorDragDropGlyph.cs / 1305376 / ConnectorDragDropGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ConnectorDragDropGlyph internal sealed class ConnectorDragDropGlyph : DesignerGlyph { private int connectorIndex = 0; private Point glyphPoint = Point.Empty; public ConnectorDragDropGlyph(int connectorIndex, Point connectorCenter) { this.connectorIndex = connectorIndex; AmbientTheme ambientTheme = WorkflowTheme.CurrentTheme.AmbientTheme; this.glyphPoint = new Point(connectorCenter.X - ambientTheme.DropIndicatorSize.Width / 2, connectorCenter.Y - ambientTheme.DropIndicatorSize.Height / 2); } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { return new Rectangle(this.glyphPoint, WorkflowTheme.CurrentTheme.AmbientTheme.DropIndicatorSize); } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.DropIndicatorImage, GetBounds(designer, activated), DesignerContentAlignment.Fill); } public override int Priority { get { return DesignerGlyph.ConnectorDragDropPriority; } } } #endregion #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.Windows.Forms; #region Glyphs #region Class ConnectorDragDropGlyph internal sealed class ConnectorDragDropGlyph : DesignerGlyph { private int connectorIndex = 0; private Point glyphPoint = Point.Empty; public ConnectorDragDropGlyph(int connectorIndex, Point connectorCenter) { this.connectorIndex = connectorIndex; AmbientTheme ambientTheme = WorkflowTheme.CurrentTheme.AmbientTheme; this.glyphPoint = new Point(connectorCenter.X - ambientTheme.DropIndicatorSize.Width / 2, connectorCenter.Y - ambientTheme.DropIndicatorSize.Height / 2); } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { return new Rectangle(this.glyphPoint, WorkflowTheme.CurrentTheme.AmbientTheme.DropIndicatorSize); } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.DropIndicatorImage, GetBounds(designer, activated), DesignerContentAlignment.Fill); } public override int Priority { get { return DesignerGlyph.ConnectorDragDropPriority; } } } #endregion #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
- ImageListStreamer.cs
- DispatchWrapper.cs
- PreviewKeyDownEventArgs.cs
- ParameterElement.cs
- CustomSignedXml.cs
- ConfigurationElement.cs
- TypeUtils.cs
- ArrayExtension.cs
- ObjectListComponentEditor.cs
- SqlClientWrapperSmiStreamChars.cs
- SimpleTypeResolver.cs
- IgnoreSectionHandler.cs
- Hyperlink.cs
- StyleConverter.cs
- dataobject.cs
- AnimatedTypeHelpers.cs
- WorkflowOperationErrorHandler.cs
- ProfilePropertySettingsCollection.cs
- AppliedDeviceFiltersEditor.cs
- SharedConnectionInfo.cs
- MethodRental.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- cryptoapiTransform.cs
- IdentityReference.cs
- SubstitutionList.cs
- Shape.cs
- DefaultEvaluationContext.cs
- EncodingDataItem.cs
- SystemDiagnosticsSection.cs
- HttpWebRequestElement.cs
- AssociativeAggregationOperator.cs
- InstallerTypeAttribute.cs
- MemberInfoSerializationHolder.cs
- ContentHostHelper.cs
- XmlBinaryReader.cs
- CalendarButton.cs
- MD5HashHelper.cs
- PermissionSet.cs
- CleanUpVirtualizedItemEventArgs.cs
- WebPartDescription.cs
- ExtentCqlBlock.cs
- GradientStop.cs
- EncryptedReference.cs
- _UriSyntax.cs
- WebPartCloseVerb.cs
- GeneralTransform3DGroup.cs
- FormsAuthenticationModule.cs
- BoolExpression.cs
- ExpressionEvaluator.cs
- WindowsRichEdit.cs
- WCFBuildProvider.cs
- VisualTreeHelper.cs
- ConfigsHelper.cs
- TryCatch.cs
- TemplateManager.cs
- RangeBase.cs
- WebPartConnectionsEventArgs.cs
- RemoteWebConfigurationHostStream.cs
- PopupEventArgs.cs
- EventLogEntry.cs
- NamespaceListProperty.cs
- WsdlBuildProvider.cs
- WebBaseEventKeyComparer.cs
- PartialTrustVisibleAssembly.cs
- UrlMapping.cs
- SessionIDManager.cs
- MutexSecurity.cs
- NativeRecognizer.cs
- ReadOnlyPermissionSet.cs
- RequiredFieldValidator.cs
- ObjectListSelectEventArgs.cs
- OciLobLocator.cs
- TableRow.cs
- ImageDrawing.cs
- SqlInternalConnectionTds.cs
- Animatable.cs
- PriorityQueue.cs
- LexicalChunk.cs
- ListBase.cs
- List.cs
- DataGridViewRowPostPaintEventArgs.cs
- SafeThreadHandle.cs
- RadioButtonDesigner.cs
- PrincipalPermissionMode.cs
- TextSerializer.cs
- StylusPointCollection.cs
- CharacterBuffer.cs
- WSDualHttpBinding.cs
- SecurityKeyIdentifier.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- SchemaNames.cs
- DropDownList.cs
- PlatformNotSupportedException.cs
- RegexStringValidatorAttribute.cs
- IPAddress.cs
- HttpPostedFile.cs
- MetadataItemEmitter.cs
- DataServiceProcessingPipelineEventArgs.cs
- GlobalizationSection.cs
- QueryNode.cs