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
- EdmToObjectNamespaceMap.cs
- DataServiceProcessingPipeline.cs
- DataErrorValidationRule.cs
- SmtpSection.cs
- XmlSchemaCollection.cs
- __TransparentProxy.cs
- CustomAttributeSerializer.cs
- Int64Storage.cs
- Oci.cs
- FormViewInsertEventArgs.cs
- Set.cs
- StorageComplexTypeMapping.cs
- codemethodreferenceexpression.cs
- EllipseGeometry.cs
- ConfigXmlText.cs
- PropertyContainer.cs
- StringFormat.cs
- SubqueryRules.cs
- EntityContainerRelationshipSetEnd.cs
- BaseTreeIterator.cs
- ComboBoxRenderer.cs
- VideoDrawing.cs
- DictionaryItemsCollection.cs
- AsymmetricSignatureDeformatter.cs
- UniqueConstraint.cs
- EastAsianLunisolarCalendar.cs
- WebPartVerb.cs
- CheckoutException.cs
- Thumb.cs
- ServiceElementCollection.cs
- DbParameterCollectionHelper.cs
- MetadataCacheItem.cs
- TempEnvironment.cs
- EdmFunction.cs
- UnsafeNativeMethods.cs
- httpstaticobjectscollection.cs
- ConnectionsZone.cs
- MutableAssemblyCacheEntry.cs
- Transform3DGroup.cs
- EditCommandColumn.cs
- StylusPlugInCollection.cs
- EventBookmark.cs
- InvalidOleVariantTypeException.cs
- CodeRemoveEventStatement.cs
- FillBehavior.cs
- Decimal.cs
- MobileCategoryAttribute.cs
- StringInfo.cs
- NegotiateStream.cs
- TableItemStyle.cs
- BitmapPalette.cs
- Validator.cs
- ComboBoxAutomationPeer.cs
- ContainerUIElement3D.cs
- DataBoundControlHelper.cs
- ObjectDataSourceMethodEventArgs.cs
- UniqueIdentifierService.cs
- GAC.cs
- SimpleWebHandlerParser.cs
- WaitHandle.cs
- DSACryptoServiceProvider.cs
- WorkflowHostingEndpoint.cs
- NativeBuffer.cs
- RC2.cs
- TextPointerBase.cs
- FileDataSourceCache.cs
- ListBox.cs
- CounterSample.cs
- Dispatcher.cs
- DbDeleteCommandTree.cs
- SchemaType.cs
- XmlTextReaderImpl.cs
- AccessKeyManager.cs
- UpDownBase.cs
- CLSCompliantAttribute.cs
- DataContractAttribute.cs
- SqlBulkCopyColumnMapping.cs
- RequestQueue.cs
- XMLDiffLoader.cs
- FlowchartSizeFeature.cs
- SplitterEvent.cs
- ReadOnlyTernaryTree.cs
- StorageBasedPackageProperties.cs
- SessionParameter.cs
- ContentType.cs
- MenuItemStyleCollection.cs
- COM2ExtendedTypeConverter.cs
- TableLayoutStyleCollection.cs
- RNGCryptoServiceProvider.cs
- TreeNodeStyleCollection.cs
- XmlSchemaSimpleContent.cs
- Facet.cs
- SBCSCodePageEncoding.cs
- COM2EnumConverter.cs
- WebResourceUtil.cs
- EFDataModelProvider.cs
- TreeViewItem.cs
- Margins.cs
- mediaeventshelper.cs
- Matrix3DStack.cs