Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / NumericUpDownAcceleration.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- JapaneseCalendar.cs
- HtmlProps.cs
- WebPartRestoreVerb.cs
- MatrixAnimationUsingPath.cs
- TreeNode.cs
- NumberFormatter.cs
- EntityContainerAssociationSetEnd.cs
- FormsAuthenticationModule.cs
- DirectoryObjectSecurity.cs
- PageParserFilter.cs
- StrongNameKeyPair.cs
- ProtocolsConfigurationHandler.cs
- UserValidatedEventArgs.cs
- ExternalDataExchangeClient.cs
- COM2IDispatchConverter.cs
- XmlSerializerFactory.cs
- DbgCompiler.cs
- SmtpNegotiateAuthenticationModule.cs
- VarRefManager.cs
- Model3D.cs
- HostedImpersonationContext.cs
- SingleAnimationUsingKeyFrames.cs
- Graphics.cs
- ControlPaint.cs
- URIFormatException.cs
- Registry.cs
- ExpandableObjectConverter.cs
- OrderedDictionary.cs
- MimeMapping.cs
- SecurityPermission.cs
- PixelFormat.cs
- StatusBarDrawItemEvent.cs
- __TransparentProxy.cs
- NullToBooleanConverter.cs
- ProjectedSlot.cs
- Wizard.cs
- ArithmeticException.cs
- ClientBuildManagerCallback.cs
- RequestSecurityTokenForGetBrowserToken.cs
- WindowsRebar.cs
- LayoutTable.cs
- WeakReference.cs
- RangeValuePatternIdentifiers.cs
- TileBrush.cs
- HttpGetProtocolReflector.cs
- HwndSource.cs
- DataGridParentRows.cs
- XmlEncoding.cs
- QilInvoke.cs
- ZoneLinkButton.cs
- EntityProxyFactory.cs
- DataBindingExpressionBuilder.cs
- ContourSegment.cs
- OdbcConnectionStringbuilder.cs
- CloudCollection.cs
- IProvider.cs
- ArrayExtension.cs
- BufferModeSettings.cs
- MatrixStack.cs
- SqlFactory.cs
- GridViewCommandEventArgs.cs
- GeometryCombineModeValidation.cs
- UnsafeNativeMethodsTablet.cs
- RequestQueue.cs
- RIPEMD160.cs
- SystemIPGlobalProperties.cs
- PreProcessor.cs
- TextViewSelectionProcessor.cs
- CipherData.cs
- SelectionPatternIdentifiers.cs
- RectIndependentAnimationStorage.cs
- SQLResource.cs
- SqlDataSourceConfigureFilterForm.cs
- RuleCache.cs
- AspNetSynchronizationContext.cs
- WindowsMenu.cs
- TracedNativeMethods.cs
- ExpressionParser.cs
- XmlEntityReference.cs
- OLEDB_Enum.cs
- EventDescriptor.cs
- PersonalizationProviderHelper.cs
- ConfigXmlWhitespace.cs
- TraceSection.cs
- PerformanceCounter.cs
- TextTreeTextBlock.cs
- ScriptManagerProxy.cs
- FloaterParaClient.cs
- HeaderUtility.cs
- Soap12ProtocolReflector.cs
- ContainerAction.cs
- PerformanceCounterPermission.cs
- SettingsPropertyValueCollection.cs
- ClockController.cs
- DataGridViewCellConverter.cs
- DSACryptoServiceProvider.cs
- MimeFormReflector.cs
- ToolBarButtonClickEvent.cs
- CompModSwitches.cs
- SQLSingleStorage.cs