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
- SqlReferenceCollection.cs
- SettingsPropertyWrongTypeException.cs
- TextCompositionEventArgs.cs
- PngBitmapDecoder.cs
- ActivationArguments.cs
- PrimitiveXmlSerializers.cs
- DisplayNameAttribute.cs
- DynamicActivityTypeDescriptor.cs
- TextEditorDragDrop.cs
- CacheForPrimitiveTypes.cs
- NetworkInformationPermission.cs
- TextTreeRootTextBlock.cs
- SqlResolver.cs
- LookupNode.cs
- ColumnResizeAdorner.cs
- SQLBytes.cs
- OLEDB_Util.cs
- HttpListenerResponse.cs
- TextChange.cs
- WinFormsComponentEditor.cs
- JsonServiceDocumentSerializer.cs
- TextBlockAutomationPeer.cs
- CanonicalizationDriver.cs
- ComboBoxRenderer.cs
- DbDataRecord.cs
- ListViewCancelEventArgs.cs
- DbLambda.cs
- Properties.cs
- PagesChangedEventArgs.cs
- SimpleRecyclingCache.cs
- SqlDataReaderSmi.cs
- SHA1Managed.cs
- SynchronizationLockException.cs
- CollectionViewGroup.cs
- RestHandlerFactory.cs
- DataGridTextBox.cs
- AutomationElement.cs
- Exceptions.cs
- DisplayNameAttribute.cs
- VSWCFServiceContractGenerator.cs
- DetailsViewPagerRow.cs
- Expander.cs
- SimpleBitVector32.cs
- ActivationArguments.cs
- Rotation3D.cs
- TextElementEditingBehaviorAttribute.cs
- RootBrowserWindow.cs
- CodeTypeMemberCollection.cs
- ComponentRenameEvent.cs
- StrongNameKeyPair.cs
- HtmlHead.cs
- LinearGradientBrush.cs
- MatrixAnimationBase.cs
- HttpResponse.cs
- ToolStripOverflow.cs
- TrackBar.cs
- HashRepartitionStream.cs
- TextDecoration.cs
- IntegerValidatorAttribute.cs
- DrawingGroup.cs
- SQLInt64.cs
- TraceLog.cs
- HtmlElementCollection.cs
- HtmlTableRow.cs
- PenThreadPool.cs
- SelectionProviderWrapper.cs
- WebPartDescription.cs
- CompilerCollection.cs
- XmlDocument.cs
- SectionRecord.cs
- X509SecurityTokenProvider.cs
- SimpleModelProvider.cs
- ApplicationCommands.cs
- IconEditor.cs
- LockedAssemblyCache.cs
- AdapterDictionary.cs
- BrowserCapabilitiesFactory35.cs
- WmlLinkAdapter.cs
- SoapInteropTypes.cs
- JoinSymbol.cs
- XamlStackWriter.cs
- GrammarBuilder.cs
- SQLInt32.cs
- PolyBezierSegmentFigureLogic.cs
- HitTestParameters.cs
- MarkupCompilePass2.cs
- XmlBoundElement.cs
- WsdlEndpointConversionContext.cs
- SafeFileMappingHandle.cs
- BitFlagsGenerator.cs
- PropertyMapper.cs
- CommandConverter.cs
- TablePatternIdentifiers.cs
- SpecularMaterial.cs
- Rectangle.cs
- BinaryWriter.cs
- RuntimeResourceSet.cs
- _HelperAsyncResults.cs
- Package.cs
- XsdBuilder.cs