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
- HtmlTable.cs
- XmlSchemaSet.cs
- GridViewCellAutomationPeer.cs
- sqlstateclientmanager.cs
- Soap12ProtocolImporter.cs
- TypeBuilderInstantiation.cs
- SafeNativeMethods.cs
- ProjectionCamera.cs
- DataGridViewRowCancelEventArgs.cs
- _AutoWebProxyScriptHelper.cs
- PnrpPeerResolverBindingElement.cs
- File.cs
- Renderer.cs
- XmlConverter.cs
- XmlValueConverter.cs
- AuthenticationModulesSection.cs
- WsatConfiguration.cs
- CapabilitiesAssignment.cs
- HitTestParameters3D.cs
- OneOfTypeConst.cs
- SerialPort.cs
- StrongTypingException.cs
- ActionNotSupportedException.cs
- SqlMethodCallConverter.cs
- DictionarySectionHandler.cs
- Assembly.cs
- LoginView.cs
- ScalarConstant.cs
- DataGridCommandEventArgs.cs
- SHA512Managed.cs
- TraceFilter.cs
- Encoding.cs
- ListViewItemSelectionChangedEvent.cs
- SuppressMergeCheckAttribute.cs
- PreviewKeyDownEventArgs.cs
- CanonicalizationDriver.cs
- Dictionary.cs
- _BasicClient.cs
- MD5CryptoServiceProvider.cs
- ExtendedPropertyDescriptor.cs
- BitmapEffectGeneralTransform.cs
- GeneralTransformGroup.cs
- SystemInformation.cs
- processwaithandle.cs
- DataObject.cs
- PropertyChangedEventArgs.cs
- UniqueSet.cs
- EventDescriptor.cs
- MemberExpression.cs
- ApplicationSettingsBase.cs
- AuthorizationSection.cs
- Module.cs
- X509CertificateCollection.cs
- PointHitTestParameters.cs
- CopyOfAction.cs
- UpDownEvent.cs
- Command.cs
- ProtocolImporter.cs
- ContractTypeNameElement.cs
- Image.cs
- EdmPropertyAttribute.cs
- SAPICategories.cs
- LocatorPartList.cs
- SystemSounds.cs
- DateTimeAutomationPeer.cs
- NamespaceCollection.cs
- RightsDocument.cs
- OdbcUtils.cs
- ExclusiveHandleList.cs
- XmlReaderSettings.cs
- SmtpReplyReader.cs
- DateTimeFormat.cs
- CertificateManager.cs
- ElementFactory.cs
- TableLayoutSettings.cs
- PropertyItem.cs
- SparseMemoryStream.cs
- GenericUriParser.cs
- XPathSingletonIterator.cs
- ComAdminWrapper.cs
- SystemFonts.cs
- XmlUtil.cs
- XmlAttributeProperties.cs
- SHA256Managed.cs
- DataKey.cs
- MsmqOutputChannel.cs
- ResourceProviderFactory.cs
- ReflectTypeDescriptionProvider.cs
- oledbmetadatacollectionnames.cs
- WindowVisualStateTracker.cs
- LogEntryHeaderDeserializer.cs
- Decimal.cs
- MetadataUtilsSmi.cs
- ExceptionValidationRule.cs
- RtType.cs
- RowUpdatedEventArgs.cs
- CustomAttributeBuilder.cs
- ExpandCollapsePattern.cs
- BitmapEffectState.cs
- MessageBox.cs