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
- TextTrailingWordEllipsis.cs
- NotifyCollectionChangedEventArgs.cs
- SecurityRuntime.cs
- adornercollection.cs
- Serializer.cs
- SortDescriptionCollection.cs
- EmbeddedObject.cs
- CompilerInfo.cs
- EventLogPermissionEntryCollection.cs
- BitmapMetadata.cs
- ListViewGroup.cs
- TabPage.cs
- PaperSize.cs
- AccessibilityHelperForVista.cs
- SQLDecimal.cs
- QilList.cs
- AppliedDeviceFiltersEditor.cs
- ListViewSelectEventArgs.cs
- SectionVisual.cs
- MembershipPasswordException.cs
- KeyboardDevice.cs
- webbrowsersite.cs
- BlobPersonalizationState.cs
- EndGetFileNameFromUserRequest.cs
- IDQuery.cs
- pingexception.cs
- ErrorWrapper.cs
- ITreeGenerator.cs
- HiddenField.cs
- Cursor.cs
- ProfileServiceManager.cs
- BitmapCodecInfoInternal.cs
- TargetException.cs
- SocketInformation.cs
- Operator.cs
- ServiceModelSecurityTokenRequirement.cs
- CompilerCollection.cs
- DataSourceGeneratorException.cs
- ModifierKeysValueSerializer.cs
- ArrayTypeMismatchException.cs
- StringTraceRecord.cs
- InvalidFilterCriteriaException.cs
- TableItemPattern.cs
- ApplyHostConfigurationBehavior.cs
- CapabilitiesState.cs
- SiteMapDataSource.cs
- ListViewItem.cs
- SemanticAnalyzer.cs
- UnsafeNativeMethodsTablet.cs
- ListViewInsertionMark.cs
- SEHException.cs
- AsymmetricAlgorithm.cs
- NativeMethods.cs
- GridViewEditEventArgs.cs
- HtmlInputImage.cs
- DES.cs
- DataGridViewCellStyle.cs
- TypeToken.cs
- AssemblyInfo.cs
- DataBoundControl.cs
- UIElement.cs
- AssemblyUtil.cs
- IPipelineRuntime.cs
- CodeNamespace.cs
- SHA512CryptoServiceProvider.cs
- WindowsFormsHostPropertyMap.cs
- StylusEditingBehavior.cs
- TdsRecordBufferSetter.cs
- ActiveXHost.cs
- EventItfInfo.cs
- ContextInformation.cs
- AssociationSetEnd.cs
- nulltextnavigator.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- SqlDataSourceParameterParser.cs
- embossbitmapeffect.cs
- Assign.cs
- WindowsRichEdit.cs
- PixelFormats.cs
- ForwardPositionQuery.cs
- DbProviderConfigurationHandler.cs
- ByteStream.cs
- CachingHintValidation.cs
- DataGridViewCellPaintingEventArgs.cs
- AppDomainShutdownMonitor.cs
- storepermissionattribute.cs
- Boolean.cs
- DataGridParentRows.cs
- ExpressionTable.cs
- HttpGetProtocolImporter.cs
- HtmlWindow.cs
- BaseHashHelper.cs
- DataGridViewAdvancedBorderStyle.cs
- StorageSetMapping.cs
- VarRefManager.cs
- Timer.cs
- ResolveNameEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- DNS.cs
- PassportAuthenticationEventArgs.cs