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
- EventLog.cs
- InputScopeConverter.cs
- UInt32Storage.cs
- DataTableCollection.cs
- Int32KeyFrameCollection.cs
- SqlNodeAnnotation.cs
- GlyphShapingProperties.cs
- RecommendedAsConfigurableAttribute.cs
- StagingAreaInputItem.cs
- ResourceDefaultValueAttribute.cs
- NavigationProgressEventArgs.cs
- DeploymentSection.cs
- ConfigsHelper.cs
- HeaderElement.cs
- InstanceDataCollectionCollection.cs
- Transform.cs
- WebPartDisplayModeCollection.cs
- Avt.cs
- PluralizationServiceUtil.cs
- TextBoxView.cs
- SrgsElement.cs
- ParameterCollection.cs
- WebExceptionStatus.cs
- ProcessModelInfo.cs
- contentDescriptor.cs
- HttpRequestCacheValidator.cs
- FormatException.cs
- Rect.cs
- wgx_sdk_version.cs
- WebResourceAttribute.cs
- WebControlParameterProxy.cs
- PeerCredentialElement.cs
- WorkflowMarkupSerializationManager.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DrawItemEvent.cs
- ArrayElementGridEntry.cs
- documentsequencetextview.cs
- ListViewCancelEventArgs.cs
- UpdatePanelTriggerCollection.cs
- AliasGenerator.cs
- DataBinding.cs
- WebBrowserSiteBase.cs
- DynamicMethod.cs
- ControlBindingsConverter.cs
- Parameter.cs
- nulltextnavigator.cs
- RowToParametersTransformer.cs
- Unit.cs
- PKCS1MaskGenerationMethod.cs
- IndexerHelper.cs
- SoapIgnoreAttribute.cs
- XmlWriter.cs
- Tuple.cs
- DispatcherProcessingDisabled.cs
- VectorCollectionConverter.cs
- ProxyFragment.cs
- EntityTypeBase.cs
- Completion.cs
- XmlSerializableWriter.cs
- EncoderNLS.cs
- TemplateControlBuildProvider.cs
- ToolStrip.cs
- TemplateContent.cs
- OracleBFile.cs
- MediaEntryAttribute.cs
- SafeReversePInvokeHandle.cs
- BooleanExpr.cs
- ListViewHitTestInfo.cs
- RectangleHotSpot.cs
- CatalogPartChrome.cs
- _Win32.cs
- HttpModulesSection.cs
- MenuItemCollection.cs
- FileLogRecordHeader.cs
- TypeName.cs
- RefreshResponseInfo.cs
- ObjectConverter.cs
- ElapsedEventArgs.cs
- Content.cs
- TagNameToTypeMapper.cs
- _FixedSizeReader.cs
- DataGridViewDataConnection.cs
- ZipIOExtraField.cs
- HtmlInputText.cs
- TypedServiceChannelBuilder.cs
- DataGridViewColumnStateChangedEventArgs.cs
- FixedSOMPageElement.cs
- InvalidPropValue.cs
- AppSettingsReader.cs
- MethodBody.cs
- BamlRecords.cs
- Logging.cs
- Certificate.cs
- handlecollector.cs
- FixedSOMSemanticBox.cs
- SelectionChangedEventArgs.cs
- Duration.cs
- XmlSchemaSet.cs
- XmlSortKey.cs
- Monitor.cs