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
- BmpBitmapEncoder.cs
- OdbcReferenceCollection.cs
- TextRangeSerialization.cs
- DBPropSet.cs
- CreateUserWizardStep.cs
- _SslSessionsCache.cs
- MSAAWinEventWrap.cs
- UrlParameterWriter.cs
- grammarelement.cs
- CssStyleCollection.cs
- BitConverter.cs
- MarshalByRefObject.cs
- BaseCollection.cs
- StateRuntime.cs
- CanonicalizationDriver.cs
- CodeEventReferenceExpression.cs
- AssociationSetEnd.cs
- XmlSchemaSimpleTypeRestriction.cs
- RequestCacheEntry.cs
- SystemIPGlobalStatistics.cs
- ReflectionPermission.cs
- VectorAnimationBase.cs
- _NestedSingleAsyncResult.cs
- CustomAssemblyResolver.cs
- RootNamespaceAttribute.cs
- MessageQueue.cs
- WindowsProgressbar.cs
- TypeDelegator.cs
- SourceFileInfo.cs
- smtpconnection.cs
- NumericPagerField.cs
- EnumValAlphaComparer.cs
- ListViewTableCell.cs
- InternalMappingException.cs
- PreparingEnlistment.cs
- SqlXml.cs
- CodeBlockBuilder.cs
- EndEvent.cs
- BulletedList.cs
- ConfigurationSettings.cs
- DataListItemCollection.cs
- TemplateKey.cs
- DocumentOrderComparer.cs
- RequestSecurityToken.cs
- ToggleProviderWrapper.cs
- EFTableProvider.cs
- ToolStripLabel.cs
- StringUtil.cs
- TrackingValidationObjectDictionary.cs
- CryptoConfig.cs
- GenerateTemporaryTargetAssembly.cs
- HttpModulesSection.cs
- DPAPIProtectedConfigurationProvider.cs
- CqlWriter.cs
- AssertFilter.cs
- Stylesheet.cs
- RectAnimation.cs
- ProcessInfo.cs
- ADConnectionHelper.cs
- XmlSerializationWriter.cs
- CheckBoxField.cs
- DataListItem.cs
- XPathAncestorQuery.cs
- PartialClassGenerationTask.cs
- AppendHelper.cs
- MailWriter.cs
- SchemaExporter.cs
- EmptyControlCollection.cs
- FileLoadException.cs
- FilteredReadOnlyMetadataCollection.cs
- XLinq.cs
- ErasingStroke.cs
- DataControlExtensions.cs
- ObjectReaderCompiler.cs
- ListBindingConverter.cs
- MsmqDiagnostics.cs
- ToolTipService.cs
- TableLayoutPanelBehavior.cs
- XsltLoader.cs
- DefaultBinder.cs
- PassportAuthentication.cs
- CellQuery.cs
- CompositeScriptReferenceEventArgs.cs
- Int32KeyFrameCollection.cs
- Size.cs
- TdsParserSafeHandles.cs
- HuffCodec.cs
- DynamicValidator.cs
- ErrorTolerantObjectWriter.cs
- ObjectSecurity.cs
- RoutedEvent.cs
- TraceSource.cs
- ChangeBlockUndoRecord.cs
- QilExpression.cs
- X509Chain.cs
- AspNetSynchronizationContext.cs
- LabelAutomationPeer.cs
- ColorMatrix.cs
- WebPartTransformerAttribute.cs
- KoreanLunisolarCalendar.cs