Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //----------------------------------------------------------------------------- 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
- DataObjectSettingDataEventArgs.cs
- safemediahandle.cs
- Model3D.cs
- InfoCardAsymmetricCrypto.cs
- ReadOnlyCollectionBase.cs
- WithStatement.cs
- DesignerLinkAdapter.cs
- XmlName.cs
- SQLConvert.cs
- MetadataArtifactLoaderCompositeResource.cs
- LoginCancelEventArgs.cs
- WindowsScroll.cs
- ThumbButtonInfoCollection.cs
- FreezableDefaultValueFactory.cs
- PageSettings.cs
- BreakRecordTable.cs
- MatrixCamera.cs
- ObjectList.cs
- SiteMapNodeItem.cs
- Timeline.cs
- SqlCrossApplyToCrossJoin.cs
- DateTimeConverter.cs
- DBCommand.cs
- ToolStripItem.cs
- EventSetter.cs
- AsyncDataRequest.cs
- StorageEntitySetMapping.cs
- IListConverters.cs
- ItemType.cs
- FrameworkElementFactoryMarkupObject.cs
- Effect.cs
- IpcManager.cs
- EntityContainerEntitySet.cs
- CultureSpecificCharacterBufferRange.cs
- ColorMatrix.cs
- SecurityStandardsManager.cs
- DataGridViewCellValidatingEventArgs.cs
- NamespaceQuery.cs
- TraceContextEventArgs.cs
- SingleSelectRootGridEntry.cs
- ResourceContainer.cs
- ParameterToken.cs
- DesignerObjectListAdapter.cs
- DataView.cs
- InstancePersistenceCommand.cs
- DataGridViewLinkCell.cs
- StylusPointDescription.cs
- CompilerErrorCollection.cs
- TabPanel.cs
- ItemsControl.cs
- FolderBrowserDialog.cs
- Events.cs
- Int32CAMarshaler.cs
- SolidColorBrush.cs
- SqlClientPermission.cs
- PrimitiveType.cs
- ProfileSettings.cs
- EntityDataSourceEntityTypeFilterItem.cs
- DbDeleteCommandTree.cs
- UpdateCommand.cs
- TextBoxBase.cs
- DataGridRelationshipRow.cs
- XmlSchemaInferenceException.cs
- Crc32.cs
- XPathDocumentIterator.cs
- BitmapMetadataEnumerator.cs
- ListDictionaryInternal.cs
- RoleGroup.cs
- RecognizerBase.cs
- InfoCardTrace.cs
- SslStream.cs
- PropertyAccessVisitor.cs
- Focus.cs
- TextBoxView.cs
- RequestCacheEntry.cs
- DiagnosticsConfigurationHandler.cs
- MULTI_QI.cs
- HashCodeCombiner.cs
- BindingEditor.xaml.cs
- DbException.cs
- IImplicitResourceProvider.cs
- TreeNode.cs
- BaseCodePageEncoding.cs
- CaseStatement.cs
- ConditionCollection.cs
- ConsumerConnectionPoint.cs
- Rule.cs
- DisplayInformation.cs
- Size.cs
- RangeBaseAutomationPeer.cs
- SessionEndedEventArgs.cs
- ConfigUtil.cs
- SubtreeProcessor.cs
- StorageEntityContainerMapping.cs
- HtmlEncodedRawTextWriter.cs
- TypeForwardedFromAttribute.cs
- DataGridPageChangedEventArgs.cs
- CaseInsensitiveOrdinalStringComparer.cs
- Delay.cs
- XNodeNavigator.cs