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
- StringSource.cs
- SchemaEntity.cs
- MimeFormatExtensions.cs
- ZipIOBlockManager.cs
- CounterSampleCalculator.cs
- ToolStripPanel.cs
- ConfigurationFileMap.cs
- KeyValueConfigurationCollection.cs
- SafeProcessHandle.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CellConstantDomain.cs
- XPathAncestorIterator.cs
- CancellableEnumerable.cs
- QilList.cs
- ListenerConnectionDemuxer.cs
- ScopelessEnumAttribute.cs
- FileUpload.cs
- StatusBarItem.cs
- TypeConverterValueSerializer.cs
- EncoderNLS.cs
- GradientBrush.cs
- ModifierKeysValueSerializer.cs
- bidPrivateBase.cs
- SafeRightsManagementQueryHandle.cs
- TypeUsage.cs
- DocumentScope.cs
- Validator.cs
- EntityContainerRelationshipSet.cs
- HelloOperationCD1AsyncResult.cs
- X509Utils.cs
- SelfIssuedAuthAsymmetricKey.cs
- TreeViewItemAutomationPeer.cs
- ListViewEditEventArgs.cs
- SqlGenerator.cs
- VectorAnimationBase.cs
- EffectiveValueEntry.cs
- Transform.cs
- DefaultExpression.cs
- TextWriterTraceListener.cs
- TextElement.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- TextServicesHost.cs
- BStrWrapper.cs
- Brush.cs
- EntityTransaction.cs
- SqlFunctionAttribute.cs
- CounterCreationData.cs
- LazyInitializer.cs
- FragmentNavigationEventArgs.cs
- XmlSchemaSimpleType.cs
- FixedStringLookup.cs
- EncoderBestFitFallback.cs
- ParentQuery.cs
- ReferenceCountedObject.cs
- ExecutorLocksHeldException.cs
- ConfigurationValidatorAttribute.cs
- HttpRequestWrapper.cs
- LogPolicy.cs
- SectionVisual.cs
- ExtensibleClassFactory.cs
- ReversePositionQuery.cs
- CompositeFontInfo.cs
- TypeInformation.cs
- OLEDB_Enum.cs
- DebugView.cs
- WindowsBrush.cs
- VirtualPath.cs
- CopyNamespacesAction.cs
- TableLayoutColumnStyleCollection.cs
- AssemblyHash.cs
- SelectionService.cs
- SafeBitVector32.cs
- StrokeCollection.cs
- Expander.cs
- BindStream.cs
- UnsettableComboBox.cs
- DetailsView.cs
- ObjectConverter.cs
- TaiwanLunisolarCalendar.cs
- RealProxy.cs
- DataListCommandEventArgs.cs
- AsyncOperationContext.cs
- TextParagraphProperties.cs
- ConstraintEnumerator.cs
- Clipboard.cs
- SerializationException.cs
- RuleValidation.cs
- VariableQuery.cs
- ListenDesigner.cs
- ClassHandlersStore.cs
- TreeWalker.cs
- LogSwitch.cs
- PartBasedPackageProperties.cs
- Util.cs
- SqlTrackingQuery.cs
- TaskForm.cs
- ClrPerspective.cs
- NumericUpDownAcceleration.cs
- BitSet.cs
- UIElementParagraph.cs