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
- LocalizationParserHooks.cs
- EdmFunction.cs
- ListViewGroupConverter.cs
- nulltextcontainer.cs
- GeneralTransform.cs
- DynamicRenderer.cs
- TableLayoutPanel.cs
- FunctionCommandText.cs
- BitVec.cs
- FileIOPermission.cs
- AssemblyInfo.cs
- PropertyIDSet.cs
- ControlAdapter.cs
- WindowsToolbarAsMenu.cs
- ToolboxDataAttribute.cs
- OutputCacheModule.cs
- TreeNodeBinding.cs
- ProxyWebPart.cs
- SqlMethodAttribute.cs
- ValidationSummary.cs
- HyperLinkStyle.cs
- XmlQueryRuntime.cs
- LabelEditEvent.cs
- NullableDecimalSumAggregationOperator.cs
- TranslateTransform3D.cs
- DependencyPropertyAttribute.cs
- ScrollProperties.cs
- CodeRemoveEventStatement.cs
- Transform.cs
- QilGeneratorEnv.cs
- BasicBrowserDialog.cs
- WmfPlaceableFileHeader.cs
- AbstractSvcMapFileLoader.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ColorKeyFrameCollection.cs
- LinkLabel.cs
- XslTransform.cs
- IsolatedStorageFilePermission.cs
- CreateParams.cs
- SoapIncludeAttribute.cs
- ControlAdapter.cs
- ControlCollection.cs
- WebBaseEventKeyComparer.cs
- XPathBuilder.cs
- sqlstateclientmanager.cs
- DrawingAttributes.cs
- CodeValidator.cs
- InputMethodStateTypeInfo.cs
- SqlConnectionPoolGroupProviderInfo.cs
- BrowserCapabilitiesCompiler.cs
- Size3D.cs
- WebPartVerb.cs
- StreamUpgradeBindingElement.cs
- DbMetaDataFactory.cs
- HtmlWindow.cs
- HttpModuleAction.cs
- TextTreeText.cs
- ConvertersCollection.cs
- SimpleBitVector32.cs
- EpmAttributeNameBuilder.cs
- PtsHost.cs
- DefaultPropertyAttribute.cs
- WebPartsSection.cs
- PagesChangedEventArgs.cs
- SplitterEvent.cs
- Vector3DCollection.cs
- EnumerableRowCollection.cs
- TableColumn.cs
- SpotLight.cs
- ProfilePropertySettings.cs
- ConfigLoader.cs
- BindingsCollection.cs
- ServiceOperationWrapper.cs
- ReadOnlyAttribute.cs
- WebServicesDescriptionAttribute.cs
- Size3DConverter.cs
- ListControlConvertEventArgs.cs
- OracleFactory.cs
- SubMenuStyleCollection.cs
- SecurityContext.cs
- ControlPaint.cs
- SQLConvert.cs
- BaseTemplateBuildProvider.cs
- XPathChildIterator.cs
- CodeObject.cs
- ExpressionServices.cs
- ApplicationId.cs
- ToggleButton.cs
- ProgressBarBrushConverter.cs
- OrderedDictionary.cs
- WhileDesigner.cs
- smtpconnection.cs
- ToolStripOverflow.cs
- XdrBuilder.cs
- RectangleF.cs
- ProxyElement.cs
- MultiPartWriter.cs
- UnsafeNativeMethods.cs
- ThemeableAttribute.cs
- EventListenerClientSide.cs