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
- IResourceProvider.cs
- Page.cs
- SkewTransform.cs
- ScrollChrome.cs
- WmlPhoneCallAdapter.cs
- TemplatePartAttribute.cs
- EditorPart.cs
- DependencyPropertyChangedEventArgs.cs
- DrawItemEvent.cs
- DSGeneratorProblem.cs
- Rijndael.cs
- SafeLibraryHandle.cs
- UrlParameterWriter.cs
- HtmlValidationSummaryAdapter.cs
- TdsRecordBufferSetter.cs
- figurelengthconverter.cs
- ResourceReferenceKeyNotFoundException.cs
- TreeViewEvent.cs
- ChangePassword.cs
- Deserializer.cs
- SelectedGridItemChangedEvent.cs
- SqlDependencyUtils.cs
- ByeMessage11.cs
- XmlSchemaSimpleContentExtension.cs
- DataGridViewCellLinkedList.cs
- MetadataPropertyCollection.cs
- ActivationWorker.cs
- IndentedWriter.cs
- WindowsBrush.cs
- AspNetHostingPermission.cs
- RotateTransform3D.cs
- ParentUndoUnit.cs
- FixedTextSelectionProcessor.cs
- Rights.cs
- Parameter.cs
- ParallelTimeline.cs
- BeginEvent.cs
- DataGridViewCellStateChangedEventArgs.cs
- TTSEvent.cs
- ByteAnimation.cs
- PingOptions.cs
- RadioButtonList.cs
- XmlEncodedRawTextWriter.cs
- FormView.cs
- ChameleonKey.cs
- MultiDataTrigger.cs
- BaseProcessor.cs
- SchemaManager.cs
- Rijndael.cs
- ExtensionFile.cs
- Stopwatch.cs
- Socket.cs
- NullReferenceException.cs
- Trace.cs
- BCLDebug.cs
- DefaultHttpHandler.cs
- AutomationProperties.cs
- Utility.cs
- ListViewItemSelectionChangedEvent.cs
- ServiceHttpModule.cs
- CompilerCollection.cs
- QilParameter.cs
- ReadingWritingEntityEventArgs.cs
- SettingsPropertyValue.cs
- PnrpPermission.cs
- LoadRetryHandler.cs
- DiagnosticTraceRecords.cs
- ProcessStartInfo.cs
- RowsCopiedEventArgs.cs
- SystemIPGlobalProperties.cs
- ZoneIdentityPermission.cs
- SqlDataSourceStatusEventArgs.cs
- TextTreeRootTextBlock.cs
- TreeViewHitTestInfo.cs
- RegistryPermission.cs
- HttpCapabilitiesBase.cs
- Scripts.cs
- Rect.cs
- XomlCompiler.cs
- ExpressionPrinter.cs
- ModelPerspective.cs
- TaiwanLunisolarCalendar.cs
- listitem.cs
- PointAnimationUsingPath.cs
- SafeWaitHandle.cs
- SqlIdentifier.cs
- Popup.cs
- ConnectionStringsExpressionEditor.cs
- NumberFunctions.cs
- SqlFunctions.cs
- BooleanConverter.cs
- WindowsStatusBar.cs
- Wizard.cs
- DynamicDocumentPaginator.cs
- TraceData.cs
- WhitespaceRule.cs
- OleStrCAMarshaler.cs
- KeyPullup.cs
- ICspAsymmetricAlgorithm.cs
- DataGridViewControlCollection.cs