Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / Design / CommandID.cs / 1 / CommandID.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides Object's ToString method. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Overrides Object's ToString method. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PathFigure.cs
- NumberSubstitution.cs
- Style.cs
- AbsoluteQuery.cs
- HebrewCalendar.cs
- UrlParameterReader.cs
- QilScopedVisitor.cs
- ToolStripMenuItem.cs
- DataGridViewCellParsingEventArgs.cs
- ChangePassword.cs
- UrlMappingsSection.cs
- RawAppCommandInputReport.cs
- CheckBox.cs
- ModelTreeEnumerator.cs
- CqlBlock.cs
- SizeF.cs
- ScrollChrome.cs
- bindurihelper.cs
- ScrollBarRenderer.cs
- PrimitiveCodeDomSerializer.cs
- ExtendedProtectionPolicyElement.cs
- WebPartDescriptionCollection.cs
- ToolStripItemGlyph.cs
- PostBackTrigger.cs
- DataSourceControlBuilder.cs
- Int64Animation.cs
- PropertySourceInfo.cs
- ProcessProtocolHandler.cs
- SiteMapNode.cs
- PageEventArgs.cs
- BaseServiceProvider.cs
- EventManager.cs
- XPathNodeList.cs
- ObjectConverter.cs
- ItemsPresenter.cs
- TreeNode.cs
- AsymmetricSignatureDeformatter.cs
- CorrelationService.cs
- DataControlFieldCell.cs
- DiffuseMaterial.cs
- SafeFreeMibTable.cs
- XPathNodePointer.cs
- PeerNearMe.cs
- DataBindingHandlerAttribute.cs
- SurrogateEncoder.cs
- OdbcTransaction.cs
- DBSqlParserTableCollection.cs
- XmlSchemaIdentityConstraint.cs
- OciLobLocator.cs
- BatchParser.cs
- CodeTryCatchFinallyStatement.cs
- StringValidator.cs
- SmtpNetworkElement.cs
- MiniModule.cs
- SaveFileDialog.cs
- srgsitem.cs
- CriticalFinalizerObject.cs
- ExpressionList.cs
- AvtEvent.cs
- ProtectedConfigurationSection.cs
- SemaphoreSecurity.cs
- ObjectMaterializedEventArgs.cs
- SystemWebSectionGroup.cs
- DataTableNameHandler.cs
- EventSetter.cs
- Types.cs
- URLAttribute.cs
- ProjectionPathBuilder.cs
- MultiView.cs
- ScaleTransform3D.cs
- EncryptRequest.cs
- TemplatePropertyEntry.cs
- ActivityFunc.cs
- MenuScrollingVisibilityConverter.cs
- RemotingConfiguration.cs
- SeverityFilter.cs
- ProfileService.cs
- InheritablePropertyChangeInfo.cs
- XamlFigureLengthSerializer.cs
- FrameworkElement.cs
- SymmetricKeyWrap.cs
- EpmCustomContentDeSerializer.cs
- BindableTemplateBuilder.cs
- CookieProtection.cs
- Reference.cs
- LocalizableAttribute.cs
- ProcessHostConfigUtils.cs
- FormsAuthenticationUser.cs
- ObjectSpanRewriter.cs
- DesignerActionKeyboardBehavior.cs
- CodeAttributeArgumentCollection.cs
- ObjectIDGenerator.cs
- WindowsPrincipal.cs
- WmlSelectionListAdapter.cs
- SqlCommand.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- Attachment.cs
- ResourceDescriptionAttribute.cs
- AdornerDecorator.cs
- WebRequestModuleElement.cs