Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / CommentGlyph.cs / 1305376 / CommentGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class CommentGlyph //Class is internal but not sealed as we dont expect the ActivityDesigner writers to supply their own //Glyph instead based on comment property comment glyph is shown //Exception: StripItemCommentGlyph public class CommentGlyph : DesignerGlyph { private static CommentGlyph defaultCommentGlyph = null; internal static CommentGlyph Default { get { if (CommentGlyph.defaultCommentGlyph == null) CommentGlyph.defaultCommentGlyph = new CommentGlyph(); return CommentGlyph.defaultCommentGlyph; } } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { if (designer == null) throw new ArgumentNullException("designer"); Rectangle bounds = designer.Bounds; bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); return bounds; } public override int Priority { get { return DesignerGlyph.CommentPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); graphics.FillRectangle(AmbientTheme.FadeBrush, bounds); graphics.FillRectangle(ambientTheme.CommentIndicatorBrush, bounds); graphics.DrawRectangle(ambientTheme.CommentIndicatorPen, bounds); } } #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 CommentGlyph //Class is internal but not sealed as we dont expect the ActivityDesigner writers to supply their own //Glyph instead based on comment property comment glyph is shown //Exception: StripItemCommentGlyph public class CommentGlyph : DesignerGlyph { private static CommentGlyph defaultCommentGlyph = null; internal static CommentGlyph Default { get { if (CommentGlyph.defaultCommentGlyph == null) CommentGlyph.defaultCommentGlyph = new CommentGlyph(); return CommentGlyph.defaultCommentGlyph; } } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { if (designer == null) throw new ArgumentNullException("designer"); Rectangle bounds = designer.Bounds; bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); return bounds; } public override int Priority { get { return DesignerGlyph.CommentPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); graphics.FillRectangle(AmbientTheme.FadeBrush, bounds); graphics.FillRectangle(ambientTheme.CommentIndicatorBrush, bounds); graphics.DrawRectangle(ambientTheme.CommentIndicatorPen, bounds); } } #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
- RootBuilder.cs
- ParserExtension.cs
- ModelPropertyImpl.cs
- StorageConditionPropertyMapping.cs
- InstanceBehavior.cs
- AnimationTimeline.cs
- BinaryNode.cs
- ActivityStatusChangeEventArgs.cs
- TextAdaptor.cs
- ZipIOExtraFieldZip64Element.cs
- ParameterBinding.cs
- HtmlElementCollection.cs
- GeneralTransform3DTo2D.cs
- HttpCookieCollection.cs
- MobileErrorInfo.cs
- EmptyControlCollection.cs
- NamespaceInfo.cs
- KeyPullup.cs
- GenericNameHandler.cs
- CodeDelegateCreateExpression.cs
- CorrelationTokenTypeConvertor.cs
- BuildManager.cs
- BindToObject.cs
- CommonProperties.cs
- DesignerToolStripControlHost.cs
- SafeFreeMibTable.cs
- Endpoint.cs
- Empty.cs
- DecimalAnimationBase.cs
- ControlEvent.cs
- RequiredFieldValidator.cs
- MaskedTextProvider.cs
- xmlsaver.cs
- AnnouncementEndpointElement.cs
- ApplicationInterop.cs
- TraceSwitch.cs
- CultureTable.cs
- OleDbErrorCollection.cs
- ResourceLoader.cs
- IISMapPath.cs
- Opcode.cs
- SQLResource.cs
- Triplet.cs
- WinFormsSecurity.cs
- HtmlControl.cs
- SerialErrors.cs
- XmlSchemaSequence.cs
- Library.cs
- CurrencyManager.cs
- IndentedWriter.cs
- MediaPlayer.cs
- SelectionUIHandler.cs
- LoginCancelEventArgs.cs
- JpegBitmapDecoder.cs
- PersonalizationDictionary.cs
- ReservationNotFoundException.cs
- HtmlTable.cs
- FrameworkContentElement.cs
- WindowsGrip.cs
- EmissiveMaterial.cs
- TdsParser.cs
- PeerCustomResolverElement.cs
- TargetInvocationException.cs
- Configuration.cs
- OdbcErrorCollection.cs
- columnmapfactory.cs
- MetafileHeaderWmf.cs
- DataTableCollection.cs
- SafeMILHandle.cs
- WorkflowService.cs
- WarningException.cs
- DataGridRowHeader.cs
- DesignerActionList.cs
- COM2ExtendedBrowsingHandler.cs
- XNodeValidator.cs
- HtmlTitle.cs
- Validator.cs
- RootBuilder.cs
- IntSecurity.cs
- ServerType.cs
- ItemsChangedEventArgs.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SystemUdpStatistics.cs
- XmlArrayItemAttribute.cs
- HashRepartitionStream.cs
- FixedMaxHeap.cs
- SessionStateContainer.cs
- ShortcutKeysEditor.cs
- WebPartTransformerAttribute.cs
- TextEditorDragDrop.cs
- ParameterSubsegment.cs
- PathGradientBrush.cs
- NGCPageContentCollectionSerializerAsync.cs
- Logging.cs
- XmlUtf8RawTextWriter.cs
- SystemWebSectionGroup.cs
- LocalizabilityAttribute.cs
- TargetException.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- WebPartDisplayMode.cs