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
- messageonlyhwndwrapper.cs
- _Connection.cs
- ApplicationCommands.cs
- XslCompiledTransform.cs
- HwndHostAutomationPeer.cs
- UserControl.cs
- ADConnectionHelper.cs
- TextEffectResolver.cs
- DiagnosticsConfigurationHandler.cs
- AdornedElementPlaceholder.cs
- SubordinateTransaction.cs
- ValueSerializerAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- URLIdentityPermission.cs
- SqlFunctions.cs
- ScrollBar.cs
- QueryAccessibilityHelpEvent.cs
- EmptyEnumerator.cs
- QueryResponse.cs
- TextTreePropertyUndoUnit.cs
- AnnotationResourceCollection.cs
- FusionWrap.cs
- CodeCompiler.cs
- BrowserCapabilitiesFactory.cs
- RandomNumberGenerator.cs
- FormViewPagerRow.cs
- MediaContext.cs
- ClientEndpointLoader.cs
- ToolStripRendererSwitcher.cs
- PropertyItem.cs
- DataContractSet.cs
- CircleHotSpot.cs
- HotSpot.cs
- ObsoleteAttribute.cs
- X509Certificate.cs
- ObjectDataSourceView.cs
- OraclePermission.cs
- SubMenuStyle.cs
- DbParameterHelper.cs
- COSERVERINFO.cs
- ToolZone.cs
- NativeActivityFaultContext.cs
- PerformanceCounter.cs
- DataControlFieldCollection.cs
- TimeSpanHelper.cs
- SizeConverter.cs
- FunctionParameter.cs
- _LocalDataStoreMgr.cs
- Hash.cs
- ColorConvertedBitmap.cs
- ContentHostHelper.cs
- TaskExtensions.cs
- HtmlWindow.cs
- PasswordTextNavigator.cs
- BuildResult.cs
- SystemColors.cs
- QuotaThrottle.cs
- XmlConvert.cs
- CardSpaceException.cs
- Typography.cs
- Duration.cs
- ChannelBinding.cs
- DbDataAdapter.cs
- XmlReaderSettings.cs
- SingleQueryOperator.cs
- RTLAwareMessageBox.cs
- InputBinding.cs
- _OSSOCK.cs
- HTTPRemotingHandler.cs
- TransformGroup.cs
- XsdCachingReader.cs
- PropertyChangeTracker.cs
- DrawingVisualDrawingContext.cs
- XmlEncoding.cs
- XamlDesignerSerializationManager.cs
- SplitterEvent.cs
- ModelItemCollectionImpl.cs
- RefreshPropertiesAttribute.cs
- DbProviderFactoriesConfigurationHandler.cs
- WmpBitmapEncoder.cs
- DependencySource.cs
- SymbolPair.cs
- CompressionTransform.cs
- ThreadStartException.cs
- PartialCachingControl.cs
- OciEnlistContext.cs
- StrongNameMembershipCondition.cs
- Validator.cs
- MLangCodePageEncoding.cs
- GPStream.cs
- InputLangChangeEvent.cs
- basevalidator.cs
- CounterSample.cs
- Messages.cs
- PtsContext.cs
- EntityViewGenerationConstants.cs
- Padding.cs
- SiteMapNode.cs
- NativeMethods.cs
- Command.cs