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
- ResourceReferenceExpression.cs
- DoubleCollectionConverter.cs
- ConnectionPoint.cs
- ProcessHost.cs
- ServiceNameElement.cs
- ExpandSegmentCollection.cs
- ViewStateModeByIdAttribute.cs
- ComponentCollection.cs
- TypedDatasetGenerator.cs
- BindingMAnagerBase.cs
- PolyQuadraticBezierSegment.cs
- TextMetrics.cs
- SiteMapProvider.cs
- dtdvalidator.cs
- ChildTable.cs
- PopupEventArgs.cs
- HttpWrapper.cs
- HandlerFactoryWrapper.cs
- DataGridViewCellPaintingEventArgs.cs
- BookmarkEventArgs.cs
- CustomMenuItemCollection.cs
- PeerObject.cs
- OperationParameterInfoCollection.cs
- XsdValidatingReader.cs
- WindowsRichEdit.cs
- _NtlmClient.cs
- HtmlControl.cs
- MarkerProperties.cs
- DbParameterCollection.cs
- RawKeyboardInputReport.cs
- TdsParameterSetter.cs
- JsonServiceDocumentSerializer.cs
- MailWriter.cs
- KeyPullup.cs
- MsmqMessageProperty.cs
- DataBinder.cs
- BitmapEffect.cs
- HtmlProps.cs
- Helper.cs
- XmlSchemaSimpleTypeList.cs
- UnmanagedMemoryStream.cs
- FontNamesConverter.cs
- ConfigurationManagerHelperFactory.cs
- CollectionViewGroupRoot.cs
- MailFileEditor.cs
- JsonReader.cs
- TlsSspiNegotiation.cs
- WebHttpSecurityModeHelper.cs
- BamlLocalizationDictionary.cs
- ContextMenu.cs
- SectionRecord.cs
- Walker.cs
- FormClosingEvent.cs
- LoggedException.cs
- SystemUdpStatistics.cs
- RegexStringValidator.cs
- TreeNodeCollection.cs
- CompositeDuplexElement.cs
- RootBrowserWindowProxy.cs
- CircleHotSpot.cs
- WebBrowserPermission.cs
- DrawingGroup.cs
- DiscoveryDocumentSerializer.cs
- XPathDocumentIterator.cs
- BoolLiteral.cs
- MessageDescriptionCollection.cs
- InlineUIContainer.cs
- XmlTextAttribute.cs
- SoapDocumentServiceAttribute.cs
- WebService.cs
- LoopExpression.cs
- XmlKeywords.cs
- XXXOnTypeBuilderInstantiation.cs
- DocumentGridPage.cs
- PeerInvitationResponse.cs
- ITextView.cs
- WinFormsComponentEditor.cs
- DataGridViewIntLinkedList.cs
- InstanceBehavior.cs
- HostedTcpTransportManager.cs
- OdbcDataAdapter.cs
- ProcessModelInfo.cs
- OutOfMemoryException.cs
- DataServiceException.cs
- PeerName.cs
- XsltContext.cs
- RequiredFieldValidator.cs
- SrgsGrammarCompiler.cs
- CustomSignedXml.cs
- StringToken.cs
- updatecommandorderer.cs
- RepeaterItem.cs
- KeyMatchBuilder.cs
- Walker.cs
- ObjectSet.cs
- SwitchLevelAttribute.cs
- WebPartUtil.cs
- StackBuilderSink.cs
- WebBrowserProgressChangedEventHandler.cs
- SerializationException.cs