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
- NameValuePair.cs
- FormViewModeEventArgs.cs
- PenCursorManager.cs
- ILGenerator.cs
- Expr.cs
- PopupControlService.cs
- Receive.cs
- ConvertEvent.cs
- MetaData.cs
- PartitionResolver.cs
- DataViewManagerListItemTypeDescriptor.cs
- PenContext.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- RelationshipManager.cs
- MarkupCompilePass1.cs
- Operator.cs
- EmissiveMaterial.cs
- LocatorPart.cs
- ApplicationCommands.cs
- NegatedCellConstant.cs
- RuleValidation.cs
- CheckBox.cs
- TripleDESCryptoServiceProvider.cs
- DocumentOrderComparer.cs
- ConnectionStringSettings.cs
- XmlSchemaObjectTable.cs
- FlatButtonAppearance.cs
- BeginStoryboard.cs
- SiteMapNodeCollection.cs
- AnonymousIdentificationModule.cs
- CreateBookmarkScope.cs
- BasicKeyConstraint.cs
- GrammarBuilderRuleRef.cs
- XMLSchema.cs
- SqlWriter.cs
- IIS7UserPrincipal.cs
- CodeDesigner.cs
- CallId.cs
- TextTreeObjectNode.cs
- WebHostScriptMappingsInstallComponent.cs
- ItemChangedEventArgs.cs
- LayoutEditorPart.cs
- FileDialogCustomPlace.cs
- XmlSerializerFormatAttribute.cs
- Stack.cs
- TreeNodeCollection.cs
- ColorAnimation.cs
- FixedNode.cs
- ControlCollection.cs
- HtmlShim.cs
- ExceptionHelpers.cs
- GeneralTransform.cs
- DateTimeOffset.cs
- BindingEditor.xaml.cs
- ThemeInfoAttribute.cs
- XmlQualifiedNameTest.cs
- CustomAttribute.cs
- KeyValuePairs.cs
- GeometryHitTestResult.cs
- Literal.cs
- Normalization.cs
- _Connection.cs
- RelationshipDetailsRow.cs
- InvalidPrinterException.cs
- EventBuilder.cs
- InputGestureCollection.cs
- PtsHost.cs
- RuleSettingsCollection.cs
- GraphicsContainer.cs
- PageAsyncTask.cs
- URLIdentityPermission.cs
- Point3D.cs
- XPathNodeIterator.cs
- Calendar.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- JavaScriptObjectDeserializer.cs
- MultilineStringConverter.cs
- MsdtcWrapper.cs
- CheckBoxBaseAdapter.cs
- TimeSpanStorage.cs
- TreeView.cs
- TypeHelpers.cs
- MetabaseSettingsIis7.cs
- QilParameter.cs
- TableTextElementCollectionInternal.cs
- XsltArgumentList.cs
- UnauthorizedWebPart.cs
- SQLDateTime.cs
- OdbcUtils.cs
- HwndStylusInputProvider.cs
- IConvertible.cs
- FrameAutomationPeer.cs
- PolicyManager.cs
- Journal.cs
- ColumnClickEvent.cs
- NetworkInformationPermission.cs
- DesignerTransactionCloseEvent.cs
- LinearQuaternionKeyFrame.cs
- MailHeaderInfo.cs
- ForceCopyBuildProvider.cs