Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / DesignerView.cs / 1305376 / DesignerView.cs
#pragma warning disable 1634, 1691 namespace System.Workflow.ComponentModel.Design { using System; using System.IO; using System.Drawing; using System.CodeDom; using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel; using System.Globalization; using System.Drawing.Design; using System.Drawing.Imaging; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; using System.ComponentModel.Design; using System.Collections.Specialized; using System.ComponentModel.Design.Serialization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization.Formatters.Binary; // #region Class DesignerView ////// Holds information about the views supported by CompositeActivityDesigner /// public class DesignerView { private static int MaxViewName = 150; private int viewId; private string text; private Image image; private IDictionary userData; private ActivityDesigner designer; ////// Constructor for DesignerView /// /// Identifier which unqiuely identified the view /// Name of the view /// Image associated with the view public DesignerView(int viewId, string text, Image image) { if (text == null) throw new ArgumentNullException("text"); if (image == null) throw new ArgumentNullException("image"); this.viewId = viewId; this.text = ((text.Length > MaxViewName)) ? text.Substring(0, MaxViewName) + "..." : text; this.image = image; } public DesignerView(int viewId, string text, Image image, ActivityDesigner associatedDesigner) : this(viewId, text, image) { if (associatedDesigner == null) throw new ArgumentNullException("associatedDesigner"); this.designer = associatedDesigner; } ////// Gets the identifier associated with view /// public int ViewId { get { return this.viewId; } } ////// Gets the name associated with the view /// public string Text { get { return this.text; } } ////// Gets the image associated with the view /// public Image Image { get { return this.image; } } ////// Gets the userdata to be associated with the view /// public IDictionary UserData { get { if (this.userData == null) this.userData = new HybridDictionary(); return this.userData; } } ////// Gets the ActivityDesigner associated with the view /// public virtual ActivityDesigner AssociatedDesigner { get { return this.designer; } } ////// Called when activating the view /// public virtual void OnActivate() { } ////// Called when deactivating the view /// public virtual void OnDeactivate() { } public override bool Equals(object obj) { DesignerView view = obj as DesignerView; if (view == null) return false; return (this.viewId == view.viewId); } public override int GetHashCode() { return this.viewId; } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. #pragma warning disable 1634, 1691 namespace System.Workflow.ComponentModel.Design { using System; using System.IO; using System.Drawing; using System.CodeDom; using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel; using System.Globalization; using System.Drawing.Design; using System.Drawing.Imaging; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; using System.ComponentModel.Design; using System.Collections.Specialized; using System.ComponentModel.Design.Serialization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization.Formatters.Binary; // #region Class DesignerView ////// Holds information about the views supported by CompositeActivityDesigner /// public class DesignerView { private static int MaxViewName = 150; private int viewId; private string text; private Image image; private IDictionary userData; private ActivityDesigner designer; ////// Constructor for DesignerView /// /// Identifier which unqiuely identified the view /// Name of the view /// Image associated with the view public DesignerView(int viewId, string text, Image image) { if (text == null) throw new ArgumentNullException("text"); if (image == null) throw new ArgumentNullException("image"); this.viewId = viewId; this.text = ((text.Length > MaxViewName)) ? text.Substring(0, MaxViewName) + "..." : text; this.image = image; } public DesignerView(int viewId, string text, Image image, ActivityDesigner associatedDesigner) : this(viewId, text, image) { if (associatedDesigner == null) throw new ArgumentNullException("associatedDesigner"); this.designer = associatedDesigner; } ////// Gets the identifier associated with view /// public int ViewId { get { return this.viewId; } } ////// Gets the name associated with the view /// public string Text { get { return this.text; } } ////// Gets the image associated with the view /// public Image Image { get { return this.image; } } ////// Gets the userdata to be associated with the view /// public IDictionary UserData { get { if (this.userData == null) this.userData = new HybridDictionary(); return this.userData; } } ////// Gets the ActivityDesigner associated with the view /// public virtual ActivityDesigner AssociatedDesigner { get { return this.designer; } } ////// Called when activating the view /// public virtual void OnActivate() { } ////// Called when deactivating the view /// public virtual void OnDeactivate() { } public override bool Equals(object obj) { DesignerView view = obj as DesignerView; if (view == null) return false; return (this.viewId == view.viewId); } public override int GetHashCode() { return this.viewId; } } #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
- ScriptHandlerFactory.cs
- PresentationAppDomainManager.cs
- XmlSchemaFacet.cs
- SqlGenericUtil.cs
- SafeEventLogWriteHandle.cs
- XmlSchemaSimpleContentExtension.cs
- NameValueConfigurationCollection.cs
- SafeSecurityHandles.cs
- CompareValidator.cs
- StorageRoot.cs
- InplaceBitmapMetadataWriter.cs
- OracleInfoMessageEventArgs.cs
- CoTaskMemUnicodeSafeHandle.cs
- DesignerVerb.cs
- CopyAction.cs
- XmlElementAttributes.cs
- TreeNodeStyle.cs
- ColorContextHelper.cs
- ConfigurationLockCollection.cs
- JsonReaderDelegator.cs
- BehaviorDragDropEventArgs.cs
- CompilationSection.cs
- ProvidersHelper.cs
- BooleanExpr.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- IntegerValidatorAttribute.cs
- PageThemeCodeDomTreeGenerator.cs
- FormViewModeEventArgs.cs
- BitmapEffectDrawingContent.cs
- Baml2006ReaderFrame.cs
- CompilationLock.cs
- DNS.cs
- SystemInfo.cs
- ParameterModifier.cs
- DataRecordObjectView.cs
- AsyncOperation.cs
- DeviceContexts.cs
- Internal.cs
- UniqueIdentifierService.cs
- CorrelationResolver.cs
- ProgressChangedEventArgs.cs
- FileUpload.cs
- HtmlElementCollection.cs
- MimeReturn.cs
- RootDesignerSerializerAttribute.cs
- Pen.cs
- InstanceDataCollection.cs
- ObjectAnimationBase.cs
- CodeMemberEvent.cs
- ManagementQuery.cs
- CellCreator.cs
- Mapping.cs
- TraceShell.cs
- EventsTab.cs
- CheckBoxField.cs
- InternalSafeNativeMethods.cs
- ModelFactory.cs
- Input.cs
- ManipulationLogic.cs
- UnknownWrapper.cs
- HtmlControlPersistable.cs
- UnauthorizedWebPart.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- SqlException.cs
- sitestring.cs
- GridViewSortEventArgs.cs
- EnumValAlphaComparer.cs
- MetadataExporter.cs
- Point3DCollection.cs
- WebCategoryAttribute.cs
- NetPeerTcpBindingCollectionElement.cs
- TypeDelegator.cs
- DefaultBindingPropertyAttribute.cs
- ColorConvertedBitmap.cs
- UnionCqlBlock.cs
- SmtpFailedRecipientsException.cs
- XmlQualifiedNameTest.cs
- TransactionFlowOption.cs
- TextCompositionManager.cs
- HttpHandler.cs
- HttpConfigurationContext.cs
- StylusPointPropertyInfoDefaults.cs
- InvokePatternIdentifiers.cs
- Cursors.cs
- QilDataSource.cs
- FilterQuery.cs
- CompositeTypefaceMetrics.cs
- CustomAttributeBuilder.cs
- RankException.cs
- RowType.cs
- NavigationHelper.cs
- MissingManifestResourceException.cs
- RequestCachePolicy.cs
- NativeMethods.cs
- PropertyInformationCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- PeerToPeerException.cs
- OpenTypeCommon.cs
- HttpRequestCacheValidator.cs
- MenuStrip.cs