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
- ContainerFilterService.cs
- SecureConversationDriver.cs
- XamlStream.cs
- DataObjectSettingDataEventArgs.cs
- SqlError.cs
- IdentitySection.cs
- RtfFormatStack.cs
- EntityDataSourceWrapperCollection.cs
- ArrangedElement.cs
- InternalsVisibleToAttribute.cs
- baseaxisquery.cs
- ValidationHelper.cs
- NodeLabelEditEvent.cs
- DoubleAnimationBase.cs
- TextEditorMouse.cs
- AssemblyFilter.cs
- ResXFileRef.cs
- MetadataItemSerializer.cs
- KeyPressEvent.cs
- MdiWindowListItemConverter.cs
- Site.cs
- CompilerErrorCollection.cs
- DecryptedHeader.cs
- ParentQuery.cs
- LambdaCompiler.ControlFlow.cs
- TypeConverterHelper.cs
- AlphabetConverter.cs
- BaseTemplateBuildProvider.cs
- base64Transforms.cs
- DataGridItemCollection.cs
- ScrollData.cs
- ScriptReferenceBase.cs
- DataSourceXmlSerializer.cs
- RecognizerStateChangedEventArgs.cs
- PermissionRequestEvidence.cs
- Wrapper.cs
- ToolbarAUtomationPeer.cs
- Size3DValueSerializer.cs
- WebPartMovingEventArgs.cs
- Model3DCollection.cs
- DecimalAnimationUsingKeyFrames.cs
- ByeOperationAsyncResult.cs
- ParserStreamGeometryContext.cs
- CurrentChangedEventManager.cs
- RuntimeWrappedException.cs
- SharedPersonalizationStateInfo.cs
- UntypedNullExpression.cs
- XsltArgumentList.cs
- BaseDataListActionList.cs
- ChangePassword.cs
- TouchesCapturedWithinProperty.cs
- BlockingCollection.cs
- ContextMenu.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- DataContractJsonSerializer.cs
- StaticExtension.cs
- WebHttpBehavior.cs
- ParseNumbers.cs
- DbExpressionVisitor_TResultType.cs
- ContainerFilterService.cs
- WebException.cs
- XmlCDATASection.cs
- FileRegion.cs
- StructuredTypeEmitter.cs
- CompModSwitches.cs
- TemplatePropertyEntry.cs
- TypedDataSetSchemaImporterExtension.cs
- MultiDataTrigger.cs
- OleDbParameterCollection.cs
- ExternalDataExchangeService.cs
- Partitioner.cs
- sitestring.cs
- PositiveTimeSpanValidator.cs
- CodeCatchClauseCollection.cs
- AncestorChangedEventArgs.cs
- Utilities.cs
- RectangleGeometry.cs
- XmlSchemaChoice.cs
- PrimitiveSchema.cs
- IISMapPath.cs
- DoubleUtil.cs
- RankException.cs
- DeferredBinaryDeserializerExtension.cs
- XsltContext.cs
- PnrpPermission.cs
- PathParser.cs
- PackageRelationship.cs
- XmlSerializerFactory.cs
- GrammarBuilder.cs
- KeyValuePairs.cs
- PartitionerQueryOperator.cs
- SpellerStatusTable.cs
- coordinatorfactory.cs
- NamespaceList.cs
- TextElementCollection.cs
- LingerOption.cs
- HttpProfileGroupBase.cs
- SymmetricKeyWrap.cs
- XmlAggregates.cs
- ImageFormatConverter.cs