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
- CommentEmitter.cs
- MaterializeFromAtom.cs
- TimelineCollection.cs
- RootBrowserWindowProxy.cs
- CustomTypeDescriptor.cs
- TagPrefixAttribute.cs
- TimeoutException.cs
- SystemIcons.cs
- XmlUnspecifiedAttribute.cs
- BitmapCodecInfo.cs
- RawStylusInputCustomData.cs
- ImageListImage.cs
- SessionSwitchEventArgs.cs
- DesignColumn.cs
- ToolStripContentPanel.cs
- SecurityCriticalDataForSet.cs
- SocketAddress.cs
- XmlSchemaValidator.cs
- ArraySortHelper.cs
- PolicyManager.cs
- ConditionCollection.cs
- MasterPageBuildProvider.cs
- AttachedAnnotationChangedEventArgs.cs
- __Error.cs
- XmlSchemaGroupRef.cs
- WeakReferenceList.cs
- RegistryPermission.cs
- RelationshipEndCollection.cs
- StyleModeStack.cs
- TemplateComponentConnector.cs
- AsymmetricAlgorithm.cs
- Memoizer.cs
- CustomTypeDescriptor.cs
- MessageDescription.cs
- RtfNavigator.cs
- DataGridItem.cs
- SemaphoreSecurity.cs
- OleDbDataReader.cs
- DataTableMappingCollection.cs
- MaskInputRejectedEventArgs.cs
- CodeArrayIndexerExpression.cs
- ByteStack.cs
- HGlobalSafeHandle.cs
- Normalization.cs
- AesCryptoServiceProvider.cs
- ButtonBaseAdapter.cs
- WorkflowMessageEventHandler.cs
- AutomationElementCollection.cs
- FormViewModeEventArgs.cs
- DatePickerAutomationPeer.cs
- SoundPlayerAction.cs
- AnnotationDocumentPaginator.cs
- StandardCommands.cs
- Tokenizer.cs
- RepeatButtonAutomationPeer.cs
- CodePropertyReferenceExpression.cs
- SqlWebEventProvider.cs
- DbUpdateCommandTree.cs
- Table.cs
- ServiceMetadataExtension.cs
- TransformPattern.cs
- MetafileHeaderWmf.cs
- StyleModeStack.cs
- BitmapPalettes.cs
- BitmapEffectInput.cs
- DefaultSection.cs
- XmlByteStreamWriter.cs
- OptimizedTemplateContent.cs
- DataGridViewCheckBoxColumn.cs
- PlatformNotSupportedException.cs
- ConstraintStruct.cs
- WebBaseEventKeyComparer.cs
- RouteValueDictionary.cs
- SmiXetterAccessMap.cs
- Cursors.cs
- NonSerializedAttribute.cs
- AccessedThroughPropertyAttribute.cs
- DataTableClearEvent.cs
- PersonalizationState.cs
- ArgumentNullException.cs
- LiteralControl.cs
- XmlILStorageConverter.cs
- GlyphRunDrawing.cs
- BindingOperations.cs
- EndCreateSecurityTokenRequest.cs
- TargetException.cs
- ClaimTypeElement.cs
- SortExpressionBuilder.cs
- Transform.cs
- GetReadStreamResult.cs
- AccessibilityHelperForVista.cs
- ShapingEngine.cs
- ArraySubsetEnumerator.cs
- SafeFindHandle.cs
- XmlSignatureManifest.cs
- AssociationEndMember.cs
- MessageQueueTransaction.cs
- DefaultBindingPropertyAttribute.cs
- AuthenticationModuleElement.cs
- IntermediatePolicyValidator.cs