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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigurationPropertyAttribute.cs
- XappLauncher.cs
- RuleElement.cs
- SocketPermission.cs
- WebPartEditorApplyVerb.cs
- MethodCallTranslator.cs
- DirectoryObjectSecurity.cs
- DirectionalLight.cs
- CorrelationScope.cs
- StateDesigner.Layouts.cs
- SqlDataSourceCache.cs
- NamedPipeConnectionPool.cs
- IconConverter.cs
- FileChangeNotifier.cs
- ObjectDataSourceMethodEventArgs.cs
- TcpProcessProtocolHandler.cs
- RowUpdatedEventArgs.cs
- safex509handles.cs
- ConnectivityStatus.cs
- CriticalFinalizerObject.cs
- BaseServiceProvider.cs
- WindowsToolbarItemAsMenuItem.cs
- SystemColorTracker.cs
- XPathSelfQuery.cs
- ObjectPropertyMapping.cs
- DictionaryContent.cs
- ProviderUtil.cs
- MessageEnumerator.cs
- FunctionDefinition.cs
- ChangePasswordDesigner.cs
- AnnotationComponentManager.cs
- FormClosedEvent.cs
- Knowncolors.cs
- EditorZoneBase.cs
- BufferedReceiveManager.cs
- PageStatePersister.cs
- FontWeights.cs
- RelatedEnd.cs
- ViewKeyConstraint.cs
- HyperLinkColumn.cs
- DrawingVisual.cs
- ObjectStateManagerMetadata.cs
- WpfPayload.cs
- CacheMemory.cs
- StringComparer.cs
- FastPropertyAccessor.cs
- XamlRtfConverter.cs
- SoapReflectionImporter.cs
- DESCryptoServiceProvider.cs
- ProfileSection.cs
- RuleCache.cs
- KeyPressEvent.cs
- UnionCodeGroup.cs
- AutomationElement.cs
- FunctionOverloadResolver.cs
- PolicyLevel.cs
- NumberAction.cs
- ObjectRef.cs
- TableCell.cs
- UnicastIPAddressInformationCollection.cs
- TransactionManager.cs
- Publisher.cs
- AttributeCollection.cs
- PerformanceCounterPermissionEntry.cs
- DetailsViewInsertEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- StylusPointPropertyInfoDefaults.cs
- BitStack.cs
- WinInetCache.cs
- InstanceHandleReference.cs
- BulletChrome.cs
- WebConfigurationHost.cs
- InkPresenterAutomationPeer.cs
- CorrelationService.cs
- ToolboxControl.cs
- WmfPlaceableFileHeader.cs
- FormsAuthentication.cs
- DebugHandleTracker.cs
- ServiceOperation.cs
- SqlWriter.cs
- ServicePointManagerElement.cs
- DbConnectionPoolGroup.cs
- ArraySortHelper.cs
- EventDriven.cs
- RegularExpressionValidator.cs
- HijriCalendar.cs
- IFlowDocumentViewer.cs
- TextDecoration.cs
- UserInitiatedNavigationPermission.cs
- KnownTypesProvider.cs
- LogPolicy.cs
- ObjectListDesigner.cs
- PenContexts.cs
- RSAOAEPKeyExchangeFormatter.cs
- Utils.cs
- InvocationExpression.cs
- ToggleButtonAutomationPeer.cs
- CmsInterop.cs
- ping.cs
- GreenMethods.cs