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
- Panel.cs
- COM2ColorConverter.cs
- DataServiceHostFactory.cs
- XPathParser.cs
- CodeEntryPointMethod.cs
- ParamArrayAttribute.cs
- Win32.cs
- ResourceDescriptionAttribute.cs
- ValidatingReaderNodeData.cs
- StructuralCache.cs
- GroupBoxRenderer.cs
- PeerNameRegistration.cs
- XmlSerializerNamespaces.cs
- FunctionNode.cs
- SelectionChangedEventArgs.cs
- MiniAssembly.cs
- AttachInfo.cs
- HashStream.cs
- Monitor.cs
- HtmlInputCheckBox.cs
- InfoCardClaimCollection.cs
- VisualBrush.cs
- AuthenticationModuleElement.cs
- ClipboardData.cs
- SynchronizationContext.cs
- ContainerUIElement3D.cs
- PLINQETWProvider.cs
- ValuePatternIdentifiers.cs
- IndependentAnimationStorage.cs
- shaperfactoryquerycacheentry.cs
- CodeSnippetStatement.cs
- ProxyElement.cs
- BitmapEffectRenderDataResource.cs
- HttpGetClientProtocol.cs
- DataGridTextBoxColumn.cs
- ToolStripDropDownItemDesigner.cs
- DataGridSortCommandEventArgs.cs
- CodePropertyReferenceExpression.cs
- OrthographicCamera.cs
- TableLayoutColumnStyleCollection.cs
- WindowsToolbar.cs
- ViewPort3D.cs
- figurelengthconverter.cs
- DataControlImageButton.cs
- Wizard.cs
- SHA384.cs
- GroupLabel.cs
- StateWorkerRequest.cs
- DoubleLink.cs
- MaterializeFromAtom.cs
- CDSsyncETWBCLProvider.cs
- EntityTransaction.cs
- AuthorizationSection.cs
- FileUpload.cs
- FastEncoder.cs
- SettingsBindableAttribute.cs
- SiteMapProvider.cs
- EditorZone.cs
- DesignUtil.cs
- TextDecorationCollection.cs
- _SSPIWrapper.cs
- AddressAlreadyInUseException.cs
- PermissionListSet.cs
- XmlSchemaInfo.cs
- OrthographicCamera.cs
- ThicknessAnimationUsingKeyFrames.cs
- TypeElement.cs
- ElementNotAvailableException.cs
- HyperlinkAutomationPeer.cs
- SQLInt64Storage.cs
- HttpStreams.cs
- WebPartConnectionsConfigureVerb.cs
- IIS7UserPrincipal.cs
- ImpersonationContext.cs
- SourceChangedEventArgs.cs
- ImpersonationContext.cs
- FileDialog_Vista.cs
- InternalResources.cs
- StreamWriter.cs
- WebPartEditVerb.cs
- GridViewColumnCollectionChangedEventArgs.cs
- HttpInputStream.cs
- XPathDocument.cs
- StateItem.cs
- ExternalException.cs
- Label.cs
- CompilationUtil.cs
- ReadContentAsBinaryHelper.cs
- DbQueryCommandTree.cs
- ListViewCancelEventArgs.cs
- versioninfo.cs
- BamlTreeMap.cs
- CacheMode.cs
- AsymmetricSecurityBindingElement.cs
- DocumentEventArgs.cs
- ValidationErrorEventArgs.cs
- WebPartMovingEventArgs.cs
- ApplicationSecurityManager.cs
- ProcessProtocolHandler.cs
- WindowsFont.cs