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
- SimpleBitVector32.cs
- RSAPKCS1SignatureDeformatter.cs
- DataTableNewRowEvent.cs
- FileNotFoundException.cs
- CalendarTable.cs
- OrCondition.cs
- ZipIOBlockManager.cs
- AccessibilityHelperForVista.cs
- ExtendedProtectionPolicyElement.cs
- SamlAudienceRestrictionCondition.cs
- ExpressionPrefixAttribute.cs
- SizeF.cs
- CodePageUtils.cs
- DataSourceXmlTextReader.cs
- Label.cs
- SystemIdentity.cs
- BinaryObjectWriter.cs
- UserControlParser.cs
- DbParameterCollectionHelper.cs
- SystemEvents.cs
- Metafile.cs
- WebSysDescriptionAttribute.cs
- ClrPerspective.cs
- CodeTypeMember.cs
- DatatypeImplementation.cs
- XmlToDatasetMap.cs
- BamlBinaryReader.cs
- DBSqlParser.cs
- EncodingFallbackAwareXmlTextWriter.cs
- ObjectDataSource.cs
- State.cs
- CngUIPolicy.cs
- cryptoapiTransform.cs
- PolicyStatement.cs
- ListViewEditEventArgs.cs
- IsolatedStorageFilePermission.cs
- DefaultConfirmation.cs
- AccessViolationException.cs
- CodeArgumentReferenceExpression.cs
- NavigationExpr.cs
- XXXInfos.cs
- ReceiveCompletedEventArgs.cs
- ItemContainerGenerator.cs
- SecurityAppliedMessage.cs
- HandleCollector.cs
- TableItemStyle.cs
- DataGridTextBoxColumn.cs
- WebDescriptionAttribute.cs
- Simplifier.cs
- XmlSerializationWriter.cs
- SuppressMessageAttribute.cs
- HTMLTextWriter.cs
- WindowsAuthenticationEventArgs.cs
- DesignerActionHeaderItem.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ValidationUtility.cs
- TerminatorSinks.cs
- ScrollChrome.cs
- ToolStripManager.cs
- DesignTimeHTMLTextWriter.cs
- XmlCollation.cs
- CompilerErrorCollection.cs
- OracleRowUpdatingEventArgs.cs
- SelectingProviderEventArgs.cs
- CheckBox.cs
- OutOfMemoryException.cs
- DataGridColumnCollection.cs
- SubclassTypeValidator.cs
- FrameSecurityDescriptor.cs
- SpellerInterop.cs
- DataGridViewComboBoxEditingControl.cs
- SHA256Managed.cs
- SettingsBase.cs
- StringStorage.cs
- WorkflowOperationFault.cs
- SizeValueSerializer.cs
- XsdCachingReader.cs
- XmlDownloadManager.cs
- HttpModulesSection.cs
- FontStretchConverter.cs
- XmlLanguage.cs
- ProfilePropertySettingsCollection.cs
- odbcmetadatafactory.cs
- SchemaNames.cs
- SafeLocalMemHandle.cs
- XmlSerializer.cs
- _AutoWebProxyScriptHelper.cs
- KeyMatchBuilder.cs
- XPathNodeIterator.cs
- DbFunctionCommandTree.cs
- AppDomainUnloadedException.cs
- AuthenticationConfig.cs
- UnsafeNativeMethods.cs
- UxThemeWrapper.cs
- mediapermission.cs
- SimpleMailWebEventProvider.cs
- HyperLinkField.cs
- ParserStreamGeometryContext.cs
- KeysConverter.cs
- sqlstateclientmanager.cs