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
- ExpressionEditorAttribute.cs
- Missing.cs
- KeyValueSerializer.cs
- MasterPage.cs
- DataSourceView.cs
- DataControlPagerLinkButton.cs
- WebPartCollection.cs
- HandleValueEditor.cs
- SubpageParaClient.cs
- ActivityMarkupSerializationProvider.cs
- BuildResult.cs
- XmlSchemaObjectCollection.cs
- Point3DCollectionConverter.cs
- CompilationLock.cs
- ConnectionStringsExpressionBuilder.cs
- HttpModuleCollection.cs
- PropertyInformation.cs
- PermissionSetEnumerator.cs
- ThicknessConverter.cs
- RawMouseInputReport.cs
- Size.cs
- WebSysDescriptionAttribute.cs
- MatcherBuilder.cs
- IPEndPoint.cs
- FormViewCommandEventArgs.cs
- DesignerObjectListAdapter.cs
- ExpressionBuilderCollection.cs
- BitmapDecoder.cs
- SQLInt64Storage.cs
- TcpStreams.cs
- OleDbConnection.cs
- SoapReflectionImporter.cs
- SafeSecurityHandles.cs
- DataGridAutoFormatDialog.cs
- CodeAttributeArgument.cs
- XmlSchemaValidationException.cs
- SecurityStandardsManager.cs
- XPathDocumentBuilder.cs
- GridViewColumnCollectionChangedEventArgs.cs
- Renderer.cs
- ObjectDataSourceEventArgs.cs
- BitmapEffectDrawing.cs
- RequestNavigateEventArgs.cs
- EnumerableRowCollection.cs
- PropertySegmentSerializer.cs
- ProcessProtocolHandler.cs
- WebPartHeaderCloseVerb.cs
- SettingsPropertyIsReadOnlyException.cs
- Crc32Helper.cs
- ColumnWidthChangingEvent.cs
- TdsParserHelperClasses.cs
- WebPartCatalogCloseVerb.cs
- InvalidEnumArgumentException.cs
- GeneralTransformCollection.cs
- IdnElement.cs
- Span.cs
- URLString.cs
- CodeThrowExceptionStatement.cs
- ExpandSegment.cs
- InputLanguageProfileNotifySink.cs
- EdmType.cs
- DecoderExceptionFallback.cs
- QueryResults.cs
- JapaneseCalendar.cs
- ContractMapping.cs
- ResXResourceReader.cs
- ResolveCriteriaApril2005.cs
- WebPartRestoreVerb.cs
- storepermission.cs
- StructuralObject.cs
- SpecialFolderEnumConverter.cs
- LogManagementAsyncResult.cs
- TextFormatterContext.cs
- KnownTypesHelper.cs
- Geometry.cs
- HtmlContainerControl.cs
- BaseUriHelper.cs
- TabControlCancelEvent.cs
- ImageDrawing.cs
- BindingSource.cs
- GeometryModel3D.cs
- FillErrorEventArgs.cs
- UInt16.cs
- ProfilePropertySettingsCollection.cs
- TransformedBitmap.cs
- OdbcParameter.cs
- SspiSecurityTokenProvider.cs
- LinkedResource.cs
- TextServicesDisplayAttribute.cs
- View.cs
- Stream.cs
- ImageMap.cs
- Overlapped.cs
- HttpResponseWrapper.cs
- TextSpanModifier.cs
- XmlReaderDelegator.cs
- TitleStyle.cs
- PropertyInformation.cs
- ClientSponsor.cs
- DataServiceExpressionVisitor.cs