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
- XomlDesignerLoader.cs
- OleDbRowUpdatingEvent.cs
- FormsAuthentication.cs
- SHA384.cs
- XmlQueryCardinality.cs
- XmlDocumentSchema.cs
- ProviderException.cs
- WithStatement.cs
- Attributes.cs
- CodeFieldReferenceExpression.cs
- CurrentChangingEventManager.cs
- XmlSchemaSimpleContent.cs
- ETagAttribute.cs
- ProcessHostServerConfig.cs
- LineBreak.cs
- TextEndOfParagraph.cs
- PrimitiveSchema.cs
- sqlpipe.cs
- COM2EnumConverter.cs
- ParentQuery.cs
- ParameterCollectionEditor.cs
- IndividualDeviceConfig.cs
- TableHeaderCell.cs
- CodeTypeOfExpression.cs
- Int16KeyFrameCollection.cs
- MLangCodePageEncoding.cs
- WindowsListViewGroup.cs
- EventWaitHandleSecurity.cs
- MimeObjectFactory.cs
- IndexedEnumerable.cs
- WebPartDeleteVerb.cs
- GlyphsSerializer.cs
- DBCommandBuilder.cs
- DataReaderContainer.cs
- ContentType.cs
- SemanticResultValue.cs
- sqlstateclientmanager.cs
- UIElementIsland.cs
- DataObjectMethodAttribute.cs
- ToolStripHighContrastRenderer.cs
- PostBackOptions.cs
- CodeExporter.cs
- ListenerSessionConnectionReader.cs
- SafeNativeMethods.cs
- Animatable.cs
- ExpressionBinding.cs
- DeviceFiltersSection.cs
- ContainerCodeDomSerializer.cs
- StringComparer.cs
- securitycriticaldataformultiplegetandset.cs
- TextModifierScope.cs
- GenericAuthenticationEventArgs.cs
- securitycriticaldataClass.cs
- TemplatedMailWebEventProvider.cs
- XsdValidatingReader.cs
- MarshalDirectiveException.cs
- CancellationScope.cs
- FormViewCommandEventArgs.cs
- PackagePartCollection.cs
- XamlSerializerUtil.cs
- ModelToObjectValueConverter.cs
- SqlFacetAttribute.cs
- ControlIdConverter.cs
- Attribute.cs
- PropertyMetadata.cs
- EventDescriptorCollection.cs
- DataControlFieldCell.cs
- Geometry.cs
- MediaPlayerState.cs
- EventSinkHelperWriter.cs
- MediaScriptCommandRoutedEventArgs.cs
- HttpListener.cs
- StringReader.cs
- NamespaceCollection.cs
- RtType.cs
- BuildProviderCollection.cs
- GetMemberBinder.cs
- SystemFonts.cs
- TabletCollection.cs
- XmlDataSourceNodeDescriptor.cs
- ArcSegment.cs
- XmlNodeChangedEventArgs.cs
- MethodToken.cs
- XslNumber.cs
- InfoCardArgumentException.cs
- ConfigXmlReader.cs
- HostedBindingBehavior.cs
- PowerStatus.cs
- FontNameConverter.cs
- Brush.cs
- DataGridViewDesigner.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SynchronizedDispatch.cs
- ChannelHandler.cs
- ProxyAttribute.cs
- VectorCollectionConverter.cs
- PagerSettings.cs
- ByteAnimationUsingKeyFrames.cs
- LineGeometry.cs
- Line.cs