Code:
/ FX-1434 / FX-1434 / 1.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
- RegisteredDisposeScript.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- DesignerListAdapter.cs
- DefaultValueTypeConverter.cs
- AsyncPostBackErrorEventArgs.cs
- MultitargetingHelpers.cs
- Point3DCollection.cs
- _SslState.cs
- CompressEmulationStream.cs
- CryptoConfig.cs
- ListViewTableRow.cs
- RootBrowserWindowProxy.cs
- LocalFileSettingsProvider.cs
- MsmqPoisonMessageException.cs
- BitSet.cs
- ThrowHelper.cs
- Rule.cs
- DocumentGridPage.cs
- RawStylusActions.cs
- StrokeCollection2.cs
- EntityViewGenerator.cs
- DataSetViewSchema.cs
- GroupLabel.cs
- DataGridViewTopRowAccessibleObject.cs
- SqlFunctions.cs
- MulticastNotSupportedException.cs
- DiagnosticTrace.cs
- WebColorConverter.cs
- SafeNativeMethods.cs
- DataTablePropertyDescriptor.cs
- SchemaImporterExtensionElementCollection.cs
- ClientEventManager.cs
- TlsnegoTokenProvider.cs
- VersionPair.cs
- SpAudioStreamWrapper.cs
- UInt64Converter.cs
- PropertyGridCommands.cs
- DbConnectionHelper.cs
- unsafeIndexingFilterStream.cs
- AsyncCompletedEventArgs.cs
- TextEffectResolver.cs
- COM2ExtendedTypeConverter.cs
- TimeoutException.cs
- Knowncolors.cs
- OleDbConnection.cs
- ExtendedTransformFactory.cs
- TreeChangeInfo.cs
- RSAPKCS1SignatureDeformatter.cs
- CryptoConfig.cs
- DrawingGroupDrawingContext.cs
- BindingList.cs
- BitmapDownload.cs
- DictionaryEntry.cs
- TextBoxDesigner.cs
- FontInfo.cs
- CompileXomlTask.cs
- CompositeActivityMarkupSerializer.cs
- Menu.cs
- UrlMappingCollection.cs
- ArgumentOutOfRangeException.cs
- versioninfo.cs
- TextBoxView.cs
- ToolStripOverflow.cs
- ColorInterpolationModeValidation.cs
- SafePEFileHandle.cs
- MLangCodePageEncoding.cs
- MediaEntryAttribute.cs
- FontFamilyValueSerializer.cs
- MultiByteCodec.cs
- Rotation3DAnimation.cs
- DbInsertCommandTree.cs
- AppDomainInfo.cs
- ImageField.cs
- AttachedPropertyBrowsableAttribute.cs
- SerializationHelper.cs
- CompletionBookmark.cs
- PointConverter.cs
- ResXResourceReader.cs
- SR.Designer.cs
- MetadataCollection.cs
- AdRotator.cs
- WebPartDisplayModeCancelEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- BaseDataList.cs
- FormsIdentity.cs
- TileModeValidation.cs
- UriExt.cs
- ParameterToken.cs
- Opcode.cs
- XMLSchema.cs
- CounterSample.cs
- ChangePassword.cs
- EnglishPluralizationService.cs
- TextAction.cs
- XmlILConstructAnalyzer.cs
- bidPrivateBase.cs
- IdentifierCollection.cs
- LinqDataSourceStatusEventArgs.cs
- StorageEndPropertyMapping.cs
- SqlNode.cs