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
- DataGridAutoFormatDialog.cs
- FixedFindEngine.cs
- RegexReplacement.cs
- DataGridViewRowsRemovedEventArgs.cs
- SQLRoleProvider.cs
- ApplicationFileParser.cs
- Section.cs
- PathGeometry.cs
- Viewport3DAutomationPeer.cs
- BaseDataBoundControlDesigner.cs
- _CookieModule.cs
- PresentationSource.cs
- SystemIPGlobalStatistics.cs
- GcSettings.cs
- RenderOptions.cs
- NativeActivityMetadata.cs
- columnmapkeybuilder.cs
- Decoder.cs
- Container.cs
- RoutedEventValueSerializer.cs
- SamlEvidence.cs
- FastEncoderStatics.cs
- RemotingConfiguration.cs
- SessionStateItemCollection.cs
- RegexNode.cs
- UidManager.cs
- HttpCachePolicyElement.cs
- TargetConverter.cs
- ScrollPattern.cs
- IItemContainerGenerator.cs
- TwoPhaseCommit.cs
- SqlDataSourceDesigner.cs
- EditingScopeUndoUnit.cs
- TypeUsageBuilder.cs
- UpdateException.cs
- Tag.cs
- AmbientLight.cs
- EdmValidator.cs
- GeometryModel3D.cs
- Int32Rect.cs
- StringComparer.cs
- IIS7UserPrincipal.cs
- AuthorizationRule.cs
- TextProperties.cs
- FileStream.cs
- PageThemeBuildProvider.cs
- JournalEntryStack.cs
- BitmapDecoder.cs
- XmlNodeComparer.cs
- ChannelTraceRecord.cs
- ScriptReferenceEventArgs.cs
- DbConnectionPool.cs
- ProviderCommandInfoUtils.cs
- Socket.cs
- LocalFileSettingsProvider.cs
- HtmlFormParameterReader.cs
- IxmlLineInfo.cs
- HttpRawResponse.cs
- ObjectPropertyMapping.cs
- GlyphShapingProperties.cs
- PoisonMessageException.cs
- SamlAssertion.cs
- BulletDecorator.cs
- WebPartEventArgs.cs
- SelectionItemPattern.cs
- Translator.cs
- _AutoWebProxyScriptHelper.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DropDownList.cs
- Utils.cs
- SecurityTokenReferenceStyle.cs
- DependentTransaction.cs
- GraphicsPathIterator.cs
- glyphs.cs
- BindingExpressionUncommonField.cs
- RegexMatchCollection.cs
- AutomationElement.cs
- QueryableDataSourceView.cs
- DesignerTransactionCloseEvent.cs
- ContextQuery.cs
- BooleanExpr.cs
- LinkConverter.cs
- Converter.cs
- BitmapPalette.cs
- DoubleAnimationUsingPath.cs
- ApplicationServiceManager.cs
- FlagsAttribute.cs
- ChangeConflicts.cs
- NavigationFailedEventArgs.cs
- WorkflowControlClient.cs
- ResourceReferenceExpressionConverter.cs
- WhereaboutsReader.cs
- shaperfactory.cs
- XsdBuildProvider.cs
- XpsInterleavingPolicy.cs
- BackgroundFormatInfo.cs
- GACMembershipCondition.cs
- NullRuntimeConfig.cs
- VectorCollection.cs
- VolatileResourceManager.cs