Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ConnectorDragDropGlyph.cs / 1305376 / ConnectorDragDropGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ConnectorDragDropGlyph internal sealed class ConnectorDragDropGlyph : DesignerGlyph { private int connectorIndex = 0; private Point glyphPoint = Point.Empty; public ConnectorDragDropGlyph(int connectorIndex, Point connectorCenter) { this.connectorIndex = connectorIndex; AmbientTheme ambientTheme = WorkflowTheme.CurrentTheme.AmbientTheme; this.glyphPoint = new Point(connectorCenter.X - ambientTheme.DropIndicatorSize.Width / 2, connectorCenter.Y - ambientTheme.DropIndicatorSize.Height / 2); } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { return new Rectangle(this.glyphPoint, WorkflowTheme.CurrentTheme.AmbientTheme.DropIndicatorSize); } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.DropIndicatorImage, GetBounds(designer, activated), DesignerContentAlignment.Fill); } public override int Priority { get { return DesignerGlyph.ConnectorDragDropPriority; } } } #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 ConnectorDragDropGlyph internal sealed class ConnectorDragDropGlyph : DesignerGlyph { private int connectorIndex = 0; private Point glyphPoint = Point.Empty; public ConnectorDragDropGlyph(int connectorIndex, Point connectorCenter) { this.connectorIndex = connectorIndex; AmbientTheme ambientTheme = WorkflowTheme.CurrentTheme.AmbientTheme; this.glyphPoint = new Point(connectorCenter.X - ambientTheme.DropIndicatorSize.Width / 2, connectorCenter.Y - ambientTheme.DropIndicatorSize.Height / 2); } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { return new Rectangle(this.glyphPoint, WorkflowTheme.CurrentTheme.AmbientTheme.DropIndicatorSize); } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.DropIndicatorImage, GetBounds(designer, activated), DesignerContentAlignment.Fill); } public override int Priority { get { return DesignerGlyph.ConnectorDragDropPriority; } } } #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
- COM2PropertyDescriptor.cs
- GeneralTransform2DTo3D.cs
- Models.cs
- XslTransform.cs
- DictionaryEntry.cs
- CodeTypeConstructor.cs
- UrlPropertyAttribute.cs
- ReservationNotFoundException.cs
- ByeOperation11AsyncResult.cs
- IdentityReference.cs
- Cursors.cs
- BooleanFunctions.cs
- nulltextcontainer.cs
- TextBlock.cs
- ConstructorNeedsTagAttribute.cs
- UrlAuthorizationModule.cs
- RegexBoyerMoore.cs
- ScriptHandlerFactory.cs
- EntityUtil.cs
- WSIdentityFaultException.cs
- SmtpDigestAuthenticationModule.cs
- ValueSerializerAttribute.cs
- BaseHashHelper.cs
- MetadataUtil.cs
- MediaElement.cs
- XmlCodeExporter.cs
- WindowsSpinner.cs
- AssemblySettingAttributes.cs
- CrossContextChannel.cs
- Journal.cs
- IPEndPoint.cs
- FormsAuthenticationEventArgs.cs
- SafeRsaProviderHandle.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- AssemblyHash.cs
- SoapSchemaImporter.cs
- InstanceLockedException.cs
- ViewBox.cs
- SynchronizedDispatch.cs
- XmlSerializerOperationFormatter.cs
- HyperLinkField.cs
- WpfSharedXamlSchemaContext.cs
- CodeSnippetTypeMember.cs
- DynamicPropertyReader.cs
- SafeLibraryHandle.cs
- ClientSettingsStore.cs
- BaseCollection.cs
- StreamAsIStream.cs
- PropertyGridEditorPart.cs
- EntitySetBase.cs
- CacheChildrenQuery.cs
- PageRequestManager.cs
- TerminatorSinks.cs
- IisNotInstalledException.cs
- ObjectStorage.cs
- TriggerBase.cs
- TypeToken.cs
- ExecutedRoutedEventArgs.cs
- GridViewRowPresenterBase.cs
- RegexTree.cs
- TransactionChannelFaultConverter.cs
- GcHandle.cs
- TextTreeText.cs
- ChtmlCommandAdapter.cs
- MenuItemBinding.cs
- IOException.cs
- ScrollBar.cs
- DataGridTemplateColumn.cs
- GradientSpreadMethodValidation.cs
- UniqueIdentifierService.cs
- TraceInternal.cs
- PeerEndPoint.cs
- ClientConfigPaths.cs
- URLMembershipCondition.cs
- ExecutionContext.cs
- XmlIlGenerator.cs
- BrowsableAttribute.cs
- VerificationAttribute.cs
- ListSourceHelper.cs
- InternalSafeNativeMethods.cs
- ActivityTypeCodeDomSerializer.cs
- LeftCellWrapper.cs
- PasswordDeriveBytes.cs
- HelloOperationCD1AsyncResult.cs
- SmtpLoginAuthenticationModule.cs
- SQLCharsStorage.cs
- DefaultPrintController.cs
- ToolStripItemCollection.cs
- IISMapPath.cs
- SaveFileDialog.cs
- UnsafeNativeMethods.cs
- ObjectViewQueryResultData.cs
- CheckBoxStandardAdapter.cs
- SQLDecimalStorage.cs
- LogWriteRestartAreaAsyncResult.cs
- EntityReference.cs
- BindingWorker.cs
- HtmlValidationSummaryAdapter.cs
- XmlElementAttributes.cs
- RuntimeConfigurationRecord.cs