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
- RadioButtonList.cs
- relpropertyhelper.cs
- WmlCommandAdapter.cs
- GroupAggregateExpr.cs
- SchemaTableOptionalColumn.cs
- SizeFConverter.cs
- ClientClassGenerator.cs
- MarkupProperty.cs
- ScopelessEnumAttribute.cs
- RelativeSource.cs
- TextCollapsingProperties.cs
- BamlTreeUpdater.cs
- EventMemberCodeDomSerializer.cs
- CacheHelper.cs
- CustomAttributeBuilder.cs
- TypeNameParser.cs
- DeploymentExceptionMapper.cs
- ThreadStateException.cs
- ResourceDisplayNameAttribute.cs
- BooleanSwitch.cs
- SqlProfileProvider.cs
- OdbcConnectionString.cs
- SpeechAudioFormatInfo.cs
- HMACSHA512.cs
- CustomWebEventKey.cs
- MetafileHeaderWmf.cs
- OdbcEnvironmentHandle.cs
- Visitor.cs
- ConnectionManagementElement.cs
- DataGridItem.cs
- HeaderedContentControl.cs
- OracleColumn.cs
- SByte.cs
- GetWinFXPath.cs
- Helpers.cs
- XmlChildEnumerator.cs
- XmlSchemaExternal.cs
- TemplateBindingExtension.cs
- AccessDataSource.cs
- LinkArea.cs
- LicenseException.cs
- LiteralText.cs
- TokenizerHelper.cs
- IQueryable.cs
- WebPartManagerInternals.cs
- WebPartConnectionsCloseVerb.cs
- OperatingSystem.cs
- StringValueConverter.cs
- ConfigXmlDocument.cs
- ImageAutomationPeer.cs
- NonClientArea.cs
- Unit.cs
- ToolStripSettings.cs
- IDQuery.cs
- ImportStoreException.cs
- PageTheme.cs
- XmlWrappingReader.cs
- Model3DGroup.cs
- ContainerVisual.cs
- XslTransform.cs
- SpecularMaterial.cs
- TypeBuilderInstantiation.cs
- Options.cs
- ArcSegment.cs
- NameValueSectionHandler.cs
- InvalidEnumArgumentException.cs
- ValidatorCollection.cs
- HttpProfileBase.cs
- PagerStyle.cs
- XamlSerializer.cs
- CodeExporter.cs
- HierarchicalDataBoundControlAdapter.cs
- CompilerScopeManager.cs
- SettingsContext.cs
- PrintingPermissionAttribute.cs
- SmiRecordBuffer.cs
- TrustLevel.cs
- MoveSizeWinEventHandler.cs
- RegistryPermission.cs
- FileLevelControlBuilderAttribute.cs
- MappingModelBuildProvider.cs
- RepeaterItemCollection.cs
- ImportDesigner.xaml.cs
- WebPartVerbsEventArgs.cs
- LocationSectionRecord.cs
- DefaultTextStoreTextComposition.cs
- TimeStampChecker.cs
- WrappedKeySecurityTokenParameters.cs
- UserPersonalizationStateInfo.cs
- EventPropertyMap.cs
- Semaphore.cs
- Selection.cs
- PingReply.cs
- RenderingBiasValidation.cs
- TextureBrush.cs
- XmlRawWriter.cs
- ColumnMapTranslator.cs
- GlyphRun.cs
- WindowsPen.cs
- Paragraph.cs