Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ConnectionPointGlyph.cs / 1305376 / ConnectionPointGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ConnectionPointGlyph internal sealed class ConnectionPointGlyph : DesignerGlyph { private ConnectionPoint connectionPoint; internal ConnectionPointGlyph(ConnectionPoint connectionPoint) { this.connectionPoint = connectionPoint; } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { if (designer.Activity != null && designer.Activity.Site != null && this.connectionPoint != null) { WorkflowView workflowView = designer.Activity.Site.GetService(typeof(WorkflowView)) as WorkflowView; Rectangle viewPort = (workflowView != null) ? workflowView.ViewPortRectangle : Rectangle.Empty; Rectangle clipRectangle = (designer.ParentDesigner != null) ? designer.ParentDesigner.Bounds : designer.Bounds; ConnectionManager connectionManager = designer.Activity.Site.GetService(typeof(ConnectionManager)) as ConnectionManager; ActivityDesignerPaintEventArgs e = new ActivityDesignerPaintEventArgs(graphics, clipRectangle, viewPort, designer.DesignerTheme); bool drawHilited = (connectionManager != null && this.connectionPoint.Equals(connectionManager.SnappedConnectionPoint)); this.connectionPoint.OnPaint(e, drawHilited); } } public override int Priority { get { return DesignerGlyph.ConnectionPointPriority; } } } #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 ConnectionPointGlyph internal sealed class ConnectionPointGlyph : DesignerGlyph { private ConnectionPoint connectionPoint; internal ConnectionPointGlyph(ConnectionPoint connectionPoint) { this.connectionPoint = connectionPoint; } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { if (designer.Activity != null && designer.Activity.Site != null && this.connectionPoint != null) { WorkflowView workflowView = designer.Activity.Site.GetService(typeof(WorkflowView)) as WorkflowView; Rectangle viewPort = (workflowView != null) ? workflowView.ViewPortRectangle : Rectangle.Empty; Rectangle clipRectangle = (designer.ParentDesigner != null) ? designer.ParentDesigner.Bounds : designer.Bounds; ConnectionManager connectionManager = designer.Activity.Site.GetService(typeof(ConnectionManager)) as ConnectionManager; ActivityDesignerPaintEventArgs e = new ActivityDesignerPaintEventArgs(graphics, clipRectangle, viewPort, designer.DesignerTheme); bool drawHilited = (connectionManager != null && this.connectionPoint.Equals(connectionManager.SnappedConnectionPoint)); this.connectionPoint.OnPaint(e, drawHilited); } } public override int Priority { get { return DesignerGlyph.ConnectionPointPriority; } } } #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
- FileSystemInfo.cs
- CompoundFileDeflateTransform.cs
- KerberosTokenFactoryCredential.cs
- AttributeEmitter.cs
- PolygonHotSpot.cs
- MenuCommand.cs
- TemplatedMailWebEventProvider.cs
- WasHttpHandlersInstallComponent.cs
- EditableRegion.cs
- FindProgressChangedEventArgs.cs
- TextRangeEditTables.cs
- XmlSchemaInfo.cs
- XmlQueryTypeFactory.cs
- Utilities.cs
- TextFormatter.cs
- sqlinternaltransaction.cs
- InheritanceService.cs
- ProxyAttribute.cs
- WinEventQueueItem.cs
- ColorConvertedBitmap.cs
- XmlExpressionDumper.cs
- FloaterBaseParagraph.cs
- SR.cs
- PtsCache.cs
- Substitution.cs
- MergeFilterQuery.cs
- SerializationFieldInfo.cs
- DataGridRelationshipRow.cs
- ResolveDuplexCD1AsyncResult.cs
- ComponentEditorForm.cs
- FormParameter.cs
- SecurityIdentifierConverter.cs
- NativeWindow.cs
- DataGridViewComboBoxColumn.cs
- SettingsSection.cs
- HttpPostProtocolReflector.cs
- ToolStripTextBox.cs
- CapabilitiesPattern.cs
- SchemaSetCompiler.cs
- PocoPropertyAccessorStrategy.cs
- DES.cs
- TextBlockAutomationPeer.cs
- BamlLocalizabilityResolver.cs
- HtmlInputPassword.cs
- FixedFlowMap.cs
- FloaterParagraph.cs
- ReplyChannelBinder.cs
- DataObjectFieldAttribute.cs
- OdbcRowUpdatingEvent.cs
- brushes.cs
- TypeListConverter.cs
- ClientUIRequest.cs
- SafeFileMappingHandle.cs
- DataGridView.cs
- ParameterExpression.cs
- PointCollectionConverter.cs
- CompoundFileDeflateTransform.cs
- SortDescriptionCollection.cs
- DuplexChannel.cs
- DataGridViewCellCollection.cs
- FixedNode.cs
- RuntimeHandles.cs
- HtmlForm.cs
- TiffBitmapEncoder.cs
- DynamicPropertyHolder.cs
- CommandHelpers.cs
- MetadataArtifactLoaderFile.cs
- Win32Native.cs
- PassportPrincipal.cs
- MetadataProperty.cs
- SortExpressionBuilder.cs
- ConfigurationPermission.cs
- DbParameterHelper.cs
- EntityDataSourceStatementEditor.cs
- AssociationType.cs
- WebZoneDesigner.cs
- PathFigureCollectionValueSerializer.cs
- PolicyUnit.cs
- DummyDataSource.cs
- GreenMethods.cs
- PageStatePersister.cs
- ProfilePropertySettingsCollection.cs
- AttachmentCollection.cs
- messageonlyhwndwrapper.cs
- EmbossBitmapEffect.cs
- RequestQueue.cs
- WindowsFormsSynchronizationContext.cs
- RsaSecurityToken.cs
- GridViewSortEventArgs.cs
- TranslateTransform3D.cs
- DataViewManagerListItemTypeDescriptor.cs
- GenerateHelper.cs
- HttpServerVarsCollection.cs
- IndexExpression.cs
- FontFamilyConverter.cs
- DbSetClause.cs
- HtmlEncodedRawTextWriter.cs
- EventLogPermissionEntry.cs
- Padding.cs
- ConnectionInterfaceCollection.cs