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
- XmlDataSourceView.cs
- PlatformNotSupportedException.cs
- PageCatalogPart.cs
- CheckBox.cs
- RequestResizeEvent.cs
- CodeTypeConstructor.cs
- XmlSchemaDocumentation.cs
- PointKeyFrameCollection.cs
- DataGridViewUtilities.cs
- FormatControl.cs
- FreezableOperations.cs
- ErrorTableItemStyle.cs
- UriTemplateClientFormatter.cs
- CopyAttributesAction.cs
- MemberAssignment.cs
- SrgsElementList.cs
- PropertyInformation.cs
- SupportsEventValidationAttribute.cs
- EntityContainerEmitter.cs
- DataObjectMethodAttribute.cs
- FieldAccessException.cs
- CodeAccessSecurityEngine.cs
- TypeElement.cs
- CodeAttributeArgument.cs
- ButtonChrome.cs
- CodeDOMProvider.cs
- RNGCryptoServiceProvider.cs
- DocumentCollection.cs
- Calendar.cs
- ClientConfigurationHost.cs
- odbcmetadatafactory.cs
- StyleBamlTreeBuilder.cs
- FaultDesigner.cs
- AmbientLight.cs
- ServiceDefaults.cs
- UpdatePanel.cs
- DataReaderContainer.cs
- versioninfo.cs
- DiscoveryDocumentSearchPattern.cs
- ActiveDocumentEvent.cs
- hebrewshape.cs
- SynchronizedInputHelper.cs
- DataSpaceManager.cs
- MenuItem.cs
- ComponentTray.cs
- FormParameter.cs
- TimeoutStream.cs
- DataGridViewSelectedColumnCollection.cs
- StylusDevice.cs
- TextEditorLists.cs
- MachineSettingsSection.cs
- WsiProfilesElement.cs
- SqlPersonalizationProvider.cs
- BaseTemplateBuildProvider.cs
- Attribute.cs
- SqlResolver.cs
- MULTI_QI.cs
- SQLStringStorage.cs
- StrongNameKeyPair.cs
- Executor.cs
- arabicshape.cs
- QilUnary.cs
- XamlBuildTaskServices.cs
- AttachInfo.cs
- MenuCommand.cs
- FunctionCommandText.cs
- BindableAttribute.cs
- iisPickupDirectory.cs
- LocationUpdates.cs
- OSFeature.cs
- XPathQueryGenerator.cs
- EncryptedReference.cs
- WebExceptionStatus.cs
- TraceSwitch.cs
- UrlEncodedParameterWriter.cs
- RIPEMD160Managed.cs
- ServiceHostingEnvironment.cs
- RectAnimation.cs
- FormViewModeEventArgs.cs
- UnmanagedBitmapWrapper.cs
- Timer.cs
- CodeSubDirectory.cs
- diagnosticsswitches.cs
- _SSPIWrapper.cs
- OleDbFactory.cs
- DataFormats.cs
- Pen.cs
- NativeWindow.cs
- Matrix.cs
- ClientUrlResolverWrapper.cs
- XpsDocumentEvent.cs
- MachineKeySection.cs
- PrintPreviewGraphics.cs
- NegotiateStream.cs
- GeometryHitTestResult.cs
- ButtonBaseAutomationPeer.cs
- TreeNodeClickEventArgs.cs
- EntitySqlQueryCacheKey.cs
- NamespaceListProperty.cs
- HandlerFactoryCache.cs