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
- XmlSchemaChoice.cs
- AnnotationDocumentPaginator.cs
- ButtonColumn.cs
- Camera.cs
- HttpServerUtilityWrapper.cs
- ButtonField.cs
- DataBoundControl.cs
- FontInfo.cs
- MimeWriter.cs
- ErrorFormatterPage.cs
- RegistryDataKey.cs
- smtppermission.cs
- ImageCreator.cs
- SafeThreadHandle.cs
- PlanCompilerUtil.cs
- SmtpFailedRecipientException.cs
- SecurityTokenSerializer.cs
- StrokeIntersection.cs
- ExpressionBuilder.cs
- TraceSource.cs
- XmlCustomFormatter.cs
- Canonicalizers.cs
- FontInfo.cs
- StringResourceManager.cs
- SQLBytesStorage.cs
- Stack.cs
- __Filters.cs
- wgx_exports.cs
- StorageBasedPackageProperties.cs
- ExceptionHandlerDesigner.cs
- DataGridViewCellLinkedList.cs
- HostProtectionPermission.cs
- XmlStreamNodeWriter.cs
- FontNamesConverter.cs
- ProfileBuildProvider.cs
- KeyValueConfigurationCollection.cs
- Assert.cs
- XmlAggregates.cs
- LayoutEngine.cs
- Line.cs
- SessionPageStateSection.cs
- WebPartVerbsEventArgs.cs
- PropertyMapper.cs
- DataPagerCommandEventArgs.cs
- ProviderUtil.cs
- TemplateContainer.cs
- RotateTransform3D.cs
- PersonalizationEntry.cs
- Calendar.cs
- SchemaImporter.cs
- OdbcStatementHandle.cs
- ScrollChrome.cs
- XmlEncoding.cs
- DataControlField.cs
- ConfigXmlElement.cs
- DocComment.cs
- DocumentViewerHelper.cs
- DataGridViewRowPrePaintEventArgs.cs
- DiscoveryMessageProperty.cs
- DataGridViewCellMouseEventArgs.cs
- COM2FontConverter.cs
- WebPart.cs
- TextHidden.cs
- ObjectContext.cs
- MouseGestureConverter.cs
- SqlFlattener.cs
- IgnoreSection.cs
- Menu.cs
- TextControlDesigner.cs
- BindingSource.cs
- HttpModulesSection.cs
- RSAPKCS1SignatureFormatter.cs
- WorkflowFileItem.cs
- XslTransform.cs
- WebPermission.cs
- ScrollEvent.cs
- StackSpiller.Generated.cs
- XsdDateTime.cs
- DataBindingHandlerAttribute.cs
- MenuItemStyleCollection.cs
- ButtonAutomationPeer.cs
- BinaryConverter.cs
- ValidationSummary.cs
- Animatable.cs
- SchemaElement.cs
- ObjectDataSourceDisposingEventArgs.cs
- HashSetEqualityComparer.cs
- SHA512CryptoServiceProvider.cs
- elementinformation.cs
- DocumentApplicationJournalEntry.cs
- RotateTransform3D.cs
- DesignerEditorPartChrome.cs
- RegistryPermission.cs
- SqlClientMetaDataCollectionNames.cs
- CompilerGeneratedAttribute.cs
- RectAnimationUsingKeyFrames.cs
- AlgoModule.cs
- HttpContext.cs
- InstanceData.cs
- CodeTypeDeclaration.cs