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
- ServiceOperationParameter.cs
- PageAdapter.cs
- GatewayDefinition.cs
- FigureParagraph.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- DefaultAssemblyResolver.cs
- RewritingPass.cs
- XmlUTF8TextReader.cs
- InputLanguageEventArgs.cs
- ReaderContextStackData.cs
- HtmlUtf8RawTextWriter.cs
- WindowsIdentity.cs
- bindurihelper.cs
- XmlSchemaSimpleContentExtension.cs
- cookieexception.cs
- CodeTypeConstructor.cs
- MobileControlsSection.cs
- StyleCollectionEditor.cs
- QilGenerator.cs
- SystemWebCachingSectionGroup.cs
- RequestCacheValidator.cs
- DispatcherProcessingDisabled.cs
- ListChangedEventArgs.cs
- XmlWellformedWriter.cs
- ProcessHostMapPath.cs
- localization.cs
- TraceSource.cs
- Pair.cs
- TextMessageEncoder.cs
- SettingsPropertyCollection.cs
- MissingMethodException.cs
- AuthorizationSection.cs
- RenameRuleObjectDialog.Designer.cs
- BaseCollection.cs
- GiveFeedbackEventArgs.cs
- FrameworkObject.cs
- ListControlConvertEventArgs.cs
- XmlBaseWriter.cs
- GeneralTransform3DTo2D.cs
- Message.cs
- EntityContainer.cs
- JsonQueryStringConverter.cs
- ConfigXmlElement.cs
- Label.cs
- HuffCodec.cs
- InputDevice.cs
- UInt32.cs
- CommandID.cs
- InvalidOleVariantTypeException.cs
- TextAction.cs
- DictionaryBase.cs
- SQLBytesStorage.cs
- ObjectHandle.cs
- metadatamappinghashervisitor.cs
- ExtensionQuery.cs
- DateTimeOffset.cs
- DataGridViewCellStateChangedEventArgs.cs
- DataSysAttribute.cs
- KeyToListMap.cs
- future.cs
- ImageBrush.cs
- WebHttpSecurityModeHelper.cs
- FontNamesConverter.cs
- CompositeActivityDesigner.cs
- AnnotationComponentManager.cs
- Item.cs
- WeakReadOnlyCollection.cs
- SessionPageStatePersister.cs
- ListBindableAttribute.cs
- Line.cs
- HostedHttpTransportManager.cs
- LazyTextWriterCreator.cs
- Simplifier.cs
- ValueConversionAttribute.cs
- SubstitutionList.cs
- SqlCharStream.cs
- CryptographicAttribute.cs
- EndpointNameMessageFilter.cs
- Scene3D.cs
- OracleTimeSpan.cs
- XmlQualifiedNameTest.cs
- DoubleConverter.cs
- ComplexPropertyEntry.cs
- KeyPullup.cs
- XmlSerializationWriter.cs
- LinkAreaEditor.cs
- Semaphore.cs
- TypeNameConverter.cs
- RemotingConfigParser.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- arclist.cs
- TransportOutputChannel.cs
- CheckBoxPopupAdapter.cs
- ProjectionCamera.cs
- XPathArrayIterator.cs
- UnionCqlBlock.cs
- CompensationToken.cs
- COM2TypeInfoProcessor.cs
- ApplicationBuildProvider.cs
- MsmqBindingBase.cs