Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / NumericUpDownAcceleration.cs / 1 / NumericUpDownAcceleration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; ////// Comprises the information specifying how acceleration should be performed /// on a Windows up-down control when the up/down button is pressed for certain /// amount of time. /// public class NumericUpDownAcceleration { private Int32 seconds; // Ideally we would use UInt32 but it is not CLS-compliant. private Decimal increment; // Ideally we would use UInt32 but NumericUpDown uses Decimal values. public NumericUpDownAcceleration(Int32 seconds, Decimal increment) { if (seconds < 0) { throw new ArgumentOutOfRangeException("seconds", seconds, SR.GetString(SR.NumericUpDownLessThanZeroError)); } if (increment < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", increment, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = seconds; this.increment = increment; } ////// Determines the amount of time for the UpDown control to wait to set the increment /// step when holding the up/down button. /// public Int32 Seconds { get { return this.seconds; } set { if (value < 0) { throw new ArgumentOutOfRangeException("seconds", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = value; } } ////// Determines the amount to increment by. /// public Decimal Increment { get { return this.increment; } set { if (value < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.increment = value; } } } } // 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
- CannotUnloadAppDomainException.cs
- ValidationRuleCollection.cs
- ValidationHelper.cs
- GridLengthConverter.cs
- PropertyRef.cs
- DecimalConstantAttribute.cs
- EllipseGeometry.cs
- ObfuscateAssemblyAttribute.cs
- MatrixValueSerializer.cs
- GuidelineCollection.cs
- TableHeaderCell.cs
- RolePrincipal.cs
- MemberAccessException.cs
- OperationParameterInfoCollection.cs
- XmlSchemaProviderAttribute.cs
- _NegoStream.cs
- TemplateControl.cs
- TdsRecordBufferSetter.cs
- SafeUserTokenHandle.cs
- Transform.cs
- TrustLevel.cs
- keycontainerpermission.cs
- ArgumentException.cs
- SurrogateEncoder.cs
- InternalDuplexChannelFactory.cs
- BatchServiceHost.cs
- ZipIOExtraFieldElement.cs
- WebRequest.cs
- DiscardableAttribute.cs
- ComplexTypeEmitter.cs
- DataErrorValidationRule.cs
- SecurityContextTokenCache.cs
- ImageCollectionEditor.cs
- TextEncodedRawTextWriter.cs
- EncodingNLS.cs
- RSAOAEPKeyExchangeFormatter.cs
- ListViewDeletedEventArgs.cs
- ListViewTableCell.cs
- XPathNavigatorKeyComparer.cs
- SiteOfOriginPart.cs
- AsymmetricKeyExchangeDeformatter.cs
- CompressedStack.cs
- CodeEventReferenceExpression.cs
- PageAsyncTaskManager.cs
- ScriptingWebServicesSectionGroup.cs
- RowType.cs
- FtpWebResponse.cs
- HtmlSelect.cs
- TreeNodeBindingCollection.cs
- SafeNativeMethods.cs
- RootBuilder.cs
- WinFormsComponentEditor.cs
- MultiPageTextView.cs
- WSHttpBinding.cs
- WebColorConverter.cs
- WebScriptMetadataFormatter.cs
- ToolStripContentPanel.cs
- AsyncOperationManager.cs
- Point3D.cs
- DeclarativeCatalogPart.cs
- ContextStack.cs
- EdmItemError.cs
- CodeTryCatchFinallyStatement.cs
- IconHelper.cs
- SafePEFileHandle.cs
- WebBrowserContainer.cs
- WindowsStartMenu.cs
- BitmapDecoder.cs
- ComplexObject.cs
- DataControlImageButton.cs
- DataServiceKeyAttribute.cs
- ResourceDictionaryCollection.cs
- ScrollBar.cs
- ImageSource.cs
- ReadOnlyState.cs
- Stylus.cs
- ReferentialConstraint.cs
- XsdValidatingReader.cs
- ActivityScheduledQuery.cs
- SharedDp.cs
- FlagPanel.cs
- ProfilePropertyNameValidator.cs
- ProxyWebPart.cs
- DESCryptoServiceProvider.cs
- SiteMap.cs
- ToolBarOverflowPanel.cs
- LocatorBase.cs
- IsolatedStorageFileStream.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- XamlToRtfWriter.cs
- SerializationUtility.cs
- CodeMemberMethod.cs
- QfeChecker.cs
- IISMapPath.cs
- Application.cs
- CustomWebEventKey.cs
- HotSpotCollection.cs
- ReliabilityContractAttribute.cs
- Itemizer.cs
- controlskin.cs