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
- WorkflowHostingEndpoint.cs
- CodeGen.cs
- XamlSerializationHelper.cs
- Speller.cs
- ListControlConvertEventArgs.cs
- TextServicesCompartmentContext.cs
- HandledMouseEvent.cs
- MetafileHeader.cs
- ButtonChrome.cs
- CommandTreeTypeHelper.cs
- dsa.cs
- CodeGenerator.cs
- InputBindingCollection.cs
- GenericIdentity.cs
- InternalConfigEventArgs.cs
- WebPartConnectionsCancelEventArgs.cs
- WebResponse.cs
- TransportConfigurationTypeElement.cs
- PtsPage.cs
- BorderGapMaskConverter.cs
- SqlProviderServices.cs
- CodePageEncoding.cs
- DataMember.cs
- WeakReferenceList.cs
- PageSettings.cs
- XmlElementAttributes.cs
- WebPartVerb.cs
- CustomAttributeBuilder.cs
- DesignBindingPicker.cs
- ListViewInsertionMark.cs
- BufferBuilder.cs
- CollectionContainer.cs
- WebServiceFaultDesigner.cs
- MultiBinding.cs
- NullableDoubleSumAggregationOperator.cs
- HttpRawResponse.cs
- Material.cs
- SpeechRecognizer.cs
- TextMarkerSource.cs
- XPathDocumentNavigator.cs
- DrawListViewColumnHeaderEventArgs.cs
- ModuleConfigurationInfo.cs
- DataGridViewRowPrePaintEventArgs.cs
- XmlAggregates.cs
- BoundsDrawingContextWalker.cs
- OleDbConnectionFactory.cs
- OutputCacheSettingsSection.cs
- DataGridViewLinkColumn.cs
- RewritingValidator.cs
- MaskInputRejectedEventArgs.cs
- TemplateAction.cs
- CharacterString.cs
- EntityDataSourceColumn.cs
- CodeBinaryOperatorExpression.cs
- EventLogPermissionEntry.cs
- VideoDrawing.cs
- ConfigurationManagerHelper.cs
- PageSettings.cs
- EntityDataSourceDataSelectionPanel.cs
- TemplateBuilder.cs
- Timer.cs
- PipelineComponent.cs
- Visual.cs
- OleDbParameter.cs
- PackageStore.cs
- GeneratedContractType.cs
- FastEncoder.cs
- WebPartActionVerb.cs
- DateTimeValueSerializerContext.cs
- EncoderNLS.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- EndpointDesigner.cs
- BamlCollectionHolder.cs
- SpotLight.cs
- MemberDescriptor.cs
- LabelDesigner.cs
- ProvidePropertyAttribute.cs
- RichTextBox.cs
- CompilationLock.cs
- HttpCookie.cs
- DataSourceCache.cs
- AppDomainProtocolHandler.cs
- UnsettableComboBox.cs
- Ray3DHitTestResult.cs
- TextProperties.cs
- XmlSchemaComplexContentRestriction.cs
- TypeSystem.cs
- ValidatingReaderNodeData.cs
- GenericIdentity.cs
- CheckBox.cs
- InsufficientExecutionStackException.cs
- SQLDecimalStorage.cs
- UInt64.cs
- GradientStopCollection.cs
- FormView.cs
- TypefaceMap.cs
- SimpleBitVector32.cs
- EntityDataSourceValidationException.cs
- AnyAllSearchOperator.cs
- HelloOperationCD1AsyncResult.cs