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
- KeyGestureConverter.cs
- ImpersonateTokenRef.cs
- SettingsPropertyNotFoundException.cs
- WebEventCodes.cs
- DetailsViewUpdateEventArgs.cs
- panel.cs
- AllMembershipCondition.cs
- SrgsRule.cs
- DefaultValueConverter.cs
- FontTypeConverter.cs
- SqlFactory.cs
- Pair.cs
- Int32KeyFrameCollection.cs
- Interlocked.cs
- SqlCrossApplyToCrossJoin.cs
- Evidence.cs
- ProcessHostConfigUtils.cs
- DataSourceViewSchemaConverter.cs
- FormsAuthenticationConfiguration.cs
- HtmlImage.cs
- CallbackTimeoutsBehavior.cs
- NetCodeGroup.cs
- RequestQueryParser.cs
- DateBoldEvent.cs
- DateTimeSerializationSection.cs
- RootDesignerSerializerAttribute.cs
- BitmapEffectDrawingContextWalker.cs
- LassoHelper.cs
- PresentationAppDomainManager.cs
- QueryInterceptorAttribute.cs
- ADMembershipProvider.cs
- Size.cs
- XmlILOptimizerVisitor.cs
- DropAnimation.xaml.cs
- XmlSchemaGroup.cs
- XmlEnumAttribute.cs
- TextParentUndoUnit.cs
- DrawListViewColumnHeaderEventArgs.cs
- WindowsFormsDesignerOptionService.cs
- MemberHolder.cs
- Point3DConverter.cs
- SqlProcedureAttribute.cs
- RuntimeConfig.cs
- uribuilder.cs
- IndentTextWriter.cs
- DbConvert.cs
- UrlPath.cs
- CultureInfoConverter.cs
- PersonalizableTypeEntry.cs
- OdbcReferenceCollection.cs
- ContentType.cs
- FigureParagraph.cs
- CodeSnippetCompileUnit.cs
- SequentialUshortCollection.cs
- SpecialNameAttribute.cs
- DoubleConverter.cs
- EntityContainerEmitter.cs
- COM2ExtendedUITypeEditor.cs
- GPStream.cs
- TemplateBindingExpression.cs
- Invariant.cs
- ProfessionalColorTable.cs
- ViewStateException.cs
- BitmapScalingModeValidation.cs
- TextDecorationCollectionConverter.cs
- TextCompositionManager.cs
- DataServiceRequestOfT.cs
- CurrentTimeZone.cs
- NavigationHelper.cs
- DataTemplateKey.cs
- GlyphRun.cs
- DispatchChannelSink.cs
- Point3DCollectionConverter.cs
- XpsResourcePolicy.cs
- SQLSingle.cs
- PrincipalPermission.cs
- AnimationClockResource.cs
- WindowsListBox.cs
- DataGridViewUtilities.cs
- figurelengthconverter.cs
- DynamicDataResources.Designer.cs
- ReadOnlyAttribute.cs
- CounterCreationData.cs
- SmiEventSink.cs
- StringFunctions.cs
- CollectionChangedEventManager.cs
- BrowsableAttribute.cs
- _ScatterGatherBuffers.cs
- XmlReader.cs
- StringAnimationUsingKeyFrames.cs
- SchemaComplexType.cs
- CompilerParameters.cs
- TextStore.cs
- CodeExporter.cs
- JsonFormatReaderGenerator.cs
- WebControl.cs
- DataGridViewCellFormattingEventArgs.cs
- TranslateTransform.cs
- BStrWrapper.cs
- WorkflowPageSetupDialog.cs