Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }/// Overrides Object's ToString method. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RuntimeCompatibilityAttribute.cs
- WebEvents.cs
- IdleTimeoutMonitor.cs
- QilReplaceVisitor.cs
- ClaimSet.cs
- ProcessHostConfigUtils.cs
- Helper.cs
- UnsafeNativeMethodsTablet.cs
- MimeWriter.cs
- ResourceReferenceKeyNotFoundException.cs
- FormViewDeletedEventArgs.cs
- HttpWebRequestElement.cs
- ScrollableControl.cs
- NamespaceInfo.cs
- SimplePropertyEntry.cs
- BaseParagraph.cs
- MenuItem.cs
- SecurityTokenException.cs
- SkinBuilder.cs
- ImageMapEventArgs.cs
- ComponentEditorPage.cs
- ResizeGrip.cs
- Wildcard.cs
- OAVariantLib.cs
- JsonQNameDataContract.cs
- DeferredReference.cs
- HtmlTitle.cs
- ComplexType.cs
- WmlPhoneCallAdapter.cs
- CodeThrowExceptionStatement.cs
- WebChannelFactory.cs
- XmlSchemaComplexContentExtension.cs
- SchemaElementDecl.cs
- BuilderElements.cs
- AllMembershipCondition.cs
- SynchronizedDisposablePool.cs
- PointCollection.cs
- infer.cs
- HierarchicalDataSourceControl.cs
- NumberFunctions.cs
- KoreanLunisolarCalendar.cs
- NonDualMessageSecurityOverHttp.cs
- ImageSourceValueSerializer.cs
- AlphaSortedEnumConverter.cs
- CaseInsensitiveOrdinalStringComparer.cs
- XmlQueryTypeFactory.cs
- BitmapImage.cs
- Triplet.cs
- TextTreeNode.cs
- DataGridViewRowsRemovedEventArgs.cs
- StdRegProviderWrapper.cs
- EntityDataSource.cs
- EntitySqlQueryCacheEntry.cs
- HttpModulesSection.cs
- SiteOfOriginPart.cs
- TTSEngineProxy.cs
- LayoutTableCell.cs
- IntSecurity.cs
- TCEAdapterGenerator.cs
- XmlHierarchicalEnumerable.cs
- ApplicationCommands.cs
- RC2.cs
- RadioButtonDesigner.cs
- ClockController.cs
- DependencyPropertyConverter.cs
- ComponentResourceKey.cs
- HwndStylusInputProvider.cs
- X509SecurityTokenProvider.cs
- SafeFindHandle.cs
- ImageMap.cs
- AsyncPostBackErrorEventArgs.cs
- CancellationTokenSource.cs
- TextTrailingWordEllipsis.cs
- Command.cs
- Dynamic.cs
- RelationshipDetailsCollection.cs
- InputProcessorProfilesLoader.cs
- ImageListUtils.cs
- wgx_sdk_version.cs
- RTLAwareMessageBox.cs
- SrgsSubset.cs
- ConnectionManagementElementCollection.cs
- ParallelEnumerable.cs
- FixedSOMImage.cs
- KoreanLunisolarCalendar.cs
- ShapingWorkspace.cs
- PixelFormats.cs
- VirtualPath.cs
- WindowsRegion.cs
- XmlSerializerFactory.cs
- DbConnectionFactory.cs
- ListViewAutomationPeer.cs
- InternalTypeHelper.cs
- SlipBehavior.cs
- PresentationAppDomainManager.cs
- SQLDouble.cs
- SoapSchemaExporter.cs
- RelatedImageListAttribute.cs
- WsatServiceCertificate.cs
- RadioButton.cs