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
- AvTraceDetails.cs
- ErrorFormatter.cs
- NetworkInterface.cs
- FixedSOMTableRow.cs
- FloatAverageAggregationOperator.cs
- ConfigXmlWhitespace.cs
- ISSmlParser.cs
- DataBoundControl.cs
- BooleanFunctions.cs
- TemplateKey.cs
- TextFindEngine.cs
- PointConverter.cs
- InfoCardProofToken.cs
- OleDbCommandBuilder.cs
- DesigntimeLicenseContext.cs
- ServicePointManager.cs
- WindowsListViewScroll.cs
- XmlComplianceUtil.cs
- PreProcessor.cs
- Solver.cs
- UnaryQueryOperator.cs
- UnsafeCollabNativeMethods.cs
- TextSyndicationContent.cs
- ArgumentReference.cs
- EncryptedKey.cs
- IPEndPointCollection.cs
- ExceptionUtil.cs
- HashCodeCombiner.cs
- coordinator.cs
- QueryResults.cs
- sqlstateclientmanager.cs
- EdmEntityTypeAttribute.cs
- WebServiceHost.cs
- PointLight.cs
- DbConnectionPoolCounters.cs
- ReadOnlyAttribute.cs
- DesignerActionVerbList.cs
- TemplatedMailWebEventProvider.cs
- HttpListenerPrefixCollection.cs
- EntityDesignPluralizationHandler.cs
- PipeConnection.cs
- BindStream.cs
- DummyDataSource.cs
- NotImplementedException.cs
- RbTree.cs
- AnnotationHighlightLayer.cs
- DESCryptoServiceProvider.cs
- EditableRegion.cs
- BulletChrome.cs
- ToolStrip.cs
- WorkflowInstanceExtensionManager.cs
- ColorMatrix.cs
- CharacterMetrics.cs
- SqlDataSourceCommandEventArgs.cs
- SqlCacheDependency.cs
- CultureTable.cs
- HttpCapabilitiesEvaluator.cs
- TdsParserHelperClasses.cs
- TrimSurroundingWhitespaceAttribute.cs
- HasCopySemanticsAttribute.cs
- Transactions.cs
- QueryExpr.cs
- TextSearch.cs
- VScrollBar.cs
- TextWriter.cs
- PaginationProgressEventArgs.cs
- SynchronizationLockException.cs
- ProfilePropertySettingsCollection.cs
- UrlPath.cs
- FileDialogPermission.cs
- GeneralTransform3D.cs
- StubHelpers.cs
- SingleAnimation.cs
- UnsafeNativeMethods.cs
- FactoryRecord.cs
- DesignConnection.cs
- VisualStyleTypesAndProperties.cs
- ColorPalette.cs
- ParameterCollection.cs
- RichTextBoxAutomationPeer.cs
- LoadGrammarCompletedEventArgs.cs
- Decimal.cs
- ISO2022Encoding.cs
- SrgsDocument.cs
- ResourcePool.cs
- ConfigurationSettings.cs
- DataListItem.cs
- SizeConverter.cs
- RubberbandSelector.cs
- SelectionItemPattern.cs
- ArrayConverter.cs
- DoubleLink.cs
- GorillaCodec.cs
- Type.cs
- FixUp.cs
- EntityTemplateUserControl.cs
- TextSpan.cs
- KeyPressEvent.cs
- XamlWriter.cs
- SqlDataSourceParameterParser.cs