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
- DetectEofStream.cs
- XmlProcessingInstruction.cs
- InternalConfigConfigurationFactory.cs
- StylusOverProperty.cs
- SystemResourceKey.cs
- ResourceContainer.cs
- AbsoluteQuery.cs
- Timer.cs
- CaretElement.cs
- EUCJPEncoding.cs
- SessionSwitchEventArgs.cs
- _NtlmClient.cs
- DataGridAutoFormat.cs
- EventManager.cs
- HtmlControlAdapter.cs
- GlyphInfoList.cs
- StrokeSerializer.cs
- FontClient.cs
- ellipse.cs
- DurationConverter.cs
- SerializableAttribute.cs
- XmlIlGenerator.cs
- TextAutomationPeer.cs
- TreeNodeMouseHoverEvent.cs
- PerformanceCounterNameAttribute.cs
- DocumentViewerAutomationPeer.cs
- FormViewRow.cs
- MissingMethodException.cs
- ServiceObjectContainer.cs
- TextViewSelectionProcessor.cs
- BinaryObjectInfo.cs
- XmlRawWriter.cs
- AnimationClock.cs
- XmlSchemaAttributeGroup.cs
- KeysConverter.cs
- PenContexts.cs
- HGlobalSafeHandle.cs
- ToReply.cs
- PrimitiveOperationFormatter.cs
- PerformanceCounterScope.cs
- followingquery.cs
- MetadataItem_Static.cs
- XmlObjectSerializerWriteContext.cs
- DataBindingValueUIHandler.cs
- SqlUtils.cs
- Quad.cs
- RoleService.cs
- DataMemberConverter.cs
- HostExecutionContextManager.cs
- ProxyWebPartConnectionCollection.cs
- UrlEncodedParameterWriter.cs
- SerializationEventsCache.cs
- MsmqHostedTransportManager.cs
- MessageVersion.cs
- XPathArrayIterator.cs
- Literal.cs
- TimersDescriptionAttribute.cs
- UIElement3DAutomationPeer.cs
- MD5.cs
- GridLength.cs
- TextTreeFixupNode.cs
- CreateSequenceResponse.cs
- IItemContainerGenerator.cs
- PageCatalogPart.cs
- ClientConfigurationHost.cs
- RequestValidator.cs
- LocalValueEnumerator.cs
- PseudoWebRequest.cs
- StorageModelBuildProvider.cs
- MemberMaps.cs
- _FtpDataStream.cs
- XmlSchemaValidator.cs
- DbProviderManifest.cs
- GeneralTransformCollection.cs
- NetworkInformationPermission.cs
- ReadOnlyTernaryTree.cs
- ForeignConstraint.cs
- ResourcePermissionBase.cs
- HashCodeCombiner.cs
- NamedPermissionSet.cs
- DataGridViewToolTip.cs
- AssemblyHash.cs
- WindowsTokenRoleProvider.cs
- DrawItemEvent.cs
- LineVisual.cs
- DiscoveryClientReferences.cs
- ElementNotAvailableException.cs
- SettingsSavedEventArgs.cs
- ScriptMethodAttribute.cs
- StyleModeStack.cs
- Matrix3DConverter.cs
- DES.cs
- ProfileServiceManager.cs
- NullRuntimeConfig.cs
- InternalTypeHelper.cs
- ResXDataNode.cs
- UnaryQueryOperator.cs
- InstanceView.cs
- GetMemberBinder.cs
- Boolean.cs