Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / LockedActivityGlyph.cs / 1305376 / LockedActivityGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class LockedActivityGlyph //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 LockedActivityGlyph : DesignerGlyph { private static LockedActivityGlyph defaultLockedGlyph = null; internal static LockedActivityGlyph Default { get { if (LockedActivityGlyph.defaultLockedGlyph == null) LockedActivityGlyph.defaultLockedGlyph = new LockedActivityGlyph(); return LockedActivityGlyph.defaultLockedGlyph; } } public LockedActivityGlyph() { } 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.LockedGlyphPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.LockImage, bounds, DesignerContentAlignment.TopLeft); } } #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 LockedActivityGlyph //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 LockedActivityGlyph : DesignerGlyph { private static LockedActivityGlyph defaultLockedGlyph = null; internal static LockedActivityGlyph Default { get { if (LockedActivityGlyph.defaultLockedGlyph == null) LockedActivityGlyph.defaultLockedGlyph = new LockedActivityGlyph(); return LockedActivityGlyph.defaultLockedGlyph; } } public LockedActivityGlyph() { } 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.LockedGlyphPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.LockImage, bounds, DesignerContentAlignment.TopLeft); } } #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
- DocumentsTrace.cs
- DragSelectionMessageFilter.cs
- WebZone.cs
- SimpleTypeResolver.cs
- NamespaceCollection.cs
- Context.cs
- CompilerResults.cs
- XmlIncludeAttribute.cs
- SoapSchemaExporter.cs
- JoinTreeSlot.cs
- IPEndPointCollection.cs
- ZipFileInfo.cs
- DrawItemEvent.cs
- InputScopeAttribute.cs
- OutputScope.cs
- LinkLabelLinkClickedEvent.cs
- SchemaElementLookUpTableEnumerator.cs
- EntityDataSourceViewSchema.cs
- WebPartActionVerb.cs
- IncrementalReadDecoders.cs
- ResourceDescriptionAttribute.cs
- DocumentationServerProtocol.cs
- IProducerConsumerCollection.cs
- LogicalExpr.cs
- FixUpCollection.cs
- Site.cs
- CacheModeConverter.cs
- MethodCallTranslator.cs
- UInt32Storage.cs
- StringComparer.cs
- Pair.cs
- XmlReflectionImporter.cs
- PrintController.cs
- ThrowHelper.cs
- listitem.cs
- MemberExpression.cs
- PathGradientBrush.cs
- DateRangeEvent.cs
- WebPartsPersonalizationAuthorization.cs
- MsmqDecodeHelper.cs
- WindowsStreamSecurityUpgradeProvider.cs
- DrawToolTipEventArgs.cs
- EpmContentSerializer.cs
- SqlClientWrapperSmiStreamChars.cs
- ToolStripSeparatorRenderEventArgs.cs
- Double.cs
- ThrowHelper.cs
- FrameworkContentElementAutomationPeer.cs
- String.cs
- RegistrationServices.cs
- PinnedBufferMemoryStream.cs
- ToolStripSystemRenderer.cs
- ArglessEventHandlerProxy.cs
- TextServicesCompartmentEventSink.cs
- TransformCryptoHandle.cs
- ModulesEntry.cs
- HttpCacheVaryByContentEncodings.cs
- VisualBrush.cs
- ExeConfigurationFileMap.cs
- StoragePropertyMapping.cs
- TextEditorMouse.cs
- XmlSchemaSimpleTypeUnion.cs
- OleDbInfoMessageEvent.cs
- RepeaterCommandEventArgs.cs
- CommandHelpers.cs
- PathFigureCollection.cs
- BitVector32.cs
- Matrix.cs
- ListMarkerSourceInfo.cs
- ProxyAttribute.cs
- UIElement3D.cs
- DataBoundControlHelper.cs
- EarlyBoundInfo.cs
- BuildResultCache.cs
- OracleCommand.cs
- DirectoryGroupQuery.cs
- ComIntegrationManifestGenerator.cs
- CompilerState.cs
- exports.cs
- CollectionChangedEventManager.cs
- PerfService.cs
- DynamicRenderer.cs
- CodeConstructor.cs
- ColumnTypeConverter.cs
- RoamingStoreFile.cs
- PeerSecurityManager.cs
- HtmlLinkAdapter.cs
- X509CertificateValidator.cs
- TileBrush.cs
- SaveWorkflowCommand.cs
- Util.cs
- LinqDataSourceView.cs
- CompositeFontInfo.cs
- ResourceDescriptionAttribute.cs
- FormatVersion.cs
- RootCodeDomSerializer.cs
- DetailsViewUpdatedEventArgs.cs
- StartFileNameEditor.cs
- RawAppCommandInputReport.cs
- Soap.cs